Code Monkey home page Code Monkey logo

terraform-upcloud-consul's Introduction

terraform-upcloud-consul

NOTE: This is very much work in progress.

Terraform module for deploying a Consul cluster on UpCloud. Uses cloud auto-join to find cluster peers on UpCloud as instance tags.

All cluster members run Consul server on Docker containers.

As of writing this, the implementation is based on a Consul image built on vtorhonen/consul@feature/go-discover-upcloud-support branch. These images are built by Github Actions workflow at vtorhonen/consul@feature/ci-go-discover-upcloud-support branch. Idea is to eventually get this merged into upstream project. Underlying implementation is also based on vtorhonen/go-discover@feature/upcloud-support branch, also something waiting to be polished and merged into upstream.

Requirements

First of all, build terraform-provider-upcloud as instructed on the documentation.

Next, create a new UpCloud API user with "all server access". You'll need a username and password in the deployment.

Deploying

See examples/ folder for a starting point. Create a new Terraform workspace and run:

terraform init
terraform plan -out=foo.plan
terraform apply foo.plan

By default, all cluster instances get a public IP address to install Docker and related components through apt-get. All cluster communication is done over utility network by default, meaning privately routed internal IP addresses.

After applying, log in to one of the cluster nodes over SSH and check container logs by running:

docker ps
docker logs consul-0
# OR
docker logs consul-1
# OR
docker logs consul-2

TODO

  • Add support for
    • Custom machine images (oof, no one should install container runtime on user data)
    • Storing Consul data on separate data volume
    • Backup schedules
    • Customizing Consul configuration by providing a set of configuration options as env variables

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.