Posts

Showing posts from November, 2018

First look at terraform

Terraform is client based like Ansible (which is good). Very cloud focussed and relies on Cloud API's to manage the infrastructure. This is good as it means you dont have to worry about authentication and ports etc but it does need to be a supported cloud vendor. You couldn't use it manage your own on-premise servers (presumably). Example config file: provider "aws" {   access_key = "AKIAIFZVQTBBG3YF46LQ"   secret_key = "SfEjiU0I2I7wxXQqbRWLPYCbEfdSxhI/4r44CgaV"   region     = "us-east-1" } resource "aws_instance" "example" {   ami           = "ami-2757f631"   instance_type = "t2.micro" } > terraform init > terraform apply > terraform show  Terraform is purely declarative. Ansible IS declarative but you need to be disciplined as it can be used imperatively. One blog calls Terraform an 'orchestration' tool with ansible being a more traditio

A brief look into Cloudformation

Image
In this blog, i just wanted to record details and my thoughts on following a first tutorial on Cloudformation. This is the free AWS offering for managing and provisioning infrastructure resources within a cloud environment - effectively their IaC service. A cloud formation template describes a group of resources that form a stack. Resources can references resources within the template or outside of the stack entirely. Template can be written in JSON or YAML. A stack is free in AWS but the resources within are priced as normal. Templates have several useful features: * Parameters * Mappings for conditional values (eg AMI ID's differ between regions) * Functions can be used to join values etc * Output values Ultimately i would like to compare and contrast with Terraformer. Updating a stack This tutorial describes how to update a stack implementing a sample PHP app on apache. MetaData/Init section for an EC2 instance allows you to specify things like which packages ar