Vagrant Platforms

Local Deployment

Prerequisites

A colocated deployment of Lattice can be launched locally with Vagrant on VirtualBox or VMware Fusion.

NOTE: Ubuntu 14.04 LTS does not install a compatible version of Vagrant by default. You can upgrade the version that you get out of the box by downloading the .deb file from Vagrant.

1. Spin up a virtual environment

Unzip the Lattice bundle, and switch to the vagrant directory

unzip lattice-bundle-VERSION.zip
cd lattice-bundle-VERSION/vagrant

To use VirtualBox run:

vagrant up --provider virtualbox

To use VMware run:

vagrant up --provider vmware_fusion

This spins up a virtual environment that is accessible at local.lattice.cf

See troubleshooting for more information about running VirtualBox alongside VMware.

2. Download compatible ltc

Follow the instructions in the vagrant up output to curl a compatible version of ltc

For example:

curl -O http://receptor.local.lattice.cf/v1/sync/<osx|linux>/ltc
chmod +x ltc

Replace <osx|linux> in the URL above with your OS. A Windows executable is also available at http://receptor.local.lattice.cf/v1/sync/windows/ltc.exe.

3. Use the Lattice CLI to target Lattice

./ltc target local.lattice.cf

AWS Deployment

Prerequisites

  • Vagrant 1.7+ installed
  • An AWS account
  • An access key id for your account
  • A secret access key for your account
  • A default VPC in the region you will be using
  • A keypair in the region you will be using
  • A security group for your VPC with the following rules:

    Type Protocol Port Range Source
    All traffic All All [SECURITY GROUP ID]
    HTTP TCP 80 [MY IP]
    SSH TCP 22 [MY IP]
    Custom TCP Rule TCP 8444 0.0.0.0/0
    Custom TCP Rule TCP 50000 - 60000 0.0.0.0/0
    Custom TCP Rule TCP 2222 0.0.0.0/0

1. Configure your environment variables

Once you have your AWS account configured, you’ll need to add your AWS credentials to your local environment:

export AWS_ACCESS_KEY_ID=<...>
export AWS_SECRET_ACCESS_KEY=<...>
export AWS_SSH_PRIVATE_KEY_NAME=<...> # name of the remote SSH key in AWS
export AWS_SSH_PRIVATE_KEY_PATH=<...> # path to the local SSH key
export AWS_INSTANCE_NAME=<...> # optional
export AWS_REGION=<...> # optional, defaults to us-east-1

2. Install vagrant-aws

vagrant plugin install vagrant-aws

3. Spin up virtual environment

unzip lattice-bundle-VERSION.zip
cd lattice-bundle-VERSION/vagrant

vagrant up --provider aws

4. Download compatible ltc

Follow the instructions in the vagrant up output to curl a compatible version of ltc

For example:

curl -O http://receptor.xx.xx.xxx.xx.xip.io/v1/sync/osx/ltc
chmod +x ltc

5. Use the Lattice CLI to target Lattice

The vagrant up output will also include the target for your cluster. Target it by running:

./ltc target xx.xx.xxx.xx.xip.io

Updating Deployments

Currently, Lattice does not support updating via provision. To update, you have to destroy the box and bring it back up with a new Vagrantfile. If you have copied a new Vagrantfile into an existing directory, make sure to remove any outdated lattice.tgz present in that directory.

Modular. Flexible. Powerful

Application Instances