Understanding Infrastructure as Code. By Michael Wittig and Andreas Wittig

Similar documents
AWS CodePipeline. User Guide API Version

Building Success on Acquia Cloud:

DevOps Course Content

Cloud Computing. Adam Barker

Amazon Elastic Beanstalk

AWS Schema Conversion Tool. User Guide Version 1.0

Automated CPanel Backup Script. for home directory backup, remote FTP backup and Amazon S3 backup

Chef Integration. Chef Integration. with IDERA s Uptime Cloud Monitor. Simple, Smart, Seamless May 10, 2013 IDERA

Getting Started with AWS. Hosting a Static Website

Modern Web development and operations practices. Grig Gheorghiu VP Tech Operations Nasty Gal

EXTENDING SINGLE SIGN-ON TO AMAZON WEB SERVICES

Building a big IaaS cloud with Apache CloudStack

AWS Data Pipeline. Developer Guide API Version

Cloudera Manager Training: Hands-On Exercises

Drupal CMS for marketing sites

OnApp Cloud. The complete platform for cloud service providers. 114 Cores. 286 Cores / 400 Cores

OVERVIEW. The complete IaaS platform for service providers

OpenTOSCA Release v1.1. Contact: Documentation Version: March 11, 2014 Current version:

Introduction to Cloud Computing

Last time. Today. IaaS Providers. Amazon Web Services, overview

What it is and why you might use it

Proactive database performance management

Alfresco Enterprise on AWS: Reference Architecture

Development at the Speed and Scale of Google. Ashish Kumar Engineering Tools

Cloud Computing with Amazon Web Services and the DevOps Methodology.

Windows Intune Walkthrough: Windows Phone 8 Management

AWS Schema Conversion Tool. User Guide Version 1.0

Cloud Computing and Open Source: Watching Hype meet Reality

Continuous Delivery on AWS. Version 1.0 DO NOT DISTRIBUTE

TECHNOLOGY WHITE PAPER Jun 2012

SOA Software API Gateway Appliance 7.1.x Administration Guide

Cloud computing - Architecting in the cloud

GRAVITYZONE HERE. Deployment Guide VLE Environment

XpoLog Center Suite Data Sheet

Cloud Computing. AWS a practical example. Hugo Pérez UPC. Mayo 2012

OpenShift on you own cloud. Troy Dawson OpenShift Engineer, Red Hat November 1, 2013

JAVA IN THE CLOUD PAAS PLATFORM IN COMPARISON

Overview. The OnApp Cloud Platform. Dashboard APPLIANCES. Used Total Used Total. Virtual Servers. Blueprint Servers. Load Balancers.

Getting Started with Google Cloud Platform

Getting Started with AWS. Hosting a Static Website

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Creating a DUO MFA Service in AWS

Cloud Models and Platforms

Introduction to DevOps on AWS

1 Download & Installation Usernames and... Passwords

PaaS Operation Manual

Getting Started with AWS. Static Website Hosting

Technology and Cost Considerations for Cloud Deployment: Amazon Elastic Compute Cloud (EC2) Case Study

Install and Config For IBM BPM 8.5.5

TECHNOLOGY WHITE PAPER Jan 2016

Introduction to Network Virtualization in IaaS Cloud. Akane Matsuo, Midokura Japan K.K. LinuxCon Japan 2013 May 31 st, 2013

Jfokus PaaS Hands-On Lab

Deploying Business Virtual Appliances on Open Source Cloud Computing

Managing Multi-Tiered Applications with AWS OpsWorks

Zend Server Amazon AMI Quick Start Guide

Tcl and Cloud Computing Automation

NGASI Universal APP Panel Administration and User Guide WebAppShowcase DBA NGASI

HC INSTALLATION GUIDE. For Linux. Hosting Controller All Rights Reserved.

Installing and Configuring vcloud Connector

CI Pipeline with Docker

IBM Cloud Manager with OpenStack

GeoInt 2015 Watson Workshop

IAN MASSINGHAM. Technical Evangelist Amazon Web Services

Users Guide. Zenoss, Inc. Release

AppGate XDP v2.0 Installation from ISO into Virtual Box Hypervisor

Practical Load Balancing

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Cloud Computing WHAT IS CLOUD COMPUTING? 2

Workflow Automation Support and troubleshooting guide

Migration Scenario: Migrating Backend Processing Pipeline to the AWS Cloud

HP Client Automation Standard Fast Track guide

UBUNTU DISK IO BENCHMARK TEST RESULTS

Apache Stratos (incubating) M5 Installation Guide

AdWhirl Open Source Server Setup Instructions

Integrating CoroSoft Datacenter Automation Suite with F5 Networks BIG-IP

Deploy XenApp 7.5 and 7.6 and XenDesktop 7.5 and 7.6 with Amazon VPC

Also on the Performance tab, you will find a button labeled Resource Monitor. You can invoke Resource Monitor for additional analysis of the system.

Open is as Open Does: Lessons from Running a Professional Open Source Company

Moving to Plesk Automation 11.5

Docker : devops, shared registries, HPC and emerging use cases. François Moreews & Olivier Sallou

2) Xen Hypervisor 3) UEC

User and Programmer Guide for the FI- STAR Monitoring Service SE

Tibbr Installation Addendum for Amazon Web Services

Testing & Assuring Mobile End User Experience Before Production. Neotys

ACCELERATE DEVOPS USING OPENSHIFT PAAS

DVS-100 Installation Guide

Build Your Own Performance Test Lab in the Cloud. Leslie Segal Testware Associate, Inc.

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

insync Installation Guide

Background on Elastic Compute Cloud (EC2) AMI s to choose from including servers hosted on different Linux distros

Chapter 9 PUBLIC CLOUD LABORATORY. Sucha Smanchat, PhD. Faculty of Information Technology. King Mongkut s University of Technology North Bangkok

Content Delivery Network. Version 0.95

DVS-100 Installation Guide

SAP CRM on SAP HANA Getting Started Today with 9 Easy Steps. May 2014

CHEF IN THE CLOUD AND ON THE GROUND

Chapter 11 Cloud Application Development

Eucalyptus User Console Guide

Transcription:

Understanding Infrastructure as Code By Michael Wittig and Andreas Wittig In this article, excerpted from Amazon Web Service in Action, we will explain Infrastructure as Code. Infrastructure as Code describes the idea of using a high level programming language to control IT systems. In software development, tools like automated tests, code repositories and build servers are increasing quality of software engineering. If your infrastructure can be treated as code you can apply the same techniques to infrastructure code than to your application code. In the end, you will improve the quality of your infrastructure by using automated tests, code repositories and build servers. WARNING Infrastructure as Code is not Infrastructure as a Service Don't mix the two terms! Infrastructure as a Service (IaaS) is renting servers, storage, network on a pay-per-use pricing model. Automation and DevOps movement DevOps is a method driven by software development to bring development and operations closer together. The goal is to deliver rapidly developed software to the customer without a negative impact on quality. Communication and collaboration between development and operations is therefore necessary. Multiple deploys per day are only possible if your pipeline from code changes to deployment is fully automated. If you commit into the repository, the source code is automatically built and tested against your automated tests. If the build passed the tests, it is automatically installed in your testing environment. Maybe some integration tests are triggered now. After the integration tests have passed, the change is propagated into production. But this is not the end of the process. Now you need to carefully monitor your system and analyze your logs in real time to ensure that the change was successful.

If your infrastructure is automated, you can spawn a new system for every change introduced to the code repository and run the integration tests isolated from other changes that were pushed to the repository at the same time. So whenever a change is made to the cod[mw1], a new system is created (servers, databases, networks, etc.) to run the change in isolation. Inventing an infrastructure language: JIML For the purpose of understanding Infrastructure as Code in detail, you will invent a new language to describe infrastructure. The language is named JSON Infrastructure Markup Language better known as JIML. Figure 1 shows the infrastructure that will be created in the end. Figure 1 From JIML blueprint to infrastructure: infrastructure automation The infrastructure consists of: Load balancer (LB) Virtual servers

Database (DB) DNS entry Content Delivery Network (CDN) Bucket for static files To reduce issues with syntax, let's say that we based JIML on JSON. The following JIML program creates the infrastructure shown in figure 1. The $ sign is used to indicate a reference to an id. Listing 1 Infrastructure description in JSON Infrastructure Markup Language (JIML) { "region": "us-east-1", "resources": [{ "type": "loadbalancer", "id": "LB", "server": { "cpu": 2, "ram": 4, "os": "ubuntu" }, "servers": 2 }, "waitfor": "$DB" "type": "cdn", "id": "CDN", "defaultsource": "$LB", "sources": [{ "path": "/static/*", "source": "$BUCKET" }] } "type": "database", "id": "DB", "password": ***", "engine": "MySQL" } "type": "dns", "from": "www.mydomain.com", "to": "$CDN" }

} "type": "bucket", "id": "BUCKET" }] How can this JSON be turned into AWS API calls? 1. The JSON input is parsed. 2. The JIML interpreter creates a dependency graph by connecting the resources with their dependencies. 3. The JIML interpreter derives a linear flow of commands from the dependency graph by traversing the tree from the bottom (leafs) to the top (root). The commands are expressed in a pseudo language. 4. The commands in pseudo language are translated into AWS API calls by the JIML runtime. Let's have a look at the dependency graph created by the JIML interpreter in figure 2.

Figure 2 JIML interpreter figures out the order in which resources needs to be created Traverse the dependency graph from bottom to top, from left to right. The nodes at the bottom have no children like DB (1), servers (2) and bucket (3). Nodes without children have no dependencies. The LB (4) node depends on the DB node and the two servers nodes. The CDN (5) node depends on the LB and bucket node. Finally the DNS (6) node depends on the LB node. The JIML interpreter now turns the dependency graph into a linear flow of commands using a pseudo language. The pseudo language represents the steps that are needed to create all the resources in the correct order. The nodes at the bottom have no dependencies and are therefore easy to create. That's why they are created first.

Listing 2 Linear flow of commands in a pseudo language is derived from the dependency graph $DB = database create {"password": ***", "engine": "MySQL"} $SERVER1 = server create {"cpu": 2, "ram": 4, "os": "ubuntu"} $SERVER2 = server create {"cpu": 2, "ram": 4, "os": "ubuntu"} $BUCKET = bucket create {} await [$DB, $SERVER1, $SERVER2] [$_SERVER1, $_SERVER2]} $LB = loadbalancer create {"servers": await [$LB, $BUCKET] $CDN = cdn create {...} await $CDN $DNS = dns create {...} await $DNS create database create servers create bucket wait for the dependencies create load balancer create CDN create DNS entry The last step, translating the commands of the pseudo language into AWS API calls, is skipped. You already learned everything you need to know about Infrastructure as Code: It's all about dependencies.