These AWS CloudFormation templates create a full application stack for a multitenant-ready Hydra-in-a-Box application, including:
- a dedicated Amazon Virtual Private Cloud (VPC) for the stack components, with public and private subnets across 3 Availability Zones, and a bastion host providing SSH access for system administrators;
- a multi-node SolrCloud cluster backed by a multi-node zookeeper ensemble;
- a PostgreSQL database with a multi-availability zone hot spare;
- a (single node) Fedora 4 server;
- and a Rails application stack, with auto-scaling webapp and worker tiers and continuous deployment of the application code.
-
Create or import an EC2 key-pair.
-
Create a public hosted zone; the web application will automatically manage DNS entries in this zone.
-
Copy the
params/stack.json
template to a new environment-specific file, populating the parameter values as appropriate for your environment (and, particularly, the key name and hosted zone created above; the other settings, while insecure, may suffice for development purposes). Additional parameters may be available, and are documented intemplates/stack.json
. -
Create the full application stack:
$ aws --region us-east-1 cloudformation create-stack --stack-name hybox --template-body https://s3.amazonaws.com/hybox-deployment-artifacts/cloudformation/current/templates/stack.json --capabilities CAPABILITY_IAM --parameters file://params/my-hybox-environment.json
You can also create (or update) your application from branches of the cloudformation repository:
$ aws --region us-east-1 cloudformation create-stack --stack-name hybox --template-body https://s3.amazonaws.com/hybox-deployment-artifacts/cloudformation/branch/branch-name/templates/stack.json --capabilities CAPABILITY_IAM --parameters file://params/my-hybox-environment.json
You can also deploy branches of the hybox application repository by setting the WebappS3Key
parameter for your stack to point at the branch-specific deployment artifact (e.g. lerna/branch/branch-name/lerna.zip
)
The AWS CloudFormation stack must be deployed into an S3 bucket for CloudFormation to correctly resolve sub-stack references. The templates/travis.json
stack will bootstrap the necessary buckets, IAM user, and access keys to support continuous deployment from both this CloudFormation repository and the Hydra-in-a-Box application repository.
This bootstrapping is already provided for the main repositories, but if you deploy a fork of this stack, you may need to create this stack and configure continuous deployment for your forks.
$ aws --region us-east-1 cloudformation create-stack --stack-name travis --template-body file://templates/travis.json --capabilities CAPABILITY_IAM
You will need the outputs from this stack to create deploy steps for these repositories.