-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This guide will step you through setting up a new deployment application with Cloudpad.
Create a directory and add a Gemfile:
$ mkdir app-deploy
$ cd app-deploy
$ touch GemfileAdd this line to your application's Gemfile:
source 'http://rubygems.org'
gem 'cloudpad', :github => 'agquick/cloudpad'
gem 'cloudpad-starter', :github => 'agquick/cloudpad-starter' # if you want cloudpad base dockerfiles, etc. This is optional.And then execute:
$ bundle install
$ bundle exec cap installUpdate your Capfile:
# Capfile
require 'capistrano/setup'
# require 'capistrano/deploy' # comment this line out
require 'cloudpad'
# any extensions go here, for example cloudpad/starter
require 'cloudpad/starter'Delete everything in config/deploy.rb
# config/deploy.rb
# This is your configuration file. Let's make it empty for now...The directory structure is integral to how Cloudpad works. Below is an outline of the relevant directories and files. Extensions may add more directories or files to these locations.
-
config/- where all configuration is stored-
deploy.rb- global configuration -
deploy/- config for stages-
production.rb- configuration overrides for production environment
-
-
-
context/- context for building images-
src/- holds all cached repositories -
services/- compile location for defined container services
-
-
manifests/- directory for holding all Dockerfile manifests
If you are using any extensions, you can run the relevant commands now. For example, this will install the starter files:
$ bundle exec cap production starter:install:allThe machine that will be running the Cloudpad commands is known as the launcher. This machine needs to have docker installed:
$ bundle exec cap production launcher:ensure_dockerYou will also most like need a image registry for your hosts. Cloudpad can help create one on your Launcher host.
$ bundle exec cap production launcher:ensure_registryNow you are ready to:
- Write your configuration file
- Build your images
- Add and provision your hosts
- Deploy your containers