Skip to content

WIP: PoC Macos autoscaler

Steve Xuereb requested to merge macos-autoscaler into master

Testing

Setup

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 running

    orka 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 is admin)

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

Merge request reports