Skip to content

Commit

Permalink
Add install script for Autonomous Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
AnykeyNL committed Aug 23, 2020
1 parent 433607e commit 66cb93a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ The **AutoScaleALL** script: A single Auto Scaling script for all OCI resources
- Support for using the script with Instance Principle. Meaning you can run this script inside OCI and when configured properly, you do not need to provide any details or credentials.
- Support for sending Notification after script is done. Thanks to Joel Nation for this! All you need to do is configure the Topic OCID in the script and make sure the user or instance principle has the correct permissions to publish Notifications.

# Install script into (free-tier) Autonomous Linux Instance
- Create a free-tier compute instance using the Autonomous Linux 7.8 image
- Create a Dynamic Group called Autoscaling and add the OCID of your instance to the group, using this command:
- ANY {instance.id = 'your_OCID_of_your_Compute_Instance'}
- Create a root level policy, giving your dynamic group permission to manage all resources in tenancy:
- allow dynamic-group Autoscaling to manage all-resources in tenancy
- Login to your instance using an SSH connection
- run the following commands:
- wget https://raw.githubusercontent.com/AnykeyNL/OCI-AutoScale/master/install.sh
- bash install.sh

# How to use
To control what to scale up/down or power on/off, you need to create a predefined tag called **Schedule**. If you want to
localize this, that is possible in the script. For the predefined tag, you need entries for the days of the week, weekdays, weekends and anyday. The tags names are case sensitive!
Expand Down
2 changes: 1 addition & 1 deletion schedule.cron
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
58 * * * * python3 /home/opc/OCI-AutoScale/AutoScaleALL.py down
01 * * * * python3 /home/opc/OCI-AutoScale/AutoScaleALL.py up
01 * * * * python3 /home/opc/OCI-AutoScale/AutoScaleALL.py up

0 comments on commit 66cb93a

Please sign in to comment.