Skip to content

Build, Provision and Run a 3-nodes Consul + Nomad cluster on OCI "Always-Free" Tier

License

Notifications You must be signed in to change notification settings

kral2/hashistack_on_oci

Repository files navigation

HashiStack on OCI

Build, Provision and Run a 3-nodes Consul+Nomad cluster on OCI "Always-Free" Tier

release hcl bash bash license

About

This project build an "HashiStack" demo on OCI. It is a 3-step workflow:

  1. BUILD: using Packer, Ansible and Bash scripts. The output is a Custom Image, ready to deploy Consul+Nomad nodes on Linux/arm64 using Ampere Altra CPU
  2. PROVISION: using Terraform Registry, Terraform Cloud with OCI. The output is an OCI Networking structure and security rules, together with 3 Computes Instances and a bastion host
  3. RUN: with Consul and Nomad on a 3-nodes cluster, with some example Nomad jobs and Consul content to come

diagram

Details about the provisioned infrastructure can be found in the "Provision" folder of this repo.

The whole architecure deployed by this project can be contained in the Oracle Cloud Always Free tier allocation, which comes with Compute, Storage, the cloud networking stuff and a hefty 10TB Outbound Data Transfer per month. So it should not cost you a single penny to try :-D

How to use this?

First, you will need to build your custom image

> cd build
> packer build .

Once your Custom image is built, let's provision it

> cd ../provision
> terraform init
> terraform plan
> terraform apply

Once you are connected to your cluster nodes through the bastion, you can verify that both Consul and Nomad clusters are up & runnning.

> cd ../run
> nomad server members
> consul members

About

Build, Provision and Run a 3-nodes Consul + Nomad cluster on OCI "Always-Free" Tier

Resources

License

Stars

Watchers

Forks

Packages

No packages published