Giter Site home page Giter Site logo

danieldev0724 / django-angular2-fullstack-devops Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 299 KB

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

License: MIT License

Python 12.07% Shell 13.64% TypeScript 47.71% JavaScript 6.01% CSS 1.49% HTML 2.77% Jinja 2.85% HCL 13.45%
angular2 ansible aws devops docker jenkins terraform

django-angular2-fullstack-devops's Introduction

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

django-angular2-fullstack-devops's People

Contributors

danieldev0724 avatar

Stargazers

 avatar

Watchers

 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.