Files
weave-scope/provisioning
Daniel Holbach 37ea4937a4 Squashed 'tools/' changes from f041a74ff..604e133c2
604e133c2 Merge pull request #167 from weaveworks/update-scheduler-instructions
bdd647e92 Merge pull request #169 from weaveworks/go-1.14.4
2c2792e7d Upgrade to Go 1.14.4
e6dd5e8f0 Merge pull request #168 from weaveworks/downgrade-werkzeug
144aa64c0 Restruct scheduler to use compatible version of werkzeug library
cc807901d Update instructions on how to deploy gc/scheduler
51a217660 Merge pull request #166 from weaveworks/165-rename-circleci-to-wksctl
bfd7a2bbe Renames circleci project wks -> wksctl afte code move
a5f7be3cc Note that the API token was revoked
15e4cfb94 Merge pull request #164 from weaveworks/improve-lint
dc8722589 Fix lint errors in Python code
8cb6a62a2 Set failure state if lint_files fails
c635ce412 Simplify the no-arguments case
167b7ed57 Skip entire directories that match filter patterns
1caa455a6 Refactor: read filter patterns once at start
4cc7911e5 Merge pull request #163 from weaveworks/fix-lint
393808dab Merge pull request #162 from weaveworks/golang-python3
3c5fcd16e Make lint run on CircleCI
f0936a1e9 lint all directories if not given a list
68f62a393 Fix typo in lint script
9ef44b057 Stop installing promtool
882df5ec5 Install python 3 instead of obsolete v2.7
988002377 Update Go to latest 1.13.3
2a2df5278 Merge pull request #161 from murali-reddy/terraform-update
bf8ed23b9 update google_compute_instance arguments as per the latest documentation

git-subtree-dir: tools
git-subtree-split: 604e133c2b7eb805766eab7be28723ef1ccd32aa
2020-09-03 10:15:13 +02:00
..

Weaveworks provisioning

Introduction

This project allows you to get hold of some machine either locally or on one of the below cloud providers:

  • Amazon Web Services
  • Digital Ocean
  • Google Cloud Platform

You can then use these machines as is or run various Ansible playbooks from ../config_management to set up Weave Net, Kubernetes, etc.

Set up

  • You will need Vagrant installed on your machine and added to your PATH in order to be able to provision local (virtual) machines automatically.

    • On macOS: brew install vagrant
    • On Linux (via Aptitude): sudo apt install vagrant
    • For other platforms or more details, see here
  • You will need Terraform installed on your machine and added to your PATH in order to be able to provision cloud-hosted machines automatically.

    • On macOS: brew install terraform

    • On Linux (via Aptitude): sudo apt install terraform

    • If you need a specific version:

        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
      
    • For other platforms or more details, see here

  • Depending on the cloud provider, you may have to create an account, manually onboard, create and register SSH keys, etc. Please refer to the README.md in each sub-folder for more details.

Usage in scripts

Source setup.sh, set the SECRET_KEY environment variable, and depending on the cloud provider you want to use, call either:

  • gcp_on / gcp_off
  • do_on / do_off
  • aws_on / aws_off

Usage in shell

Source setup.sh, set the SECRET_KEY environment variable, and depending on the cloud provider you want to use, call either:

  • gcp_on / gcp_off
  • do_on / do_off
  • aws_on / aws_off

Indeed, the functions defined in setup.sh are also exported as aliases, so you can call them from your shell directly.

Other aliases are also defined, in order to make your life easier:

  • 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.
  • 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.