Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

  1. 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.
  2. clusterName: Select the target cluster where the Kubernetes namespace is located.
  3. projectName: Select the target project where the Kubernetes namespace is located.

Image Removed

Usage

  1. Select the Jenkins job and click on "Build with Parameters" to provide the required input.

  2. 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.

  3. Select the target cluster by choosing the appropriate option from the "clusterName" parameter dropdown.

  4. Select the target project by choosing the appropriate option from the "projectName" parameter dropdown.

  5. 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:

  • Time zone: UTC i.e. all schedules are in UTC time zone

How to start Rancher environment:

PARAMETERVALUEREQUIRED
CLUSTERList of clusterstrue
NAMESPACEList of namespacestrue
ACTIONstart | default valuetrue

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


Image Added


Image Added

How to monitor job status:

  • Review Console Output

Image Added

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
CLUSTERList of clusterstrue
NAMESPACEList of namespacestrue
PERIODnight || weekendtrue
SUSPENDcheckmark 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


Image Added

Direct Link on Rancher UI

Image Added