Friday 28 June 2013

Nitrous.IO! First impression after public beta release

Ok. I signed on as soon as I heard about this at the end of May 2013 because it was exactly what I was looking for.
I just received the email confirming the public beta, I decided to do some testing for 'real' and see if it really suited my needs in the 'real' world.

First step was to login and confirm my email. No problem.
Got extra N2O because I was part of the first signers and that's very cool.

Oh I forgot to mention; I'm using Chrome Version 27.0.1453.116.

So... I configured a box.
Neat easy and fast.
At the main window, I immediately started digging around.
First let's take a look at the system:

action@kimbo-review-99999:~/workspace$ lsb_release -a
No LSB modules are available.  
Distributor ID: Ubuntu 
Description:  Ubuntu 12.04.2 LTS 
Release:  12.04  
Codename: precise  

(FYI: The boxname is not the real one for obvious reasons...)

Ok. Ubuntu 12.04. There's a later version (which I've upgraded to on one of my home machines due to some gigabit network driver issues) but I wasn't about to try to do a sudo apt-get do-release-upgrade for obvious reasons.

Next networking:

action@kimbo-review-99999:~/workspace$ ifconfig -a  
eth0  Link encap:Ethernet  HWaddr 02:00:c0:a8:fd:f6  
  inet addr:192.168.253.246  Bcast:192.168.253.255  Mask:255.255.255.0 
  inet6 addr: fe80::c0ff:fea8:fdf6/64 Scope:Link 
  ...elided for brevity...

Ok. So know we know that subnets they're using. A quick check on the 'boxes' page (which is very well built I have to say) showed my external hostname. A quick check with nslookup shows it as running off AWS:

bandit:~ kim$ nslookup kimbo-review-99999.apse2.actionbox.io
Server:  192.168.170.1
Address: 192.168.170.1#53

Non-authoritative answer:
kimbo-review-99999.apse2.actionbox.io canonical name = ec2-54-252-89-123.ap-southeast-2.compute.amazonaws.com.
Name: ec2-54-252-89-123.ap-southeast-2.compute.amazonaws.com
Address: 54.252.89.123
Now let's see who I am:

action@kimbo-review-99999:~/workspace$ who  
action pts/1  2013-06-28 02:10 (ip-10-240-57-14.ap-southeast-2.compute.internal)
Interesting. User 'action'. So I had a look at `/etc/passwd` and noticed that `www-data` is included for Apache2 and `puppet` for... well... `puppet`.

Now for giggles I did this:

action@kimbo-review-99999:~$ uptime 
 02:27:42 up 23 days,  9:58,  1 user,  load average: 0.02, 0.06, 0.11  
What? 23 days? Ah. Neat. It appears that boxes are 'pre-provisioned' and assigned a name and extras during the 'provisioning' process.
Clever. Like that. Must remember that.

UPDATE: Whoops. Ben pointed out my mistake. They aren't pre-provisioned. It's likely a clone of a VM that was configured 24 days ago. My bad.

Now let's dig around the home folder:

action@kimbo-review-99999:~$ ls -aF /home/action  
./ .bash_history  .bash_profile  .cache/  .gemrc  .nvm/ .rvm/  .tmux.conf  workspace/  .zshrc  
../  .bash_logout .bashrc  .gem/  .gitconfig  .profile  .ssh/  .VERSION  .zprofile 
Ok. The .gemrc has good stuff in it:

install: --no-rdoc --no-ri 
update: --no-rdoc --no-ri  
gem: --no-rdoc --no-ri 
And the .gitconfig also:

[color]  
  ui = auto  
[alias]  
  st = status  
  di = diff  
  ci = commit  
  br = branch  
  llog = log --date=local  
[rerere] 
  enabled = true 
The .profile is normal and basic. The .tmux.conf is fine:

action@kimbo-review-99999:~$ cat .tmux.conf 
# shell  
set-option -g default-shell /bin/bash  
set -g default-terminal "screen-256color"  
There is a .VERSION file which looks interesting. I'm presuming this is part of the puppet process.
I'm also presuming the .ssh folder keys are used for the same purpose (they are for action@apse2.actionbox.io).

Next a dig around /etc...
Noticed there are no cron jobs configured.
The /etc/hosts is interesting as it has that old 'Ubuntu 127.0.1.1' address thing going on.
The /etc/nsswitch.conf is minimal with the hosts set to files dns.
The /etc/resolv.conf is interesting also. Mine is set to this:

action@kimbo-review-99999:~$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN  
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) 
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN  
nameserver 172.16.0.23 
search us-west-1.compute.internal  
Which is curious since I configured an 'Oceania' box since I'm in Australia. Oh well.

The /etc/timezone file shows the zone is set to Etc/UTC. If you want to I guess you could change this to your local time zone for your logs.

Now the /etc/init.d folder. Mostly standard stuff and no Apache1 or NGinx.
Ah. That's a question I wanted to ask! How the frack do you configure a 'production' environment.
I'll come back to that.

Next I checked the svn and git commands:

action@kimbo-review-99999:~$ svn --version  
svn, version 1.6.17 (r1128011) 
 compiled Dec 17 2011, 16:12:52  
 
Copyright (C) 2000-2009 CollabNet. 
Subversion is open source software, see http://subversion.apache.org/  
This product includes software developed by CollabNet (http://www.Collab.Net/).  
 
The following repository access (RA) modules are available:  
 
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.  
  - handles 'http' scheme  
  - handles 'https' scheme 
* ra_svn : Module for accessing a repository using the svn network protocol. 
  - with Cyrus SASL authentication 
  - handles 'svn' scheme 
* ra_local : Module for accessing a repository on local disk.  
  - handles 'file' scheme  
 
action@kimbo-review-99999:~$ git --version  
git version 1.7.9.5  
Ok. The git version is less than 1.7.10 so if you are using capistrano from your own physical box you *may* encounter the old "cap constantly asking for passwords even though they've been defined in the deploy.rb" problem.

Ok. I configured a RoR box, so let's do some digging.
First, of course, is ruby.

action@kimbo-review-99999:~/workspace$ ruby -v  
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]  
Neat. Ruby2 p147 has just been released and hopefully that will be installed on new boxes and be upgradeable on already provisioned ones.
Next, let's see some system stats:

Since I am going to test padrino I did a gem install padrino and it installed very quickly!
The rails gems like activerecord were all 3.2 by the way.
So next I changed directory to the `workspace` and generated a plain app.
Blisteringly quick.
So cd to the workspace app and do a bundle install...
Not so blistering, but fast enough.
It showed that we are using sinatra (1.4.3) and padrino (0.11.2).
So let's play with starting the app:

action@kimbo-review-99999:~/workspace/kimbo$ padrino start  
WARN: Unresolved specs during Gem::Specification.reset:  
  rack (>= 1.0.0, ~> 1.4)  
  activesupport (>= 3.1.0) 
WARN: Clearing out unresolved specs. 
Please report a bug if this causes problems. 
=> Padrino/0.11.2 has taken the stage development at http://127.0.0.1:3000 
[2013-06-28 02:57:14] INFO  WEBrick 1.3.1  
[2013-06-28 02:57:14] INFO  ruby 2.0.0 (2013-05-14) [x86_64-linux] 
[2013-06-28 02:57:14] INFO  WEBrick::HTTPServer#start: pid=969 port=3000 

Ok. I browsed to it from the 'preview' menu (port 3000) as that was what WEBrick starts on.

BLAM!

We couldn't find a server running on this port – are you sure there is a server running?
Make sure to bind your server to host 0.0.0.0 (instead of localhost/127.0.0.1).
Ah. Fracking obvious. So a restart of WEBrick with the host and port set:

action@kimbo-review-99999:~/workspace/kimbo$ padrino start -p 3000 -e development -h 0.0.0.0  
WARN: Unresolved specs during Gem::Specification.reset:  
  rack (>= 1.0.0, ~> 1.4)  
  activesupport (>= 3.1.0) 
WARN: Clearing out unresolved specs. 
Please report a bug if this causes problems. 
=> Padrino/0.11.2 has taken the stage development at http://0.0.0.0:3000 
[2013-06-28 03:02:49] INFO  WEBrick 1.3.1  
[2013-06-28 03:02:49] INFO  ruby 2.0.0 (2013-05-14) [x86_64-linux] 
[2013-06-28 03:02:49] INFO  WEBrick::HTTPServer#start: pid=978 port=3000 
And the 'preview' works. Cool. Don't like the look of those gem messages, but I'll leave that for now.

Let's try thin:

action@kimbo-review-99999:~/workspace/kimbo$ padrino start -p 3000 -e development -h 0.0.0.0 -a thin  
WARN: Unresolved specs during Gem::Specification.reset:  
  rack (>= 1.0.0, ~> 1.4)  
  activesupport (>= 3.1.0) 
WARN: Clearing out unresolved specs. 
Please report a bug if this causes problems. 
=> Padrino/0.11.2 has taken the stage development at http://0.0.0.0:3000 
<= Padrino leaves the gun, takes the cannoli 
/home/action/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError)  
  from /home/action/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler/thin.rb:1:in `<top (required)>' 
  from /home/action/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler.rb:20:in `const_get'  
...elided for brevity...

BLAM!

Odd. Sure I saw it in the gem list --local... Is it installed?

action@kimbo-review-99999:~/workspace/kimbo$ which thin 
action@kimbo-review-99999:~/workspace/kimbo$ gem list --local | grep thin 
So I was wrong. Not installed.
Install it:

action@kimbo-review-99999:~/workspace/kimbo$ gem install thin 
Fetching: eventmachine-1.0.3.gem (100%)  
Building native extensions.  This could take a while...  
Successfully installed eventmachine-1.0.3  
Fetching: daemons-1.1.9.gem (100%) 
Successfully installed daemons-1.1.9 
Fetching: thin-1.5.1.gem (100%)  
Building native extensions.  This could take a while...  
Successfully installed thin-1.5.1  
3 gems installed 
And try again:

action@kimbo-review-99999:~/workspace/kimbo$ padrino start -p 3000 -e development -h 0.0.0.0 -a thin  
WARN: Unresolved specs during Gem::Specification.reset:  
  rack (>= 1.0.0, ~> 1.4)  
  activesupport (>= 3.1.0) 
WARN: Clearing out unresolved specs. 
Please report a bug if this causes problems. 
=> Padrino/0.11.2 has taken the stage development at http://0.0.0.0:3000 
<= Padrino leaves the gun, takes the cannoli 
/home/action/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError)  
  from /home/action/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler/thin.rb:1:in `<top (required)>' 
  from /home/action/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler.rb:20:in `const_get'  
...elided for brevity...

BLAM!

Oh my lord I'm a dummy. Look at the Gemfile:

# Server requirements
# gem 'thin' # or mongrel
# gem 'trinidad', :platform => 'jruby'
Ok. (Hmm. JRuby would be interesting to test... :-)
Uncomment thin and bundle install and try again:

action@kimbo-review-99999:~/workspace/kimbo$ padrino start -p 3000 -e development -h 0.0.0.0 -a thin  
WARN: Unresolved specs during Gem::Specification.reset:  
  rack (>= 1.0.0, ~> 1.4)  
  activesupport (>= 3.1.0) 
WARN: Clearing out unresolved specs. 
Please report a bug if this causes problems. 
=> Padrino/0.11.2 has taken the stage development at http://0.0.0.0:3000 
>> Thin web server (v1.5.1 codename Straight Razor)  
>> Maximum connections set to 1024 
>> Listening on 0.0.0.0:3000, CTRL+C to stop 
Check preview again and we see the "Sinatra doesn’t know this ditty." which is fine.

Ok. We have got somewhere.
Just because I'm cantankerous, I always enable development and test logging 'my way'.
If you want to do this, edit your config/boot.rb and add this:

Padrino::Logger::Config[:development] = {
  :log_level => :debug,
  :stream => :stdout,
  :format_datetime => '%Y-%m-%d %H:%M:%S'
}
Padrino::Logger::Config[:test] = {
  :log_level => :debug,
  :stream => :stdout,
  :format_datetime => '%Y-%m-%d %H:%M:%S'
}
I normally adjust the format of the output as well, but I won't bore you.
For the record, I also uncomment the I18n.default_locale = :en line.

One thing I need to mention is the font. Why can't I change it?
I know I'm old and have bad eyes, but I prefer a MUCH smaller font to get a better view.

I found that the in browser editor gets it 'almost' right - curlys don't line up the way I like.
I also noticed that when you click on the language button or soft tabs button you have to re-click the button to get the menu to go away.
Clicking in the editor window doesn't do it.
In fact, ALL buttons have this behaviour which I find personally irritating.
You may feel different and that's fine.
I'm spoiled I guess using IDEs like RubyMine.

No I tried the 'chat' mode with Ben (who is downstairs writing a non-technical review) and up came a 'Collaborators' popup.

"This feature is experimental"

Ah. But heck, I'll try it. So I typed in his email and the first part worked.
To get your collaborator to have editing on a file, you open it in your editor and click the 'Collab Mode' button.
Neat. It's experimental - YMMV.

Ok. One thing I noticed is that there is no config/database stuff.
Now while clicking about on the menus I saw the following options on the 'Connect' menu: 'MongoDB (MongoLab)' and 'PostgreSQL (Heroku)'.
These point to help pages with extensive details on how to get connected to them, so I won't go into it in detail.
You'll have to install the ORMs etc and configure them yourself of course.

One niggle: when on the 'Connect' pages, it's tempting to click the 'Help Center' button at the top.
Unfortunately, this is a href to the page you're on.
Not helpful.
So if you want to go to the actual help center, you'll have to use http://help.nitrous.io
The Help Center is well laid out and easy to navigate but does have some

Conclusion:

Frackin love it. It has quirks but is just a development environment. Ben tried it on the iPad and apart from not listening to attached keyboard commands it worked just fine.

You *could* run up NGinx or Apache2 on your box and have a 'stage/production' environment, but if you are using Heroku or ilk, why bother?
You *could* install MySQL or CouchDB or whatever locally. I didn't try it.
Does it violate some part of the acceptable terms or policy?
Can't see anything on the help center about this.
Need to read a bit more.

Just a point... If you're just using the system as a development environment, why would you need a box with 2Gb memory and 20Tb (Correction 20Gb - been in the big data world too long) of storage just for development? At $89.95 a month this seems over the top. There is an implication (for me) that if you're paying $90 a month you would expect to be able to install extra packages and use the box at least as a staging if not production server.

There are some quirks.

If you use git (you do use it right?) then it's cmdline only.
Maybe they'll add it to the menu to allow issue/branch/merge/commit/push like RubyMine but I'm ok with the cmdline.

Also a website oddness. Once you've gone to the https://www.nitrous.io/app once, you can't seem to get back to the main site at http://nitrous.io - you just keep getting redirected to your app boxes page. Browser issue? In any case it's annoying.
I had to open a new 'incognito' window to get to https://www.nitrous.io/pricing.

There are a few spelling errors and what not, but we're all developers right?

Deployment

Heroku integration
Deplying to Heroku

`Deplying`?

Also I have to say that when I followed the link for connecting to GitHub, I saw the authorize page:
"Authorize Nitrous.IO?
The app Nitrous.IO will be able to:
Read your public information.
Update your user profile.
Update your public and private repositories (Commits, Issues, etc)."
Wait. Update my public information? Make *ANY* change to my public and private repos? How do I authorize that from GitHub to stop someone hacking Nitrous and getting access to my repos? Hmm. Kinda facebookie. Scared to enter my details on that one. Same for LinkedIn. Although I'm obviously trusting GitHub and LinkedIn to not get hacked...

Oh! I forgot: READ THE:

'Acceptible use policy' (http://help.nitrous.io/admin-aup/) especially the 'Quota & Limits' part.

'Terms of use' (http://help.nitrous.io/admin-terms/) especially '8. License from You'

But I love it.
I'll use it.
It won't replace RubyMine, but it's not supposed to.
It's to allow project development anywhere not just on your local desktop.
ChromeBook on the train home anyone?

I give it 5 pings.

FYI: You can get me extra N2O by following this link: https://www.nitrous.io/join/CL9mwvyYmwY

UPDATE: I was discussing my post with Ben and something occurred to me. How would this work with teams? I could easily see that a sole developer (or a duo) would find the system fantastic to work with. But with teams? Here's a simple example:

Ben and Kim are developers. Let's say Ben creates a box to work on. He creates an app. Kim wants in. How does that work? She has access to the box as per http://help.nitrous.io/collab/ but does she start a new instance of the app so she can work on it? How does it fit together when you may have dozens of people working on a project? They each have a Nitrous account, and the IDE open, but do they all have a WEBrick (or Thin - whatever) running? And since it's in development mode, won't changes Ben makes to the code get reloaded by Kims instance of WEBrick? They may be silly or just plain invalid questions, but I need to play with that to answer the question fully. Another post.

2 comments:

  1. Nice post! I just gave Nitrous.io a spin a couple of days ago.

    Thoughts:

    The virtualization is via LXC:

    $ mount
    ...
    devpts on /dev/lxc/console type devpts (rw,noexec,nosuid,relatime,gid=5,mode=620,ptmxmode=000)
    ...

    The memory allocated to the AWS instance box is 64GB-70GB. I put down a range, since it measured 64GB yesterday and 66GB today.

    Looks like they are using cgroups to limit memory utilization:

    [14591690.303664] Memory cgroup out of memory: Kill process 18330 (qbs.test) score 920 or sacrifice child

    Note: that wasn't my process which was killed, so there is a shared 'dmesg' output. Something to be aware of, if folks are used to doing internals dumping to the console/logging. It isn't secured or isolated.

    /proc/cpuinfo reveals there are 8 x intel xeon 2.4Ghz cpu cores.
    The "/" for my instance showed a size of 500GB.

    Though I'm sure it will differ based on which AWS backend is hosting the LXC container for the Nitrous.io user.

    Cron jobs appear to work. Which is nice.

    The AUP listing of limits is interesting. Especially the 1TB soft limit for network transfers.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete