This project contains Terraform templates to help you deploy Lattice on Openstack.
Note: This is a community-supplied platform, it is not presently supported by the project maintainers.
- An Openstack Cloud
- An Account, project and relevant access on your openstack cloud.
Here are some step-by-step instructions for configuring a Lattice cluster via Terraform:
- Visit the Lattice GitHub Releases page
- Select the Lattice version you wish to deploy and download the Terraform example file for your target platform. The filename will be
lattice.openstack.tf
- Create an empty folder and place the
lattice.openstack.tf
file in that folder. - Update the
lattice.openstack.tf
by filling in the values for the variables. Details for the values of those variables are below.
The available variables that can be configured are:
openstack_access_key
: Openstack username.openstack_secret_key
: Openstack Password.openstack_tenant_name
: The Tenant/Project name in Openstack.openstack_key_name
: The name given to the SSH key which will be uploaded for use by the instances.openstack_public_key
: The actual contents of rsa_id.pub to upload as the public key.openstack_ssh_private_key_file
: Path to the SSH private key file (Stays local. Used for provisioning.)openstack_ssh_user
: SSH user (defaultubuntu
)num_cells
: The number of Lattice Cells to launch (default3
)openstack_keystone_uri
: The Keystone API URLopenstack_instance_type_coordinator
: flavour for Coordinator nodeopenstack_instance_type_cell
: flavour for Cell nodesopenstack_neutron_router_gateway_network_id
: The UUID of a network which can be used by a Neutron router as a WAN IP address. (Gateway Network)openstack_floating_ip_pool_name
: The Name of the Openstack IP pool from which to request floating IP'sopenstack_image
: The Ubuntu image in glance to use for Instances.openstack_region
: Openstack Region. Leave blank to support Openstack installations without region support.lattice_username
: Lattice username (defaultuser
)lattice_password
: Lattice password (defaultpass
)
Refer to the Terraform AWS provider documentation for more details about how to configure the proper credentials.
Here are some step-by-step instructions for deploying a Lattice cluster via Terraform:
- Run the following commands in the folder containing the
lattice.openstack.tf
file
terraform get -update
terraform apply
This will deploy the cluster.
Upon success, terraform will print the Lattice target:
Outputs:
lattice_target = x.x.x.x.xip.io
lattice_username = xxxxxxxx
lattice_password = xxxxxxxx
which you can use with the Lattice CLI to ltc target x.x.x.x.xip.io
.
Terraform will generate a terraform.tfstate
file. This file describes the cluster that was built - keep it around in order to modify/tear down the cluster.
Refer to the Lattice CLI documentation.
Destroy the cluster:
terraform destroy
Sometimes, destroy will need to be run twice to completely destroy all components, as openstack networking components are often seen as 'still in use' when destroyed immidietley after the instances that relied on them.
The provided examples (i.e., lattice.openstack.tf
) are pinned to a specific Bump commit or release tag in order to maintain compatibility between the Lattice build (lattice.tgz
) and the Terraform definitions. Currently, Terraform does not automatically update to newer revisions of Lattice.
If you want to update to the latest version of Lattice:
- Update the
ref
in thesource
directive of yourlattice.openstack.tf
tomaster
. - Run
terraform get -update
to update the modules under the.terraform/
folder.
If you want to update to a specific version of Lattice:
- Choose a version from either the Bump commits or Releases.
- Update the
ref
in thesource
directive of yourlattice.openstack.tf
to that version. - Run
terraform get -update
to update the modules under the.terraform/
folder.
Openstack Terraform support for Lattice.cf added by Matt Johnson matjohn2@cisco.com.
For Lattice copyright, see LICENSE for details. Copyright (c) 2015 Pivotal Software, Inc.