WIP: PoC Macos autoscaler
Testing
Setup
-
Create token https://documenter.getpostman.com/view/6574930/S1ETRGzt?version=latest#3b0726f3-9473-4d42-bb3e-dfb242284cd2
-
Set up a new
config.toml
file for the autoscalerconfig.toml
Provider = "orka" OS = "macOS" LogLevel = "info" LogFormat = "json" VMTag = "msrm" [Orka] Token = "xxxxx" Username = "steveazz" [ProviderCache] Enabled = false Directory = "/tmp/macos"
prepare stage
-
Run the following command
BUILD_FAILURE_EXIT_CODE=1 SYSTEM_FAILURE_EXIT_CODE=2 go run cmd/autoscaler/main.go custom prepare
-
Run
orka vm list
and you should see a new vm runningorka vm list
steveazz-autoscaler _ 4622c3314708e _ xxxx _ macpro-2 (UP) _ IP _ :5999 _ :5900 _ :8822 _ 6|6 _ 15GB _ steveazz-test.img _ running _
run stage
-
Create a new bash script in
/tmp/test.sh
with the following content:/tmp/test.sh
#! /usr/bin/env bash now=$(date +"%Y_%m_%d_%H_%M") fileName="/tmp/execute.${now}" echo $fileName echo "hello" > $fileName
-
Run the following command
BUILD_FAILURE_EXIT_CODE=1 SYSTEM_FAILURE_EXIT_CODE=2 go run cmd/autoscaler/main.go custom run /tmp/test.sh test
-
Check if file was created with
ssh -p 8822 admin@10.221.188.4 ls -la /tmp/
(password isadmin
)
cleanup stage
- Run
BUILD_FAILURE_EXIT_CODE=1 SYSTEM_FAILURE_EXIT_CODE=2 go run cmd/autoscaler/main.go custom cleanup
- Run
orka vm list
and you should see no VMS.
reference gitlab-org/gitlab-runner#6607 (closed)
Edited by Steve Xuereb