Using Terraform in AWS Mumbai

Terraform is a fantastic tool to manage your infrastructure with simple and declarative templates; you simply describe your infrastructure in a template file that looks like:

resource "digitalocean_droplet" "web" {
    name = "tf-web"
    size = "512mb"
    image = "centos-5-8-x32"
    region = "sfo1"

resource "dnsimple_record" "hello" {
    domain = ""
    name = "test"
    value = "${digitalocean_droplet.web.ipv4_address}"
    type = "A"

run terraform apply and you’re set: Terraform will boot the infrastructure for you.

AWS recently launched their ap-south-1 region (Mumbai, India) and, due to the fact that’s much closer to our customer and EC2 there seems to be ~10% cheaper than in AWS Singapore (where we’re currently hosted), we wanted to start experiment moving part of our infrastructure to this region.

Terraform, though, has an hardcoded list of AWS regions and, since Mumbai is a recent addition, it will throw an error saying that the region isn’t supported.

Read on →

A message to all the tech teams out there: start doing Tech Trivias

Every now and then you end up with a silly, stupid and simple idea that turns out to be an epic win: I am firmly convinced that introducing Tech Trivias was one of these ideas for our team.

Read on →

Bundling static files within your Golang app

One of the nice features of golang is that you can simply distribute your programs through executables, meaning the user doesn’t need to have custom libraries to install / run your software: just download the executable and you’re set.

What Go really does is to bundle together all your *.go files in a single, platform-dependent executable, that can be run with a single click — which works perfectly in 99% of our use cases.

All of this seems great, until you have to bundle different kind of files in your application, for example an .yml config file or an .xliff translation file.

How would you approach this? Enter the trick of the year.

Read on →

Connecting to the inflight internet on Emirates’ flights

It would really be hard for you to find this article useful because you probably won’t have internet to read this…

Read on →

Enable remote debugging on chrome for React Native’s webviews

In my last post I explained how you can hack on react native for android locally, so that if you need any change to the java packages1 you can do it yourself, with immediate feedback upon a react-native run-android.

One thing I immediately patched was the ability to enable remote debugging on webviews, which is turned off in react native — and here’s how you can do the same.

Read on →

Contributing to React Native for Android

It is no news that we, at Namshi, like to play around with all sorts of interesting technologies: last but not least, we’re taking a closer look at react native, the framework from Facebook that allows you to build mobile, native apps with React components.

While developing a small prototype, we had a small issue with a WebView that was supposed to run within our application and wanted to enable remote debugging on chrome to troubleshoot it: since this is turned off by default, we had to recompile react native with webview debugging enabled, and I wanted to share my brief experience with it since, with the same approach, you can start hacking and contributing to react native itself.

Read on →

Deploying 3 times a day without a downtime

At the beginning of September, part of the Namshi team attended the 2015 Rocket Tech Summit in Berlin, a 2-days event that brought together rocketers from all over the world: the event was focused on knowledge sharing among many of the ventures that have been launched by Rocket, but we also got the chance to hear some kick-ass presentations from industry leaders like Amazon, Google and ThoughtWorks.

Read on →

How Docker changed me

A lot of people blog about their experiences with Docker and how it helps them either running apps in production or easily replicating development environments, so I won’t spend much time on that.

This post is about how docker changed the way I think of my personal laptop which is, yes, used to deploy containers to production and develop apps through docker-compose, but also to blog and do a lot of personal stuff with it.

Read on →

I have built my own IDE and I’m happy to trash it after a year

Last year I dedicated quite some time, during ramadan, to a project I really cared about: building a fast and smart text editor to use on a daily basis.

That’s how Nikki was born, and today I am happy to announce that the project is dead, simply because I found another, very similar tool that does the job.

This is the story of how open source projects get born and die, and why we should still celebrate it.

Read on →

Minimal docker : run your NodeJS app in <25mb of an image

Managing Docker images might become a bit of a painful experience, especially when looking at your storages: very “simple” images like node end up quite fat and contribute to sucking up a good chunck of your HDD.

At the same time, the most painful moment with Docker images is, at least for me, when you want to pull and run a brand new image, not available on your machine (or production servers, not much difference): you will need to wait until the whole image gets downloaded before being able to play around with it1.

At the end of the day, one thing is clear: we’d like to shrink images as much as possible. Turns out, the easiest solution is, as often, the simplest one: start small, end small.

There are plenty of resources on limiting the size of your images / containers, but today I am going to start with this very simple approach.

Read on →