diff --git a/infcode-golang b/infcode-golang index fa7f1a7a4d99081feb9b7f641421218b02ed140b..f615eaf48238de159ec104ff04e2b6a4fbe88070 160000 --- a/infcode-golang +++ b/infcode-golang @@ -1 +1 @@ -Subproject commit fa7f1a7a4d99081feb9b7f641421218b02ed140b +Subproject commit f615eaf48238de159ec104ff04e2b6a4fbe88070 diff --git a/setup.sh b/setup.sh index cb44a6ce3099056448d009c9da60b64e49fdc4ff..c085c5297245cfe79e412e2eeb7ff7b6f84baa70 100644 --- a/setup.sh +++ b/setup.sh @@ -11,16 +11,17 @@ while [ $secs -gt 0 ]; do done # Get both downscale and upscale webhooks from stack output and feed to service project directory -openstack stack output show --all scaling_scheduler | grep -Eo "(https)://[a-zA-Z0-9./?&=_%:-]*" > infcode-golang/main/scheduleroutputdata.txt +openstack stack output show --all scaling_scheduler | grep -Eo "(https)://[a-zA-Z0-9./?&=_%:-]*" > infcode-golang/scheduleroutputdata.txt # Install golang if not installed sudo apt-get update sudo apt-get -y install golang-go # Build scheduler service -go build /home/ubuntu/scaling_scheduler/infcode-golang/main/main.go +go build /home/ubuntu/scaling_scheduler/infcode-golang/main/main.go -o /home/ubuntu/scaling_scheduler/infcode-golang/main/main # Create symlink for systemctl to run go service +sudo systemctl disable scheduler sudo systemctl link /home/ubuntu/scaling_scheduler/infcode-golang/main/scheduler.service # Activate service with systemd