The Rise and Rise of Pop-up Labs in the Cloud
Young children read pop up books; books whose pages pop up in to some form of structure for the child to admire and then pop back in again when the page is turned. As the page is turned it produces a different structure. Perhaps the first one was a lion or a space-rocket. The next page would probably be a tiger or a lunar module.
Pop-up labs (PULs) use the same idea. They are pre-formed IT lab environments that you pop-up when you need them, and you pop-down when you’re finished. Sometimes you’ll have them up and running for an hour, sometimes for a few days. The point is they are available wherever you have a connection to the Internet. You can use them from your office, from home, from a client’s location, on your laptop, your tablet, even your phone.
A lot of IT folks and developers don’t realise you can build these environments and run some pretty sophisticated apps and infrastructure for free. Without having to pay for hardware, networking, storage, rack-mounted servers and so on.
Why would you even want to build a series of pop-up labs in the first place?
Well, you could look at it from the purely selfish point of view of having a safe and PRIVATE (it just belongs to you) IT environment to enhance your skills and therefore look after your career development. You could get crazily experimental in a sandboxed environment that you own and try things you’d never try in a corporate lab.
Or maybe you are responsible for the on-the-job training of your team. Being able to pop-up a lab for the duration of any training session you devise, or even, popping up several labs and giving your students the freedom to learn by making the kind of mistakes that would never be tolerated in a production or even corporate lab environment.
Maybe you’d want to go really big with this. Let’s say you have an application consisting of 50 servers in the production environment. You’ve been working on a new configuration or some new code and it needs to be tested before it’s deployed in to production. Your corporate test environment will probably be a smaller version of the production environment, with each server performing multiple server roles. With a pop-up lab you can literally build a full-size, fully-functional replica of your production environment and accurately synthesize what would happen for real with your new code or configuration.
This is how it works. We’ll take a couple of simple examples. The first one is a Sharepoint infrastructure, the next one is a multi-tier application you have built yourself.
For the Sharepoint infrastructure you’ll need Active Directory and SQL Server. Let’s say you’ll create 2 Active Directory Domain Controllers, a 2 node Sharepoint Farm and a single SQL Server. A total of 5 servers. Where are all these servers going to come from? We’re going to use a trick to get them for free in the cloud. I’ll explain the trick at the end, but here are the initial steps:
1. Sign-up for a free Windows Azure trial subscription. Or if you already have one, skip this step. You can get a subscription at this URL:
https://aka.ms/DevWeekOffer. You’ll need a Live ID and a credit-card for identity verification but you won’t be charged: your spending limit will be set to zero. If at some stage you want to really go big on this and build an enormous lab in which you will be doing testing 24-hours a day for several weeks, then you can choose to remove the spending limit but in most cases we’d only be talking small amounts of money with server compute charged at as little as 2 cents per hour – that’s just over 1 uk penny per hour.
2. Log on to the Windows Azure portal and create a Virtual Network. This is a network that is private to you. It’s isolated from other customers’ environments. If you need to, you can also connect it to your on-premises network if you have a VPN device.
3. Use the portal to create 3 Windows 2012 Servers giving them suitable names – such as ADDC1, ADDC2, SQL1. Log in to each one in turn and enable Windows Update and ensure they are fully-updated.
4. Create a 4th Windows 2012 Server and name it SPBaseImage
5. Log on to ADDC1 and then install Active Directory. Let’s imagine this domain is called plankytronixx.com.
6. Once finished, install AD onto ADDC2 joining it to the same domain – plankytronixx.com in this example.
7. Domain-join the SQL Server (to plankytronixx.com in this example) and set up SQL Security to use a domain account.
8. Install the Sharepoint binaries on to the sharepoint machine and then sysprep it.
9. Use the portal to CAPTURE the image and save it as an image in your image library.
10. Use the Azure portal to create 2 sharepoint servers from your sharepoint image. Join them to the domain (plankytronixx.com) and create them in to a sharepoint farm specifying the domain and SQL server you have already created.
11. You have now built a 5-server sharepoint pop-up lab. When you have finished with it you can either shut down each server in turn and delete it, or develop a powershell script to automate the deletion process for you.
12. Next time you need the environment, log in to the portal and specify to boot from the disks you have already created. They will boot in to the environment you have already created.
This is not like a hosting environment where you take out a contract for say 12, 24 or 36 months and are charged for your Virtual Private Server whether you have it booted up or not. In this environment you are charged per hour for the servers you run. Here’s the trick to get free resources:
1. You get 750 hours of a small server instance per month for free in your trial subscription There are 744 hours in a 31-day month, meaning you could run that server for 24 hours per day without charge. The word “small” simply refers to the power of the server. A medium server has twice as much RAM and twice as many cores, and so it goes on doubling all the way up to an extra-large server which has 8 cores and 14GB RAM. There is another server size – we actually call them “instances” – the extra small instance. It has a single core and only 768MB RAM, but that’s perfectly adequate for certain server workloads. The thing a lot of people don’t realise is that all hours that are used are converted to small instance hours. You can get six times as many hours if you run an extra-small instance than if you run a small instance. If you run a medium instance you only get half as many hours. But you only pay, per hour, for the time you have those servers deployed. Because you have 750 hours in a month to play with, it means in that 5 server Sharepoint infrastructure you just built could be run for 150 hours. Some quick maths on that shows in a 4 week month you could run it for 37.5 hours per week. That’s a working week. As long as you provision and de-provision your environment at the beginning and end of each day, you could, for example, run a 1 week training course. For free. But let’s imagine you want to create several parallel environments for small groups of your students to work on. 37.5 hours * 5 servers is just over £15 per week per environment. Depending on your needs it’s either free or a very inexpensive way to run a lab. Each environment can be popped up and popped down whenever required.
If you have built your own multi-tier application things are even simpler. Again, we use the cloud to pop-up and pop-down environments when they are needed and only for the hours they are needed – just like in the SharePoint example. But we’ll use the Platform as a Service or PaaS features of Azure. This separates the application from the underlying infrastructure. Here are the steps:
1. As with the Sharepoint example, sign-up for a free Windows Azure trial subscription. Or if you already have one, skip this step. You can get a subscription at this URL:
https://aka.ms/DevWeekOffer. You’ll need a Live ID and a credit-card for identity verification but remember you won’t be charged.
2. Fire up Visual Studio and create the Windows Azure app using the Windows Azure SDK. If you want to learn more about how to do this, we run free regular training camps in the UK at this URL:
3. You’ll get 2 outputs – the package or .cspkg, that contains your code. And the service model which is basically an XML description of the environment your app will run in – for example it specifies how many servers exist in the web front end, how many servers exist in the middle-tier, what size instances they are, what ports you want to connect to the Internet, how load balancing will work, what ports are used for internal communication and so on….
4. Save these outputs. Whenever you want to provision an environment you simply change the size of the environment by adjusting the instance count in the service model. Then use the Windows Azure portal to submit these 2 files.
5. Your environment will take about 8 to 15 minutes to be deployed.
6. All the same free and billing rules apply. Say if it consists of a web tier with 3 servers and a middle tier with 2 servers – that’s a 5 server environment and you already know you can deploy that for a working week every week for a 4 week month for free. But even if you want to deploy multiple versions of the environment in parallel with each other, say for training small groups, it would only cost just over £15 per week for the compute resources. The trick is to ensure you deploy at the beginning of the working day and undeploy at the end of the day.
You can exploit the way cloud billing works by careful selection of the time periods, number and size of servers you deploy to make sure you don’t exceed 750 small-instance hours per month for the 90 days of your trial subscription. You could run a single small instance 24 hours per day for a month. You could run 6 extra-small instances 24 hours per day for a month. I guess theoretically you could run 750 small instances for one hour or even 4,500 extra small instances for one hour, before incurring compute charges. This flexibility in billing gives you the opportunity to create pop-up labs that exist for the time-period you need them for but even if you need to create larger environments or multiple environments that take you over your billing threshold, they are still inexpensive to run because you only pay for what you use.
Remember you can sign up for a free trial subscription at https://aka.ms/DevWeekOffer.
Build your pop-up labs today so they are there, ready and prepared for the next time you need to pop them up. Increasing numbers of IT Pros and Developers are using pop-up labs for self-training and career advancement. Independent consultants are now taking on engagements with a number of standardised pop-up labs they can use at a moment’s notice with their clients. Salespeople are using them to demonstrate full-blown, fully functional environments – all delivered over the Internet.
There’s no reason why you can’t also be part of the pop-up lab movement.