Skip to content
NGINX and NGINX Plus demos
HTML Shell PHP Python Ruby Dockerfile Other
Branch: master
Clone or download
Latest commit b0a76a9 Aug 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
autoscaling-demo Update README Feb 6, 2019
aws-nlb-ha-asg Update GCP HA demo Jun 27, 2019
consul-api-demo Update service discovery demos to use NGINX's REST API (#12) Jan 30, 2019
consul-dns-srv-demo Update service discovery demos to use NGINX's REST API (#12) Jan 30, 2019
consul-template-demo Update service discovery demos to use NGINX's REST API (#12) Jan 30, 2019
coreos-demo Deprecate coreos fleet demo May 21, 2018
etcd-demo Update service discovery demos to use NGINX's REST API (#12) Jan 30, 2019
fun-with-health-checks Merge pull request #10 from dnalborczyk/patch-1 Jan 29, 2019
gce-nginx-plus-deployment-guide-files Merge pull request #8 from tmauro-nginx/patch-3 Dec 14, 2018
gcp-lb-ha-asg Update GCP HA demo Jun 27, 2019
kubernetes-demo Added Kubernetes NGINX conf 2016 demos Oct 11, 2016
mqtt-contiki-demo Add MQTT client behaviour info Oct 5, 2017
mysql-galera-demo mysql demo fixes Jul 14, 2017
nginx-cookbook added rhel support to keepalived config Jan 23, 2018
nginx-gcp-meetup-demo Create README.md Apr 12, 2016
nginx-hello Update nginx-hello Feb 7, 2018
nginx-openstack-heat-demo Added OpenStack demo May 5, 2016
nginx-regex-tester Update README.md Jun 14, 2019
nginx-swarm-demo Update Dockerfile Jan 28, 2019
oauth2-token-introspection-oss Add OAuth 2.0 Token Introspection solutions for NGINX and NGINX Plus Apr 25, 2019
oauth2-token-introspection-plus Add OAuth 2.0 Token Introspection solutions for NGINX and NGINX Plus Apr 25, 2019
random-files Refactor folder/file structure Aug 17, 2017
redis-demo Redis demo Jul 17, 2017
zookeeper-demo Update service discovery demos to use NGINX's REST API (#12) Jan 30, 2019
.gitignore Update service discovery demos to use NGINX's REST API (#12) Jan 30, 2019
LICENSE Create LICENSE May 24, 2018
README.md Update README.md Aug 12, 2019

README.md

Misc NGINX Demos from conferences showing different functionality of NGINX and NGINX Plus

  • autoscaling-demo: This demo uses one NGINX Plus instance as a load balancer with two upstream groups, one for NGINX Plus web servers and one for Elasticsearch nodes. All of the instances run in Docker containers. The demo uses both the upstream_conf and status api's. If shows creating a new NGINX Plus environment and adding and removing containers manually and with autoscaling.

  • aws-nlb-ha-asg: This demo contains a series of scripts that enable an easy deployment of a High Availability All Active Auto Scaling NGINX Plus Load Balancing configuration on AWS.

  • consul-api-demo: This demo spins up a bunch of docker containers and shows NGINX Plus being used in conjuction with Consul, a service discovery platform. It uses the upstream_conf API in NGINX Plus to add the servers registered with Consul and remove the ones which get deregistered without the need for reloading NGINX Plus. This automates the process of upstream reconfiguration in NGINX Plus based on Consul data using a simple bash script and Consul watches.

  • consul-dns-srv-demo: This demo shows how to use Consul's DNS interface for load balancing with NGINX Plus. It uses the DNS SRV records using the "service" parameter for the server directive of http upstream module and DNS lookups over TCP feature introduced in NGINX Plus R9. This means that NGINX Plus can now ask for the SRV record (port,weight etc) in the DNS query and also switch the DNS query over TCP automatically if it receives a truncated DNS response over UDP.

  • coreos-demo: Shows how to use NGINX Plus to load balance an application running in a CoreOS cluster, utilizing fleet and etcd.

  • etcd-demo: This demo spins up a bunch of docker containers and shows NGINX Plus being used in conjuction with etcd for service discovery. It uses the upstream_conf API in NGINX Plus to add the servers registered with etcd and remove the ones which get deregistered without the need for reloading NGINX Plus. This automates the process of upstream reconfiguration in NGINX Plus based on etcd data using a simple bash script and 'etcdctl exec-watch'.

  • gcp-lb-ha-asg: This demo contains a series of scripts that enable an easy deployment of a High Availability All Active Auto Scaling NGINX Plus Load Balancing configuration on Google Cloud. Adaptation of a guide found here.

  • mysql-galera-demo: This demo uses NGINX Plus as a TCP load balancer for a MySQL Galera cluster consisting of two mysqld servers. It does round-robin load balancing between the 2 mysqld servers and also does active health checks using an xinetd script running on port 9200 inside each mysqld container.

  • nginx-hello: NGINX running as webserver in a docker container that serves a simple page containing the container's hostname, IP address and port

  • nginx-openstack-heat: Shows how to deploy and configure NGINX Plus to load balance a simple web application in OpenStack using Heat. Also the demo shows how NGINX Plus can be reconfigured so that whenever we create or delete our application instances, NGINX Plus is automatically reconfigured.

  • nginx-swarm-demo: Shows how to use NGINX and NGINX Plus in a Docker Swarm, ultilizing the new features of Docker 1.12. Demonstrates doing load balancing with just Docker Swarm, then with NGINX open source and then with NGINX Plus, including autoscaling the backend containers.

  • oauth2-token-introspection-oss: NGINX OAuth 2.0 Token Introspection (with disk caching)

  • oauth2-token-introspection-plus: NGINX Plus OAuth 2.0 Token Introspection (with keyval caching)

  • random-files: Demo to show random content and upstream_conf. Nick to add more description here

  • redis-demo: This demo uses NGINX Plus as a TCP load balancer for a Redis cluster consisting of 3 Redis nodes in Docker. It does Round-robin load balancing between the 3 Redis nodes, leverages the active health checks feature of NGINX Plus and also shows advanced logging using nginScript.

  • zookeeper-demo: This demo spins up a bunch of docker containers and shows NGINX Plus being used in conjuction with Apache Zookeeper for service discovery. It uses the upstream_conf API in NGINX Plus to dynamically add or remove the servers without the need for reloading NGINX Plus. This automates the process of upstream reconfiguration in NGINX Plus based on Zookeeper data using a simple bash script and Zookeeper watches.

  • kubernetes-demo: Shows how to load balance applications on Kubernetes using NGINX and NGINX Plus.

  • mqtt-contiki-demo: Simple MQTT device (mote) for Contiki OS, to demo with Cooji simulator.

Most of the Demos have been configured to utilize Vagrant and Ansible to enable autodeployment.

Prerequisites for Vagrant/Ansible deploymnets

  1. Install Vagrant using the necessary package for your OS:

    https://www.vagrantup.com/downloads.html
    
  2. Install provider for vagrant to use to start VM's.

    The default provider is VirtualBox [Note that only VirtualBox versions 4.0, 4.1, 4.2, 4.3 are supported], which can be downloaded from the following link:
    
    https://www.virtualbox.org/wiki/Downloads
    
    A full list of providers can be found at the following page, if you do not want to use VirtualBox:
    
    https://docs.vagrantup.com/v2/providers/
    
  3. Install Ansible:

    http://docs.ansible.com/ansible/intro_installation.html
    
  4. Clone demo repo

    ```$ git clone git@github.com:nginxinc/NGINX-Demos.git```
    
  5. Copy nginx-repo.key and nginx-repo.crt files for your account to ~/NGINX-Demos/autoscaling-demo/ansible/files/

You can’t perform that action at this time.