tree: 8e5faa02438820b5c1caa50694b7dad20997d683 [path history] [tgz]
  1. server/
  2. test_agent/
  3. BUILD.bazel
  4. control_loop.go
  5. fakequinix_test.go
  6. initializer.go
  7. initializer_test.go
  8. manager.go
  9. provisioner.go
  10. provisioner_test.go
  11. README.md
  12. recoverer.go
  13. recoverer_test.go
  14. shared_config.go
  15. ssh.go
  16. updater.go
  17. updater_test.go
cloud/shepherd/equinix/manager/README.md

Equinix Shepherd

Manages Equinix machines in sync with BMDB contents. Made up of two components:

Provisioner

Brings up machines from hardware reservations and populates BMDB with new Provided machines.

Initializer

Starts the Agent over SSH (wherever necessary per the BMDB) and reports success into the BMDB.

Running

Unit Tests

The Shepherd has some basic smoke tests which run against a Fakequinix.

Manual Testing

If you have Equinix credentials, you can run:

$ bazel build //cloud/shepherd/equinix/manager/server
$ bazel build //cloud/shepherd/equinix/manager/test_agent
$ bazel-bin/cloud/shepherd/equinix/manager/server/server_/server \
    -bmdb_eat_my_data \
    -equinix_project_id FIXME \
    -equinix_api_username FIXME \
    -equinix_api_key FIXME \
    -agent_executable_path bazel-bin/cloud/shepherd/equinix/manager/test_agent/test_agent_/test_agent \
    -agent_endpoint example.com \
    -equinix_ssh_key_label $USER-FIXME \
    -equinix_device_prefix $USER-FIXME- \
    -provisioner_assimilate -provisioner_max_machines 10

Replace $USER-FIXME with <your username>-test or some other unique name/prefix.

This will start a single instance of the provisioner accompanied by a single instance of the initializer.

A persistent SSH key will be created in your current working directory.

Prod Deployment

TODO(q3k): split server binary into separate provisioner/initializer for initializer scalability, as that's the main bottleneck.