| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Simple meetup.com clone
Author: Stephen "TheCodeAssassin" Hoogendijk
Local testing will be done using Vagrant. Vagrant will spin up a machine (either locally or remotely) and use that instance to serve your code.
Note You need at least Vagrant 1.8.1
$ vagrant up
First you would have to install Terraform and Ansible.
You need to have a config.tf file so that Terraform can connect to your AWS account. Copy the config.tf.example file and replace the access_key and secret_key values.
You need to provide a public key name and the path to your a local public key. Important: The key needs to already be present in AWS EC2.
Obviously you need to replace "hatchup" with your own key name and path. I created a script to make it easier to interact with terraform.
Note This step might include the consumption of coffee/tea since it WILL take a while.
The script will create the infrastructure in AWS when running the apply operation.
# now apply the infrastructure $ bash terraform/run.sh apply stephen ~/.ssh/stephen.pub
Provisioning is done with Ansible and can be simply called by running the ansible script included in the root directory.
$ ./ansible.sh
Should you need to destroy all the managed infrastructure (this is considered catastrophic in a live scenario). You need to run the same script as above but using the destroy operation.
$ ./terraform.sh destroy stephen ~/.ssh/stephen.pub
I did not like the prospect of storing users in Elasticsearch because i do not believe users belong there. If this would not be a simple MVP i would setup a proper MariaDB Galera cluster to host additional database requirements.
Sure, just add nodes in the main.tf file. The EBS should take care of routing the traffic to healthy instances should your instance go down. Then re-run ansible to provision everything.
To scale up the web instances: Edit "count = x" in the terraform/web-nodes.tf file.
The following infrastructure will be build by the terraform configuration:
We create a VPC which only exposes port 80 and port 22 to the outside. The elasticsearch nodes are not reachable via the Internet only from instances inside the VPC.
| Back | FazBrowse Home | New Git URL |