Ansible role for making a personal data center.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Jeff Baskin bbc07a78dc Removed the changed flag from the items that are always changing. 8 months ago
defaults Added floating ips. 8 months ago
files Added vip failover script. 8 months ago
handlers Moved nomad jobs from json to hcl. 8 months ago
meta Added galaxy items. 10 months ago
tasks Removed the changed flag from the items that are always changing. 8 months ago
templates Added vip failover script. 8 months ago
README.md Added additiional sssupmtion to the readme. 9 months ago
requirements.yml Removed false start. 10 months ago

README.md

Primary Cluster

Support setup for creating a nomad and consul cluster on base hardware.

Task files

main

The following assumptions apply:

  • Noamd is already installed and configured machines. (Recommended: https://github.com/ansible-community/ansible-nomad.git)

  • The core cluster nodes have their meta data set to: cluster_type = { whatever crclstr_group is set to.}

  • The podman driver for nomad is already installed into nomad.

  • Containers come up on the ipv4 network. (The default for podman and docker.)

Main performs the following:

  • Sets the hosts files on the core cluster so they can function independent of DNS.

  • Opens up the firewall

  • Set up gluster and its volumes on the core cluster.

  • Set up podman so it can be used by nomad.

  • Starts a job that gives nomad a place to access artifacts locally. (This is a web service on port 8000.)

  • If crclstr_returning_servers is used, it will setup gluster, and return the node to the cluster. The above assumptions still apply.

maintenance

This is to be used to take a client out of the cluster. This way the client could be rebuilt or replaced without damaging the cluster as a whole.

Maintenance performs the following functions:

  • It drains the node from nomad. (Stops all running jobs and moves them to other nomad clients.)

  • Removes the node from the gluster configuration.

Role Variables

crclstr_group: Name of the inventory group with the core cluster. (Minimum of 3 servers recommended.) Default: crclstr

crclstr_vols_dir: Directory for nomad used volumes. Default: /opt/nomad

crclstr_vols_add: List of additional volume names for containers. Default: []

crclstr_datacenters: List of datacenters used. Default: ['dc1']

crclstr_maintenance_servers: List of servers being removed for maintenance. Default: []

crclstr_returning_servers: List of servers returning from maintenance. Default: []

crclstr_jobs_add: List of additional jobs sent to the nomad HTTP API. (Look at the default crclstr_jobs_req for an example.) Default []

Requirements

None

License

MIT