Setup the prerequisites, clone this repo, run the commands, and you'll have a fully functional Cloud Foundry to deploy applications on AWS.
How does it work? Terraform configures the networking infrastructure on AWS, next bosh-init
sets up the BOSH Director, then BOSH installs Cloud Foundry.
- Re-sizable - Start small, but can grow as big as you need. See
config/aws/cf-<size>.yml
for examples. - Accessible - Give users the ability to try Cloud Foundry on AWS as quickly and easily as possible.
- Configurable - Manage the deploy manifests with Spruce.
Examples use a Mac OS X operating system. Ensure the following are setup before continuing.
- Amazon Web Services Setup
- Mac OS X with Homebrew
In your local code folder clone the repo, then change to that folder.
git clone https://github.com/cloudfoundry-community/aws-nat-bastion-bosh-cf.git
The make prepare
command will install Terraform to your /usr/local/bin
folder.
make prepare
Both BOSH and Cloud Foundry expect to find the key named sshkeys/bosh.pem
. Rename your public key to match this and copy it to the sshkeys
folder.
Terraform creates a plan
. Then users apply
the plan
and the infrastructure is allocated for the given provider.
Configure the terraform/aws/terraform.tfvars
file and Terraform will know who you are on AWS and where to create it's resources.
Copy the example file to the terraform.tfvars
file:
cp terraform/aws/terraform.tfvars.example terraform/aws/terraform.tfvars
Follow the instructions in the example file about any changes that need to be made.
Using Terraform now we'll create the AWS Virtual Private Cloud and ancillary gateways, routes and subnets. For more read about the network topology.
make plan
make apply
When an apply is complete the output will look something like this:
Apply complete! Resources: 27 added, 0 changed, 0 destroyed.
A bastion host is a server that sits on a public Internet address and provides a special service. This server is a jump-box that bridges the connection between public and private subnets.
make provision-base
Using bosh-init
we'll be creating the BOSH Director instance next.
make provision-bosh
For tear-down of the AWS VPC, you may run:
make destroy
To reset the Terraform cached files and start over, you can also run:
make clean
Check out terraform debugging for more about troubleshooting Terraform errors.
The next steps will be to establish an SSH connection to the BOSH Director, add releases and perform deploys.