#2

Deployment automation & infrastructure as code:

Ultimate efficiency in cloud computing

The benefits of automatic configuration and provisioning by Stefan Bauer, The unbelievable Machine Company

#2

If a company wants to offer online digital services – such as a webshop, or even a simple website – through a "traditional" on-premise, locally hosted environment, there are countless factors to consider. Server/infrastructure and software procurement, setup, organization, and operation all require significant financial investment, manpower, and time, which can ultimately limit the scope of the actual solution and the delivery of the service.

Switching to a cloud-based solution eliminates this protracted setup phase and all of the complex work it involves. Readily available servers and infrastructures are tailored to the customer's needs, providing a scalable solution under a transparent, use-dependent cost structure.

The next challenge is to ensure that these benefits are utilized as effectively as possible. Once a company has decided to run its systems, or parts of its systems, in the cloud, it is a good idea to think about automating the associated processes of provisioning and configuration.

Cloud automation out of the box In the context of the cloud, the concept that we refer to as cloud automation is part of cloud management: Providers such as (AWS), , and the offer solutions that can be deployed in just a few clicks. These solutions generally include a self-service portal for users, dashboards for users and administrators, and service and app catalogs.

The tools automate management actions to relieve administrators of the burden of repetitive standard tasks and to permit the more flexible use of cloud resources. Installation and setup take place manually. However, the ultimate goal is to make effective and efficient use of cloud technology – so we recommend switching to automated application provisioning and configuration too.

2 #2

The crux of the matter: Cloud deployment automation As with traditional deployment automation, cloud deployment automation involves automatically installing and configuring a new application – whether on an existing or new infrastructure – using scripts and tools. Via a self-service function, the user requests specific applications using cloud resources. These applications are then rolled out and configured in an automated process.

For ultimate efficiency and effectiveness, the solution can be taken one crucial step further – by deploying a program (in the form of code) that fully automates the entire process.

The key: Infrastructure as code Infrastructure as code (IAC) is defined as the use of code for the automatic provisioning, administration, and rollout of servers and applications. The code reflects both the IT infrastructure (servers, storage, and networks) and the setup of the actual applications. For this reason, IAC is also referred to as a "programmable infrastructure".

The basic concept relies on script programming methods similar to those deployed for scripts that are intended to automate elementary processes in IT applications. However, scripts are primarily used to automate a sequence of static steps.

IAC goes far beyond this basic goal: The code not only includes outcomes for commands, but entire "recipes" – to use terminology from automation solution 'Chef'. As the concept is based on code, all of the latest software development technologies and methods can be incorporated into the programming and transferred across to infrastructure level.

Automation in the cloud via a programmable interface (API) creates a framework in which a previously haptic infrastructure – which would have been associated with a complex setup process – can be visualized, implemented, and continually developed from within a software package. For the first time, IAC enables users to benefit from continuous integration, in an ongoing cycle (or test cycle) of infrastructures, configurations, and redeployments.

As all processes are recorded and automated in code, the entire sequence of system and software setup and provisioning actions can be completed quickly and, more importantly, as often as required: Users can now create ten or more websites at once rather than a single service or site, or publish one site on various test platforms.

With the appropriate tools at your disposal, this process is simple, effective, and profitable. The ability to test the entire provisioning setup helps to prevent errors, facilitates planning, and enables you to continually improve processes along the entire chain.

3 #2

The tools Infrastructure as code (IAC) is a key element of effective cloud computing and cloud deployment automation. There are a number of tools available that allow you to deploy IAC, enabling you to provide resources via a cloud API and to automate system configuration. We've outlined some of these tools below:

Puppet is one of the most established automation tools. This Ruby-based program is used to configure multiple computers via a network. The Puppet agent obtains the target status of the server and the application via the Puppet master network and ensures that the defined target status is reached, enabling Puppet to achieve a high degree of convergence in the target and actual states within the systems. The target state is defined as a "resource" in a "manifest". Resources may include the installation of a piece of software (Package), data synchronization across files (File), or the execution of programs (Service). Using this Package/File/Service pattern makes it easy to install, configure, and start applications and system services.

The code is written in Puppet DSL (domain-specific language) and packaged in "modules". The sequences and preconditions are also defined in the DSL. More complex modules can be implemented via Ruby, allowing the system to be expanded as required without limitations.

Ansible is a Python-based open-source configuration and orchestration tool. The target state and the steps required to achieve this state are defined as "tasks" in "playbooks". Ansible does not have its own language; instead, the tool uses the YAML format. The individual configuration modules are bundled into "roles", which are also written in YAML. More complex modules may also be written in other programming languages.

Ansible relies on the push principle and does not require any agents on the target system. This means that the solution can be deployed immediately without any other conditions needing to be fulfilled; the tool is capable of orchestrating complex processes without additional tools. Via Ansible, IAC can be used to install a MySQL server and verify that MySQL has been executed correctly; it can create a user account and password, set up a new database, delete any databases that are no longer required, and activate a maintenance page during execution. All of these actions are programmed as code.

4 #2

Chef is a Ruby-based automation platform that converts complex system configurations into code – either in the cloud, on-premise, or in mixed form. Chef is based on a simple concept involving automatic achievement of the required system state, central modeling of the IT infrastructure, and basic resource elements that function as building blocks for the future use of the system. The automation logic is written as a "recipe".

Saltstack (or Salt for short) is a Python-based open configuration tool. Salt allows you to install and configure software packages and execute any configuration command from a central computer on multiple managed servers. The tool is provided under an Apache license and runs, in principle, on any platform, but was designed specifically for use with Unix-like operating systems such as Unix, , or FreeBSD.

Terraform is a platform-independent infrastructure provisioning tool that focuses on the initial setup of networks, storage, VMs, security policies, and a range of IaaS services from various cloud providers. The tool is provided by Hashicorp and written in Go. Terraform is an easy-to-use template creation tool that provides a good overview of infrastructure updates and deployments.

Conclusion Cloud computing provides easy access to IT resources and allows these resources to be utilized and scaled in line with individual needs, under a transparent cost structure. The extensive work involved in procurement, setup, and organization for local, on-premise solutions is no longer required, and the workload associated with ongoing operation is reduced to an absolute minimum.

To gain maximum benefit, it is a good idea to automate the standard processes and the provisioning and configuration of systems, and to reflect the IT infrastructure and the applications in a program (code) for fully automated provisioning, administration, application rollout, and the associated test procedures.

As key elements of modern cloud computing, cloud deployment automation and infrastructure as code (IAC) enable you to unlock the full potential of this technology.

5 #2

Contact

The unbelievable Machine Company GmbH Philipp Schlueter (Marketing & Sales) Grolmanstr. 40 D-10623 Berlin Germany +49 (0) 30 88926560 [email protected] www.unbelievable-machine.com

6