
Runnable Sandboxes: Full-stack environments for every GitHub branch - hiphipjorge
http://blog.runnable.com/post/141200219146/runnable-sandboxes-full-stack-environments-for
======
Jemaclus
My company build something pretty identical to this a few years ago. It's
INVALUABLE if you have a QA team or non-tech people who need to test things on
different branches. Our workflow basically went like this:

1\. Dev pushes branch to repo 2\. Dev assigns ticket to QA 3\. QA builds a
sandbox server 4\. QA tests everything under the sun 5\. Any bugs are pushed
to repo and auto-pushed to sandbox server 6\. After QA gives green light,
sandbox server is taken down.

Average uptime for a sandbox server was a few hours, and we caught a bazillion
bugs this way. I'm no longer with that company, so it's really exciting that
someone else has built something like this off-the-shelf so that I can
continue with that workflow at future jobs. :)

~~~
ykumar6
Founder here. Check us out for your future jobs. Maintaining sandbox
infrastructure is a pain.

One of our key lessons is being able to dispose and rebuild your
infrastructure on a daily or weekly basis so leaks don't destroy your
environment.

We recycle customer environments in Runnable, on a regular basis and its
completely transparent to users

------
theptip
This looks great, thanks for sharing -- I was planning to write something like
this for my build pipeline, but having something available off-the-shelf will
save a lot of time.

Eventually I'll be moving our Docker containers to run under Kubernetes, which
might necessitate writing my own thing to replace this; I'd ultimately like to
be able to deploy my k8s config files into a per-branch/per-commit namespace,
so that the full deploy pipeline can be tested.

------
markbnj
This is really a great idea, imo. At my last gig we had four projects in GCP
using kubernetes to deploy various clusters, and essentially all but one of
those projects were for testing branches. Will be keeping an eye on this.

------
jmickey
Any plans to include Bitbucket repositories?

Bitbucket offers a more favorable pricing policy for development agencies,
which would potentially be heavy users of your service.

~~~
kernel_panic
Bitbucket is on our roadmap, just collecting feedback (and hiring developers)
to see if we should deliver it sooner

------
ogrisel
This looks very similar to what is offered by
[https://platform.sh/](https://platform.sh/) . Anybody familiar with both
could contrast them?

~~~
ryanrichards
According to the website it looks like platform.sh has a focus on drupal,
symphony, & php while runnable is platform agnostic.

~~~
OriPekelman
Co-Founder of Platform.sh here: I am not extremely familiar with runnable.com
so I won't comment on them.

Anyway, this is true we currently focus on the PHP market. Though you can
already deploy nodejs applications (or a mix as we support complex multi-app
clusters).

The platform itself is totally abstract so we will probably add in the near
future many other run-times.

The main difference I think it would be interesting to point out is that
Platform.sh is a production system... not a staging thing.

What we clone into staging is production .. with all the data.. however
complex it is. And we do it really fast.

And we run production in a multi-datacenter / scalable / highly-available
setup.

BTW we are hiring like crazy so if you want to work on your pet language
having our features... contact me :) We are a fully distributed company... so
u can be anywhere the world.

~~~
sundip
To OriPekelman's point, our strategy is to provide a great development and
testing experience for containers.

You don't have to run production on Runnable. We are complimentary to your
existing prod system. Most of our customers run on AWS.

------
appleton
Sounds a lot like Heroku review apps[1]

1: [https://devcenter.heroku.com/articles/github-integration-
rev...](https://devcenter.heroku.com/articles/github-integration-review-apps)

~~~
ykumar6
Hey appleton - Here are some differences

1) You don't have to re-configure your environment variables and 3rd party
APIs for each branch on Runnable. Every branch runs in the same sandboxed
environment with the same env variables and 3rd party services. With the help
of an HTTP proxy and a dynamic DNS server, we can route traffic to the right
set of containers for the branch you want to test.

2) Runnable is built on Docker, which means all your configuration files and
the way your containers are run is non-proprietary

3) You can connect arbitrary branches with each other for testing. So if you
have a feature branch on a web server, and a feature branch on an api server -
both can be connected easily through our web interface. This allows for cross-
branch testing. Underneath the hood, we swap the IP address to connect the
right containers together.

4) Our environments spin up much quicker than Heroku's. We build and run on
the same machines so there are no network transfers and we can utilize build
cache better.

5) Databases clone instantaneously with Runable, versus waiting minutes
(depending on size). This because our build system applies Copy-on-Write to
database containers

6) You can run end-to-end integration tests as your code is being pushed to a
branch. Heroku only creates an environment when you're done coding and a pull
request is open

~~~
cybice
I wrote similar service on dokku few days before
[https://github.com/istarkov/create-your-own-heroku-review-
ap...](https://github.com/istarkov/create-your-own-heroku-review-apps-with-
dokku)

And it's really cool that we have Heroku alternatives.

------
callumlocke
Can someone help me understand what's the difference from Travis CI, Circle
CI, etc?

~~~
ykumar6
Travis CI and Circle CI push code to a staging or production environment. So
you still need to setup a full-stack environment to do end-to-end testing.

Runnable let's you have end-to-end (full-stack) environments with every
branch. The minute a branch comes up, you have an environment. This includes a
clone of your database

------
webo
How would this look like when multiple branches from different projects work
together?

> Developers can pull individual components or services locally and connect to
> the rest of the stack on Runnable.

This sounds great, I wonder how this is done.

I am currently evaluating docker-cloud for the same purpose since all of our
infrastructure is Dockerized. Can you comment on the differences?

~~~
Myztiq
Runnable engineer here.

> How would this look like when multiple branches from different projects worm
> together?

Each repository has it's own configuration, and each branch gets it's own
container. We allow you to connect branches together, not dissimilar to
DNS[1].

To work on individual components locally we have a couple of tricks up our
sleeves, but at the end of the day we have a CLI that will allow you to do
file syncing and ssh'ing into your boxes from your own terminal[2].

1: [https://runnable.zendesk.com/hc/en-
us/articles/209632083-Aft...](https://runnable.zendesk.com/hc/en-
us/articles/209632083-After-Setup)

2: [https://runnable.zendesk.com/hc/en-
us/articles/208018696-How...](https://runnable.zendesk.com/hc/en-
us/articles/208018696-How-do-I-get-started-with-the-CLI-)

------
ykumar6
Hey All - Founder here. Happy to answer any questions or discuss some of the
problems we've solved building on Docker.

~~~
mbrock
Do the stacks run with Docker Swarm and Docker Networking? If so, does it work
well? Any strange issues you had to work around, etc?

~~~
kernel_panic
Our stack does use swarm under the hood. So far we have not seen any major
issues with scheduling across 100 servers. However we have seen issues with
the swarm event stream disconnecting. Our workaround was connect to the event
stream of the docker engines directly and use the `since` parameter. We
currently use weave net to handle docker networking and have not had major
issues with it.

~~~
mbrock
Nice to hear!

------
prafulrana
Do you guys support large databases and can every branch get its own database?

~~~
ykumar6
Yes, every branch can get a clone of your gigabyte database. This works by
applying Copy-on-Write to the containers running your stateful containers.

So it becomes very easy to test schema changes and migrations with this
approach

------
nodesocket
Really cool. I actually hand rolled my own solution using a Node CLI and the
AWS API.

What features/problems does Runnable solve over
[https://elasticbox.com](https://elasticbox.com)?

Also, who did your promo video
[https://www.youtube.com/watch?v=mBR-_5dXH4w&feature=youtu.be](https://www.youtube.com/watch?v=mBR-_5dXH4w&feature=youtu.be))?
They did an amazing job.

------
bliti
Gitlab support in the pipeline?

~~~
ykumar6
We're trying to hire developers to help us do that :-)

~~~
bliti
What's your stack like? For those interested...

~~~
kernel_panic
Our stack is comprised of 15 stateless micro services all built with Nodejs.
MongoDB, Redis and Neo4j are used for persistence, caching, and dependency
management. The fundamental piece our system is RabbitMQ which is used as our
event queue. The architecture designed around events. When an application dies
or a commit is made, an event propagated through the system.

We also use a lot of open source software. Docker Machines + Swarm is used to
schedule and run applications. Docker Registry is used to store images. We use
WeaveWorkes weave for inter-container communication.

We are starting an engineering blog as well, keep posted for deep dives into
our architecture! [http://blog.runnable.com/](http://blog.runnable.com/)

~~~
jmickey
What is your experience with using Docker Swarm in a production environment? I
have heard conflicting views regarding it.

~~~
kernel_panic
Responded in another thread here:
[https://news.ycombinator.com/item?id=11306045](https://news.ycombinator.com/item?id=11306045)
Will be happy to go into more detail.

------
jabo
I remember you guys were a cloud IDE service right? Did you pivot or is this a
separate product offering?

~~~
sundip
Runnable Sandboxes is a new product we're launching.

But you might be thinking of our CodeSnippets site, code.runnable.com :)

------
gingerlime
Looks like exactly what we're looking for.

Why is it only available with a Github organization account though?

~~~
kernel_panic
Support for other code repositories is on our roadmap — we are looking to hire
more developers to help build support for them ! :)

~~~
gingerlime
We are using github, but just not github organizations...

~~~
ykumar6
The reason it's built for Github organizations is we can access-control your
private infrastructure based on the permissions set in Github.

We don't have access to the same APIs with just a personal accout

------
bryanrasmussen
On pricing it says - "We plan to announce pricing and general availability in
Summer, 2016. Plans will be priced between $30/mo to $55/mo per active
developer."

Are active developers determined from repository - or is there another way?

------
dtertman
This sounds neat - are there plans for an on-prem version instead of EC2? We
have Mirantis OpenStack running in a bubble at my organization (we are cloud-
averse).

~~~
ykumar6
It's on our roadmap. Can you submit a support ticket and I can fill you in
over email

------
ferrantim
This is really cool. Can you explain if I would use this instead of my Jenkins
server, or in addition to my Jenkins server?

~~~
hiphipjorge
You might be able to replace Jenkins :-). Runnable builds every branch as soon
as it's updated with a push, and then deploys it. This allows you to spin off
branches for your app and use/test them in a matter of seconds. Builds are
exportable as Docker images which are stored in an authenticated registry.

Would love to hear what your use-case is and whether it's a good for or not!
Send me an email jorge@runnable.com

------
bryanrasmussen
I guess for me it would be most useful if it also had a production service and
pricing, any plans?

------
donatj
This looks very promising. I wonder if/how well they could handle a 500gb
database.

~~~
ykumar6
Founder here - We absolutely can! Just give us a heads up so we can make sure
it loads up properly on your account

------
lewq
How do you import multi-GB databases? Where can you import them from?

~~~
sundip
Database backups less than 5GB can be uploaded directly to Runnable
([https://runnable.zendesk.com/hc/en-
us/articles/208221743-How...](https://runnable.zendesk.com/hc/en-
us/articles/208221743-How-to-add-files-to-a-container-configuration-
permanently-))

Reach out to us for bigger backups, and we'll provide direct access
instructions to your storage infrastructure.

