Giter Site home page Giter Site logo

consul-acl-examples's Introduction

Consul ACL Examples

This repository contains 2 examples of Consul Cluster configurations that works with the recent implementation of ACL in Consul.

The example resides in the following directories:

  • single-dc
  • multi-dc

The examples are working with and validated on version 1.5.0.

Introduction

Each directory contains a docker-compose.yml that contains a basic configuration. Each file will create a network where all containers are connected on. All containers have port 8500 and 8600/udp exposed. For the first container, the same ports are open, 2nd container is +1 and 3rd container is +2.

The cluster can be started by executing the docker-compose.sh script. Please make sure that if you start the 2nd cluster that the first cluster is down (Due to opening of ports).

The wdijkerman/consul image is used for the Consul Cluster setup.

single-dc

This example starts 3 Docker Consul containers named consul-1, consul-2 and consul-3.

The following ACL's are created:

  • "agent": 7a59f860-7e6a-0037-52d6-270ee84e4bed
  • "master": 9a6c723f-2533-2679-4515-654cdb7f96c9

Within the hcl directory, 2 hcl files can be found that contains the configuration for the roles.

multi-dc

This example starts 2 Docker Consul containers named consul-dc1 and consul-dc2. consul-dc1 resides in the dc1 datacenter and consul-dc2 in the dc2 datacenter.

The following ACL's are created:

  • "agent": FD8BCA99-ACE8-4FFE-BDF2-760A9CFAEAAB
  • "master": BDDF9C2E-7296-4D80-9CB5-661224D11FD6

ACLs/Tokens are replicated to the secondary datacenters. So you'll have to only create them on the consul-dc1 cluster. These tokens are replicated via an acl with id FA294BBA-8279-4F93-84A2-FCBA61C8298A, which is only configured on the consul-dc2 cluster.

Within the hcl directory, 3 hcl files can be found that contains the configuration for the roles.

Learn

This repository is based on the learn.hashicorp.com site and some various other sites.

Link: https://learn.hashicorp.com/consul/

consul-acl-examples's People

Contributors

bbaassssiiee avatar dj-wasabi 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.