Giter VIP home page Giter VIP logo

aws-scaling's Introduction

AWS Step Functions to Start/Stop the Staging Environment

Description

This repository includes code and Terraform manifests for an AWS Lambda and AWS Step Functions to reliably start and stop resources within the NUL RDC staging environment as follows:

Spin Down

  • Scale all ECS tasks in meadow, avr, and arch clusters down to 0
  • Perform incremental backup of avr and arch collections in Solr
  • Scale all ECS tasks in fcrepo and solrcloud clusters down to 0
  • Stop meadow-db and stack-s-db RDS instances

Spin Up

  • Start meadow-db and stack-s-db RDS instances if necessary
    • Wait for both instances to reach available state
  • Scale fcrepo ECS service up to 1
  • Scale up solrcloud ECS services
    • 3 Zookeeper nodes
    • 4 Solr nodes
  • Wait for the Solr cluster to report 4 stable, live nodes
  • Restore avr and arch Solr collections
  • Start meadow, avr, and arch ECS services

The Terraform manifests also create AWS EventBridge Rules to spin the stack up and down every weekday at 6am and 8pm Central, respectively.

Execution

To spin the staging environment up or down, execute the stack-s-spin-up-environment or stack-s-spin-down-environment Step Function, respectively, with the following payload:

{
  "solr": {
    "baseUrl": "http://solr.internal.rdc-staging.library.northwestern.edu:8983/solr/",
    "collections": ["arch", "avr"]
  },
  "rds": {
    "meadow": "meadow-db",
    "stack": "stack-s-db"
  }
}

There is also a staging-environment utility script on the staging bastion host that can be used to spin the staging environment up or down on demand.

aws-scaling's People

Contributors

mbklein avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.