github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/tools/provisioning/README.md (about) 1 # Weaveworks provisioning 2 3 ## Introduction 4 5 This project allows you to get hold of some machine either locally or on one of the below cloud providers: 6 7 * Amazon Web Services 8 * Digital Ocean 9 * Google Cloud Platform 10 11 You can then use these machines as is or run various Ansible playbooks from `../config_management` to set up Weave Net, Kubernetes, etc. 12 13 ## Set up 14 15 * You will need [Vagrant](https://www.vagrantup.com) installed on your machine and added to your `PATH` in order to be able to provision local (virtual) machines automatically. 16 17 * On macOS: `brew install vagrant` 18 * On Linux (via Aptitude): `sudo apt install vagrant` 19 * For other platforms or more details, see [here](https://www.vagrantup.com/docs/installation/) 20 21 * You will need [Terraform](https://www.terraform.io) installed on your machine and added to your `PATH` in order to be able to provision cloud-hosted machines automatically. 22 23 * On macOS: `brew install terraform` 24 * On Linux (via Aptitude): `sudo apt install terraform` 25 * If you need a specific version: 26 27 curl -fsS https://releases.hashicorp.com/terraform/x.y.z/terraform_x.y.z_linux_amd64.zip | gunzip > terraform && chmod +x terraform && sudo mv terraform /usr/bin 28 * For other platforms or more details, see [here](https://www.terraform.io/intro/getting-started/install.html) 29 30 * Depending on the cloud provider, you may have to create an account, manually onboard, create and register SSH keys, etc. 31 Please refer to the `README.md` in each sub-folder for more details. 32 33 ## Usage in scripts 34 35 Source `setup.sh`, set the `SECRET_KEY` environment variable, and depending on the cloud provider you want to use, call either: 36 37 * `gcp_on` / `gcp_off` 38 * `do_on` / `do_off` 39 * `aws_on` / `aws_off` 40 41 ## Usage in shell 42 43 Source `setup.sh`, set the `SECRET_KEY` environment variable, and depending on the cloud provider you want to use, call either: 44 45 * `gcp_on` / `gcp_off` 46 * `do_on` / `do_off` 47 * `aws_on` / `aws_off` 48 49 Indeed, the functions defined in `setup.sh` are also exported as aliases, so you can call them from your shell directly. 50 51 Other aliases are also defined, in order to make your life easier: 52 53 * `tf_ssh`: to ease SSH-ing into the virtual machines, reading the username and IP address to use from Terraform, as well as setting default SSH options. 54 * `tf_ansi`: to ease applying an Ansible playbook to a set of virtual machines, dynamically creating the inventory, as well as setting default SSH options.