blob: e3c0f24a1b079915f0253a2858f599703df84f2e [file] [log] [blame] [view]
Serge Bazanskicaa12082023-02-16 14:54:04 +01001Equinix Shepherd
2===
3
4Manages Equinix machines in sync with BMDB contents. Made up of two components:
5
6Provisioner
7---
8
9Brings up machines from hardware reservations and populates BMDB with new Provided machines.
10
11Initializer
12---
13
14Starts the Agent over SSH (wherever necessary per the BMDB) and reports success into the BMDB.
15
16
17Running
18===
19
20Unit Tests
21---
22
23The Shepherd has some basic smoke tests which run against a Fakequinix.
24
25Manual Testing
26---
27
28If you have Equinix credentials, you can run:
29
30```
31$ bazel build //cloud/shepherd/equinix/manager/server
32$ bazel build //cloud/shepherd/equinix/manager/test_agent
33$ bazel-bin/cloud/shepherd/equinix/manager/server/server_/server \
34 -bmdb_eat_my_data \
35 -equinix_project_id FIXME \
36 -equinix_api_username FIXME \
37 -equinix_api_key FIXME \
38 -agent_executable_path bazel-bin/cloud/shepherd/equinix/manager/test_agent/test_agent_/test_agent \
39 -agent_endpoint example.com \
40 -equinix_ssh_key_label $USER-FIXME \
41 -equinix_device_prefix $USER-FIXME- \
42 -provisioner_assimilate -provisioner_max_machines 10
43```
44
45Replace $USER-FIXME with `<your username>-test` or some other unique name/prefix.
46
47This will start a single instance of the provisioner accompanied by a single instance of the initializer.
48
49A persistent SSH key will be created in your current working directory.
50
51Prod Deployment
52---
53
54TODO(q3k): split server binary into separate provisioner/initializer for initializer scalability, as that's the main bottleneck.