Use Ubuntu Server 14.04 LTS x64
Provision with packer
packer build -var 'aws_access_key=XXXXX' -var 'aws_secret_key=XXXXX' -var 'do_api_key=XXXXX' -var 'do_client_id=XXXXX' packer.json
Install
- Add the following to your gemfile.
gem 'tape', github: 'smashingboxes/tape', group: :development, tag: <DESIRED_VERSION>
bundle install
tape installer install
- Updated the hosts file with the IP address of your server
[omnibox]
0.0.0.0
- Fill in missing values in
tape_vars.yml
- Copy all developers public keys into some dir and specify that dir inside
tape_vars.yml
(dev_key_files) tape ansible everything
Upgrade
bundle upgrade tape
tape installer install
You can write app specific roles in the roles files storred in the roles
directory
You must then specify the roles you want to use in omnibox.yml
or deploy.yml
Read the Ansible docs on playbook roles here
You can setup multistage by defining your hosts file as follows
[production]
0.0.0.0 be_app_env=SOME_ENV be_app_branch=SOME_BRANCH
[staging]
0.0.0.0 be_app_env=SOME_ENV be_app_branch=SOME_BRANCH
[omnibox:children]
production
staging
then use the -l
option to specify the staging
tape ansible deploy -l staging
vagrant up
ortape vagrant create
- Put the following into your hosts inventory file:
[vagrant]
<192.168.13.37> ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
The port number might be different if other vagrant machines are running, run vagrant ssh-config
to find the correct configuration.
You can speicfy a port using the ansible_ssh_port
in your hosts inventory file.
- Update
tape_vars.yml
with information to a rails app you want to deploy tape ansible everything -l vagrant
tape qemu create --name fe_test
tape qemu start --name fe_test -p2255
ssh-add ./id_rsa_sb_basebox
echo 'localhost:2255' >test_hosts
tape ansible everything
Run tape -h
for a quick rundown of the tool's modules and options.
git clone git@github.com:smashingboxes/tape.git
cd tape
ansible-galaxy install -r requirements.yml --force