Skip to content
Snippets Groups Projects
Commit 9c05bce9 authored by Abdulhadi Al-Sayed's avatar Abdulhadi Al-Sayed
Browse files

Added service running functionality

parent a0c76f6e
Branches
No related tags found
No related merge requests found
# scaling_scheduler
Use this command when cloning this repo for submodules to clone as well
Clone in home directory of ubuntu user
git clone --recurse-submodules repo_url
* Edit scale_env.yaml with all necessary values from openstack
* Run setup.sh on a manager instance that is authenticated in the openstack cli (e.g run service user script)
* Run setup.sh on a manager instance (Ubuntu) that is authenticated in the openstack cli (e.g run service user script)
Example environment variables
```
......
Subproject commit 55bb21e55ec9abe3c64ce684d5418e773ab9200a
Subproject commit be2b11ca9bb586deda8ad24cc22a79a922b214b2
File moved
#!/bin/bash -v
# CREATE STACK
openstack stack create -t scaling_scheduler.yaml -e scale_env.yaml scaling_scheduler
# Wait 3 minutes while stack is being created
secs=$((3 * 60))
while [ $secs -gt 0 ]; do
echo -ne "Leeway countdown for stack CREATE to finish: $secs\033[0K\r"
sleep 1
: $((secs--))
done
# Get both downscale and upscale webhooks from stack output and feed to service project directory
openstack stack output show --all autoscale_scheduler | grep -Eo "(https)://[a-zA-Z0-9./?&=_%:-]*" > infcode-golang/scheduleroutputdata.txt
# Install golang if not installed
sudo apt-get -y install golang-golang
# Create symlink for systemctl to run go service
sudo ln -s infcode-golang/scheduler.service /etc/systemd/system/scheduler.service
# Activate service with systemd
sudo systemctl daemon-reload
sudo systemctl enable scheduler
sudo systemctl start scheduler
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment