Skip to content


Subversion checkout URL

You can clone with
Download ZIP
This project has been renamed to ciborg. Please visit the ciborg page for more info.
Ruby Shell

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Lobot: Your Chief Administrative Aide on Cloud City


Easily create your CI server on EC2

Lando Calrissian relies on Lobot to keep Cloud City afloat, and now you can rely on Lobot to get your continuous integration server running in the cloud. Lobot is a gem that will help you spin-up, bootstrap, and install Jenkins CI for your Rails app on Amazon EC2.

What do I get?

  • Rake tasks for creating, starting, stopping, or destroying your CI server on EC2
  • Capistrano tasks for bootstrapping the Centos EC2 instance
  • Chef recipes for configuring the instance to run Jenkins and build Rails projects

After you add lobot to your Gemfile, all you'll need to do is run the following commands:

rails g lobot:install
rails g lobot:config
rake ci:create_server
cap ci bootstrap
cap ci chef

Read on for an explanation of what each one of these steps does.


Add lobot to your Gemfile, in the test group:

gem "lobot", :group => :test

To Install

rails g lobot:install


You can use a generator to interactively generate the config/ci.yml that includes some reasonable defaults and explanations.

rails g lobot:config

Alternatively, manually edit config/ci.yml

app_name: # a short name for your application
git_location: # The location of your remote git repository which Jenkins will poll and pull from on changes.
- username: # The username you will use to access the Jenkins web interface
  password: # The password you will use to access the Jenkins web interface
  aws_access_key_id: # The Access Key for your Amazon AWS account
  aws_secret_access_key: The Secret Access Key for your Amazon AWS account
  provider: AWS # leave this one alone
  name: run 'rake ci:create_server to populate'
  instance_id: run 'rake ci:create_server to populate'
build_command: ./script/
  key_pair_name: myapp_ci
  id_rsa_path: ~/.ssh/id_rsa
github_private_ssh_key_path: ~/.ssh/id_rsa

Adjust Defaults (Optional)

In your ci.yml, there are defaults set for values that have the recommened value. For example, the instance size used for EC2 is set to "c1.medium", which costs $118/month. You can save on EC2 costs by using a tool like projectmonitor or ylastic to schedule when your instances are online.

Commit and push your changes

At this point you will need to create a commit of the files generated or modified and push those changes to your remote git repository so Jenkins can execute the build script when it pulls down your repo for the first time.

Modify the soloistrc if necessary

The soloistrc in root of your project is where you tell chef which recipes to run. Because we're using the cookbooks from Travis CI, you can look through all the recipes Travis has available, and add any of them to your soloistrc.

Starting your lobot instance

  1. Launch an instance, allocate and associates an elastic IP and updates ci.yml:

    rake ci:create_server
  2. Bootstrap the instance using the script generated by Lobot. The script installs ruby prerequisites, creates the app_user account, and installs RVM for that user:

    cap ci bootstrap
  3. Upload the contents of your chef/cookbooks/ directory, upload the soloistrc, and run chef:

    cap ci chef

Your lobot instance should now be up and running. You will be able to access your CI server at: http://<your instance address>/ with the username and password you chose during configuration. For more information about Jenkins CI, see


Shell access for your instance

rake ci:ssh

Terminating your instance and deallocating the elastic IP

rake ci:destroy_server

Suspending your instance

rake ci:stop_server

Rstarting a server

rake ci:start_server

Add your new CI instance to projectmonitor and CCMenu

Lobot can generate the config for you, just run:

rake ci:info


Lobot installs the ansicolor plugin, however you need to configure rspec to generate colorful output. One way is to include --color in your .rspec and update your spec_helper.rb to include

RSpec.configure do |config|
 config.tty = true


  • fog
  • capistrano
  • capistrano-ext
  • rvm (the gem - it configures capistrano to use RVM on the server)
  • nokogiri


Lobot is tested using rspec, generator_spec and cucumber. Cucumber provides a full integration test which can generate a rails application, push it to github, start a server and bring up CI for the generated project. You'll need a git repository (which should not have any code you care about) and an AWS account to run the whole test suite. It costs about $0.50 and takes about half an hour. It will attempt to terminate the server however you should verify this so you do not get charged additional money. Use the secrets.yml.example to create a secrets.yml file with your account information.


We welcome pull requests. Pull requests should have test coverage for quick consideration. Please fork, make your changes on a branch, and open a pull request.


Lobot is MIT Licensed and © Pivotal Labs. See LICENSE.txt for details.

Something went wrong with that request. Please try again.