Skip to content
All-in-one django/angular2 seed with cli interface for multi-environment devops on aws using ansible/packer/terraform
TypeScript Shell HCL Python JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
backend Update README.md Jun 20, 2016
docs Add aws and node.js prerequisites Jul 22, 2016
frontend Add frontend to devops commands Jun 16, 2016
provisioning Automate dependencies that can be installed by python pip Oct 2, 2016
scripts Automate dependencies that can be installed by python pip Oct 2, 2016
.gitignore Add tf vars to rds and chain to backend Jun 19, 2016
LICENSE
README.md
Vagrantfile
devops
vars Merge branch 'master' of https://github.com/stphivos/django-angular2-… Oct 1, 2016

README.md

django-angular2-fullstack-devops

All-in-one django/angular2 seed with cli interface for multi-environment devops on aws using ansible/packer/terraform.

Save weeks or even months of work!

Features

  • Vagrant box
  • Ansible playbook
  • Devops cli interface
  • Travis CI configurations
  • Tests with code coverage
  • Isolated frontend/backend projects
  • Build virtual images with packer
  • Launch infrastructure using terraform
  • Central project variables configuration
  • Jenkins pipeline workflow server (TODO)

Stack

Frontend

  • Angular 2.0
  • TypeScript 1.8
  • Bootstrap 3.3

Backend

  • Django 1.9
  • PostgreSQL 9.4
  • Django REST Framework 3.3

Requirements

The following are needed for building and deploying your infrastructure:

Setup

$ git clone https://github.com/stphivos/django-angular2-fullstack-devops
$ cd django-angular2-fullstack-devops

$ vim vars          # Edit project variables based on your project
$ ./devops setup    # Equivalent to `vagrant up` the first time, except that it destroys and re-creates the machine
$ vagrant ssh       # Log into the virtual machine. See all vagrant commands: https://www.vagrantup.com/docs/cli/

Run

Frontend

$ cd frontend
$ npm start

README..

Backend

$ cd backend
$ ./manage.py runserver

README..

Devops

Build

The first time:

$ ./devops build dev            # Calls commands below in the order shown

For building a specific project, either of the following can be run separately:

$ ./devops build dev backend    # Uses packer/ansible to provision an amazon machine image (ami)
$ ./devops build dev frontend   # Uses gulp to create a target environment distribution

Deploy

The first time:

$ ./devops deploy dev           # Calls commands below in the order shown

After updating a specific component, either of the following can be run separately:

$ ./devops deploy dev core      # Uses terraform to launch shared infrastructure such as vpc/gateway/subnets etc.
$ ./devops deploy dev rds       # Uses terraform to launch a db instance on RDS
$ ./devops deploy dev backend   # Uses terraform to launch an EC2 instance and load balancer for the backend api
$ ./devops deploy dev frontend  # Uses aws-cli to upload the frontend static files to a bucket on S3

Examples

Rebuild and deploy frontend for prod environment:

$ ./devops pipeline prod frontend  # ~30 seconds

Rebuild and deploy backend for prod environment:

$ ./devops pipeline prod backend  # ~7 minutes

Credits

You can’t perform that action at this time.