Giter Site home page Giter Site logo

cloudformation-webservices's Introduction

AWS Cloudformation HA LAMP Web Services Demo

AWS Cloudformation HA LAMP Web Services Demo

Getting Started

This is demo Cloudformation setup for making autoscaled HA Frontend/Backend based LAMP infrastructure. The MySQL server is also running on Amazon RDS.

Prerequisites

Requires Amazon Web CLI (aws-cli):

pip install python-awscli

Also requires working administrative credentials for applying Cloudformation templates with various resources.

Installing

The structure is as follows:

  1. 2 separated templates for setting up networking and server stack
  2. The network stack installation have to be run before spinning up web servers stack
  3. There are helper scripts which allow to run all steps
  4. The SSH key "webservices" is looked up in the AWS account. This is required for ec2-user SSH access. If you are using different key please reference name on "SecurityKey" variable it in parameters.json file.
* first_bootstrap.sh - Sets up Network stack with VPC and install servers stack
* setup_network_stack.sh - Sets up VPC and Network stack
* setup_lamp_stack.sh - Sets up LAMP stack
* remove_stacks.sh - Purges LAMP and Networking stacks from AWS
* cloudformatrion.sh - Multipurpose aws-cli wrapper. Allows convienent execution of AWS tasks for installing/updating/status/deleting of stacks. Requires template and parameter files as arguments.
                       Limitation: Expects "StackName" variable in parameters json file for stack name for automatic stack naming.

After setting up LAMP HA stack the Cloudformation console outputs tab will have Load Balancer URLs for Frontend and Backend Web servers.

Things to do for improvements

At the moment the templates are setting up static PHP demo pages. For automated CI deployments the S3 buckets need to be created and web-services template need modification for web code deployment. For managed Web pages configuration with tools such as Ansible/Puppet/Chef the additional hooking scripts need to be written. The networking stack is using simple layout structure and the additional networks are set for future develpment. The VPN (OpenVPN or AWS builtin) solution or Bastion server stack need to be added for locking down remote access.

Built With

  • Bash shell scripting
  • AWS Cloudformation templates
  • mcedit text editor

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Credits for:

  • Amazon Cloudformation templates documentation
  • Cloudformation templates from multiple contributors in GitHub

cloudformation-webservices's People

Contributors

arunasp avatar

Watchers

James Cloos 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.