Create Orka VMs
What does this MR do?
Implements the Orka provider Create()
method.
Note that an update to our VM naming scheme is required: Orka only allows VM names to be at most 38 chars. Unfortunately, the naming is a global package used by GCP too so this will change our GCP naming as well. I tried to make it a sensible solution keeping the ability to tag VMs and having the job ID as a unique auto-incrementing identifier linking to the job and also the runner used.
At this points this only creates VMs, nothing else is done with them.
Why was this MR needed?
What's the best way to test this MR?
Get your orka-cli token:
cat ~/.config/configstore/orka-cli.json | jq -r ".token"
Fill out your config.toml
Provider = "orka"
OS = "macos"
VMTag = "manual-qa"
[Orka]
BaseImage = "runner-12-20201203.img"
Cores = 3
Endpoint = "http://10.221.188.100"
Token = "token from orka-cli"
Connect to the VPN using the script in the orka
repository:
path-to-orka/scripts/vpn.sh
Run:
CUSTOM_ENV_CI_JOB_ID=$(date +%s) BUILD_FAILURE_EXIT_CODE=1 SYSTEM_FAILURE_EXIT_CODE=2 go run cmd/autoscaler/main.go custom prepare
Remember to delete all the VMs you create!
What are the relevant issue numbers?
Edited by Adrien Kohlbecker