Page 42 - MSDN Magazine, October 2017
P. 42
CLOUD DEVELOPMENT
Building Better
Cloud Deployments:
5 Steps to Immutability
Martin Albisetti
Cloud delivery has emerged as the accepted standard for Web service deployment, whether those services reside on public or private cloud infrastructures. While cloud promises on-demand availability, automation and agility, not all Web services are designed to take full advantage of these promises. Unpredictable cloud infra- structure and agile DevOps cycles have created a need for isolated software components, which enable rapid movement through testing, development and production of Web services in the cloud.
At Bitnami, we’ve been living and breathing the evolution of soft- ware deployment for a very long time, and we’ve invested heavily in making it easy for developers to embrace the best deployment techniques available. One technique is the concept of immutable infrastructure, which is an approach to managing services and software deployments in a way that components are replaced rather than changed. In effect, an application or service is redeployed each time any change occurs.
Pets Versus Cattle
Randy Bias, founder of the OpenStack Foundation, coined the anal- ogy of pets versus cattle to represent this. Traditional servers are treat- ed like pets. They have their own personalities, and if they get sick you nurse them back to health. Cattle, on the other hand, all look the same. If they get sick you just get rid of them. It costs you more to treat cattle than to replace them. Also, cattle scales. A farmer will add to the herd as the operation grows, based on demand and budget.
Clouds provide just enough functionality to let you continue treating your servers as pets. The problem is, they’re pet goldfish. It’s boring. If the pet gets sick, you might be able to treat it, but vets will usually laugh at you if you try. The fish will often be unrespon- sive and will die at any time without warning.
This is why immutable (or image-based) deployments and using public or private clouds usually go together. If you want to confi- dently run production-grade Web services in the cloud, it’s time to set aside pet ownership and deploy infrastructure and software that can be easily reproduced or replaced. Like cattle.
To understand the subtleties in this approach, let’s consider the pros and cons of using clouds. Clouds offer benefits that used to be prohibitively expensive to achieve with private infrastructure. In addition to worldwide redundancy and fast delivery by serving content geographically close to users, cloud deployments enable elasticity. IT organizations can call upon resources as they’re needed, paying only for what they use at any time. This on-demand model also makes it easy to experiment with new technologies and topol- ogies without steep, up-front investments.
This article discusses:
• Isolating layers of code infrastructure, including OS, runtime framework and application code
• Adapting workflows to automate and improve immutable image deployment
• Optimizing for stateless scenarios such as worker farms, caching systems or static Web sites
Technologies discussed:
Cloud Services, Configuration Management Software
38 msdn magazine