Giter Club home page Giter Club logo

controller-ha-for-aws's Introduction

Aviatrix - AWS CloudFormation template for HA on an Existing Aviatrix controller.

Description

This guide assumes you already have an Aviatrix Controller running and has been configured. If you don't, launch a controller through instructions available at Aviatrix Controller Startup Guide

This CloudFormation script will create the following:

  • An Aviatrix Autoscaling group with size 1 with a new security group
  • An SNS topic with same name as of existing controller instance.
  • An email subscription to the SNS topic(optional)
  • A lambda function for setting up HA and restoring configuration automatically.
  • An Aviatrix Role for Lambda with corresponding role policy with required permissions.

This script is only supported for Aviatrix Controller version >= 3.4

Pre-requisites:

  • VPC of existing controller.
  • Existing controller's VPC should have one or more public subnets, preferrably in different AZs for HA across AZ.
  • Existing controller version should be >= 3.4. if not, upgrade your controller to the latest
  • Existing controller must have backup and restore enabled
  • Existing controller must have at least AMI ID aviatrix_cloud_services_gateway_043018_BYOL-xxxxxx. If you are on an older AMI ID, please refer here to migrate to the latest controller AMI ID first.
  • Existing controller must have "aviatrix-role-ec2" attached to it and IAM roles "aviatrix-role-ec2" and "aviatrix-role-app" must be created before hand. Refer here
  • Non IAM based controller HA script has been deprecated. An old version is available at "access_key_support" branch in github
  • S3 bucket(s) to host the Lambda script and for the backup restore functionality
  • S3 bucket used for controller backup/restore must be in the same account

Step by step Procedure:

  1. Make sure that controller version is >= 3.4 in Settings->Maintenance->Upgrade. if not, upgrade your controller to the latest by clicking on "Upgrade" in Settings->Maintence->Upgrade

  2. In the controller, make sure that daily backup and restore is enabled in Settings->Maintenance->Backup restore page

  3. Do a "Backup Now" from the Settings->Maintenance->Backup restore page

  4. You can launch the cloud formation directly from here

  5. On the Stack Name textbox, Name your Stack -> Something like AviatrixHA

  6. Enter the parameters. Read the descriptions and instructions carefully. Click next.

  7. Specify your options/tags/permissions as per your policies, when in doubt just click next.

  8. On the review page, scroll to the bottom and check the button that reads: I acknowledge that AWS CloudFormation might create IAM resources with custom names.

  9. Click on Create.

  10. Wait for status to change to CREATE_COMPLETE. If fails or rolls back, you can see the error message in the Cloudwatch logs.

  11. If you provided an email to subscribe to SNS events, you will need to confirm the subscription in your email

  12. You are encouraged to test the functionality before deploying in production. This can be done by shutting down the controller from the AWS EC2 console. This would trigger the Autoscaling and the HA switchover. Ensure that the new controller has the correct configuration.

  13. If you see any issues, report them in this github

  14. Enjoy! You are welcome!

controller-ha-for-aws's People

Contributors

arvindsree avatar rakesh568 avatar sxw97g avatar akbhat avatar mshakhmaykin avatar bwilloughby avatar srinitt avatar cksoon16 avatar lmxiangcsco2020 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.