KumoDockerCloud 
This is the Redbubble wrapper around creating environments in docker cloud. It is built into our rbdevltools container and can then be used during apply-env and deploy tasks.
Installation
This is installed into the rbdevtools container.
Usage
Apply env example
KumoDockerCloud::Environment.new(
name: environment_name,
env_vars: env_vars,
app_name: 'your-app-here',
config_path: File.join('/app', 'config'),
stack_template_path: File.join('/app', 'docker-cloud, 'stack.yml.erb')
).apply
Deploy example
begin
KumoDockerCloud::Stack.new(app_name, env_name).deploy(version)
rescue KumoDockerCloud::Deployment::DeploymentError, TimeoutError
exit 1
end
Testing changes
Changes to the gem can be manually tested end to end in a project that uses the gem (i.e. http-wala).
- First start the dev-tools container:
baxter kumo tools debug non-production - Re-install the gem:
gem specific_install https://github.com/redbubble/kumo_dockercloud_gem.git -b <your_branch> - Fire up a console:
irb - Require the gem:
require "kumo_dockercloud" - Interact with the gem's classes.
KumoDockerCloud::Stack.new('http-wala', 'test').deploy('1518') - If your container doesn't have a version check endpoint, add the
contactable: falseoption:KumoDockerCloud::Stack.new('http-wala', 'test', contactable: false).deploy('1518')
Contributing
- Fork it ( https://github.com/[my-github-username]/kumo_dockercloud_gem/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request