Coder Social home page Coder Social logo

nginx-lab's Introduction

Nginx Plus Load Balancer lab environment

###Dependencies

  • Ansible 2.0
  • Vagrant 1.8.5
  • Virtualbox 5.0.20 r106931

###Vagrantfile The vagrant up command will, by default, build 3 hosts using the ansible/hosts.yaml API compatible file. Therefore we use the dynamic inventory script to read the hosts.yaml file. Adjust as necessary or use the static_inventory

###Prerequisites

  • You need to get a trial key and certificate to authenticate with the NginX Plus Apt repo.

####Place the Nginx Repo key and cert in the ansible nginx role files folder Name them nginx-repo.key and nginx-repo.crt and place them in the

./ansible/roles/nginx/files/etc/ssl/ngninx/ directory

###Ansible Playbooks

Run the playbooks from the project's ansible/ directory. Looking at the playbooks, you can see variables passed into the role, that alters the functionality. There are 2 configurations. A load balancer for proxying SSL TCP requests (provision_nginx_lb.yaml). And SSL/HTTP server configurations with or without self signed certificates (provision_nginx_upstream.yaml).

ansible-playbook provision_nginx_lb.yaml -i inventory.py
ansible-playbook provision_nginx_upstream.yaml -i inventory.py

###Nginx

####Nginx Plus Upstream Dashboard

http://10.10.0.102:8888/status.html#tcp_upstreams

####Test the round robin load balancing

curl -k https://10.10.0.102:443

nginx-lab's People

Contributors

chrisjalinsky avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.