Skip to content

MIams-REISys/amazonia

 
 

Repository files navigation

Amazonia

Amazonia facilitates creation of application and infrastructure stacks in the AWS cloud in a reproducible and consistent way. It does this by accepting your defaults and application files, validating them for errors and producing and cloud formation template. As the name implies the defaults file states all the environmental settings. It is highly recommended to spend some time to review and customise this to your environment. This will speed up development by freeing you up to focus your efforts on application stacks.

Quick Start

Amazonia can be accessed via two methods the first being an experimental web front-end. Requiring no setup time it allows you to quickly become familiar with Amazonia and is also handy if you are developing on a restricted workstation. Just create and enter an application YAML in your browser here and see the resultant cloud formation template (this is naturally run against the supplied defaults).

The second method is more geared towards a development environment and requires some minor setup which is described in the next section.

Installation

This section details the steps required to install Amazonia for local development. It assumes your Linux development workstation has Python3, PIP and Git client configured and working.

  1. Using Git download Amazonia from the BitBucket repo git clone https://bitbucket.org/geoscienceaustralia/amazonia.git
  2. From the amazonia root folder run the install pip install -e .
  3. You are now ready to use Amazonia !!

Usage

Amazonia is driven by the amz.py Python script which takes two input files. As previously mentioned these are the defaults and application files. If either of these are not supplied on the commandline Amazonia will source from amazonia/application.yaml and amazonia/defaults.yaml instead.

Commandline: python amazonia/amz.py -y {application}.yaml -d {defaults}.yaml

usage: amz.py [-h] [-y YAML] [-d DEFAULT] [-s SCHEMA] [-t TEMPLATE] [-o]

optional arguments:
  -h, --help            show this help message and exit
  -y YAML, --yaml       Path to the **application**s amazonia yaml file
  -d DEFAULT, --default
                        Path to the environmental **defaults** yaml file
  -s SCHEMA, --schema
                        Path to the schema to validate the provided yaml
                        values against
  -t TEMPLATE, --template
                        Path for amazonia to place template file
  -o, --out             Output template to stdout rather than a file.

Examples

You will find two examples in the examples amazonia\examples folder:

2TierWeb

This is a simple Hello World !! web application. It has been configured to auto-scale with Elastic Load Balancer for load distribution.

3TierWebRDS

This demostrates a 3 tier stack consisting of a web front-end, an api middle tier and database backend.

Contributions

For any contributions, please feel free to fork, or branch this repo from the integration branch. All pull requests should also be aimed at the integration branch. This is because the integration branch is where our tests run before we merge to master so this is super helpful to us :)

YAML key tips

keypair

The keypair value is required to be a valid key pair name in your AWS space. This value is not created by the Cloud Formation Template generated by Amazonia.

Packages

No packages published

Languages

  • Python 98.4%
  • Other 1.6%