Strapping Boots to Clouds


License
MIT
Install
gem install cloudstrap -v 0.49.1.pre

Documentation

Cloudstrap

Status

Cloudstrap is not being actively developed right now, due to lack of available AWS resources for testing. The current release (0.49.4) is feature-complete, with few known bugs (see Issues on GitHub).

  • Issues should still be reported, and will be fixed if development resumes.
  • Pull Requests are welcome, and will continue to be reviewed.

There are a few very minor changes I would like to see before I would be comfortable calling this 1.0.0, mostly regarding namespacing of environment variables (BOOTSTRAP_* -> CLOUDSTRAP_*), and restructuring the CLI (cloudstrap-teardown is not Cloudstrap-specific, and should be a standalone tool).

Overview

cloudstrap straps your boots to the cloud. Think of it as sort of a meta-bootstrap tool. It handles pre-bootstrapping, primarily. Once complete, you should have an environment suitable for launching your bootstrapper.

Why does this exist?

To simplify deployment by replacing manual process with glorious automation.

Installation

gem install --pre cloudstrap

Usage

Simply run the automated bootstrap tool. You can configure it via ENV or config.yaml

env BOOTSTRAP_WITHOUT_HUMAN_OVERSIGHT=true cloudstrap

The output describes the results, and all settings used in the process.

# Cloudstrap v0.28.0.pre

# General Configuration
#   These settings can be configured via ENV or config.yaml

BOOTSTRAP_REGION=us-west-2
BOOTSTRAP_CACHE_PATH=/Users/colstrom/cloudstrap/.cache
BOOTSTRAP_VPC_CIDR_BLOCK=10.0.0.0/16
BOOTSTRAP_PUBLIC_CIDR_BLOCK=10.0.0.0/24
BOOTSTRAP_PRIVATE_CIDR_BLOCK=10.0.1.0/24
BOOTSTRAP_AMI_OWNER=099720109477
BOOTSTRAP_UBUNTU_RELEASE=14.04
BOOTSTRAP_INSTANCE_TYPE=t2.micro
BOOTSTRAP_SSH_DIR=/Users/colstrom/cloudstrap/.ssh
BOOTSTRAP_SSH_USERNAME=ubuntu
BOOTSTRAP_HCP_DIR=/Users/colstrom/cloudstrap

# Cached Configuration
#   These settings can be overridden via ENV only

BOOTSTRAP_USERNAME=colstrom
BOOTSTRAP_UUID=97cb1464-cf44-479e-be47-9a212131ad4c
BOOTSTRAP_TAG=lkg@colstrom/97cb1464-cf44-479e-be47-9a212131ad4c
BOOTSTRAP_AMI=ami-70b67d10
BOOTSTRAP_VPC_ID=vpc-0e93a16a
BOOTSTRAP_INTERNET_GATEWAY_ID=igw-942af8f0
BOOTSTRAP_JUMPBOX_SECURITY_GROUP=sg-43f9183a
BOOTSTRAP_PRIVATE_SUBNET_ID=subnet-b7047dc1
BOOTSTRAP_PUBLIC_SUBNET_ID=subnet-9c1c65ea
BOOTSTRAP_ROUTE_TABLE_ID=rtb-9d28dcfa
BOOTSTRAP_AVAILABILITY_ZONE=us-west-2b
BOOTSTRAP_JUMPBOX_ID=i-051c248563a2c3f54
BOOTSTRAP_JUMPBOX_IP=52.89.237.123
BOOTSTRAP_WITHOUT_HUMAN_OVERSIGHT=true

# Additional Information
#   These do not need configuration, and are presented as a debugging checklist

# Public IPs Enabled in Public Subnet? true
# Gateway Attached to VPC? true
# Route to Internet via Gateway? true
# Route to NAT Gateway from Private Subnet? true
# SSH Allowed to Jumpbox? true
# SSH Key uploaded to AWS? 1a:c4:ec:25:94:90:ed:ee:c2:66:2e:3c:9c:c8:7a:12
# HCP bootstrap.properties configured? true
# Jumpbox Running? true

# No version specified for HCP Bootstrap, falling back to default version
INFO [0942f874] Running /usr/bin/env rm -f /home/ubuntu/.ssh/id_rsa as ubuntu@52.89.237.123
INFO [0942f874] Finished in 11.547 seconds with exit status 0 (successful).
INFO Uploading /Users/colstrom/cloudstrap/.ssh/lkg@colstrom/97cb1464-cf44-479e-be47-9a212131ad4c 100.0%
INFO [bec7b898] Running /usr/bin/env chmod -w /home/ubuntu/.ssh/id_rsa as ubuntu@52.89.237.123
INFO [bec7b898] Finished in 0.048 seconds with exit status 0 (successful).
INFO Uploading /Users/colstrom/bootstrap.properties 100.0%
INFO [e091db46] Running /usr/bin/env apt install --assume-yes genisoimage aria2 as ubuntu@54.89.237.123
INFO [e091db46] Finished in 8.157 seconds with exit status 0 (successful).
INFO [1fa8cae1] Running /usr/bin/env aria2c --continue=true --dir=/opt --out=bootstrap.deb as ubuntu@52.89.237.123
INFO [1fa8cae1] Finished in 3.395 seconds with exit status 0 (successful).
INFO [577d4fdc] Running /usr/bin/env dpkg --install /opt/bootstrap.deb as ubuntu@52.89.237.123
INFO [577d4fdc] Finished in 3.055 seconds with exit status 0 (successful).

Contratulations! Your Jumpbox is ready. This instance has been configured with
everything you need to deploy your very own cluster. The SSH key used by this
process has been uploaded to your Jumpbox, along with a bootstrap.properties
file that has been configured to match the settings used here.

Human oversight has been disabled.

Now would be a good time for tea and swordplay (https://xkcd.com/303/). What
happens next is non-interactive and will take approximately 30 minutes.

  INFO [03a68da8] Running /usr/bin/env bootstrap install bootstrap.properties as ubuntu@52.89.237.123
  INFO [03a68da8] Finished in 1457.406 seconds with exit status 0 (successful).

License

cloudstrap is available under the MIT License. See LICENSE.txt for the full text. The software it deploys has its own license.

Contributors