Cellular automaton #2 – First deploy

TL;DR: Nanobox is free but requires paid service on DigitalOcean or AWS, so I deployed to Heroku.

I wanted to use something other than Heroku but after all it’s still the best free platform for small web applications. I spent about 2 hours setting up Nanobox Desktop just to discover that it will create Amazon EC2 instance of $6/month cost (Nanobox itself is free for open source apps) when I connected AWS as cloud provider, which I could do on the beginning. I don’t need 100% uptime or advanced managing, monitoring and scaling features for that small application, good old Heroku will be just fine and quick. There is AWS Free Tier for 12 months but I expect some longer fiddling on the first time, I might try it later for other projects.

In this post I will present some steps done with Nanobox.

Installing Nanobox Desktop

After creating Nanobox account I had to install Nanobox Desktop to start development.

nanobox_desktop

I finished installation with nanobox command to create initial configuration with settings like: what VM to run Nanobox with (VirtualBox or Docker Native), how many CPU cores and GB of RAM make available to the VM. Configuration ended with strange message about docker-machine and link to docs.

nanobox_desktop_2

The documentation page I visited explained that vboxmanage is a management command for VirtualBox which I needed to install separately. After this I repeated the configuration process for Nanobox.

Sinatra from scratch

On Get Started page there are guides for most popular languages and frameworks. I went for Ruby and Sinatra. By following this guide I created base application and configuration. All changes were included in this commit. Next step was to install Sinatra and other dependencies (nanobox run is to execute given command inside container’s environment and must be run inside project directory like other nanobox commands).

nanobox_desktop_3.png

After a bit longer moment it was done – it had to build and prepare VM container for the first time before actually installing any dependencies.

nanobox_desktop_4.png

With these commands I was able to run local server and access it under http://sinatra.dev:9292:

nanobox dns add local sinatra.dev
nanobox run rackup --host 0.0.0.0

nanobox_desktop_5.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s