Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
scaling_scheduler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abdulhadi Al-Sayed
scaling_scheduler
Commits
9c05bce9
Commit
9c05bce9
authored
3 years ago
by
Abdulhadi Al-Sayed
Browse files
Options
Downloads
Patches
Plain Diff
Added service running functionality
parent
a0c76f6e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+2
-1
2 additions, 1 deletion
README.md
infcode-golang
+1
-1
1 addition, 1 deletion
infcode-golang
scaling_scheduler.yaml
+0
-0
0 additions, 0 deletions
scaling_scheduler.yaml
setup.sh
+27
-0
27 additions, 0 deletions
setup.sh
with
30 additions
and
2 deletions
README.md
+
2
−
1
View file @
9c05bce9
# 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
```
...
...
This diff is collapsed.
Click to expand it.
infcode-golang
@
be2b11ca
Compare
55bb21e5
...
be2b11ca
Subproject commit
55bb21e55ec9abe3c64ce684d5418e773ab9200a
Subproject commit
be2b11ca9bb586deda8ad24cc22a79a922b214b2
This diff is collapsed.
Click to expand it.
auto
scaling.yaml
→
scaling
_scheduler
.yaml
+
0
−
0
View file @
9c05bce9
File moved
This diff is collapsed.
Click to expand it.
setup.sh
+
27
−
0
View file @
9c05bce9
#!/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
\0
33[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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment