Elastic IP Address (EIP) and ECS (EC2 Container Service) cluster, a naive solution

Recently I had the opportunity to set up another ECS cluster for a Ruby on Rails application that exposes a few API endpoints and a backend to manage some contents, i.e. images, videos and so on.

Considering our previous experience we decided to automate the provisioning of the infrastructure by using Ansible and after a bit we ended up with a few playbooks that allowed us to bring up everything we needed, from the DB to the instances, ELB, task definitions and services.

Everything was working quite well until we were asked to provide a static IP that could be used to access the aforementioned API endpoints.

Continue reading “Elastic IP Address (EIP) and ECS (EC2 Container Service) cluster, a naive solution”

Continuous delivery with Travis and ECS

ECS is a good product. Sadly it’s authored by the same UX designer that authored all other AWS products, so a lot of people couldn’t even succeed in starting a simple hello world container.

Some months ago @fusillicode wrote a two-part tutorial on how to dockerize and deploy on ECS a WordPress app (you can find them here: part 1 and part 2). Of course, given we’re talking of docker, the technology you’re using is not so important.

What’s missing in those posts is how to do a painless deploy.
Continue reading “Continuous delivery with Travis and ECS”

AWS Summit Milan Keynote recap

Last 14th of April I had the opportunity to attend the AWS Summit here in Milan.

The agenda was really dense and rich of interesting contents. Moreover, thanks to some Amazon partners, many hands-on labs were organized during the day. They were focused on letting the attendants get in touch with many of the Amazon Web Services by granting them the possibility to interact with valid and prepared experts.
As for the presentation sessions they were divided into three parallel “channels” focused respectively on live demos, enterprise & security and big data & analytics.

Continue reading “AWS Summit Milan Keynote recap”

A few (silly) tips about AWS EC2 instances “backup/migration”

EC2 instances are often considered long lasting resources in charge to deliver the Web applications deployed on them.
This is actually a wrong belief as their nature is instrinsically ephemeral and they should be considered reproducible assets in the context of a much larger infrastructure.

Continue reading “A few (silly) tips about AWS EC2 instances “backup/migration””

ECS and KISS dockerization of WordPress (Part 2)

‘Two article ago’ I wrote about my initial experience with Docker and ECS, the container service, built on top of EC2, offered by Amazon. Here it is if you want to take a look.

Today I want to continue in that direction describing the configuration of containers (or better container) I choose to serve the application selected as guinea pig to try ECS. Just as a reminder, the app was an almost standard WordPress blog with a custom theme and a few plugins.

Continue reading “ECS and KISS dockerization of WordPress (Part 2)”

ECS and KISS dockerization of WordPress

ECS (EC2 Container Service) is one of the latest Web services released by Amazon and it is among the cool kids around. Why? Well it let you deploy and administer Docker containers by integrating deeply with the other Web services offered by Amazon. To name a few, ELB (Elastic Load Balancer), Launching Configuration and Auto Scaling Groups (ASG).

At the base of ECS reside two fundamental concepts, tasks and services.

Continue reading “ECS and KISS dockerization of WordPress”

Metaprogramming in OpsWorks recipes

The last time I worked on OpsWorks I needed to implement a recipe to handle the setup and configuration of cron jobs.

Actually I had already written some code to handle this functionality in the past. However, the recipe I ended up with wasn’t particularly flexible.

Continue reading “Metaprogramming in OpsWorks recipes”

WordPress and OpsWorks, “Pride and Prejudice” (Part 4)

4th part of the serie titled “Wordpress and OpsWorks“ (here you can find the 1st, 2nd and 3rd part).

Despite the title, this time I’m not going to talk about an aspect of OpsWorks specifically related to WordPress, since I’ll be presenting a brute force way to modify the default attributes merging behavior of OpsWorks.

Continue reading “WordPress and OpsWorks, “Pride and Prejudice” (Part 4)”