Skip to content

Commit

Permalink
Update script
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 3, 2023
1 parent 80ef800 commit 2909708
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions hack/scripts/start-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,11 @@ sudo -E -u ${svc_user} ./config.sh --unattended --url $runner_url --token $RUNNE
# Configuring as a service
#---------------------------------------
echo
# echo "Configuring as a service ..."
# prefix=""
# if [ "${runner_plat}" == "linux" ]; then
# prefix="sudo "
# fi

# ${prefix}./svc.sh install ${svc_user}
# ${prefix}./svc.sh start

# echo "USER=$USER , svc_user=${svc_user}"
# whoami
echo "Configuring as a service ..."
prefix=""
if [ "${runner_plat}" == "linux" ]; then
prefix="sudo "
fi

sudo -E -u ${svc_user} ./run.sh
${prefix}./svc.sh install ${svc_user}
${prefix}./svc.sh start
2 changes: 1 addition & 1 deletion pkg/providers/firecracker/cloud_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export RUNNER_NAME=%s
# curl -s https://raw.githubusercontent.com/actions/runner/main/scripts/create-latest-svc.sh | bash -s -- -s ${RUNNER_OWNER} -n ${RUNNER_NAME} -f
# ephemeral runner: https://docs.github.com/en/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners#using-ephemeral-runners-for-autoscaling
# https://github.blog/changelog/2021-09-20-github-actions-ephemeral-self-hosted-runners-new-webhooks-for-auto-scaling/
curl -fsSL https://gist.githubusercontent.com/tamalsaha/af2f99c80f84410253bd1e532bdfabc7/raw/49e6cbdd461afe4cff930e2a5323507827b7718a/start-runner.sh | bash -s -- -n ${RUNNER_NAME} -l firecracker -f
curl -fsSL https://gist.githubusercontent.com/tamalsaha/af2f99c80f84410253bd1e532bdfabc7/raw/4e6cff5d2a391d1b625e72a1cc15ff6560d5863c/start-runner.sh | bash -s -- -n ${RUNNER_NAME} -l firecracker -f
`, DefaultOptions.NatsURL, DefaultOptions.NatsUsername, DefaultOptions.NatsPassword, ghToken, runnerName)

udBytes, err := PrepareCloudInitUserData(userData, script)
Expand Down

0 comments on commit 2909708

Please sign in to comment.