stackadmin
Gem to facilitate administration of Stackato deployments
Install
gem install stackadmin
Then, require 'stackadmin'
in your application.
Requirements
- Ruby 2.0.0
- Target Stackato nodes must be set up for Passwordless SSH access.
Testing
The happy path
bundle install
bundle exec rake test
That should get everything set up for you. It will spin up a vagrant VM, run all tests, and then destroy the vagrant VM.
Problems? Read on.
Setting up the test env
Install your dependencies:
bundle install
The test environment depends on Vagrant (>= 1.5.1) and vagrant-s3auth.
The Vagrant VM depends on a custom basebox stored in our private S3 bucket.
You should have access credentials stored in the standard environment variables (i.e. ENV['AWS_ACCESS_KEY_ID']
and ENV['AWS_SECRET_ACCESS_KEY']
) in order to have Vagrant download the basebox automatically.
To verify that these requirements are met:
bundle exec rake test:setup_vagrant
To spin up the Vagrant box:
bundle exec rake test:start_env
To fulfill the passwordless SSH requirement to the stackato
user in the test env:
bundle exec rake test:setup_env
That last command assumes that your personal public key is located in ~/.ssh/keys/id_rsa.pub
. If your key is located elsewhere, you can specify the location as follows:
bundle exec rake test:setup_env['~/.ssh/certs/me.pub']
You can also provide the public key location when using rake test
:
bundle exec rake test['~/.ssh/certs/me.pub']
Run tests
Currently, all tests are in a single suite:
bundle exec rake test:run
Destroy the test env
bundle exec rake test:destroy_env