Git Product home page Git Product logo

challenge's Introduction

Installation on OSX

Install Vagrant, librarian-puppet and bundler.

Vagrant (http://vagrantup.com) 
librarian-puppet (http://librarian-puppet.com/) 
bundler (http://bundler.io/)

Clone the git repository to local disk

git clone https://github.com/SydOps/challenge.git

Install all required gems

bundle install

Install all Puppet modules with Puppet Librarian

librarian-puppet install

you can ignore below error message:
Invalid module name 'apache', you should qualify it with 'ORGANIZATION-apache' for resolution to work correctly
Invalid module name 'haproxy', you should qualify it with 'ORGANIZATION-haproxy' for resolution to work correctly

Start all the vms with Vagrant

vagrant up  (or vagrant up web01 ; vagrant up web02; vagrant up haproxy)

( Notes: If you find some services don't run properly, run vagrant provision BOXNAME again, it will fix this issue)

Test the load balancer from your favorite web browser

http://192.168.50.54

Keep refresh, you should see the server name keep changing between web01.example.com and web02.example.com

If you need add more webservers under haproxy, for example, add two more web servers.

edit manifests/vagrant.pp file, you can add more IPs, or remove some IPs.

switch 

$webserver = ['192.168.50.50','192.168.50.52']

to

$webserver = ['192.168.50.50','192.168.50.52', '192.168.50.56', '192.168.50.58']

add more boxes in Vagrantfile

  config.vm.define :web03 do |config|
     config.vm.host_name = "web03.example.com"
     config.vm.network :private_network, ip: "192.168.50.56"
  end

  config.vm.define :web04 do |config|
     config.vm.host_name = "web04.example.com"
     config.vm.network :private_network, ip: "192.168.50.58"
  end

No need run librarian-puppet install this time. Because there is no change in puppet modules.

start new web servers and provision haproxy server.

vagrant up web03; vagrant up web04; vagrant provision haproxy

Then you should see four webservers in haproxy server control

http://192.168.50.54:8080
username: haproxy
password: topsecret

challenge's People

Contributors

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