lobot 2.0.0pre → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -10
- data/.gitmodules +1 -1
- data/.pairs +15 -0
- data/.rvmrc +1 -1
- data/.travis.yml +5 -0
- data/Gemfile +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +67 -29
- data/Rakefile +11 -6
- data/Vagrantfile +8 -5
- data/bin/lobot +2 -4
- data/chef/cookbooks/pivotal_ci/attributes/jenkins.rb +1 -0
- data/chef/cookbooks/pivotal_ci/files/default/tests/minitest/default_test.rb +40 -2
- data/chef/cookbooks/pivotal_ci/recipes/id_rsa.rb +5 -0
- data/chef/cookbooks/pivotal_ci/recipes/jenkins_config.rb +5 -2
- data/chef/cookbooks/pivotal_ci/recipes/limited_travis_ci_environment.rb +4 -0
- data/chef/cookbooks/pivotal_ci/templates/default/jenkins-job-config.xml.erb +8 -6
- data/chef/cookbooks/pivotal_ci/test/kitchen/cookbooks/pivotal_ci_test/attributes/default.rb +0 -1
- data/chef/cookbooks/pivotal_ci/test/kitchen/cookbooks/pivotal_ci_test/recipes/bootstrap.rb +41 -0
- data/chef/cookbooks/pivotal_ci/test/kitchen/cookbooks/pivotal_ci_test/recipes/default.rb +1 -41
- data/chef/travis-cookbooks/ci_environment/apt/recipes/default.rb +8 -7
- data/chef/travis-cookbooks/ci_environment/bazaar/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/cassandra/attributes/default.rb +6 -3
- data/chef/travis-cookbooks/ci_environment/cassandra/recipes/datastax.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/cassandra/recipes/package.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/cassandra/recipes/tarball.rb +6 -2
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/cassandra.init.erb +58 -131
- data/chef/travis-cookbooks/ci_environment/chromium/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/clang/attributes/tarball.rb +2 -7
- data/chef/travis-cookbooks/ci_environment/clang/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/clang/recipes/tarball.rb +2 -4
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ubuntu-12.04.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ubuntu1110_ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ubuntu1204_ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/doxygen/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/ci_environment/elasticsearch/attributes/default.rb +4 -1
- data/chef/travis-cookbooks/ci_environment/elasticsearch/recipes/default.rb +8 -5
- data/chef/travis-cookbooks/ci_environment/emacs/recipes/nox.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/firefox/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/git/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/git/recipes/ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/golang/attributes/default.rb +3 -3
- data/chef/travis-cookbooks/ci_environment/gradle/attributes/tarball.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/ghc_package.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/ghc_source.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/platform_package.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/platform_ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/platform_source.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/source.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/hbase/recipes/cdh4.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/java/attributes/default.rb +4 -2
- data/chef/travis-cookbooks/ci_environment/java/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/java/recipes/oraclejdk7.rb +6 -1
- data/chef/travis-cookbooks/ci_environment/kerl/attributes/source.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/kerl/files/default/erlang.cookie +1 -0
- data/chef/travis-cookbooks/ci_environment/kerl/recipes/source.rb +8 -0
- data/chef/travis-cookbooks/ci_environment/kestrel/recipes/tarball.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/leiningen/attributes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/leiningen/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/leiningen/recipes/lein1x.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/leiningen/recipes/lein2x.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libffi/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libgdbm/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libncurses/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libossp-uuid/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libreadline/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libssl/recipes/098.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libssl/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/libxml/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/lighttpd/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/default.rb +5 -2
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/package.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/tarball.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/memcached/attributes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/memcached/attributes/ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/memcached/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/memcached/recipes/ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/mercurial/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/mercurial/recipes/ppa.rb +36 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/attributes/mongodb.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/mongodb/files/default/mongodb.sysvinit.sh +1 -1
- data/chef/travis-cookbooks/ci_environment/mongodb/recipes/apt.rb +5 -5
- data/chef/travis-cookbooks/ci_environment/mongodb/recipes/server.rb +5 -2
- data/chef/travis-cookbooks/ci_environment/mysql/attributes/default.rb +1 -3
- data/chef/travis-cookbooks/ci_environment/mysql/recipes/server_on_ramfs.rb +6 -1
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/my.cnf.erb +0 -2
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/ramfs/my.cnf.erb +0 -2
- data/chef/travis-cookbooks/ci_environment/neo4j-server/attributes/tarball.rb +13 -2
- data/chef/travis-cookbooks/ci_environment/neo4j-server/recipes/tarball.rb +26 -2
- data/chef/travis-cookbooks/ci_environment/networking_basic/recipes/default.rb +4 -1
- data/chef/travis-cookbooks/ci_environment/nodejs/attributes/multi.rb +3 -3
- data/chef/travis-cookbooks/ci_environment/nodejs/recipes/multi.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/openssh/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/perlbrew/attributes/multi.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/phantomjs/attributes/default.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/phantomjs/metadata.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/phantomjs/recipes/default.rb +3 -1
- data/chef/travis-cookbooks/ci_environment/phantomjs/recipes/tarball.rb +3 -2
- data/chef/travis-cookbooks/ci_environment/php/attributes/default.rb +40 -2
- data/chef/travis-cookbooks/ci_environment/php/providers/pecl.rb +73 -0
- data/chef/travis-cookbooks/ci_environment/php/recipes/extensions.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/php/recipes/multi.rb +5 -4
- data/chef/travis-cookbooks/ci_environment/php/resources/pecl.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/attributes/default.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/phpbuild/files/default/after-install.d/phpunit.sh +58 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/files/default/definitions/5.2.17 +3 -1
- data/chef/travis-cookbooks/ci_environment/phpbuild/files/default/definitions/5.3.3 +2 -1
- data/chef/travis-cookbooks/ci_environment/phpbuild/providers/build.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/phpbuild/recipes/default.rb +8 -10
- data/chef/travis-cookbooks/ci_environment/phpbuild/templates/default/default_configure_options.erb +4 -0
- data/chef/travis-cookbooks/ci_environment/phpenv/attributes/default.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/phpenv/recipes/default.rb +11 -7
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/server_on_ramfs.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/python/attributes/default.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/python/recipes/multi.rb +10 -3
- data/chef/travis-cookbooks/ci_environment/rabbitmq/attributes/default.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/recipes/default.rb +6 -2
- data/chef/travis-cookbooks/ci_environment/ragel/recipes/custom.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/ragel/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/redis/attributes/default.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/redis/recipes/default.rb +6 -3
- data/chef/travis-cookbooks/ci_environment/redis/recipes/ppa.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/riak/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/package.rb +3 -3
- data/chef/travis-cookbooks/{messaging_broker/openssl/recipes/default.rb → ci_environment/riak/attributes/service.rb} +4 -3
- data/chef/travis-cookbooks/ci_environment/riak/recipes/config.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/riak/recipes/default.rb +12 -5
- data/chef/travis-cookbooks/ci_environment/rvm/attributes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/rvm/attributes/multi.rb +2 -0
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/global.gems +1 -1
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/jruby/global.gems +1 -1
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/ruby/2.0.0/global.gems +2 -0
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/ruby/head/global.gems +2 -0
- data/chef/travis-cookbooks/ci_environment/rvm/recipes/default.rb +23 -1
- data/chef/travis-cookbooks/ci_environment/rvm/recipes/multi.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/rvm/templates/default/bundler_config.yml.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/sbt/CHANGELOG.md +20 -0
- data/chef/travis-cookbooks/ci_environment/sbt/LICENSE +201 -0
- data/chef/travis-cookbooks/ci_environment/sbt/README.md +78 -2
- data/chef/travis-cookbooks/ci_environment/sbt/attributes/default.rb +36 -10
- data/chef/travis-cookbooks/ci_environment/sbt/metadata.json +27 -17
- data/chef/travis-cookbooks/ci_environment/sbt/metadata.rb +13 -6
- data/chef/travis-cookbooks/ci_environment/sbt/recipes/default.rb +101 -51
- data/chef/travis-cookbooks/ci_environment/sbt/templates/default/jvmopts.erb +7 -0
- data/chef/travis-cookbooks/ci_environment/sbt/templates/default/sbtopts.erb +54 -0
- data/chef/travis-cookbooks/ci_environment/sphinx/attributes/default.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/sphinx/metadata.rb +4 -4
- data/chef/travis-cookbooks/ci_environment/sphinx/recipes/all.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/sphinx/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/{messaging_broker/build-essential/recipes/default.rb → ci_environment/sqlite/recipes/ppa.rb} +13 -24
- data/chef/travis-cookbooks/ci_environment/subversion/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/sweeper/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/attributes/default.rb +2 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/recipes/ci_user.rb +2 -2
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/recipes/default.rb +1 -3
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/recipes/root.rb +5 -1
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/ci_user/{dot_bashrc.sh → dot_bashrc.sh.erb} +0 -4
- data/chef/travis-cookbooks/ci_environment/unarchivers/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/xserver/metadata.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/xserver/recipes/default.rb +1 -1
- data/chef/travis-cookbooks/ci_environment/zeromq/recipes/default.rb +6 -23
- data/chef/travis-cookbooks/ci_environment/zeromq/recipes/{20x.rb → ppa.rb} +14 -14
- data/chef/travis-cookbooks/ci_environment/zookeeper/recipes/cdh4.rb +1 -1
- data/chef/travis-cookbooks/worker_host/java/metadata.rb +1 -1
- data/chef/travis-cookbooks/worker_host/java/recipes/openjdk.rb +6 -0
- data/chef/travis-cookbooks/worker_host/jruby/attributes/default.rb +1 -1
- data/chef/travis-cookbooks/worker_host/jruby/metadata.rb +1 -1
- data/chef/travis-cookbooks/worker_host/jruby/recipes/default.rb +1 -0
- data/chef/travis-cookbooks/worker_host/monit/recipes/default.rb +21 -17
- data/chef/travis-cookbooks/worker_host/networking_basic/metadata.rb +1 -1
- data/chef/travis-cookbooks/worker_host/networking_basic/recipes/default.rb +0 -6
- data/chef/travis-cookbooks/worker_host/ntp/.gitignore +1 -0
- data/chef/travis-cookbooks/worker_host/ntp/.travis.yml +6 -0
- data/chef/travis-cookbooks/worker_host/ntp/CHANGELOG.md +35 -0
- data/chef/travis-cookbooks/worker_host/ntp/CONTRIBUTING +29 -0
- data/chef/travis-cookbooks/worker_host/ntp/LICENSE +201 -0
- data/chef/travis-cookbooks/worker_host/ntp/README.md +163 -0
- data/chef/travis-cookbooks/worker_host/ntp/Rakefile +19 -0
- data/chef/travis-cookbooks/worker_host/ntp/TESTING.md +213 -0
- data/chef/travis-cookbooks/worker_host/ntp/attributes/default.rb +54 -0
- data/chef/travis-cookbooks/{messaging_broker/rabbitmq/resources/vhost.rb → worker_host/ntp/attributes/ntpdate.rb} +6 -7
- data/chef/travis-cookbooks/worker_host/ntp/chefignore +19 -0
- data/chef/travis-cookbooks/worker_host/ntp/files/default/ntp.leapseconds +222 -0
- data/chef/travis-cookbooks/worker_host/ntp/metadata.json +117 -0
- data/chef/travis-cookbooks/worker_host/ntp/metadata.rb +45 -0
- data/chef/travis-cookbooks/worker_host/ntp/recipes/default.rb +50 -0
- data/chef/travis-cookbooks/worker_host/ntp/recipes/disable.rb +22 -0
- data/chef/travis-cookbooks/worker_host/ntp/recipes/ntpdate.rb +36 -0
- data/chef/travis-cookbooks/{messaging_broker/openssl/libraries/secure_password.rb → worker_host/ntp/recipes/undo.rb} +17 -18
- data/chef/travis-cookbooks/worker_host/ntp/templates/default/ntp.conf.erb +55 -0
- data/chef/travis-cookbooks/worker_host/ntp/templates/default/ntpdate.erb +14 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/multi.rb +1 -1
- data/chef/travis-cookbooks/worker_host/travis_worker/attributes/default.rb +10 -3
- data/chef/travis-cookbooks/worker_host/travis_worker/files/default/signal_wrapper.rb +22 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/metadata.rb +2 -2
- data/chef/travis-cookbooks/worker_host/travis_worker/recipes/bluebox.rb +97 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/recipes/default.rb +25 -15
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/sv-travis-worker-run.erb +1 -1
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/worker-bluebox.yml.erb +21 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/worker.yml.erb +0 -4
- data/chef/travis-cookbooks/worker_host/travis_worker_collectd/metadata.rb +1 -0
- data/chef/travis-cookbooks/worker_host/travis_worker_collectd/recipes/bluebox.rb +15 -0
- data/chef/travis-cookbooks/worker_host/travis_worker_collectd/recipes/default.rb +1 -0
- data/chef/travis-cookbooks/worker_host/users/recipes/default.rb +5 -0
- data/cookbooks/.gitkeep +3 -0
- data/lib/lobot.rb +8 -4
- data/lib/lobot/amazon.rb +33 -19
- data/lib/lobot/cli.rb +70 -46
- data/lib/lobot/config.rb +151 -19
- data/lib/lobot/configuration_wizard.rb +117 -0
- data/lib/lobot/keychain.rb +36 -0
- data/lib/lobot/password.rb +13 -0
- data/lib/lobot/sobo.rb +57 -13
- data/lib/lobot/templates/default_rails_build_script.sh +13 -0
- data/lib/lobot/version.rb +2 -2
- data/lobot.gemspec +4 -5
- data/script/bootstrap_server.sh +1 -1
- data/script/ci_build.sh +13 -0
- data/spec/assets/test_cert.crt +18 -0
- data/spec/fixtures/ssh_keys/vagrant_test_key +27 -0
- data/spec/fixtures/ssh_keys/vagrant_test_key.pub +1 -0
- data/spec/lib/lobot/amazon_spec.rb +80 -39
- data/spec/lib/lobot/cli_spec.rb +223 -154
- data/spec/lib/lobot/config_spec.rb +207 -5
- data/spec/lib/lobot/configuration_wizard_spec.rb +347 -0
- data/spec/lib/lobot/keychain_spec.rb +33 -0
- data/spec/lib/lobot/password_spec.rb +15 -0
- data/spec/spec_helper.rb +19 -1
- data/templates/Gemfile-remote +4 -0
- metadata +83 -100
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/ruby/1.8.6/global.gems +0 -2
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/root/dot_bashrc.sh +0 -86
- data/chef/travis-cookbooks/ci_environment/zeromq/attributes/default.rb +0 -7
- data/chef/travis-cookbooks/messaging_broker/build-essential/README.md +0 -24
- data/chef/travis-cookbooks/messaging_broker/build-essential/metadata.rb +0 -10
- data/chef/travis-cookbooks/messaging_broker/emacs/metadata.rb +0 -11
- data/chef/travis-cookbooks/messaging_broker/emacs/recipes/default.rb +0 -21
- data/chef/travis-cookbooks/messaging_broker/erlang/attributes/default.rb +0 -1
- data/chef/travis-cookbooks/messaging_broker/erlang/metadata.rb +0 -11
- data/chef/travis-cookbooks/messaging_broker/erlang/recipes/default.rb +0 -27
- data/chef/travis-cookbooks/messaging_broker/git/README.rdoc +0 -37
- data/chef/travis-cookbooks/messaging_broker/git/metadata.rb +0 -16
- data/chef/travis-cookbooks/messaging_broker/git/recipes/default.rb +0 -24
- data/chef/travis-cookbooks/messaging_broker/git/recipes/server.rb +0 -34
- data/chef/travis-cookbooks/messaging_broker/git/templates/default/sv-git-daemon-log-run.erb +0 -2
- data/chef/travis-cookbooks/messaging_broker/git/templates/default/sv-git-daemon-run.erb +0 -3
- data/chef/travis-cookbooks/messaging_broker/haproxy/README.md +0 -79
- data/chef/travis-cookbooks/messaging_broker/haproxy/attributes/default.rb +0 -22
- data/chef/travis-cookbooks/messaging_broker/haproxy/metadata.rb +0 -13
- data/chef/travis-cookbooks/messaging_broker/haproxy/recipes/app_lb.rb +0 -50
- data/chef/travis-cookbooks/messaging_broker/haproxy/recipes/default.rb +0 -42
- data/chef/travis-cookbooks/messaging_broker/haproxy/templates/default/haproxy-app_lb.cfg.erb +0 -34
- data/chef/travis-cookbooks/messaging_broker/haproxy/templates/default/haproxy-default.erb +0 -4
- data/chef/travis-cookbooks/messaging_broker/haproxy/templates/default/haproxy.cfg.erb +0 -27
- data/chef/travis-cookbooks/messaging_broker/iptables/definitions/iptables_rule.rb +0 -35
- data/chef/travis-cookbooks/messaging_broker/iptables/files/default/rebuild-iptables +0 -284
- data/chef/travis-cookbooks/messaging_broker/iptables/metadata.rb +0 -10
- data/chef/travis-cookbooks/messaging_broker/iptables/recipes/default.rb +0 -50
- data/chef/travis-cookbooks/messaging_broker/iptables/templates/default/all_established.erb +0 -2
- data/chef/travis-cookbooks/messaging_broker/iptables/templates/default/all_icmp.erb +0 -2
- data/chef/travis-cookbooks/messaging_broker/iptables/templates/default/iptables_load.erb +0 -3
- data/chef/travis-cookbooks/messaging_broker/openssl/README.md +0 -37
- data/chef/travis-cookbooks/messaging_broker/openssl/metadata.rb +0 -8
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/README.md +0 -86
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/attributes/default.rb +0 -10
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/metadata.rb +0 -63
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/providers/user.rb +0 -66
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/providers/vhost.rb +0 -34
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/recipes/cluster.rb +0 -35
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/recipes/default.rb +0 -51
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/resources/user.rb +0 -25
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/templates/default/doterlang.cookie.erb +0 -1
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/templates/default/rabbitmq-env.conf.erb +0 -10
- data/chef/travis-cookbooks/messaging_broker/rabbitmq/templates/default/rabbitmq_cluster.config.erb +0 -5
- data/ci_build.sh +0 -20
- data/docs/ci_yml.md +0 -39
- data/features/ci.feature +0 -29
- data/features/config/secrets.yml.example +0 -4
- data/features/step_definitions/ci_steps.rb +0 -137
- data/features/support/env.rb +0 -12
- data/lib/generators/lobot/USAGE +0 -15
- data/lib/generators/lobot/config_generator.rb +0 -141
- data/lib/generators/lobot/install_generator.rb +0 -25
- data/lib/generators/lobot/templates/Capfile +0 -6
- data/lib/generators/lobot/templates/ci.yml +0 -22
- data/lib/generators/lobot/templates/ci_build.sh +0 -22
- data/lib/generators/lobot/templates/deploy-ci.rb +0 -7
- data/lib/generators/lobot/templates/soloistrc +0 -23
- data/lib/lobot/jenkins.rb +0 -17
- data/lib/lobot/railtie.rb +0 -20
- data/lib/lobot/recipes/ci.rb +0 -78
- data/lib/lobot/tasks/ci.rake +0 -93
- data/spec/lib/lobot/jenkins_spec.rb +0 -14
data/.gitignore
CHANGED
data/.gitmodules
CHANGED
data/.pairs
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# This file is managed by Chef!
|
2
|
+
# Override node.default["git_pairs_authors"] and node.default["git_pairs_domain"] in attributes/git_pairs.rb to modify.
|
3
|
+
|
4
|
+
pairs:
|
5
|
+
dr: Doc Ritezel; doc
|
6
|
+
mk: Matthew Kocher; mkocher
|
7
|
+
km: Ken Mayer; ken
|
8
|
+
dv: David Varvel; dvarvel
|
9
|
+
am: Alexander Murmann; Alexander
|
10
|
+
|
11
|
+
email:
|
12
|
+
prefix: pair
|
13
|
+
domain: pivotallabs.com
|
14
|
+
|
15
|
+
global: true
|
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm --create
|
1
|
+
rvm --create ruby-1.9.3-p327@lobot
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem "builder", "~> 3.0.0" # Bundler goes into an infinite loop looking for this dep
|
3
|
+
#gem "builder", "~> 3.0.0" # Bundler occasionally goes into an infinite loop looking for this dep if version isn't specified.
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in lobot.gemspec
|
6
6
|
gemspec
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
-
Lobot: Your Chief Administrative Aide on Cloud City
|
2
|
-
============================
|
1
|
+
# Lobot: Your Chief Administrative Aide on Cloud City
|
3
2
|
|
4
3
|
![Lobot](http://cheffiles.pivotallabs.com/lobot/logo.png)
|
5
4
|
|
6
|
-
|
5
|
+
[![Code Climate](https://codeclimate.com/github/pivotal/lobot.png)](https://codeclimate.com/github/pivotal/lobot)
|
6
|
+
[![Build Status](https://travis-ci.org/pivotal/lobot.png?branch=master)](https://travis-ci.org/pivotal/lobot)
|
7
|
+
|
8
|
+
|
9
|
+
## Easily create your CI server on EC2
|
7
10
|
|
8
11
|
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.
|
9
12
|
|
@@ -13,41 +16,60 @@ Lando Calrissian relies on Lobot to keep Cloud City afloat, and now you can rely
|
|
13
16
|
* The full [Travis CI](http://travis-ci.org) environment on Ubuntu 12.04
|
14
17
|
* A Jenkins frontend for monitoring your builds
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
```
|
20
|
+
Tasks:
|
21
|
+
lobot add_build <name> <repository> <branch> <command> # Adds a build to Lobot
|
22
|
+
lobot bootstrap # Configures Lobot's master node
|
23
|
+
lobot certificate # Dump the certificate
|
24
|
+
lobot chef # Uploads chef recipes and runs them
|
25
|
+
lobot config # Dumps all configuration data for Lobot
|
26
|
+
lobot create # Create a new Lobot server using EC2
|
27
|
+
lobot create_vagrant # Creates a vagrant instance
|
28
|
+
lobot destroy_ec2 # Destroys all the lobot resources on EC2
|
29
|
+
lobot help [TASK] # Describe available tasks or one specific task
|
30
|
+
lobot open # Open a browser to Lobot
|
31
|
+
lobot setup # Sets up lobot through a series of questions
|
32
|
+
lobot ssh # SSH into Lobot
|
33
|
+
lobot trust_certificate # Adds the current master's certificate to your OSX keychain
|
34
|
+
```
|
23
35
|
|
24
36
|
Read on for an explanation of what each one of these steps does.
|
25
37
|
|
26
38
|
## Install
|
27
39
|
|
28
|
-
|
40
|
+
gem install lobot
|
29
41
|
|
30
|
-
|
42
|
+
Lobot runs independently of your project and is not a dependency.
|
31
43
|
|
32
44
|
## Setup
|
33
45
|
|
34
|
-
|
46
|
+
If this is your first time running `lobot` and you do not have configuration file, yet, run:
|
35
47
|
|
36
|
-
|
37
|
-
server_ssh_key: ~/.ssh/id_rsa
|
38
|
-
github_ssh_key: ~/.ssh/id_rsa
|
39
|
-
aws_key: <your AWS Key>
|
40
|
-
aws_secret: <your AWS Secret>
|
41
|
-
node_attributes:
|
42
|
-
nginx:
|
43
|
-
basic_auth_user: ci
|
44
|
-
basic_auth_password: password
|
48
|
+
lobot setup
|
45
49
|
|
46
|
-
|
50
|
+
It will ask you a series of questions that will get you up and running.
|
47
51
|
|
48
52
|
## Adjust Defaults (Optional)
|
49
53
|
|
50
|
-
|
54
|
+
If you don't like the default, Rails-centric, build script you can create your own:
|
55
|
+
|
56
|
+
```sh
|
57
|
+
#!/bin/bash -le
|
58
|
+
|
59
|
+
source .rvmrc
|
60
|
+
|
61
|
+
# install bundler if necessary
|
62
|
+
set -e
|
63
|
+
|
64
|
+
gem install bundler --no-ri --no-rdoc && bundle install
|
65
|
+
|
66
|
+
# debugging info
|
67
|
+
echo USER=$USER && ruby --version && which ruby && which bundle
|
68
|
+
|
69
|
+
bundle exec rake spec
|
70
|
+
```
|
71
|
+
|
72
|
+
In your config/lobot.yml, there are defaults set for recommended values. For example, the EC2 instance size is set to "c1.medium".
|
51
73
|
|
52
74
|
You can save on EC2 costs by using a tool like [projectmonitor](https://github.com/pivotal/projectmonitor) or ylastic to schedule when your instances are online.
|
53
75
|
|
@@ -65,7 +87,7 @@ You can modify the chef run list by setting the `recipes` key in config/lobot.ym
|
|
65
87
|
|
66
88
|
Because we're using the cookbooks from Travis CI, you can look through [all the recipes Travis has available](https://github.com/travis-ci/travis-cookbooks/), and add any that you need.
|
67
89
|
|
68
|
-
##
|
90
|
+
## Manually starting your lobot instance
|
69
91
|
|
70
92
|
1. Launch an instance, allocate and associates an elastic IP and updates config/lobot.yml:
|
71
93
|
|
@@ -79,8 +101,15 @@ Because we're using the cookbooks from Travis CI, you can look through [all the
|
|
79
101
|
|
80
102
|
lobot chef
|
81
103
|
|
82
|
-
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.
|
83
|
-
|
104
|
+
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. Or, if you are on a Mac, run `lobot open`. For more information about Jenkins CI, see [http://jenkins-ci.org](http://jenkins-ci.org).
|
105
|
+
|
106
|
+
## Custom Chef Recipes
|
107
|
+
|
108
|
+
If you need to write your own chef recipes to install your project's dependencies, you can add a cookbooks directory to
|
109
|
+
the root of your project. Make sure to delete the cookbook_paths section from your lobot.yml (to use the default values),
|
110
|
+
or add ./chef/project-cookbooks to the cookbook_paths section.
|
111
|
+
|
112
|
+
So, to have a bacon recipe, you should have cookbooks/pork/recipes/bacon.rb file in your repository.
|
84
113
|
|
85
114
|
## Troubleshooting
|
86
115
|
|
@@ -104,11 +133,20 @@ end
|
|
104
133
|
|
105
134
|
## Dependencies
|
106
135
|
|
107
|
-
* fog
|
108
136
|
* ci_reporter
|
109
|
-
*
|
137
|
+
* fog
|
138
|
+
* godot
|
139
|
+
* haddock
|
110
140
|
* hashie
|
141
|
+
* httpclient
|
111
142
|
* net-ssh
|
143
|
+
* thor
|
144
|
+
|
145
|
+
## Forking
|
146
|
+
|
147
|
+
Please be aware that Lobot uses git submodules. In order to git source Lobot in your `Gemfile`, you will need the following line:
|
148
|
+
|
149
|
+
gem "lobot", :github => "pivotal/lobot", :submodules => true
|
112
150
|
|
113
151
|
## Testing
|
114
152
|
|
data/Rakefile
CHANGED
@@ -1,11 +1,16 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler/gem_tasks'
|
2
3
|
require 'rspec/core/rake_task'
|
3
|
-
require 'bundler'
|
4
4
|
|
5
|
-
|
5
|
+
file "chef/travis-cookbooks/README.md" do
|
6
|
+
sh "git submodule init"
|
7
|
+
sh "git submodule update"
|
8
|
+
end
|
6
9
|
|
7
|
-
task :default => ['ci:setup:rspec', :spec]
|
8
|
-
|
9
|
-
desc "Run all specs in spec directory (excluding plugin specs)"
|
10
10
|
RSpec::Core::RakeTask.new(:spec)
|
11
11
|
|
12
|
+
desc ""
|
13
|
+
task :spec => ["chef/travis-cookbooks/README.md"]
|
14
|
+
|
15
|
+
desc "Run specs"
|
16
|
+
task :default => :spec
|
data/Vagrantfile
CHANGED
@@ -3,13 +3,16 @@ Vagrant::Config.run do |config|
|
|
3
3
|
config.vm.box_url = "http://files.vagrantup.com/#{config.vm.box}.box"
|
4
4
|
config.vm.network :hostonly, "192.168.33.10"
|
5
5
|
|
6
|
-
config.vm.provision :shell, :inline => "
|
6
|
+
config.vm.provision :shell, :inline => "grep -q ubuntu /etc/passwd || sudo -n useradd -m ubuntu -G sudo,admin -s /bin/bash"
|
7
|
+
|
8
|
+
config.vm.provision :shell, :inline => "test -d /home/ubuntu/.ssh || sudo -n mkdir /home/ubuntu/.ssh"
|
9
|
+
config.vm.provision :shell, :inline => "sudo -n chmod 0700 /home/ubuntu/.ssh"
|
7
10
|
|
8
11
|
config.vm.provision :shell do |shell|
|
9
|
-
shell.inline = "echo $@
|
10
|
-
ssh_key =
|
12
|
+
shell.inline = "sudo -n echo $@ > /home/ubuntu/.ssh/authorized_keys"
|
13
|
+
ssh_key = File.join(File.dirname(__FILE__), 'spec', 'fixtures', 'ssh_keys', 'vagrant_test_key.pub')
|
11
14
|
shell.args = File.read(ssh_key)
|
12
15
|
end
|
13
16
|
|
14
|
-
config.vm.provision :shell, :inline => "sudo
|
15
|
-
end
|
17
|
+
config.vm.provision :shell, :inline => "sudo -n chown -R ubuntu /home/ubuntu/.ssh"
|
18
|
+
end
|
data/bin/lobot
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
describe "pivotal_ci::jenkins" do
|
2
2
|
include MiniTest::Chef::Assertions
|
3
3
|
include MiniTest::Chef::Context
|
4
4
|
include MiniTest::Chef::Resources
|
@@ -16,7 +16,45 @@ describe_recipe "pivotal_ci::jenkins" do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
describe "pivotal_ci::id_rsa" do
|
20
|
+
include MiniTest::Chef::Assertions
|
21
|
+
include MiniTest::Chef::Context
|
22
|
+
include MiniTest::Chef::Resources
|
23
|
+
|
24
|
+
describe ".ssh/id_rsa" do
|
25
|
+
it "exists" do
|
26
|
+
file("/var/lib/jenkins/.ssh/id_rsa").must_exist
|
27
|
+
end
|
28
|
+
|
29
|
+
it "is user-writable" do
|
30
|
+
file("/var/lib/jenkins/.ssh/id_rsa").must_have(:mode, "600")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "is owned by jenkins" do
|
34
|
+
file("/var/lib/jenkins/.ssh/id_rsa").must_have(:user, "jenkins")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe ".ssh/known_hosts" do
|
39
|
+
it "exists" do
|
40
|
+
file("/var/lib/jenkins/.ssh/known_hosts").must_exist
|
41
|
+
end
|
42
|
+
|
43
|
+
it "is user-writable" do
|
44
|
+
file("/var/lib/jenkins/.ssh/known_hosts").must_have(:mode, "600")
|
45
|
+
end
|
46
|
+
|
47
|
+
it "is owned by jenkins" do
|
48
|
+
file("/var/lib/jenkins/.ssh/known_hosts").must_have(:user, "jenkins")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe "pivotal_ci::default" do
|
54
|
+
include MiniTest::Chef::Assertions
|
55
|
+
include MiniTest::Chef::Context
|
56
|
+
include MiniTest::Chef::Resources
|
57
|
+
|
20
58
|
def wait_for(match, options="")
|
21
59
|
Timeout.timeout(10) do
|
22
60
|
sleep 1 until `curl #{options} -ks https://localhost/` =~ match
|
@@ -20,6 +20,11 @@ file "#{node["jenkins"]["home"]}/.ssh/id_rsa" do
|
|
20
20
|
owner "jenkins"
|
21
21
|
end
|
22
22
|
|
23
|
+
file "#{node["jenkins"]["home"]}/.ssh/known_hosts" do
|
24
|
+
mode 0600
|
25
|
+
owner "jenkins"
|
26
|
+
end
|
27
|
+
|
23
28
|
execute "add github to known hosts if necessary" do
|
24
29
|
github_string = 'github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
|
25
30
|
command "echo '#{github_string}' >> #{node["jenkins"]["home"]}/.ssh/known_hosts"
|
@@ -15,7 +15,7 @@ execute "download lobot plugin" do
|
|
15
15
|
jenkins_plugin.call(self, "lobot", "http://cheffiles.pivotallabs.com/lobot/lobot.hpi")
|
16
16
|
end
|
17
17
|
|
18
|
-
['git', 'ansicolor', 'xvfb'].each do |plugin|
|
18
|
+
['git-client', 'git', 'ansicolor', 'xvfb', 'greenballs'].each do |plugin|
|
19
19
|
execute "download #{plugin} plugin" do
|
20
20
|
jenkins_plugin.call(self, plugin, "http://mirrors.jenkins-ci.org/plugins/#{plugin}/latest/#{plugin}.hpi")
|
21
21
|
end
|
@@ -32,14 +32,17 @@ node["jenkins"]["builds"].each do |build|
|
|
32
32
|
owner "jenkins"
|
33
33
|
end
|
34
34
|
|
35
|
+
require "cgi"
|
35
36
|
template "#{node["jenkins"]["home"]}/jobs/#{build['name']}/config.xml" do
|
36
37
|
source "jenkins-job-config.xml.erb"
|
37
38
|
owner "jenkins"
|
38
39
|
notifies :restart, "service[jenkins]"
|
40
|
+
junit_publisher = build['junit_publisher'].nil? ? true : build['junit_publisher']
|
39
41
|
variables(
|
40
42
|
:branch => build['branch'],
|
41
43
|
:command => build['command'],
|
42
|
-
:repository => build['repository']
|
44
|
+
:repository => build['repository'],
|
45
|
+
:junit_publisher => junit_publisher
|
43
46
|
)
|
44
47
|
end
|
45
48
|
end
|
@@ -51,15 +51,17 @@
|
|
51
51
|
<concurrentBuild>false</concurrentBuild>
|
52
52
|
<builders>
|
53
53
|
<hudson.tasks.Shell>
|
54
|
-
<command><%= @command %></command>
|
54
|
+
<command><%= CGI.escapeHTML @command %></command>
|
55
55
|
</hudson.tasks.Shell>
|
56
56
|
</builders>
|
57
57
|
<publishers>
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
<% if @junit_publisher %>
|
59
|
+
<hudson.tasks.junit.JUnitResultArchiver>
|
60
|
+
<testResults>spec/reports/*.xml</testResults>
|
61
|
+
<keepLongStdio>false</keepLongStdio>
|
62
|
+
<testDataPublishers/>
|
63
|
+
</hudson.tasks.junit.JUnitResultArchiver>
|
64
|
+
<% end %>
|
63
65
|
</publishers>
|
64
66
|
<buildWrappers>
|
65
67
|
<hudson.plugins.ansicolor.AnsiColorBuildWrapper>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
bash "bootstrap" do
|
2
|
+
cwd "/home/vagrant"
|
3
|
+
code <<-BOOTSTRAP
|
4
|
+
#!/bin/bash
|
5
|
+
|
6
|
+
set -e
|
7
|
+
|
8
|
+
sudo apt-get update > /dev/null
|
9
|
+
|
10
|
+
packages="git build-essential openssl libreadline6 libreadline6-dev libreadline5 curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison subversion pkg-config"
|
11
|
+
selections=`dpkg --get-selections`
|
12
|
+
|
13
|
+
for package in $packages
|
14
|
+
do
|
15
|
+
if ! echo "$selections" | grep "^$package\s" > /dev/null
|
16
|
+
then
|
17
|
+
to_install="$to_install $package"
|
18
|
+
fi
|
19
|
+
done
|
20
|
+
|
21
|
+
if [ ! -z "$to_install" ]
|
22
|
+
then
|
23
|
+
sudo apt-get install -y $to_install
|
24
|
+
fi
|
25
|
+
|
26
|
+
test -d /usr/local/rvm || curl -L https://get.rvm.io | sudo bash -s stable
|
27
|
+
|
28
|
+
sudo tee /etc/profile.d/rvm.sh > /dev/null <<RVMSH_CONTENT
|
29
|
+
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
|
30
|
+
RVMSH_CONTENT
|
31
|
+
|
32
|
+
sudo tee /etc/rvmrc > /dev/null <<RVMRC_CONTENTS
|
33
|
+
rvm_install_on_use_flag=1
|
34
|
+
rvm_trust_rvmrcs_flag=1
|
35
|
+
rvm_gemset_create_on_use_flag=1
|
36
|
+
RVMRC_CONTENTS
|
37
|
+
|
38
|
+
sudo usermod vagrant -a -G rvm
|
39
|
+
|
40
|
+
BOOTSTRAP
|
41
|
+
end
|