Skip to content

maati55/master_of_puppets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Master Of Puppets

Build Status

This just demonstrate how you can provision and build sample go app in local environment.

  • 3 ubuntu instances: 1 x Web(nginx) and 2 x App(GO)
  • Using puppet to install and configure Nginx with round-robin and install app requirement on nodes.
  • Using simple bash to build and run go app

alt tag

Dependencies

Software dependencies.

  • VirtualBox
  • Vagrant

Running stack

For run and build web with 2x GO app just need to run:

make stack

So now you can check the stack from Nginx load-balancer from http://localhost:8000 (by refreshing the page app message should be changed). Also it possible to connect to nodes app-1: http://localhost:8001 app-2: http://localhost:8002

Destroy stack

Run this command to destroy stack

make destroy_stack

Running single node (web | app-1 | app-2)

If you need to run one of nodes and connect to vagrant machine via ssh you just need to run this command:

make machine ROLE=web
make machine ROLE=app-1
make machine ROLE=app-2

Destroy node

make destroy_machine ROLE=web
make destroy_machine ROLE=app-1
make destroy_machine ROLE=app-2

Travis-CI

You can see a build status on Travis-CI: https://travis-ci.org/ali-karimkhani/master_of_puppets. If the build will be success you should see the result of curl localhost:8080 something like this: Hi there, This is served from testing-worker-linux-docker-4f9c9dca-3389-linux-6!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published