Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip-ci] Mac PW Pool script docs update #183

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Mac PW Pool script docs update
Signed-off-by: Chris Evich <cevich@redhat.com>
  • Loading branch information
cevich committed Feb 6, 2024
commit 71ede1b334ac72e4fa23cf4e3272aaa575986ecc
31 changes: 20 additions & 11 deletions mac_pw_pool/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Cirrus-CI persistent worker maintenance

These docs and scripts were implemented in a hurry. They both likely
contain cringe-worthy content and incomplete information.
This might be improved in the future. Sorry.
These scripts are intended to be used from a repository clone,
by cron, on an always-on cloud machine. They make a lot of
other assumptions, some of which may not be well documented.
Please see the comments at the top of each scripts for more
detailed/specific information.

## Prerequisites

Expand All @@ -12,21 +14,24 @@ This might be improved in the future. Sorry.
* A copy of the ssh-key referenced by `CirrusMacM1PWinstance` launch template
under "Assumptions" below.
* The ssh-key has been added to a running ssh-agent.
* The running ssh-agent sh-compatible env. vars. are stored in
`/run/user/$UID/ssh-agent.env`
* The env. var. `POOLTOKEN` is set to the Cirrus-CI persistent worker pool
token value.

## Assumptions

* You've read all scripts in this directory and meet any requirements
stated within.
* You've read all scripts in this directory, generally follow
their purpose, and meet any requirements stated within the
header comment.
* You have permissions to access all referenced AWS resources.
* There are one or more dedicated hosts allocated and have set:
* A name tag like `MacM1-<some number>`
* A name tag like `MacM1-<some number>` (NO SPACES!)
* The `mac2` instance family
* The `mac2.metal` instance type
* Disabled "Instance auto-placement", "Host recovery", and "Host maintenance"
* Quantity: 1
* Tags: `automation=false` and `PWPoolReady=true`
* Tags: `automation=false`, `purpose=prod`, and `PWPoolReady=true`
* The EC2 `CirrusMacM1PWinstance` instance-template exists and sets:
* Shutdown-behavior: terminate
* Same "key pair" referenced under `Prerequisites`
Expand Down Expand Up @@ -55,10 +60,14 @@ and ruined.

## Initialization

When no dedicated hosts have instances running, complete creation and
setup will take many hours. This may be bypassed by *manually* running
`LaunchInstances.sh --force`. This should be done prior to installing
the `Cron.sh` cron-job.
It is assumed that neither the `Cron.sh` nor any related maintenance
scripts are installed (in crontab) or currently running.

Once several dedicated hosts have been manually created, they
should initially have no instances on them. If left alone, the
maintenance scripts will eventually bring them all up, however
complete creation and setup will take many hours. This may be
bypassed by *manually* running `LaunchInstances.sh --force`.

In order to prevent all the instances from being recycled at the same
(future) time, the shutdown time installed by `SetupInstances.sh` also
Expand Down