ciborg 0.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ciborg might be problematic. Click here for more details.
- data/.gitignore +9 -16
- data/.gitmodules +3 -0
- data/.pairs +17 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +3 -1
- data/Guardfile +10 -0
- data/LICENSE.txt +17 -18
- data/README.md +152 -17
- data/Rakefile +16 -1
- data/Vagrantfile +18 -0
- data/bin/ciborg +5 -0
- data/chef/cookbooks/pivotal_ci/.gitignore +4 -0
- data/chef/cookbooks/pivotal_ci/Gemfile +3 -0
- data/chef/cookbooks/pivotal_ci/README.md +3 -0
- data/chef/cookbooks/pivotal_ci/attributes/git.rb +4 -0
- data/chef/cookbooks/pivotal_ci/attributes/jenkins.rb +3 -0
- data/chef/cookbooks/pivotal_ci/attributes/nginx.rb +1 -0
- data/chef/cookbooks/pivotal_ci/attributes/ssl.rb +5 -0
- data/chef/cookbooks/pivotal_ci/files/default/jenkins-ci.org.key +112 -0
- data/chef/cookbooks/pivotal_ci/files/default/tests/minitest/default_test.rb +75 -0
- data/chef/cookbooks/pivotal_ci/metadata.rb +32 -0
- data/chef/cookbooks/pivotal_ci/recipes/default.rb +6 -0
- data/chef/cookbooks/pivotal_ci/recipes/fonts.rb +5 -0
- data/chef/cookbooks/pivotal_ci/recipes/git_config.rb +17 -0
- data/chef/cookbooks/pivotal_ci/recipes/id_rsa.rb +32 -0
- data/chef/cookbooks/pivotal_ci/recipes/jenkins.rb +26 -0
- data/chef/cookbooks/pivotal_ci/recipes/jenkins_config.rb +48 -0
- data/chef/cookbooks/pivotal_ci/recipes/limited_travis_ci_environment.rb +39 -0
- data/chef/cookbooks/pivotal_ci/recipes/nginx.rb +19 -0
- data/chef/cookbooks/pivotal_ci/recipes/ssl_certificate.rb +44 -0
- data/chef/cookbooks/pivotal_ci/recipes/teamcity.rb +42 -0
- data/chef/cookbooks/pivotal_ci/templates/default/jenkins-job-config.xml.erb +79 -0
- data/chef/cookbooks/pivotal_ci/templates/default/nginx-conf.erb +58 -0
- data/chef/cookbooks/pivotal_ci/templates/default/nginx-htaccess.erb +3 -0
- data/chef/cookbooks/pivotal_ci/templates/default/org.jenkinsci.plugins.xvfb.XvfbBuildWrapper.xml.erb +11 -0
- data/chef/cookbooks/pivotal_ci/templates/default/teamcity-initd.erb +44 -0
- data/chef/cookbooks/pivotal_ci/test/kitchen/Kitchenfile +4 -0
- data/chef/cookbooks/pivotal_ci/test/kitchen/cookbooks/pivotal_ci_test/attributes/default.rb +2 -0
- data/chef/cookbooks/pivotal_ci/test/kitchen/cookbooks/pivotal_ci_test/metadata.rb +10 -0
- 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 -0
- data/chef/travis-cookbooks/.gitignore +7 -0
- data/chef/travis-cookbooks/LICENSE +23 -0
- data/chef/travis-cookbooks/README.md +28 -0
- data/chef/travis-cookbooks/ci_environment/.gitignore +1 -0
- data/chef/travis-cookbooks/ci_environment/ant/README.md +51 -0
- data/chef/travis-cookbooks/ci_environment/ant/metadata.rb +14 -0
- data/chef/travis-cookbooks/ci_environment/ant/recipes/default.rb +41 -0
- data/chef/travis-cookbooks/ci_environment/apt/README.md +109 -0
- data/chef/travis-cookbooks/ci_environment/apt/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/apt/files/default/apt-cacher +9 -0
- data/chef/travis-cookbooks/ci_environment/apt/files/default/apt-cacher.conf +144 -0
- data/chef/travis-cookbooks/ci_environment/apt/files/default/apt-proxy-v2.conf +50 -0
- data/chef/travis-cookbooks/ci_environment/apt/metadata.json +34 -0
- data/chef/travis-cookbooks/ci_environment/apt/metadata.rb +13 -0
- data/chef/travis-cookbooks/ci_environment/apt/providers/repository.rb +73 -0
- data/chef/travis-cookbooks/ci_environment/apt/recipes/cacher-client.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/apt/recipes/cacher.rb +45 -0
- data/chef/travis-cookbooks/ci_environment/apt/recipes/default.rb +55 -0
- data/chef/travis-cookbooks/ci_environment/apt/resources/repository.rb +31 -0
- data/chef/travis-cookbooks/ci_environment/apt/templates/ubuntu-10.04/sources.list.erb +31 -0
- data/chef/travis-cookbooks/ci_environment/apt/templates/ubuntu-11.04/sources.list.erb +31 -0
- data/chef/travis-cookbooks/ci_environment/apt/templates/ubuntu-11.10/sources.list.erb +31 -0
- data/chef/travis-cookbooks/ci_environment/apt/templates/ubuntu-12.04/sources.list.erb +54 -0
- data/chef/travis-cookbooks/ci_environment/bazaar/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/bison/attributes/default.rb +7 -0
- data/chef/travis-cookbooks/ci_environment/bison/recipes/default.rb +48 -0
- data/chef/travis-cookbooks/ci_environment/build-essential/README.md +24 -0
- data/chef/travis-cookbooks/ci_environment/build-essential/metadata.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/build-essential/recipes/default.rb +47 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/attributes/default.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/recipes/datastax.rb +43 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/recipes/package.rb +43 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/recipes/tarball.rb +158 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/cassandra-cli.erb +60 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/cassandra-env.sh.erb +159 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/cassandra-limits.conf.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/cassandra.init.erb +158 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/cassandra.yaml.erb +567 -0
- data/chef/travis-cookbooks/ci_environment/cassandra/templates/default/log4j-server.properties.yml +43 -0
- data/chef/travis-cookbooks/ci_environment/chromium/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/clang/attributes/tarball.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/clang/metadata.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/clang/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/clang/recipes/tarball.rb +73 -0
- data/chef/travis-cookbooks/ci_environment/cmake/README.md +21 -0
- data/chef/travis-cookbooks/ci_environment/cmake/metadata.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/cmake/recipes/default.rb +23 -0
- data/chef/travis-cookbooks/ci_environment/composer/recipes/default.rb +21 -0
- data/chef/travis-cookbooks/ci_environment/composer/templates/default/composer.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/default.rb +33 -0
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ppa.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ubuntu-12.04.rb +39 -0
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ubuntu1110_ppa.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/couchdb/recipes/ubuntu1204_ppa.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/doxygen/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/ci_environment/elasticsearch/attributes/default.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/elasticsearch/recipes/default.rb +67 -0
- data/chef/travis-cookbooks/ci_environment/emacs/metadata.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/emacs/recipes/default.rb +21 -0
- data/chef/travis-cookbooks/ci_environment/emacs/recipes/nox.rb +32 -0
- data/chef/travis-cookbooks/ci_environment/erlang/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/erlang/metadata.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/erlang/recipes/default.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/firefox/recipes/default.rb +29 -0
- data/chef/travis-cookbooks/ci_environment/git/README.rdoc +37 -0
- data/chef/travis-cookbooks/ci_environment/git/files/default/git_1.7.5.4-1+github5_amd64.deb +0 -0
- data/chef/travis-cookbooks/ci_environment/git/files/default/git_1.7.5.4-1+github5_i386.deb +0 -0
- data/chef/travis-cookbooks/ci_environment/git/metadata.rb +15 -0
- data/chef/travis-cookbooks/ci_environment/git/recipes/custom.git +65 -0
- data/chef/travis-cookbooks/ci_environment/git/recipes/default.rb +23 -0
- data/chef/travis-cookbooks/ci_environment/git/recipes/ppa.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/git/templates/default/sv-git-daemon-log-run.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/git/templates/default/sv-git-daemon-run.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/golang/README.md +35 -0
- data/chef/travis-cookbooks/ci_environment/golang/attributes/default.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/golang/recipes/default.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/golang/recipes/multi.rb +55 -0
- data/chef/travis-cookbooks/ci_environment/golang/recipes/ppa.rb +32 -0
- data/chef/travis-cookbooks/ci_environment/gradle/README.md +33 -0
- data/chef/travis-cookbooks/ci_environment/gradle/attributes/tarball.rb +9 -0
- data/chef/travis-cookbooks/ci_environment/gradle/files/default/etc/profile.d/gradle.sh +1 -0
- data/chef/travis-cookbooks/ci_environment/gradle/recipes/tarball.rb +65 -0
- data/chef/travis-cookbooks/ci_environment/gvm/files/ubuntu/gvm.sh +3 -0
- data/chef/travis-cookbooks/ci_environment/gvm/recipes/default.rb +44 -0
- data/chef/travis-cookbooks/ci_environment/haskell/attributes/ghc.rb +4 -0
- data/chef/travis-cookbooks/ci_environment/haskell/attributes/platform.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/haskell/files/default/cabal.sh +3 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/default.rb +38 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/ghc_package.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/ghc_source.rb +78 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/platform_package.rb +52 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/platform_ppa.rb +68 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/platform_source.rb +67 -0
- data/chef/travis-cookbooks/ci_environment/haskell/recipes/source.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/hbase/recipes/cdh4.rb +49 -0
- data/chef/travis-cookbooks/ci_environment/htop/recipes/default.rb +4 -0
- data/chef/travis-cookbooks/ci_environment/imagemagick/README.rdoc +33 -0
- data/chef/travis-cookbooks/ci_environment/imagemagick/metadata.rb +12 -0
- data/chef/travis-cookbooks/ci_environment/imagemagick/recipes/default.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/iptables/files/default/iptables_rules +13 -0
- data/chef/travis-cookbooks/ci_environment/iptables/metadata.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/iptables/recipes/default.rb +48 -0
- data/chef/travis-cookbooks/ci_environment/iptables/templates/default/iptables_load.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/java/README.md +102 -0
- data/chef/travis-cookbooks/ci_environment/java/attributes/default.rb +43 -0
- data/chef/travis-cookbooks/ci_environment/java/files/ubuntu/java.seed +14 -0
- data/chef/travis-cookbooks/ci_environment/java/files/ubuntu/load_jdk_switcher.sh +7 -0
- data/chef/travis-cookbooks/ci_environment/java/files/ubuntu/oraclejdk7.jinfo +44 -0
- data/chef/travis-cookbooks/ci_environment/java/files/ubuntu/oraclejdk8.jinfo +44 -0
- data/chef/travis-cookbooks/ci_environment/java/files/ubuntu/startssl_root_ca_installer.sh +48 -0
- data/chef/travis-cookbooks/ci_environment/java/metadata.rb +16 -0
- data/chef/travis-cookbooks/ci_environment/java/recipes/default.rb +30 -0
- data/chef/travis-cookbooks/ci_environment/java/recipes/multi.rb +30 -0
- data/chef/travis-cookbooks/ci_environment/java/recipes/openjdk6.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/java/recipes/openjdk7.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/java/recipes/oraclejdk7.rb +83 -0
- data/chef/travis-cookbooks/ci_environment/java/recipes/oraclejdk8.rb +71 -0
- data/chef/travis-cookbooks/ci_environment/java/templates/ubuntu/etc/profile.d/java_home.sh.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/CHANGELOG.md +7 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/CONTRIBUTING +29 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/LICENSE +201 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/README.md +52 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/attributes/default.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/metadata.rb +14 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/recipes/default.rb +58 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/templates/default/jpackage.repo.erb +49 -0
- data/chef/travis-cookbooks/ci_environment/jpackage/templates/fedora/jpackage.repo.erb +49 -0
- data/chef/travis-cookbooks/ci_environment/kerl/README.md +3 -0
- data/chef/travis-cookbooks/ci_environment/kerl/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/kerl/attributes/source.rb +2 -0
- data/chef/travis-cookbooks/ci_environment/kerl/files/default/erlang.cookie +1 -0
- data/chef/travis-cookbooks/ci_environment/kerl/metadata.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/kerl/recipes/default.rb +19 -0
- data/chef/travis-cookbooks/ci_environment/kerl/recipes/source.rb +104 -0
- data/chef/travis-cookbooks/ci_environment/kestrel/attributes/tarball.rb +15 -0
- data/chef/travis-cookbooks/ci_environment/kestrel/files/default/config/development.scala +33 -0
- data/chef/travis-cookbooks/ci_environment/kestrel/recipes/tarball.rb +134 -0
- data/chef/travis-cookbooks/ci_environment/kestrel/templates/ubuntu/kestrel-limits.conf.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/kestrel/templates/ubuntu/kestrel.init.erb +208 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/README.rdoc +5 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/attributes/default.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/files/default/profiles.clj +1 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/metadata.json +32 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/metadata.rb +8 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/recipes/default.rb +23 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/recipes/lein1x.rb +68 -0
- data/chef/travis-cookbooks/ci_environment/leiningen/recipes/lein2x.rb +82 -0
- data/chef/travis-cookbooks/ci_environment/libffi/recipes/default.rb +34 -0
- data/chef/travis-cookbooks/ci_environment/libgdbm/recipes/default.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/libncurses/recipes/default.rb +31 -0
- data/chef/travis-cookbooks/ci_environment/libossp-uuid/recipes/default.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/libqt4/recipes/default.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/libreadline/recipes/default.rb +34 -0
- data/chef/travis-cookbooks/ci_environment/libssl/recipes/098.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/libssl/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/ci_environment/libxml/recipes/default.rb +30 -0
- data/chef/travis-cookbooks/ci_environment/libyaml/recipes/default.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/lighttpd/attributes/default.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/lighttpd/recipes/default.rb +39 -0
- data/chef/travis-cookbooks/ci_environment/lighttpd/templates/default/lighttpd.conf.erb +166 -0
- data/chef/travis-cookbooks/ci_environment/maven3/attributes/default.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/maven3/files/default/settings.xml +136 -0
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/default.rb +56 -0
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/package.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/ppa.rb +44 -0
- data/chef/travis-cookbooks/ci_environment/maven3/recipes/tarball.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/maven3/templates/ubuntu-11.04/install_maven3.sh.erb +32 -0
- data/chef/travis-cookbooks/ci_environment/memcached/README.rdoc +52 -0
- data/chef/travis-cookbooks/ci_environment/memcached/attributes/default.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/memcached/attributes/ppa.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/memcached/definitions/memcached_instance.rb +32 -0
- data/chef/travis-cookbooks/ci_environment/memcached/metadata.rb +33 -0
- data/chef/travis-cookbooks/ci_environment/memcached/recipes/default.rb +60 -0
- data/chef/travis-cookbooks/ci_environment/memcached/recipes/ppa.rb +34 -0
- data/chef/travis-cookbooks/ci_environment/memcached/templates/default/memcached.conf.erb +54 -0
- data/chef/travis-cookbooks/ci_environment/memcached/templates/default/memcached.default.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/memcached/templates/default/sv-memcached-log-run.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/memcached/templates/default/sv-memcached-run.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/mercurial/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/mercurial/recipes/ppa.rb +36 -0
- data/chef/travis-cookbooks/ci_environment/mingw32/README.md +21 -0
- data/chef/travis-cookbooks/ci_environment/mingw32/metadata.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/mingw32/recipes/default.rb +23 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/.gitignore +1 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/README.md +0 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/attributes/mongodb.rb +67 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/files/default/mongodb.list +1 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/files/default/mongodb.sysvinit.sh +261 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/metadata.rb +235 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/recipes/apt.rb +65 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/recipes/default.rb +23 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/recipes/server.rb +44 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/templates/default/mongod.upstart.erb +16 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/templates/default/mongodb.conf.erb +5 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/templates/default/mongodb.init.10gen.erb +74 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/templates/default/mongodb.init.erb +268 -0
- data/chef/travis-cookbooks/ci_environment/mongodb/templates/default/mongodb.list.erb +1 -0
- data/chef/travis-cookbooks/ci_environment/mysql/README.md +141 -0
- data/chef/travis-cookbooks/ci_environment/mysql/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/mysql/attributes/server.rb +69 -0
- data/chef/travis-cookbooks/ci_environment/mysql/attributes/server_on_ramfs.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/mysql/libraries/database.rb +19 -0
- data/chef/travis-cookbooks/ci_environment/mysql/libraries/helpers.rb +33 -0
- data/chef/travis-cookbooks/ci_environment/mysql/metadata.rb +77 -0
- data/chef/travis-cookbooks/ci_environment/mysql/providers/database.rb +81 -0
- data/chef/travis-cookbooks/ci_environment/mysql/recipes/client.rb +60 -0
- data/chef/travis-cookbooks/ci_environment/mysql/recipes/default.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/mysql/recipes/server.rb +125 -0
- data/chef/travis-cookbooks/ci_environment/mysql/recipes/server_on_ramfs.rb +88 -0
- data/chef/travis-cookbooks/ci_environment/mysql/resources/database.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/debian.cnf.erb +12 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/grants.sql.erb +33 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/init/mysql.conf.erb +49 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/my.cnf.erb +182 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/mysql-server.seed.erb +10 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/port_mysql.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/mysql/templates/default/ramfs/my.cnf.erb +175 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/.gitignore +4 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/README.md +47 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/attributes/tarball.rb +43 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/recipes/tarball.rb +164 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/templates/default/neo4j-limits.conf.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/templates/default/neo4j-server.properties.erb +75 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/templates/default/neo4j-wrapper.conf.erb +26 -0
- data/chef/travis-cookbooks/ci_environment/neo4j-server/templates/default/neo4j.init.erb +55 -0
- data/chef/travis-cookbooks/ci_environment/networking_basic/recipes/default.rb +39 -0
- data/chef/travis-cookbooks/ci_environment/nodejs/attributes/multi.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/nodejs/files/default/nvm.sh +281 -0
- data/chef/travis-cookbooks/ci_environment/nodejs/files/default/profile_entry.sh +3 -0
- data/chef/travis-cookbooks/ci_environment/nodejs/recipes/multi.rb +79 -0
- data/chef/travis-cookbooks/ci_environment/nodejs/templates/default/nvm.sh.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/openssh/files/default/ssh_init.sh +181 -0
- data/chef/travis-cookbooks/ci_environment/openssh/files/default/sshd_config +54 -0
- data/chef/travis-cookbooks/ci_environment/openssh/recipes/default.rb +42 -0
- data/chef/travis-cookbooks/ci_environment/openssl/README.md +37 -0
- data/chef/travis-cookbooks/ci_environment/openssl/libraries/secure_password.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/openssl/metadata.rb +8 -0
- data/chef/travis-cookbooks/ci_environment/openssl/recipes/default.rb +19 -0
- data/chef/travis-cookbooks/ci_environment/perlbrew/attributes/default.rb +0 -0
- data/chef/travis-cookbooks/ci_environment/perlbrew/attributes/multi.rb +8 -0
- data/chef/travis-cookbooks/ci_environment/perlbrew/files/default/perlbrew.sh +7 -0
- data/chef/travis-cookbooks/ci_environment/perlbrew/metadata.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/perlbrew/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/perlbrew/recipes/multi.rb +41 -0
- data/chef/travis-cookbooks/ci_environment/phantomjs/attributes/default.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/phantomjs/files/ubuntu/etc/profile.d/phantomjs.sh +1 -0
- data/chef/travis-cookbooks/ci_environment/phantomjs/metadata.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/phantomjs/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/phantomjs/recipes/tarball.rb +69 -0
- data/chef/travis-cookbooks/ci_environment/php/README.md +5 -0
- data/chef/travis-cookbooks/ci_environment/php/attributes/default.rb +47 -0
- data/chef/travis-cookbooks/ci_environment/php/metadata.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/php/providers/pecl.rb +87 -0
- data/chef/travis-cookbooks/ci_environment/php/recipes/extensions.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/php/recipes/multi.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/php/resources/pecl.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/attributes/default.rb +19 -0
- 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 +18 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/files/default/definitions/5.3.3 +6 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/files/default/definitions/5.5.0beta1 +5 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/metadata.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/providers/build.rb +56 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/recipes/default.rb +122 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/resources/build.rb +7 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/templates/default/default_configure_options.erb +42 -0
- data/chef/travis-cookbooks/ci_environment/phpbuild/templates/default/travis.ini.erb +9 -0
- data/chef/travis-cookbooks/ci_environment/phpenv/attributes/default.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/phpenv/files/default/phpenv.sh +5 -0
- data/chef/travis-cookbooks/ci_environment/phpenv/metadata.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/phpenv/recipes/default.rb +33 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/README.rdoc +49 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/attributes/default.rb +74 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/metadata.rb +15 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/client.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/default.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/server.rb +83 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/server_debian.rb +73 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/server_on_ramfs.rb +32 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/recipes/server_redhat.rb +84 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/templates/default/30-shared-memory.conf.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/templates/default/debian.pg_hba.conf.erb +83 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/templates/default/debian.postgresql.conf.erb +234 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/templates/default/ramfs.init.erb +50 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/templates/default/redhat.pg_hba.conf.erb +74 -0
- data/chef/travis-cookbooks/ci_environment/postgresql/templates/default/redhat.postgresql.conf.erb +502 -0
- data/chef/travis-cookbooks/ci_environment/pypy/attributes/default.rb +21 -0
- data/chef/travis-cookbooks/ci_environment/pypy/files/default/etc/profile.d/pypy.sh +1 -0
- data/chef/travis-cookbooks/ci_environment/pypy/recipes/ppa.rb +39 -0
- data/chef/travis-cookbooks/ci_environment/pypy/recipes/tarball.rb +54 -0
- data/chef/travis-cookbooks/ci_environment/python/README.md +162 -0
- data/chef/travis-cookbooks/ci_environment/python/attributes/default.rb +22 -0
- data/chef/travis-cookbooks/ci_environment/python/files/default/virtualenv_settings.sh +1 -0
- data/chef/travis-cookbooks/ci_environment/python/metadata.json +52 -0
- data/chef/travis-cookbooks/ci_environment/python/metadata.rb +17 -0
- data/chef/travis-cookbooks/ci_environment/python/providers/pip.rb +146 -0
- data/chef/travis-cookbooks/ci_environment/python/providers/virtualenv.rb +79 -0
- data/chef/travis-cookbooks/ci_environment/python/recipes/default.rb +21 -0
- data/chef/travis-cookbooks/ci_environment/python/recipes/devshm.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/python/recipes/multi.rb +188 -0
- data/chef/travis-cookbooks/ci_environment/python/recipes/package.rb +36 -0
- data/chef/travis-cookbooks/ci_environment/python/recipes/pip.rb +38 -0
- data/chef/travis-cookbooks/ci_environment/python/recipes/virtualenv.rb +32 -0
- data/chef/travis-cookbooks/ci_environment/python/resources/pip.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/python/resources/virtualenv.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/README.md +86 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/attributes/default.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/metadata.rb +63 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/providers/user.rb +66 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/providers/vhost.rb +34 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/recipes/default.rb +67 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/recipes/with_management_plugin.rb +13 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/resources/user.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/resources/vhost.rb +22 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/templates/default/doterlang.cookie.erb +1 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/templates/default/rabbitmq-env.conf.erb +10 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/templates/default/rabbitmq.config.erb +5 -0
- data/chef/travis-cookbooks/ci_environment/rabbitmq/templates/default/rabbitmq_cluster.config.erb +5 -0
- data/chef/travis-cookbooks/ci_environment/ragel/recipes/custom.rb +56 -0
- data/chef/travis-cookbooks/ci_environment/ragel/recipes/default.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/ramfs/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/ramfs/recipes/default.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/rebar/README.md +3 -0
- data/chef/travis-cookbooks/ci_environment/rebar/attributes/default.rb +2 -0
- data/chef/travis-cookbooks/ci_environment/rebar/metadata.rb +7 -0
- data/chef/travis-cookbooks/ci_environment/rebar/recipes/default.rb +26 -0
- data/chef/travis-cookbooks/ci_environment/redis/attributes/default.rb +10 -0
- data/chef/travis-cookbooks/ci_environment/redis/recipes/default.rb +68 -0
- data/chef/travis-cookbooks/ci_environment/redis/recipes/ppa.rb +42 -0
- data/chef/travis-cookbooks/ci_environment/riak/.gitignore +1 -0
- data/chef/travis-cookbooks/ci_environment/riak/README.md +161 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/api.rb +21 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/bitcask.rb +22 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/control.rb +23 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/core.rb +41 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/default.rb +33 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/dets.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/eleveldb.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/erlang.rb +30 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/err.rb +21 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/innostore.rb +28 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/kernel.rb +22 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/kv.rb +62 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/lager.rb +31 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/merge.rb +22 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/netdev.rb +22 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/package.rb +30 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/sasl.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/search.rb +19 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/service.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/riak/attributes/sysmon.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/riak/libraries/riak_template_helper.rb +180 -0
- data/chef/travis-cookbooks/ci_environment/riak/metadata.rb +32 -0
- data/chef/travis-cookbooks/ci_environment/riak/providers/cluster.rb +80 -0
- data/chef/travis-cookbooks/ci_environment/riak/recipes/autoconf.rb +47 -0
- data/chef/travis-cookbooks/ci_environment/riak/recipes/config.rb +70 -0
- data/chef/travis-cookbooks/ci_environment/riak/recipes/default.rb +160 -0
- data/chef/travis-cookbooks/ci_environment/riak/recipes/innostore.rb +74 -0
- data/chef/travis-cookbooks/ci_environment/riak/recipes/iptables.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/riak/resources/cluster.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/riak/templates/default/app.config.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/riak/templates/default/iptables.erb +13 -0
- data/chef/travis-cookbooks/ci_environment/riak/templates/default/vm.args.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/runit/CHANGELOG.md +3 -0
- data/chef/travis-cookbooks/ci_environment/runit/CONTRIBUTING +29 -0
- data/chef/travis-cookbooks/ci_environment/runit/LICENSE +201 -0
- data/chef/travis-cookbooks/ci_environment/runit/README.md +226 -0
- data/chef/travis-cookbooks/ci_environment/runit/attributes/default.rb +31 -0
- data/chef/travis-cookbooks/ci_environment/runit/definitions/runit_service.rb +164 -0
- data/chef/travis-cookbooks/ci_environment/runit/files/default/runit.seed +1 -0
- data/chef/travis-cookbooks/ci_environment/runit/files/default/runsvdir +0 -0
- data/chef/travis-cookbooks/ci_environment/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/chef/travis-cookbooks/ci_environment/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/chef/travis-cookbooks/ci_environment/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/chef/travis-cookbooks/ci_environment/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/chef/travis-cookbooks/ci_environment/runit/metadata.json +102 -0
- data/chef/travis-cookbooks/ci_environment/runit/metadata.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/runit/recipes/default.rb +72 -0
- data/chef/travis-cookbooks/ci_environment/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/chef/travis-cookbooks/ci_environment/rvm/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/rvm/attributes/multi.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/default.gems +1 -0
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/global.gems +2 -0
- data/chef/travis-cookbooks/ci_environment/rvm/files/default/gemsets/jruby/global.gems +4 -0
- 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/files/default/rvm.sh +3 -0
- data/chef/travis-cookbooks/ci_environment/rvm/metadata.json +43 -0
- data/chef/travis-cookbooks/ci_environment/rvm/metadata.rb +25 -0
- data/chef/travis-cookbooks/ci_environment/rvm/recipes/default.rb +98 -0
- data/chef/travis-cookbooks/ci_environment/rvm/recipes/multi.rb +88 -0
- data/chef/travis-cookbooks/ci_environment/rvm/templates/default/bundler_config.yml.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/rvm/templates/default/dot_rvmrc.sh.erb +3 -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 +79 -0
- data/chef/travis-cookbooks/ci_environment/sbt/attributes/default.rb +36 -0
- data/chef/travis-cookbooks/ci_environment/sbt/metadata.json +42 -0
- data/chef/travis-cookbooks/ci_environment/sbt/metadata.rb +15 -0
- data/chef/travis-cookbooks/ci_environment/sbt/recipes/default.rb +119 -0
- 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/scons/recipes/default.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/sphinx/README.md +0 -0
- data/chef/travis-cookbooks/ci_environment/sphinx/attributes/default.rb +8 -0
- data/chef/travis-cookbooks/ci_environment/sphinx/metadata.rb +17 -0
- data/chef/travis-cookbooks/ci_environment/sphinx/recipes/all.rb +64 -0
- data/chef/travis-cookbooks/ci_environment/sphinx/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/ci_environment/sqlite/metadata.rb +11 -0
- data/chef/travis-cookbooks/ci_environment/sqlite/recipes/default.rb +30 -0
- data/chef/travis-cookbooks/ci_environment/sqlite/recipes/ppa.rb +34 -0
- data/chef/travis-cookbooks/ci_environment/subversion/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/ci_environment/sweeper/recipes/default.rb +45 -0
- data/chef/travis-cookbooks/ci_environment/sysctl/attributes/default.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/sysctl/recipes/default.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/sysctl/templates/default/sysctl.conf.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/timezone/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/ci_environment/timezone/metadata.json +35 -0
- data/chef/travis-cookbooks/ci_environment/timezone/metadata.rb +9 -0
- data/chef/travis-cookbooks/ci_environment/timezone/recipes/._default.rb +0 -0
- data/chef/travis-cookbooks/ci_environment/timezone/recipes/default.rb +38 -0
- data/chef/travis-cookbooks/ci_environment/timezone/templates/default/timezone.conf.erb +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/attributes/default.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/ci_user/dot_erlang_dot_cookie +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/ci_user/dot_gemrc.yml +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/ci_user/known_hosts +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/ci_user/travis_environment.sh +30 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/etc/default/locale.sh +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/etc/sudoers/env_keep +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/files/default/root/recover_eth0.sh +8 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/recipes/ci_user.rb +113 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/recipes/default.rb +134 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/recipes/root.rb +44 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/ci_user/ci_environment_metadata.yml.erb +2 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/ci_user/dot_bashrc.sh.erb +111 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/etc/apt/assumeyes.erb +1 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/etc/apt/timeouts.erb +3 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/etc/environment.sh.erb +11 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/etc/hostname.erb +12 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/etc/hosts.erb +30 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/etc/security/limits.conf.erb +62 -0
- data/chef/travis-cookbooks/ci_environment/travis_build_environment/templates/default/root/dot_bashrc.sh.erb +88 -0
- data/chef/travis-cookbooks/ci_environment/unarchivers/recipes/default.rb +29 -0
- data/chef/travis-cookbooks/ci_environment/util-linux/recipes/default.rb +5 -0
- data/chef/travis-cookbooks/ci_environment/vim/README.md +39 -0
- data/chef/travis-cookbooks/ci_environment/vim/attributes/default.rb +20 -0
- data/chef/travis-cookbooks/ci_environment/vim/metadata.rb +6 -0
- data/chef/travis-cookbooks/ci_environment/vim/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/ci_environment/xserver/files/default/etc/init.d/xvfb.sh +24 -0
- data/chef/travis-cookbooks/ci_environment/xserver/metadata.rb +3 -0
- data/chef/travis-cookbooks/ci_environment/xserver/recipes/default.rb +37 -0
- data/chef/travis-cookbooks/ci_environment/zeromq/recipes/default.rb +27 -0
- data/chef/travis-cookbooks/ci_environment/zeromq/recipes/ppa.rb +33 -0
- data/chef/travis-cookbooks/ci_environment/zookeeper/recipes/cdh4.rb +51 -0
- data/chef/travis-cookbooks/worker_host/.gitignore +1 -0
- data/chef/travis-cookbooks/worker_host/ant/README.md +51 -0
- data/chef/travis-cookbooks/worker_host/ant/metadata.rb +12 -0
- data/chef/travis-cookbooks/worker_host/ant/recipes/default.rb +36 -0
- data/chef/travis-cookbooks/worker_host/apt/README.md +109 -0
- data/chef/travis-cookbooks/worker_host/apt/files/default/apt-cacher +9 -0
- data/chef/travis-cookbooks/worker_host/apt/files/default/apt-cacher.conf +144 -0
- data/chef/travis-cookbooks/worker_host/apt/files/default/apt-proxy-v2.conf +50 -0
- data/chef/travis-cookbooks/worker_host/apt/metadata.json +34 -0
- data/chef/travis-cookbooks/worker_host/apt/metadata.rb +13 -0
- data/chef/travis-cookbooks/worker_host/apt/providers/repository.rb +72 -0
- data/chef/travis-cookbooks/worker_host/apt/recipes/cacher-client.rb +37 -0
- data/chef/travis-cookbooks/worker_host/apt/recipes/cacher.rb +45 -0
- data/chef/travis-cookbooks/worker_host/apt/recipes/default.rb +33 -0
- data/chef/travis-cookbooks/worker_host/apt/resources/repository.rb +30 -0
- data/chef/travis-cookbooks/worker_host/build-essential/README.md +24 -0
- data/chef/travis-cookbooks/worker_host/build-essential/metadata.rb +10 -0
- data/chef/travis-cookbooks/worker_host/build-essential/recipes/default.rb +45 -0
- data/chef/travis-cookbooks/worker_host/chef-client/CHANGELOG.md +29 -0
- data/chef/travis-cookbooks/worker_host/chef-client/CONTRIBUTING +29 -0
- data/chef/travis-cookbooks/worker_host/chef-client/LICENSE +201 -0
- data/chef/travis-cookbooks/worker_host/chef-client/README.md +265 -0
- data/chef/travis-cookbooks/worker_host/chef-client/attributes/default.rb +70 -0
- data/chef/travis-cookbooks/worker_host/chef-client/metadata.json +44 -0
- data/chef/travis-cookbooks/worker_host/chef-client/metadata.rb +15 -0
- data/chef/travis-cookbooks/worker_host/chef-client/recipes/config.rb +53 -0
- data/chef/travis-cookbooks/worker_host/chef-client/recipes/cron.rb +83 -0
- data/chef/travis-cookbooks/worker_host/chef-client/recipes/default.rb +20 -0
- data/chef/travis-cookbooks/worker_host/chef-client/recipes/delete_validation.rb +26 -0
- data/chef/travis-cookbooks/worker_host/chef-client/recipes/service.rb +242 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/arch/conf.d/chef-client.conf.erb +5 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/arch/rc.d/chef-client.erb +76 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/chef-client.pill.erb +14 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/client.rb.erb +36 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/debian/default/chef-client.erb +4 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/debian/init.d/chef-client.erb +185 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/debian/init/chef-client.conf.erb +17 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/redhat/init.d/chef-client.erb +110 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/redhat/sysconfig/chef-client.erb +15 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/solaris/chef-client.erb +78 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/solaris/manifest.xml.erb +103 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/sv-chef-client-log-run.erb +2 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/default/sv-chef-client-run.erb +4 -0
- data/chef/travis-cookbooks/worker_host/chef-client/templates/windows/chef-client.xml.erb +38 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/CHANGELOG.md +12 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/CONTRIBUTING +29 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/LICENSE +201 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/README.md +103 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/attributes/default.rb +21 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/files/default/handlers/README +1 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/files/default/handlers/campfire_handler.rb +61 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/metadata.json +29 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/metadata.rb +6 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/providers/default.rb +83 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/recipes/campfire.rb +15 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/recipes/default.rb +31 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/recipes/json_file.rb +28 -0
- data/chef/travis-cookbooks/worker_host/chef_handler/resources/default.rb +34 -0
- data/chef/travis-cookbooks/worker_host/collectd-librato/.gitignore +1 -0
- data/chef/travis-cookbooks/worker_host/collectd-librato/README.md +22 -0
- data/chef/travis-cookbooks/worker_host/collectd-librato/attributes/collectd_librato.rb +4 -0
- data/chef/travis-cookbooks/worker_host/collectd-librato/metadata.rb +11 -0
- data/chef/travis-cookbooks/worker_host/collectd-librato/recipes/default.rb +41 -0
- data/chef/travis-cookbooks/worker_host/collectd/README.rdoc +85 -0
- data/chef/travis-cookbooks/worker_host/collectd/attributes/default.rb +33 -0
- data/chef/travis-cookbooks/worker_host/collectd/definitions/collectd_plugin.rb +52 -0
- data/chef/travis-cookbooks/worker_host/collectd/libraries/default.rb +47 -0
- data/chef/travis-cookbooks/worker_host/collectd/metadata.rb +15 -0
- data/chef/travis-cookbooks/worker_host/collectd/recipes/client.rb +33 -0
- data/chef/travis-cookbooks/worker_host/collectd/recipes/collectd_web.rb +49 -0
- data/chef/travis-cookbooks/worker_host/collectd/recipes/default.rb +90 -0
- data/chef/travis-cookbooks/worker_host/collectd/recipes/server.rb +24 -0
- data/chef/travis-cookbooks/worker_host/collectd/templates/default/collectd.conf.erb +23 -0
- data/chef/travis-cookbooks/worker_host/collectd/templates/default/collectd_web.conf.erb +32 -0
- data/chef/travis-cookbooks/worker_host/collectd/templates/default/collection.conf.erb +2 -0
- data/chef/travis-cookbooks/worker_host/collectd/templates/default/plugin.conf.erb +15 -0
- data/chef/travis-cookbooks/worker_host/collectd/templates/default/python_plugin.conf.erb +20 -0
- data/chef/travis-cookbooks/worker_host/collectd/templates/default/thresholds.conf.erb +37 -0
- data/chef/travis-cookbooks/worker_host/disks/attributes/default.rb +1 -0
- data/chef/travis-cookbooks/worker_host/disks/recipes/default.rb +15 -0
- data/chef/travis-cookbooks/worker_host/emacs/emacs/metadata.rb +11 -0
- data/chef/travis-cookbooks/worker_host/emacs/emacs/recipes/default.rb +21 -0
- data/chef/travis-cookbooks/worker_host/emacs/metadata.rb +11 -0
- data/chef/travis-cookbooks/worker_host/emacs/recipes/default.rb +21 -0
- data/chef/travis-cookbooks/worker_host/git/README.rdoc +37 -0
- data/chef/travis-cookbooks/worker_host/git/metadata.rb +11 -0
- data/chef/travis-cookbooks/worker_host/git/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/worker_host/git/templates/default/sv-git-daemon-log-run.erb +2 -0
- data/chef/travis-cookbooks/worker_host/git/templates/default/sv-git-daemon-run.erb +3 -0
- data/chef/travis-cookbooks/worker_host/iptables/files/default/iptables_rules +13 -0
- data/chef/travis-cookbooks/worker_host/iptables/metadata.rb +10 -0
- data/chef/travis-cookbooks/worker_host/iptables/recipes/default.rb +48 -0
- data/chef/travis-cookbooks/worker_host/iptables/templates/default/iptables_load.erb +3 -0
- data/chef/travis-cookbooks/worker_host/java/README.md +102 -0
- data/chef/travis-cookbooks/worker_host/java/attributes/default.rb +29 -0
- data/chef/travis-cookbooks/worker_host/java/files/default/java.seed +11 -0
- data/chef/travis-cookbooks/worker_host/java/metadata.rb +16 -0
- data/chef/travis-cookbooks/worker_host/java/recipes/default.rb +61 -0
- data/chef/travis-cookbooks/worker_host/java/recipes/openjdk.rb +54 -0
- data/chef/travis-cookbooks/worker_host/java/recipes/sun.rb +49 -0
- data/chef/travis-cookbooks/worker_host/jruby/attributes/default.rb +5 -0
- data/chef/travis-cookbooks/worker_host/jruby/metadata.rb +8 -0
- data/chef/travis-cookbooks/worker_host/jruby/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/worker_host/monit/attributes/default.rb +3 -0
- data/chef/travis-cookbooks/worker_host/monit/files/default/default.monit +1 -0
- data/chef/travis-cookbooks/worker_host/monit/recipes/default.rb +56 -0
- data/chef/travis-cookbooks/worker_host/monit/templates/default/alerts.erb +12 -0
- data/chef/travis-cookbooks/worker_host/monit/templates/default/filesystems.erb +6 -0
- data/chef/travis-cookbooks/worker_host/monit/templates/default/monitrc.erb +6 -0
- data/chef/travis-cookbooks/worker_host/monit/templates/default/system.erb +4 -0
- data/chef/travis-cookbooks/worker_host/networking_basic/README.rdoc +8 -0
- data/chef/travis-cookbooks/worker_host/networking_basic/metadata.json +35 -0
- data/chef/travis-cookbooks/worker_host/networking_basic/metadata.rb +10 -0
- data/chef/travis-cookbooks/worker_host/networking_basic/recipes/default.rb +32 -0
- 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/worker_host/ntp/attributes/ntpdate.rb +21 -0
- 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/worker_host/ntp/recipes/undo.rb +36 -0
- 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/runit/CHANGELOG.md +3 -0
- data/chef/travis-cookbooks/worker_host/runit/CONTRIBUTING +29 -0
- data/chef/travis-cookbooks/worker_host/runit/LICENSE +201 -0
- data/chef/travis-cookbooks/worker_host/runit/README.md +226 -0
- data/chef/travis-cookbooks/worker_host/runit/attributes/default.rb +31 -0
- data/chef/travis-cookbooks/worker_host/runit/definitions/runit_service.rb +164 -0
- data/chef/travis-cookbooks/worker_host/runit/files/default/runit.seed +1 -0
- data/chef/travis-cookbooks/worker_host/runit/files/default/runsvdir +0 -0
- data/chef/travis-cookbooks/worker_host/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/chef/travis-cookbooks/worker_host/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/chef/travis-cookbooks/worker_host/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/chef/travis-cookbooks/worker_host/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/chef/travis-cookbooks/worker_host/runit/metadata.json +102 -0
- data/chef/travis-cookbooks/worker_host/runit/metadata.rb +37 -0
- data/chef/travis-cookbooks/worker_host/runit/recipes/default.rb +72 -0
- data/chef/travis-cookbooks/worker_host/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/chef/travis-cookbooks/worker_host/rvm/attributes/default.rb +20 -0
- data/chef/travis-cookbooks/worker_host/rvm/attributes/install.rb +1 -0
- data/chef/travis-cookbooks/worker_host/rvm/attributes/ree.rb +1 -0
- data/chef/travis-cookbooks/worker_host/rvm/attributes/ruby_187.rb +2 -0
- data/chef/travis-cookbooks/worker_host/rvm/attributes/ruby_192.rb +2 -0
- data/chef/travis-cookbooks/worker_host/rvm/files/default/rvm.sh +1 -0
- data/chef/travis-cookbooks/worker_host/rvm/metadata.rb +27 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/default.rb +27 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/install.rb +36 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/multi.rb +48 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/ree.rb +6 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/ruby_187.rb +7 -0
- data/chef/travis-cookbooks/worker_host/rvm/recipes/ruby_192.rb +7 -0
- data/chef/travis-cookbooks/worker_host/ssh/recipes/sshd.rb +12 -0
- data/chef/travis-cookbooks/worker_host/ssh/templates/default/sshd_config.erb +87 -0
- data/chef/travis-cookbooks/worker_host/sudo/attributes/sudoers.rb +2 -0
- data/chef/travis-cookbooks/worker_host/sudo/recipes/default.rb +14 -0
- data/chef/travis-cookbooks/worker_host/sudo/templates/default/sudoers.erb +19 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/attributes/default.rb +20 -0
- 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 +6 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/recipes/bluebox.rb +98 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/recipes/default.rb +140 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/sv-travis-worker-log-run.erb +2 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/sv-travis-worker-run.erb +4 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/travis-worker-bluebox.monitrc.erb +8 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/travis-worker.monitrc.erb +3 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/worker-bluebox.yml.erb +31 -0
- data/chef/travis-cookbooks/worker_host/travis_worker/templates/default/worker.yml.erb +10 -0
- data/chef/travis-cookbooks/worker_host/travis_worker_collectd/metadata.rb +2 -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 +12 -0
- data/chef/travis-cookbooks/worker_host/users/attributes/default.rb +2 -0
- data/chef/travis-cookbooks/worker_host/users/metadata.rb +9 -0
- data/chef/travis-cookbooks/worker_host/users/recipes/default.rb +88 -0
- data/chef/travis-cookbooks/worker_host/users/templates/default/authorized_keys.pub +4 -0
- data/chef/travis-cookbooks/worker_host/vim/README.md +39 -0
- data/chef/travis-cookbooks/worker_host/vim/attributes/default.rb +20 -0
- data/chef/travis-cookbooks/worker_host/vim/metadata.rb +6 -0
- data/chef/travis-cookbooks/worker_host/vim/recipes/default.rb +24 -0
- data/chef/travis-cookbooks/worker_host/virtualbox/attributes/default.rb +0 -0
- data/chef/travis-cookbooks/worker_host/virtualbox/metadata.rb +11 -0
- data/chef/travis-cookbooks/worker_host/virtualbox/recipes/default.rb +13 -0
- data/ciborg.gemspec +33 -19
- data/config/.gitkeep +0 -0
- data/cookbooks/.gitkeep +3 -0
- data/jenkins_plugin/.travis.yml +5 -0
- data/jenkins_plugin/README.md +8 -0
- data/jenkins_plugin/pom.xml +39 -0
- data/jenkins_plugin/src/main/java/com/pivotallabs/CiborgDecorator.java +22 -0
- data/jenkins_plugin/src/main/resources/com/pivotallabs/CiborgDecorator/header.jelly +3 -0
- data/jenkins_plugin/src/main/resources/index.jelly +6 -0
- data/jenkins_plugin/src/main/webapp/ciborg.css +5 -0
- data/jenkins_plugin/src/main/webapp/ciborg.png +0 -0
- data/lib/ciborg.rb +7 -4
- data/lib/ciborg/amazon.rb +105 -0
- data/lib/ciborg/cli.rb +172 -0
- data/lib/ciborg/config.rb +214 -0
- data/lib/ciborg/configuration_wizard.rb +122 -0
- data/lib/ciborg/keychain.rb +36 -0
- data/lib/ciborg/password.rb +13 -0
- data/lib/ciborg/sobo.rb +79 -0
- data/lib/ciborg/templates/default_rails_build_script.sh +13 -0
- data/lib/ciborg/version.rb +1 -1
- data/script/bootstrap_server.sh +35 -0
- data/script/ci_build.sh +13 -0
- data/spec/assets/test_cert.crt +15 -0
- data/spec/assets/test_cert.csr +12 -0
- data/spec/assets/test_cert.key +15 -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/ciborg/amazon_spec.rb +168 -0
- data/spec/lib/ciborg/cli_spec.rb +292 -0
- data/spec/lib/ciborg/config_spec.rb +299 -0
- data/spec/lib/ciborg/configuration_wizard_spec.rb +364 -0
- data/spec/lib/ciborg/keychain_spec.rb +33 -0
- data/spec/lib/ciborg/password_spec.rb +15 -0
- data/spec/spec_helper.rb +24 -0
- data/templates/Gemfile-remote +4 -0
- metadata +928 -20
@@ -0,0 +1,122 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Ciborg
|
4
|
+
class ConfigurationWizard < ::Thor
|
5
|
+
include Actions
|
6
|
+
|
7
|
+
DESCRIPTION_TEXT = "Sets up ciborg through a series of questions"
|
8
|
+
|
9
|
+
default_task :setup
|
10
|
+
|
11
|
+
desc "setup", DESCRIPTION_TEXT
|
12
|
+
def setup
|
13
|
+
return unless yes?("It looks like you're trying to set up a CI Box. Can I help? (Yes/No)")
|
14
|
+
prompt_for_build
|
15
|
+
prompt_for_github_key
|
16
|
+
prompt_for_ssh_key
|
17
|
+
prompt_for_aws
|
18
|
+
prompt_for_security_group
|
19
|
+
prompt_for_basic_auth
|
20
|
+
config.save
|
21
|
+
say config.reload.display
|
22
|
+
if user_wants_to_create_instance?
|
23
|
+
create_instance
|
24
|
+
provision_server
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
no_tasks do
|
29
|
+
def ask_with_default(statement, default)
|
30
|
+
question = default ? "#{statement} [#{default}]:" : "#{statement}:"
|
31
|
+
answer = ask(question) || ""
|
32
|
+
answer.empty? ? default : answer
|
33
|
+
end
|
34
|
+
|
35
|
+
def prompt_for_aws
|
36
|
+
say("For your AWS Access Key and Secret, see https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key")
|
37
|
+
config.aws_key = ask_with_default("Your AWS key", config.aws_key)
|
38
|
+
config.aws_secret = ask_with_default("Your AWS secret key", config.aws_secret)
|
39
|
+
end
|
40
|
+
|
41
|
+
def prompt_for_security_group
|
42
|
+
config.security_group = ask_with_default("What EC2 security group would you like to use?", config.security_group)
|
43
|
+
end
|
44
|
+
|
45
|
+
def prompt_for_basic_auth
|
46
|
+
config.node_attributes.nginx.basic_auth_user = ask_with_default("Your CI username", config.node_attributes.nginx.basic_auth_user)
|
47
|
+
config.node_attributes.nginx.basic_auth_password = ask_with_default("Your CI password", config.node_attributes.nginx.basic_auth_password)
|
48
|
+
end
|
49
|
+
|
50
|
+
def prompt_for_ssh_key
|
51
|
+
config.server_ssh_key = ask_with_default("Path to CI server SSH key", config.server_ssh_key_path)
|
52
|
+
end
|
53
|
+
|
54
|
+
def prompt_for_github_key
|
55
|
+
config.github_ssh_key = ask_with_default("Path to a SSH key authorized to clone the repository", config.github_ssh_key_path)
|
56
|
+
end
|
57
|
+
|
58
|
+
def prompt_for_build
|
59
|
+
build = config.node_attributes.jenkins.builds.first || {}
|
60
|
+
|
61
|
+
if this_is_a_rails_project? && prompt_for_default_rails_script
|
62
|
+
build_command = Proc.new { "script/ci_build.sh" }
|
63
|
+
copy_file('default_rails_build_script.sh', 'script/ci_build.sh')
|
64
|
+
else
|
65
|
+
build_command = Proc.new { ask_with_default("What command should be run during the build?", build["command"]) }
|
66
|
+
end
|
67
|
+
|
68
|
+
repository = ask_with_default("What is the address of your git repository?", build["repository"])
|
69
|
+
name = ask_with_default("What would you like to name your build?", build["name"])
|
70
|
+
command = build_command.call
|
71
|
+
branch = "master"
|
72
|
+
|
73
|
+
config.add_build name, repository, branch, command
|
74
|
+
end
|
75
|
+
|
76
|
+
def user_wants_to_create_instance?
|
77
|
+
return unless config.master.nil?
|
78
|
+
yes?("Would you like to start an instance on AWS now? (Yes/No)")
|
79
|
+
end
|
80
|
+
|
81
|
+
def create_instance
|
82
|
+
say("Creating instance #{config.instance_size}")
|
83
|
+
cli.create
|
84
|
+
say("Instance launched.")
|
85
|
+
end
|
86
|
+
|
87
|
+
def provision_server
|
88
|
+
return if config.reload.master.nil?
|
89
|
+
cli.bootstrap
|
90
|
+
cli.chef
|
91
|
+
end
|
92
|
+
|
93
|
+
def config
|
94
|
+
@config ||= Ciborg::Config.from_file(ciborg_config_path)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
private
|
99
|
+
|
100
|
+
def source_paths
|
101
|
+
[File.join(File.expand_path(File.dirname(__FILE__)), "templates")] + super
|
102
|
+
end
|
103
|
+
|
104
|
+
def prompt_for_default_rails_script
|
105
|
+
return false if File.exists?('script/ci_build.sh')
|
106
|
+
yes?("It looks like this is a Rails project. Would you like to use the default Rails build script? (Yes/No)")
|
107
|
+
end
|
108
|
+
|
109
|
+
def this_is_a_rails_project?
|
110
|
+
File.exists?('script/rails')
|
111
|
+
end
|
112
|
+
|
113
|
+
def ciborg_config_path
|
114
|
+
FileUtils.mkdir_p(File.join(Dir.pwd, "config"))
|
115
|
+
File.expand_path("config/ciborg.yml", Dir.pwd)
|
116
|
+
end
|
117
|
+
|
118
|
+
def cli
|
119
|
+
Ciborg::CLI.new
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "httpclient"
|
2
|
+
|
3
|
+
module Ciborg
|
4
|
+
class Keychain
|
5
|
+
attr_reader :config, :path
|
6
|
+
|
7
|
+
def initialize(keychain_path)
|
8
|
+
@path = keychain_path
|
9
|
+
end
|
10
|
+
|
11
|
+
def has_key?(key_name)
|
12
|
+
system("sudo security find-certificate -c \"#{key_name}\" #{path} > /dev/null 2>&1")
|
13
|
+
end
|
14
|
+
|
15
|
+
def fetch_remote_certificate(host)
|
16
|
+
http_client.get(host).peer_cert.to_s
|
17
|
+
end
|
18
|
+
|
19
|
+
def add_certificate(certificate)
|
20
|
+
certificate_file = Tempfile.new("ciborg.crt").tap do |f|
|
21
|
+
f.write(certificate)
|
22
|
+
f.close
|
23
|
+
end
|
24
|
+
|
25
|
+
system("sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain #{certificate_file.path}")
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def http_client
|
30
|
+
@http_client ||=
|
31
|
+
HTTPClient.new.tap do |hc|
|
32
|
+
hc.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/ciborg/sobo.rb
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'net/ssh'
|
2
|
+
require 'shellwords'
|
3
|
+
module Ciborg
|
4
|
+
class Sobo
|
5
|
+
class CommandFailed < StandardError; end;
|
6
|
+
|
7
|
+
attr_reader :ip, :key, :user
|
8
|
+
attr_writer :timeout
|
9
|
+
|
10
|
+
def initialize(ip, key, user='ubuntu')
|
11
|
+
@ip = ip
|
12
|
+
@key = key
|
13
|
+
@user = user
|
14
|
+
end
|
15
|
+
|
16
|
+
def timeout
|
17
|
+
@timeout || 10000
|
18
|
+
end
|
19
|
+
|
20
|
+
def system(command)
|
21
|
+
ssh_popen4!(command, true)[2]
|
22
|
+
end
|
23
|
+
|
24
|
+
def system!(command)
|
25
|
+
result = ssh_popen4!(command, true)
|
26
|
+
raise(CommandFailed, "Failed: #{command}\n#{result[0]}\n\n#{result[1]}") unless result[2] == 0
|
27
|
+
end
|
28
|
+
|
29
|
+
def backtick(command)
|
30
|
+
ssh_popen4!(command)[0]
|
31
|
+
end
|
32
|
+
|
33
|
+
def ssh_popen4!(command, streaming_output = false)
|
34
|
+
ssh = Net::SSH.start(ip, user, :keys => [key], :timeout => timeout, paranoid: false)
|
35
|
+
stdout_data = ""
|
36
|
+
stderr_data = ""
|
37
|
+
exit_code = nil
|
38
|
+
exit_signal = nil
|
39
|
+
|
40
|
+
ssh.open_channel do |channel|
|
41
|
+
channel.exec("/bin/bash -lc #{Shellwords.escape(command)}") do |ch, success|
|
42
|
+
unless success
|
43
|
+
raise "FAILED: couldn't execute command (ssh.channel.exec)"
|
44
|
+
end
|
45
|
+
|
46
|
+
channel.on_data do |ch,data|
|
47
|
+
if streaming_output
|
48
|
+
STDOUT << data
|
49
|
+
STDOUT.flush
|
50
|
+
end
|
51
|
+
stdout_data += data
|
52
|
+
end
|
53
|
+
|
54
|
+
channel.on_extended_data do |ch,type,data|
|
55
|
+
if streaming_output
|
56
|
+
STDERR << data
|
57
|
+
STDERR.flush
|
58
|
+
end
|
59
|
+
stderr_data += data
|
60
|
+
end
|
61
|
+
|
62
|
+
channel.on_request("exit-status") do |ch,data|
|
63
|
+
exit_code = data.read_long
|
64
|
+
end
|
65
|
+
|
66
|
+
channel.on_request("exit-signal") do |ch, data|
|
67
|
+
exit_signal = data.read_long
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
ssh.loop
|
72
|
+
[stdout_data, stderr_data, exit_code, exit_signal]
|
73
|
+
end
|
74
|
+
|
75
|
+
def upload(from, to, opts = "--exclude .git")
|
76
|
+
Kernel.system(%Q{rsync --rsh="ssh -o 'StrictHostKeyChecking no' -i #{key}" --archive --compress --delete #{from} #{user}@#{ip}:#{to} #{opts}})
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/bin/bash -le
|
2
|
+
|
3
|
+
source .rvmrc
|
4
|
+
|
5
|
+
# install bundler if necessary
|
6
|
+
set -e
|
7
|
+
|
8
|
+
gem install bundler --no-ri --no-rdoc && bundle install
|
9
|
+
|
10
|
+
# debugging info
|
11
|
+
echo USER=$USER && ruby --version && which ruby && which bundle
|
12
|
+
|
13
|
+
bundle exec rspec spec
|
data/lib/ciborg/version.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
sudo apt-get update > /dev/null
|
6
|
+
|
7
|
+
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"
|
8
|
+
selections=`dpkg --get-selections`
|
9
|
+
|
10
|
+
for package in $packages
|
11
|
+
do
|
12
|
+
if ! echo "$selections" | grep "^$package\s" > /dev/null
|
13
|
+
then
|
14
|
+
to_install="$to_install $package"
|
15
|
+
fi
|
16
|
+
done
|
17
|
+
|
18
|
+
if [ ! -z "$to_install" ]
|
19
|
+
then
|
20
|
+
sudo apt-get install -y $to_install
|
21
|
+
fi
|
22
|
+
|
23
|
+
test -d /usr/local/rvm || curl --location https://get.rvm.io | sudo bash -s stable
|
24
|
+
|
25
|
+
sudo tee /etc/profile.d/rvm.sh > /dev/null <<RVMSH_CONTENT
|
26
|
+
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
|
27
|
+
RVMSH_CONTENT
|
28
|
+
|
29
|
+
sudo tee /etc/rvmrc > /dev/null <<RVMRC_CONTENTS
|
30
|
+
rvm_install_on_use_flag=1
|
31
|
+
rvm_trust_rvmrcs_flag=1
|
32
|
+
rvm_gemset_create_on_use_flag=1
|
33
|
+
RVMRC_CONTENTS
|
34
|
+
|
35
|
+
sudo usermod ubuntu -a -G rvm
|
data/script/ci_build.sh
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/bin/bash -le
|
2
|
+
|
3
|
+
source .rvmrc
|
4
|
+
|
5
|
+
# install bundler if necessary
|
6
|
+
set -e
|
7
|
+
|
8
|
+
gem install bundler --no-ri --no-rdoc && bundle install
|
9
|
+
|
10
|
+
# debugging info
|
11
|
+
echo USER=$USER && ruby --version && which ruby && which bundle
|
12
|
+
|
13
|
+
bundle exec rspec spec --tag ~slow --tag ~vagrant --tag ~osx
|
@@ -0,0 +1,15 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIICazCCAdQCCQDiA9ObNgBXmTANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJB
|
3
|
+
VTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxFzAVBgNVBAoTDk15IE9y
|
4
|
+
ZyBQdHkgTHRkMREwDwYDVQQLEwhPcmcgVW5pdDEgMB4GA1UEAxQXY2lib3JnX3Rl
|
5
|
+
c3RfY2VydGlmaWNhdGUwHhcNMTMwNDIzMTcxMjU4WhcNMTMwNTIzMTcxMjU4WjB6
|
6
|
+
MQswCQYDVQQGEwJBVTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxFzAV
|
7
|
+
BgNVBAoTDk15IE9yZyBQdHkgTHRkMREwDwYDVQQLEwhPcmcgVW5pdDEgMB4GA1UE
|
8
|
+
AxQXY2lib3JnX3Rlc3RfY2VydGlmaWNhdGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
|
9
|
+
MIGJAoGBALFFaiUwevz7QcfT7AyUR34VnTQJQ4BErRjpqbgLvuEP8zKFAIESC3Zr
|
10
|
+
AZIBvXw9UX1iHSON2zpRyZzlCXuzVHC7WbWPPFDLf22G7v03OxEytPqRB5bM5dAu
|
11
|
+
rgn2EsTb4CY7e/PKFSrE2bvfOSmewUyUAmqD9/qN0HwN9k9OpzS7AgMBAAEwDQYJ
|
12
|
+
KoZIhvcNAQEFBQADgYEASMExTjGijIElwr87yZVLeMp8jwtRTCpooRl/lWuSsX/9
|
13
|
+
mbQKQFYjH/b1FSeJ+mXhszbig/XnY0dlwmjXZtybMT5yWJ6f/AOw6iH1BTLPCt72
|
14
|
+
OZ4b4ku8oIknwX9lJa5/75ljC450jc2OKEArHvpkg6LV2iadVJiqP1in6JKK0yM=
|
15
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,12 @@
|
|
1
|
+
-----BEGIN CERTIFICATE REQUEST-----
|
2
|
+
MIIBujCCASMCAQAwejELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEPMA0GA1UE
|
3
|
+
BxMGU3lkbmV5MRcwFQYDVQQKEw5NeSBPcmcgUHR5IEx0ZDERMA8GA1UECxMIT3Jn
|
4
|
+
IFVuaXQxIDAeBgNVBAMUF2NpYm9yZ190ZXN0X2NlcnRpZmljYXRlMIGfMA0GCSqG
|
5
|
+
SIb3DQEBAQUAA4GNADCBiQKBgQCxRWolMHr8+0HH0+wMlEd+FZ00CUOARK0Y6am4
|
6
|
+
C77hD/MyhQCBEgt2awGSAb18PVF9Yh0jjds6Ucmc5Ql7s1Rwu1m1jzxQy39thu79
|
7
|
+
NzsRMrT6kQeWzOXQLq4J9hLE2+AmO3vzyhUqxNm73zkpnsFMlAJqg/f6jdB8DfZP
|
8
|
+
Tqc0uwIDAQABoAAwDQYJKoZIhvcNAQEFBQADgYEAl3V2LPi8tWNhDrC1WIGHEGjc
|
9
|
+
rm98ZaAkS3x8PYnIgurZ7wT4yFsO34DvVFJTbE7m8coaJ9+Lb23WDaKZawGnVkMx
|
10
|
+
ajO98/teArmYlaNX2tvQ+n0++mwlq95yDj9S1N5+H5gUtC/5M1o/pTg3NGNahKbS
|
11
|
+
fF24B+h0XRc+TqwWwgs=
|
12
|
+
-----END CERTIFICATE REQUEST-----
|
@@ -0,0 +1,15 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIICXgIBAAKBgQCxRWolMHr8+0HH0+wMlEd+FZ00CUOARK0Y6am4C77hD/MyhQCB
|
3
|
+
Egt2awGSAb18PVF9Yh0jjds6Ucmc5Ql7s1Rwu1m1jzxQy39thu79NzsRMrT6kQeW
|
4
|
+
zOXQLq4J9hLE2+AmO3vzyhUqxNm73zkpnsFMlAJqg/f6jdB8DfZPTqc0uwIDAQAB
|
5
|
+
AoGAM4f1KihkqCO15IvjQ2jbO3i3AQhsWd4c33AVSQ4JB82mKZpmIh8Hu/2xMCtX
|
6
|
+
VMVSaftacxpqjxJ1ZClkT1Q7CCn/OgvNFyuRlNhn7KqwE3gPTxQmi1A8vFi8InPM
|
7
|
+
hqDFfhd1Se/cu9xznq3cfR/S9YlIXxWQ9xI/Bq0AkYvOyzECQQDmrNxAnhoHpWMb
|
8
|
+
c1SpHhO9BZkm8Bo0HRKdGuJMcJyRyW3URfTn8ROUMNTGn6GQIX6leGN4hLm179Q5
|
9
|
+
ZqfwFItJAkEAxLuhMPWZX/W3dMjzWqaP8PpqD+Pd2QdaGNu3LWBHy+9PRJcr0RRi
|
10
|
+
v06Zpg4krofd//uA1KakwzWONFPnHMcb4wJBAMiOemDkFRWYwfZX67+uGtM5TtL/
|
11
|
+
5ohwzoIxoZd8QWSvkQICYNBYVgF+A0E+ASZjOM19Ql7CZwS8I/RUQKcH9aECQQCu
|
12
|
+
yIf4CGtgXtzDq/jQ0+RUUxZB0c96jtaT+Thv3vdKju1c4fWyxqrIjlthtXUPfnRU
|
13
|
+
hay6wObm68DQaq6M2bTDAkEA40ZcUTPi7OqG6tSW1ZKyWmyhPfpbznfqHU7zLRil
|
14
|
+
A76GespDkkEpvu+OBu/FZx4MjFwDIDIqb11pw9xqMDJHbg==
|
15
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEpQIBAAKCAQEA3ItezXAizPua9JTKlxN5D3Q3RUNT7TXUbqfg3XmEEEOIcidc
|
3
|
+
yAAqG+4XVbp7Fjv80ADSWTrZzJN5/rfr762/zvupBEmDsHcaSaWo6MCTnek6uBPR
|
4
|
+
I7GwFh17zKtjrXNdZqKyHn6STwdcar5hh282sqbs7TJjVVnSLuJbjTZEsSVS3r3/
|
5
|
+
CVhWTxVQbis/fgE7IQkGCKDDtEJtXRR3VBtDz5n5Ez0aefsjUxtcgSJKLJoVJrOM
|
6
|
+
DVO/rIvbiAEBXy3uZsFi9uSvTp0nIyE5t8GPoQeG8pgcgiahNOy+sIiWcbK5BXrb
|
7
|
+
SrdWi0NfW+2CfJGzJXo2Fs09QVzpUyts2GAqaQIDAQABAoIBAQC9ab2MN4jMADO/
|
8
|
+
Z6LvSbwpd6iYhhCopBjEyM4pqNmxli6zy/a1lt6TilLkP/rCx9aDVpFSLWctemPG
|
9
|
+
TnQGL3WS8TTiB7lgb4pWQj7lV6/waYUS34I5Y7xV4hCXYYOETpajNYxBAHfsA+ht
|
10
|
+
jQD6bpvNp+vIdAQ4I6KOvb3fdAJfGJSmdr5Yqas2u9DqCidrw4gQ5cPRwxpki+8n
|
11
|
+
s6eGKw6HGaoqYk/hsLECec5kZqy89lrn/E0+1xzlUwBXSaUsbLUKE6toHMZzoSIP
|
12
|
+
tUIh+WoKe0gt2s4j+sMD0wSYmny0UvuFyDlyQHDOSE8TSVODGWhEr1pztqklYEfg
|
13
|
+
oM4JrqPZAoGBAPfd9eS0qviFvRloOxPIdEeHaCc7+yBQnBWBDvgA19fcvFByJlmr
|
14
|
+
i6qrQmChIxZS8loDGKQEPsJnrVKww15GcmDU0yesAfQHmXpplQK3cslTXhghwC3z
|
15
|
+
p7ohMLnWjEi9Q+k0RizhFCq55w7+9U+E5wbW9017MAzC4A52mhm+GDZ/AoGBAOPH
|
16
|
+
55TxoF4/o3rrXNtjajQ/DBYZPAmUbqpdj0QQIRkIxziiV44Aw2HmdqgtlZaQ5a/r
|
17
|
+
8qUJCO2/on/zyQvjByx/sGfdqhOcVymySGSPOSusk6cwq2oCaDPdwZorrzueE0jV
|
18
|
+
DgHFF9Y3p1W5CEl4Um6IWRZZS9PK4cPC/p1mXDsXAoGAVO1JTjaVChgQxb7P1yRs
|
19
|
+
qwF7L04+6kCUak3RCiqHyh+IqmuiNkEv1qddU+yCMCj1ft/mtnP56PRLD7UfC5NJ
|
20
|
+
p2Hkg4hNFwbvkGDSvJ6Mhuy4pb4Ssev1QTIUFuirIlUvCp1tmfz4wvb1c07qUHey
|
21
|
+
DMbk7zhRK14uFOaQQFfAxhMCgYEAhQINY7b4mzB0COn5Dg7uTFXoe9r+aOWo/Yim
|
22
|
+
iOsWOKUcmCCMGdquPLOz5B7CM+qmhOS1itNMyG/XtvmnE27dmIlzfCM/FjZ721hE
|
23
|
+
15uembcrfTx5S+zd5jN+wsTxjVGQFz558GSjt65F41Op2CUPlYW+58L6+VCGJqbt
|
24
|
+
wQGtp78CgYEA8WD+AcC70tS0h+siJoG2AYvQfBmZPGcZjGmban8SGRHcXMctpVw/
|
25
|
+
LOP18TY4/nfT/j4OwwZ07SlCbIWPJm7+u0IiWxmf5j48pGy7p1oMxih9IggXr0+t
|
26
|
+
KyWHrnBl8O90L7QLmSBzfOHAIoPhejgAqqADQd9lSDXSSW7GhVh0g4Q=
|
27
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1 @@
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDci17NcCLM+5r0lMqXE3kPdDdFQ1PtNdRup+DdeYQQQ4hyJ1zIACob7hdVunsWO/zQANJZOtnMk3n+t+vvrb/O+6kESYOwdxpJpajowJOd6Tq4E9EjsbAWHXvMq2Otc11morIefpJPB1xqvmGHbzaypuztMmNVWdIu4luNNkSxJVLevf8JWFZPFVBuKz9+ATshCQYIoMO0Qm1dFHdUG0PPmfkTPRp5+yNTG1yBIkosmhUms4wNU7+si9uIAQFfLe5mwWL25K9OnScjITm3wY+hB4bymByCJqE07L6wiJZxsrkFettKt1aLQ19b7YJ8kbMlejYWzT1BXOlTK2zYYCpp pivotal@holloway
|
@@ -0,0 +1,168 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Ciborg::Amazon, :slow do
|
4
|
+
subject(:amazon) { Ciborg::Amazon.new(ENV["EC2_KEY"], ENV["EC2_SECRET"]) }
|
5
|
+
let(:tempdir) { Dir.mktmpdir }
|
6
|
+
let(:fog) { amazon.send(:fog) }
|
7
|
+
|
8
|
+
before { pending "Missing EC2 Credentials" unless SpecHelpers::ec2_credentials_present? }
|
9
|
+
|
10
|
+
describe "#create_security_group" do
|
11
|
+
after { amazon.fog_security_groups.get(security_group).destroy if SpecHelpers::ec2_credentials_present? }
|
12
|
+
|
13
|
+
context "when there is no existing security group" do
|
14
|
+
let(:security_group) { "totally_not_a_honeypot" }
|
15
|
+
|
16
|
+
it "creates a security group" do
|
17
|
+
amazon.create_security_group(security_group)
|
18
|
+
amazon.fog_security_groups.map(&:name).should include security_group
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "when the security group already exists" do
|
23
|
+
let(:security_group) { "bart_police" }
|
24
|
+
before { amazon.create_security_group(security_group) }
|
25
|
+
|
26
|
+
it "does not complain" do
|
27
|
+
expect { amazon.create_security_group(security_group) }.not_to raise_error
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#open_port" do
|
33
|
+
let(:security_group) { "bag_of_weasels" }
|
34
|
+
let(:group) { amazon.fog_security_groups.get(security_group) }
|
35
|
+
|
36
|
+
before { amazon.create_security_group(security_group) }
|
37
|
+
after { amazon.fog_security_groups.get(security_group).destroy if SpecHelpers::ec2_credentials_present? }
|
38
|
+
|
39
|
+
def includes_port?(permissions, port)
|
40
|
+
permissions.any? { |p| (p["fromPort"]..p["toPort"]).include?(port) }
|
41
|
+
end
|
42
|
+
|
43
|
+
it "opens a port for business" do
|
44
|
+
group.ip_permissions.should_not include "80"
|
45
|
+
amazon.open_port(security_group, 80)
|
46
|
+
includes_port?(group.reload.ip_permissions, 80).should be_true
|
47
|
+
end
|
48
|
+
|
49
|
+
it "takes a bunch of ports" do
|
50
|
+
amazon.open_port(security_group, 22, 443)
|
51
|
+
includes_port?(group.reload.ip_permissions, 22).should be_true
|
52
|
+
includes_port?(group.reload.ip_permissions, 443).should be_true
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "#add_key_pair" do
|
57
|
+
let(:key_pair_pub) { File.read(File.expand_path(ssh_key_pair_path + ".pub")) }
|
58
|
+
let(:key_pair_name) { "is_supernuts" }
|
59
|
+
|
60
|
+
before { amazon.delete_key_pair(key_pair_name) }
|
61
|
+
after { amazon.delete_key_pair(key_pair_name) if SpecHelpers::ec2_credentials_present? }
|
62
|
+
|
63
|
+
it "uploads the key" do
|
64
|
+
amazon.add_key_pair(key_pair_name, key_pair_pub)
|
65
|
+
amazon.fog_key_pairs.map(&:name).should include key_pair_name
|
66
|
+
end
|
67
|
+
|
68
|
+
context "when the key is already there" do
|
69
|
+
before { amazon.add_key_pair(key_pair_name, key_pair_pub) }
|
70
|
+
|
71
|
+
it "doesn't reupload" do
|
72
|
+
expect do
|
73
|
+
amazon.add_key_pair(key_pair_name, key_pair_pub)
|
74
|
+
end.not_to raise_error
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe "things which launch instances" do
|
80
|
+
let(:key_pair_name) { "eating_my_cookie" }
|
81
|
+
let(:security_group) { "chump_of_change" }
|
82
|
+
let(:key_pair_pub) { File.read(File.expand_path(ssh_key_pair_path + ".pub")) }
|
83
|
+
let(:freshly_launched_server) { amazon.launch_server(key_pair_name, security_group, "t1.micro") }
|
84
|
+
|
85
|
+
before do
|
86
|
+
amazon.delete_key_pair(key_pair_name)
|
87
|
+
amazon.add_key_pair(key_pair_name, key_pair_pub)
|
88
|
+
amazon.create_security_group(security_group)
|
89
|
+
end
|
90
|
+
|
91
|
+
after do
|
92
|
+
if SpecHelpers::ec2_credentials_present?
|
93
|
+
freshly_launched_server.destroy
|
94
|
+
amazon.delete_key_pair(key_pair_name)
|
95
|
+
# Make a best effort attempt to clean up after the tests have completed
|
96
|
+
# EC2 does not always reap these resources fast enough for our tests, we could wait, but why bother?
|
97
|
+
amazon.elastic_ip_address.destroy rescue nil
|
98
|
+
amazon.fog_security_groups.get(security_group).destroy rescue nil
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
describe "#launch_instance" do
|
103
|
+
it "creates an instance" do
|
104
|
+
expect { freshly_launched_server }.to change { amazon.fog_servers.reload.count }.by(1)
|
105
|
+
|
106
|
+
freshly_launched_server.availability_zone.should =~ /us-east-1[abcd]/
|
107
|
+
freshly_launched_server.flavor_id.should == "t1.micro"
|
108
|
+
freshly_launched_server.tags.should == {"ciborg" => Ciborg::VERSION, "Name" => "Ciborg"}
|
109
|
+
freshly_launched_server.key_name.should == key_pair_name
|
110
|
+
freshly_launched_server.groups.should == [security_group]
|
111
|
+
freshly_launched_server.public_ip_address.should == amazon.elastic_ip_address.public_ip
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe "#destroy_ec2" do
|
116
|
+
let!(:server_ip) { freshly_launched_server.public_ip_address }
|
117
|
+
|
118
|
+
context 'with a confirmation Proc that returns true' do
|
119
|
+
let(:proc) { ->(_) { true } }
|
120
|
+
|
121
|
+
it "stops all the instances" do
|
122
|
+
# TODO: This probably needs some more testing with n > 1 instances
|
123
|
+
expect do
|
124
|
+
amazon.destroy_ec2(proc, :all)
|
125
|
+
end.to change { freshly_launched_server.reload.state }.from("running")
|
126
|
+
fog.addresses.get(server_ip).should_not be
|
127
|
+
end
|
128
|
+
|
129
|
+
it "stops the named instances" do
|
130
|
+
expect do
|
131
|
+
amazon.destroy_ec2(proc, freshly_launched_server.id)
|
132
|
+
freshly_launched_server.wait_for { !ready? }
|
133
|
+
end.to change { freshly_launched_server.reload.state }.from("running")
|
134
|
+
fog.addresses.get(server_ip).should_not be
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
context 'with a confirmation Proc that returns false' do
|
139
|
+
let(:proc) { ->(_) { false } }
|
140
|
+
|
141
|
+
it 'does not stop instances' do
|
142
|
+
expect do
|
143
|
+
amazon.destroy_ec2(proc, :all)
|
144
|
+
end.to_not change { freshly_launched_server.reload.state }.from("running")
|
145
|
+
fog.addresses.get(server_ip).should be
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe "#elastic_ip_address" do
|
152
|
+
it "allocates an ip address" do
|
153
|
+
expect { amazon.elastic_ip_address }.to change { fog.addresses.reload.count }.by(1)
|
154
|
+
amazon.elastic_ip_address.public_ip.should =~ /\d+\.\d+\.\d+\.\d+/
|
155
|
+
amazon.elastic_ip_address.destroy
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
describe "#release_elastic_ip" do
|
160
|
+
let!(:elastic_ip) { amazon.elastic_ip_address }
|
161
|
+
|
162
|
+
it "releases the ip" do
|
163
|
+
expect do
|
164
|
+
amazon.release_elastic_ip(elastic_ip.public_ip)
|
165
|
+
end.to change { fog.addresses.reload.count }.by(-1)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|