Why Your Servers are Not Important Anymore

Image from Amazon AWS
Image from Amazon AWS

Unlike the old days that you had to build server from scratch and spend hours to install the software, patch the servers and  setup the static configuration (IP, Name, …), in cloud computing, you can dynamically create lots of servers with all the required components and configurations pre-deployed; As a result:

Your servers become just a temporary computing resources to do the processing for you.

Any update, patching or fix required for the server, not a problem in the cloud! The old server will be removed and replaced with a new updated, patched and healthier version.

So making your servers as Disposable Compute Resource is one of the Principles of Architecting in the Cloud; But how to convert the time-consuming task of a server build to a smooth reusable task/ process?

 

Bootstrapping

Even with the dynamic provisioning of resources in the cloud, your servers still come with a default configuration and installed applications. Bootstrapping is:

Pushing some script to the server to customise your OS from top to bottom including installing and setting up a piece of software.

There are multiple ways to bootstrap servers:

  • You can push power shell /bash scripts to the server, or
  • You may use configuration management tools like Puppet or Chef recipes;
  • Cloud-init and user data scripts are also other ways to auto-config servers during the boot process.
  • AWS CloudFormation and AWS OpsWork are two main tools in AWS that can help you bootstrap your server

 

Golden Images

If you need some faster approach with fewer dependencies on external components, you can apply all your nice customization to a server and prepare it to be your golden image.

Now with your golden image, you can deploy as many servers as you want from your image which includes all the pre-build software and configurations.

 

Hybrid (Bootstrapping & Golden Image)

You can use the combination of the two methods to get the best out of your auto provisioning. The question is when/where to use each method over another!? It all depends on your deployment but as a general rule:

  • Things that are less likely to change between your instances (i.e, software installations) are best items to be put in your golden image; Installing software even automatically can be a time-consuming job.
  • On the other hand, things that are more likely to change in different deployments better to be deployed by bootstrapping. (i.e, Minor software updates and application specific configuration like database configuration.)

The good example of this is AWS Elastic Beanstalk that provides pre-configured servers with all the required software but lets you also use bootstrapping to customise your environment variables.

 

Bootstrapping, Golden Image or the combination of the two, are part of Server Instantiating Approach by which you make your server provisioning an automated/repeatable process.

Let’s move one step forward on this. What if you want to extend your automation job beyond your servers and make your entire infrastructure acting as  programmable resources that itself can be converted to a reproduced  process.

 

Infrastructure as Code

When you transform your whole infrastructure to codes, a new window of possibilities opens to you:

Anything that can be converted to software, can be programmed, and anything that can be programmed can be reused,reproduced and automated.

An example of a tool that can help you move towards to an infrastructure as code enabled environment is AWS CloudFormation; With AWS CloudFormation you can create, manage and develop your AWS resource as codes (Networks, Load Balances, Security Policies, ….); Multiple AWS resources can be programmed together and attached to your application to enable creating a reusable end-to-end environment including your server resources as well as your infrastructure resources.

 

Leave a comment

Your email address will not be published. Required fields are marked *