Posts

Showing posts from December, 2015

Building Infrastructure with Terraform

Image
Terraform is similar to Amazon Cloud Formation . It allows you to automate the creation of your infrastructure like VPCs, ELBS, ASGs, Instances. Terraform is generic, it works with other provides besides AWS like containers and even bare-metal servers. Terraform build infrastructure, but also launch it as well. Terraform enables infrastructure as a Code because you can describe your whole infrastructure with a simple set of declarative files. Terraform keeps track of state, so will tell you if can do something or can't do some operation. This is very cool for operation point of view. To use Terraform you just need to download the binaries for your OS and them put Terraform in your PATH. Once you have the config files you can do $ terraform apply and the magic will happen :-) Today i will show how to build a very simple infrastructure on AWS, you just need have your credential(ID and Secret).  Main.tf is your config for the infrastructure. Variables are var you can use into...

Having fun with the Jenkins DSL

Image
Jenkins it's a outstanding deployment tool. I love Jenkins, i use for a very long time.  I remember when was called Hudson.  There are several things that made Jenkins one for the most used solutions for deploys. Jenkins has a awesome community with more than 1k plugins . For this post i will cover a specific plugin called Jenkins Job DSL . This plugin gives you a Groovy DSL to code your Jobs, yes Code not XML. :-) This is good for lots of reasons. First of All in a DevOps context this allow you to automate the job creation which is tedious and manual. Moreover the DSL is great because it allow you to create a massive number of job, so in a microservices context lets say you have 50 microservices and all run in they own jetty and they code is on GitHub and build is done using maven. You can automate all that and create a JOB using the DSL this job will create the other jobs. Even if you have one job only for me it makes sense because you have it automated. We will ...

Having some fun with AWS Route53

Image
Amazon Web Services Route53 is a high available and scalable DNS solution. It can be used to route request inside and outside amazon web services as well. Route53 allow you to configure DNS health checker to route traffic to a healthy endpoint. Route53 has plenty of features, for me best ones are: Traffic Flow: Route end user to best endpoints. Latency Based Routing: Routes users to region with lowest latency. GEO DNS: Route users based on they IP location. Private DNS for Amazon VPC:  Manages custom domains internaly. DNS Failover: Avoid outages routing users to different locations. For this post i will show how to install and do some basic operations with  CLI53 a command line interface for Amazon Route53.  For this post we will use CentOS / Amazon Linux Distribution.

RPM deploy in Neuxs

Image
Nexus is a repository manager solution for Java. Similar to Archiva and Artifactory . If you are a Java developer probably you are familiar with this kind of solutions. Nexus is useful because acts like a proxy then you can improve download speed because you have a central cache and you have your deploys and binaries there. There is feature is really cool on the DevOps context makes lots of sense is the RPM feature. Basically you are allowed to deploy RPM in Nexus, Artifactory has a similar feature too. This is very useful because sometimes you need to pack things that are not JARS and this is very useful to the operations point of view. So In this post I will show how to install Nexus on Linux and how to deploy an RPM in Nexus is pretty easy and there are more than one to do this.

AMI Backing: Using Ansible to Provision with Packer

Image
Immutable Infrastructure in on the heart of DevOps. Today Backing is a very popular idea. AWS allow you to create AMI (AMI is amazon specific image is kinda of a ISO on the OS) this image can be backed in a automated fashion. To perform this task we can use Packer but Packer will take care on the AMI and publishing to AWS but you still need to install things on this linux image lets say Ubuntu or CentOS for instance. For provision you can use Ansible . In this post i will show how to install Ansible, Packer and build an AMI image with Packer and have the full provisioning using Ansible. 

Having fun with ArangoDB

Image
Besides performance, strong consistency and scalability we also pick NoSQL DBs based on the Design of your Data this is one of the cool things about ArangoDB because it has multi-models. ArangoDB is a distributed NoSQL database. It has a flexible data model for documents, graphs, and key-values this is also called multi-model db. ArangoDB has convenient SQL-like query language or JavaScript extensions. In this post i will cover the Document Model and show some have code for such task i will use gradle and Java 8 .  ArangoDB have drivers for lots of languages you check it out here . I'm using ArangoDB in Ubuntu Linux, so to install you just do $ sudo apt-get install arangodb . If you are using another OS or Docker for instance is fine you check it out here as well .

Having fun with Etcd

Image
Etcd is a distributed, consistent key-value store for shared configuration and service discovery, with a focus on being. Etcd is very useful in DevOps context because today Immutable Infrastructure is one of the core principles. Often what people do is store the configs into a K/V store like Etcd and them just export OS_VARS into the OS level that could be an Amazon AMI, Linux or Bare metal, Mesos or even a Docker container. One of the cool things about Etcd is that you have a pretty simple REST interface to operate over the K/V store.  When you are doing provisioning sometimes you need store IPs, IDS, Tags, etc... and this is very viable solution.

Having fun with FPM

Image
Working with automation is not easy. I would say would take 5-10X more to get something automated rather than manual, but this pays off on a long term so this is not an open matter. DevOps has many meanings for different people now a days, for me, is really about Dev and Ops work together. I don't see how an OPS team often called DevOps time could carry this alone, for it can't . The best model I see so far is the Silicon Valley model you see in companies like Netflix. Were you pretty much have everybody doing everything so you build it you run it. Ops needs to learn how to code and other Dev disciplines and Devs need to learn about ops, this is how is it going to me as well on the last couple of years. Today I want to show a little bit more about FPM. FPM it's a package management solution that builds deb and RPM files for you. This is great because leverage Linux tools that are already in place and ops know how to use it. :-)

Tech Trade Offs

Image
Writing software is fairly easy today.  There are Dynamic Languages, Frameworks, Libraries and lots of guides and styles about how to write good code that other humans will understand. Unfortunately, so few are captured about trade offs, this is specially hard since tech is constant change and evolution as requirements come and go is very hard to document this, so this kind of knowledge is hard to get it, specially because we are always building new things and at the scale we have different and bigger problems. The scale changes things, it creates new problems this requires a new way of thinking. There are matters like Anti-Fragility and Multi-Data center that are very hard to add it later, its way better get it from the get-go.  The hard part is that you don't know how much your business will grow and is hard for someone invest on rocket since tech before knowing where the business is going so in other words trade offs are really tough in this sense. Today it m...