Our engineers have been doing a lot of i18n (internationalization) work to make Meetup more friendly around the globe!
This past spring, we launched changes to how our pages are indexed by search engines. You can now access Meetup from links which correspond to different languages - for instance:
- http://www.meetup.com/de/
- http://www.meetup.com/es/
- http://www.meetup.com/fr/
- http://www.meetup.com/it/
- http://www.meetup.com/pt/
(you must be logged out, otherwise the page is rendered according to the language in your account settings)
In April we changed our sitemap to surface these URLs to search engines. Now, Meetup will be presented in search results in users’ local languages. Not only are people registering more often this way, they are getting a better, more native experience!
Steps Towards Automated Testing with Docker and Jenkins
blog post written by Jose Rodriguez,
Product Engineering Lead at Meetup
Going from Play-Doh to Legos
We’re making an effort to clean up our core codebase. Most of Meetup’s architecture has been monolithic for a long time with a lot of our core code shared in the same scope of a singular webapp. We established no rules or boundaries for how our codebase should interface with other parts. Like a ball of mixed Play-Doh, our code can be hard to identify with no separation of concern. Pieces call other pieces in ad-hoc fashion, resulting in tightly coupled code that is both difficult to test and difficult to maintain.
Instead, we want our code to be like Legos. We want to build small identifiable components with defined interfaces of interaction. With the implementation of code reviews and some good luck in hiring talented engineers, Meetup’s code quality has improved over the past few years. Now we’re interested in enforcing constraints to keep our codebase modular, decoupled, and testable.

Meetup is older than most people realize. Just a few weeks ago we turned 13. While it’s exciting that we’ve lasted this long, it also means we’ve accumulated a lot of code over the years. The truth is that most of our code isn’t tested in an automated way. Much of it isn’t even testable. We have sustained this long by investing in a manual testing strategy. If we took a holistic view of Meetup’s testing coverage it might look something like this:

We know what a healthy testing population looks like and we’re far from it. Last year we took the first step by transitioning from a giant source tree, all in the same scope, to a hierarchy of modules. We even have goals set around the long term vision of those modules. The transition was a success and now we’re ready for the next step, to bring automated unit testing to Meetup with the help of Docker and Jenkins.
What have we learned from the past?
We’ve tried something similar before. Our systems team recognized the importance of testing and attempted to setup a continuous testing infrastructure. So why didn’t it work?
- Tests depended on external services like MySQL, Redis, or Memcached.
We skipped any form of unit testing and went straight for integration. An isolated environment was required but our implementation was not reproducible. Since we use a shared development model at Meetup, two engineers running the test suite would end up in state conflict if run at the same time. - Engineers weren’t familiar with our continuous testing infrastructure.
There was only one instance of Jenkins running. With no alternative to poke and prod, engineers were hesitant to learn more about it. Engineers are curious, but less so when it may mean downing a running service. - An absence of gatekeeping for test regressions.
If an engineer broke an existing test no one was informed until after that code was merged to master. Bugs were created to fix broken tests but by the time it had been addressed, the tests were no longer salvageable or relevant.
Answering these problems with Docker and Jenkins
In the ladder to automated testing, the first step is unit tests. Integration tests are useful but harder to do. Unit testing is fast and easy. It gives us a solid foundation to start influencing design and prevent regressions. Once we have a solid unit testing foundation, then we can start moving towards higher forms of automated testing.
We need an automated testing setup that is reliable, reproducible and which prevents future regressions and breakage. In evaluating alternatives, we found that Jenkins with Docker would meet this criteria. Around this time we were introduced to the approaches that eBay had been trying with containerizing Jenkins slaves. You can find more about it here: http://www.ebaytechblog.com/2014/05/12/delivering-ebays-ci-solution-with-apache-mesos-part-ii/
We started with their second approach of mounting a slave container’s Docker sock inside of itself. The slave now has access to run other containers without the overhead of Docker in Docker.

Reliable builds regardless of environment
When introducing new infrastructure, reliability influences adoption. If the thing is a piece of junk, no one will want to back it. We needed a method to reproduce builds over and over from scratch with no environmental side effects. By running builds and tests inside of a container, we have detailed control over these side effects. Docker gives us confidence in these environments and an easy interface for working with them.

Creating a reproducible CI environment
To increase adoption with the continuous integration (CI) tooling, we wanted the tools and environment to be reproducible. The singular Jenkins instance didn’t work for us in the past. Our engineers should be able to reproduce the same configuration in their own environment, just like any production service.
We took eBay’s approach a step further by turning the Jenkins master into a container as well. We have a base Docker image with shared plugins and Jenkins version. We then extend the base image with detailed configurations for a particular Jenkins master. Now engineers can reproduce any configuration we have available.
In this reproducible environment, we wanted as much decoupling as possible. Configurations should have as little environment specific details as possible. We also wanted to create slave instances without needing configuration changes on the master. Jenkins Swarm allowed us to make starting a new slave as easy as starting a Docker container. (https://wiki.jenkins-ci.org/display/JENKINS/Swarm+Plugin) If we want another Jenkins slave, we just run the slave container pointed at the master. The slave will use JNLP and Jenkins Swarm to register itself.

The final result allows us to reproduce any CI setup or configuration in just a few Docker commands.
Preventing future breakage
Keeping engineers informed of breakage is good, but we also need to prevent it from entering our master branch. At Meetup, we’ve adopted GitHub flow with our core codebase using GitHub Enterprise. One of the features of GitHub we actively use are the Pull Requests (PR) to review code before it’s submitted for release. GitHub also comes with a feature to flag commits with statuses. In this case, we can use Jenkins’ GitHub Pull Request Builder Plugin to build PRs and their updates. (https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin)


Test breakage is now reported to both the submitting and reviewing engineers. A failing commit will alert the PR submitter, and the failed state of the PR alerts the reviewer that a problem exists.
Conclusion and what’s next?
We now have a reliable mechanism for determining failure. Engineers do not have to worry about false negatives due to infrastructure failure. Anyone interested in updating our infrastructure can test changes in their own CI setup. And finally, we have gates in place to prevent test breakage from going unnoticed.
Our next step is to create more isolation in pursuit of testable integration. We’re excited about the capabilities Docker offers us here. We’re hoping that the steps we’ve taken for unit testing will help influence our code design and move us towards a more testable future.
For the most recent internal hackathon at Meetup, Evan Estola and I built a Party Mode toggle switch. Obviously, the switch turns Party Mode on and off. Party mode activates an animated CSS disco ball on meetup.com and on partymode.club.
Built with:
Mason jar (we live in Brooklyn, okay?)
Spark Core
USB charger
Toggle switch (from the hardware store across the street)



