Let's talk about the dynamic provision nature of cloud computing. It's like having a magic wand that can create servers out of thin air! But seriously, it means that we need to think of system resources as temporary because we can launch as many servers as we need and use them for as long as we need. When a server crashes or a new configuration needs to be applied, we can replace the running server with a new one. This helps with easier rollbacks and is suitable for stateless architectures.
Now, whether we're deploying a new environment or increasing the load capacity of an existing one, we want to automate this repeatable process. Here are a few ways to do it:
Bootstrapping: Usually, resources are launched with default configurations. Once that's done, we can execute automated bootstrapped actions, which are scripts that install software or copy data to bring a resource to a particular state. It's like having a personal assistant who sets up your workspace just the way you like it.
Golden Images: Golden images are snapshots of a resource in a particular state. For example, we can create snapshots of VMs at particular states and restore to that state in the future. Golden images result in faster times compared to bootstrapping. You can launch AWS EC2, EBS, or Amazon RDS DB instances from golden images. It's like having a Polaroid picture of your favorite moment, ready to be printed and hung on your wall.
Containers: A container is a standard unit of software that packages up code and all its dependencies so that the application runs quickly and reliably from one computing environment to another. It's like having a portable lunchbox for your code. Docker allows us to package a piece of software in a Docker image, which becomes containers at runtime. It's like having a lunchbox that can magically transform into a dining table when you open it.
Hybrid Approach: Depending on the application and use case, we can employ both bootstrapping and golden images for the dynamic provision of resources. It's like having both a personal assistant and a Polaroid camera, why not have the best of both worlds!