Add Host Config Files and Update Utility Playbooks
This commit is contained in:
parent
4351c6803b
commit
41579e2771
24
host_config/consul.hcl
Normal file
24
host_config/consul.hcl
Normal file
@ -0,0 +1,24 @@
|
||||
datacenter = "dc1"
|
||||
data_dir = "/var/consul"
|
||||
log_level = "info"
|
||||
|
||||
server = true
|
||||
|
||||
node_name = "node1"
|
||||
bootstrap_expect = 1
|
||||
bind_addr = "127.0.0.1"
|
||||
client_addr = "0.0.0.0"
|
||||
|
||||
ports {
|
||||
grpc = 8502
|
||||
}
|
||||
|
||||
connect {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
ui_config {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
enable_script_checks = true
|
58
host_config/nomad.hcl
Normal file
58
host_config/nomad.hcl
Normal file
@ -0,0 +1,58 @@
|
||||
data_dir = "/var/lib/nomad"
|
||||
disable_update_check = true
|
||||
# Logging is handled by supervise-daemon so disable
|
||||
# Syslog to avoid double logging.
|
||||
enable_syslog = false
|
||||
plugin_dir = "/usr/lib/nomad/plugins"
|
||||
|
||||
# WARNING: Servers and Clients should not be on the same host
|
||||
# This does not meet high availability requirements/recommendations
|
||||
server {
|
||||
enabled = true
|
||||
bootstrap_expect = 1
|
||||
}
|
||||
|
||||
client {
|
||||
enabled = true
|
||||
|
||||
# CNI-related settings
|
||||
cni_config_dir = "/etc/cni"
|
||||
cni_path = "/usr/libexec/cni"
|
||||
|
||||
options {
|
||||
# Disable java as it is not installed by default
|
||||
driver.denylist = "java"
|
||||
}
|
||||
|
||||
# Storage drives for docker containers to mount
|
||||
# You'll probably want to edit these
|
||||
host_volume "gitea-data" {
|
||||
path = "/hdd/gitea/"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
host_volume "minio-ssd" {
|
||||
path = "/ssd/minio/"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
host_volume "minio-hdd" {
|
||||
path = "/hdd/minio/"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
host_volume "postgres" {
|
||||
path = "/ssd/postgres/"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
host_volume "sqlite" {
|
||||
path = "/ssd/sqlite/"
|
||||
read_only = false
|
||||
}
|
||||
}
|
||||
|
||||
ui {
|
||||
# Comment to disable UI, it listens on port 4646
|
||||
enabled = true
|
||||
}
|
27
host_config/traefik.yml
Normal file
27
host_config/traefik.yml
Normal file
@ -0,0 +1,27 @@
|
||||
## Static configuration
|
||||
global:
|
||||
checkNewVersion: false
|
||||
sendAnonymousUsage: false
|
||||
|
||||
log:
|
||||
filePath: /var/log/traefik/traefik.log
|
||||
accessLog:
|
||||
filePath: /var/log/traefik/access.log
|
||||
|
||||
entryPoints:
|
||||
websecure:
|
||||
address: ":443"
|
||||
|
||||
providers:
|
||||
consulCatalog:
|
||||
endpoint:
|
||||
address: 127.0.0.1:8500
|
||||
|
||||
file:
|
||||
filename: /etc/traefik/traefik-certs.yml
|
||||
|
||||
api:
|
||||
insecure: true
|
||||
dashboard: true
|
||||
|
||||
ping: {}
|
15
utils/updateConsulConfig.yml
Normal file
15
utils/updateConsulConfig.yml
Normal file
@ -0,0 +1,15 @@
|
||||
- name: Update nomad config on alpine linux
|
||||
hosts: all
|
||||
|
||||
tasks:
|
||||
- name: Update consul config
|
||||
ansible.builtin.copy:
|
||||
mode: preserve
|
||||
src: ./host_config/consul.hcl
|
||||
dest: /etc/consul/server.hcl
|
||||
|
||||
- name: Restart consul service
|
||||
ansible.builtin.service:
|
||||
name: consul
|
||||
state: restarted
|
||||
enabled: true
|
15
utils/updateNomadConfig.yml
Normal file
15
utils/updateNomadConfig.yml
Normal file
@ -0,0 +1,15 @@
|
||||
- name: Update consul config on alpine linux
|
||||
hosts: all
|
||||
|
||||
tasks:
|
||||
- name: Update nomad config
|
||||
ansible.builtin.copy:
|
||||
mode: preserve
|
||||
src: ./host_config/nomad.hcl
|
||||
dest: /etc/nomad.d/server.hcl
|
||||
|
||||
- name: Restart nomad service
|
||||
ansible.builtin.service:
|
||||
name: nomad
|
||||
state: restarted
|
||||
enabled: true
|
15
utils/updateTraefikConfig.yml
Normal file
15
utils/updateTraefikConfig.yml
Normal file
@ -0,0 +1,15 @@
|
||||
- name: Update consul config on alpine linux
|
||||
hosts: all
|
||||
|
||||
tasks:
|
||||
- name: Update traefik config
|
||||
ansible.builtin.copy:
|
||||
mode: preserve
|
||||
src: ./host_config/traefik.yml
|
||||
dest: /etc/traefik/traefik.yaml # Alpine default config is yaml
|
||||
|
||||
- name: Restart traefik service
|
||||
ansible.builtin.service:
|
||||
name: traefik
|
||||
state: restarted
|
||||
enabled: true
|
Loading…
Reference in New Issue
Block a user