This starts with an abstracted config file… [python] ### variables (abstract these further and pull in as a seprate file – then create a new file for a new environment) region = ‘aws region’ cluster_name = ‘cluster’ amiid = ‘ami-123456789123’ instance_type = ‘t2.medium’ key_name = ‘aws key name’ subnet_id_1 = ‘subnet-123456789123’ subnet_id_2 = ‘subnet-123456789125’…
Continue ReadingAWS
boto3 (AWS & Python)
I’ve worked through the Amazon AWS CLI commands to create and then to deploy an ECS cluster using ec2 containers and an Application Load Balancer to deploy a docker nodejs app. In bash. Because the straightest line between command line and automation with no wasted motion is bash. Once. But if you want a supportable…
Continue ReadingBlue Green w/S3, Cloudfront, Route53
I tend to code and architect devops with an eye toward NOT being locked into any particular cloud or service. Netsaint -> Nagios -> Icinga Hudson -> Jenkins VMWare -> Vagrant -> Docker -> Kubernetes -> ECS Everything changes. That ideal cloud you are moving on to right now – will change in five years,…
Continue ReadingShip Inside of a Bottle, Repeat
…in other words, DevOps. Github sends a notifyCommit message to Jenkins. That message passes through the Jenkins git plugin, which triggers a job if (1) there is a job configured with a git url matching the notifyCommit git url, and (2) there is a change to the code. If the job does not already exist…
Continue ReadingFinding AWS AMIs for Jenkins Agents
I created an automagically configured Jenkins controller. It spun up in Amazon Web Services, it grabbed and installed its private keys for access, and it was stateless. But… But the Jenkins AMI came with a Jenkins config.xml configured with agent AMI ids when it was built. As development moved forward (CICD, after all), the config.xml…
Continue ReadingTroubleshoot Hashicorp packer AWS Instance Directly
I use GitHub to send a notifyCommit to Jenkins to kick off a pipeline job that spins up packer, calling ansible as a provisioner (along with some preliminary shell) to configure and install, which then tests (ansible properly formatted cover unit testing) integration using a temporary cloud formation using Hashicorp consul service discovery and a…
Continue Reading