Giter Club home page Giter Club logo

aws-test's Introduction

Quote application

Application to store quotes and sent randomly

List of 3-party used:

github.com/gorilla/mux
github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/session
github.com/guregu/dynamo

List of puppet modules used:

puppetlabs-docker_platform --version 2.2.1

Deployment

login to AWS:

aws configure

To build image run:

docker_image.sh

To deploy stack run:

terraform init
terraform apply

Flow of deployment

Insrances will be created by terraform. DNS name of balancer will be showed in outputs. Then over userdata will be deployed puppet. If s3 contains site.pp it will be used for puppet, otherwise site.pp will be generated by userdata. Then Puppet will deploy all requements for start docker and then start docker image 577043135686.dkr.ecr.us-west-1.amazonaws.com/quoteapp:latest

Usage

You can use web form at <balancer_url>/ to add new quote.

to add new quote via url

curl -i -H "Accept: application/json" -H "X-HTTP-Method-Override: POST"  -X POST -d '{"quote":"some very meanful test","category":"awesome"}'   <balancer_url>/new

to read all quotas

curl   <balancer_url>/quotes

to read random quote

curl    <balancer_url>/quote

Additional tools

You can use ./fill_quotes.sh script to fill quotes from sample directory.

./fill_quotes.sh http://<APP_BALANCER_URL>/new

aws-test's People

Contributors

kernelold 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.