The purpose of the Jenkins job https://jenkins-aws.indexdata.com/job/Rancher/job/Automation/job/start-stop-project/
is to automatically/manually stop/start project for a period of time to save AWS costs.
At the moment we have schedule where every environment in folio-dev, folio-perf clusters are stopped during time period from 6PM EST (Friday) until 6:30 PM EST (Sunday).
Daily shutdowns in discussion at the moment.
Main purpose
For dev teams main purpose of the job could be necessity to use (development/testing process) their environment during stop period (weekends, nights?).
Job Parameters
The job requires the following parameters to be provided when running:
- action: Choose the action to be performed with the project "start" - if you need to work with env during stop hours, "stop" - after you finished your work.
- clusterName: Select the target cluster where the Kubernetes namespace is located.
- projectName: Select the target project where the Kubernetes namespace is located.
Usage
Select the Jenkins job and click on "Build with Parameters" to provide the required input.
Choose the desired action from the available options: "start" - if you need to work with env during stop hours, "stop" - after you finished your work.
Select the target cluster by choosing the appropriate option from the "clusterName" parameter dropdown.
Select the target project by choosing the appropriate option from the "projectName" parameter dropdown.
Click on "Build" to execute the job with the provided parameters.
...
Table of Contents |
---|
Target Jenkins pipeline: Link
Aim: Spin up automatically scaled down Rancher environment
Epilogue: *** Starting from All Rancher environments will be excluded from auto start action inside "managePods" pipeline i.e. to make environment up & running manual interaction is a MUST.
INFO:
Scaling down schedule: Link
Time zone: UTC i.e. all schedules are in UTC time zone
How to start Rancher environment:
PARAMETER | VALUE | REQUIRED |
---|---|---|
CLUSTER | List of clusters | true |
NAMESPACE | List of namespaces | true |
ACTION | start | default value | true |
P.S. ***IGNORE ALL OF THE REST PARAMETERS***
EXAMPLE OF STARTING SAMPLE RANCHER ENVIRONMENT:
- Select all 3 required parameters
- Click on "BUILD" button at the bottom of Jenkins pipeline page
- Wait until job execution is complete
How to monitor job status:
- Review Console Output
If Green Checkmark appeared, then pipeline execution successfully complete.
Check, Verify & Validate target environment.
Information, how to construct environment URLs, please visit this page: Link
In case of any issue, please report via Slack Channel.
How to exclude environment from auto shutdown list:
(CAUTION: THIS IS ONE TIME OPERATION, SETTINGS ARE NOT PERMENANT, i.e. if target date passed, on the next cycle environment will be automatically included into the list)
P.S. ***IGNORE ALL OF THE REST PARAMETERS***
PERIOD:
parameter defines for how long target environment will be excluded from auto shutdown process, possible values: night (upcoming i.e. DO NOT shutdown tonight), weekend (upcoming i.e. DO NOT shutdown on this weekend)
PARAMETER | VALUE | REQUIRED |
---|---|---|
CLUSTER | List of clusters | true |
NAMESPACE | List of namespaces | true |
PERIOD | night || weekend | true |
SUSPEND | checkmark | true |
EXAMPLE of parameters selection to suspend auto shutdown for tonight:
- select all required 4 parameters
- click on "BUILD" button at the bottom of Jenkins pipeline page
- wait until job execution is complete