podman and nomad stuff
This commit is contained in:
24
roles/nummer5/files/nomad.hcl.j2
Normal file
24
roles/nummer5/files/nomad.hcl.j2
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
###
|
||||||
|
# Ansible
|
||||||
|
##
|
||||||
|
|
||||||
|
# Copyright (c) HashiCorp, Inc.
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
# Full configuration options can be found at https://www.nomadproject.io/docs/configuration
|
||||||
|
|
||||||
|
data_dir = "/opt/nomad/data"
|
||||||
|
bind_addr = "{{ ansible_facts['default_ipv4']['address'] }}"
|
||||||
|
datacenter = "nummer5"
|
||||||
|
|
||||||
|
server {
|
||||||
|
enabled = true
|
||||||
|
bootstrap_expect = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
client {
|
||||||
|
enabled = true
|
||||||
|
servers = ["{{ ansible_facts['default_ipv4']['address'] }}"]
|
||||||
|
network_interface = "{{ ansible_facts['default_ipv4']['interface'] }}"
|
||||||
|
node_pool = "{{ nomad_pool }}"
|
||||||
|
}
|
||||||
@@ -3,4 +3,18 @@
|
|||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- nomad
|
- nomad
|
||||||
- nomad-driver-podman
|
- nomad-driver-podman
|
||||||
|
|
||||||
|
- name: Configure Nomad telemetry
|
||||||
|
register: conf_update
|
||||||
|
copy:
|
||||||
|
src: telemetry.hcl
|
||||||
|
dest: /etc/nomad.d/telemetry.hcl
|
||||||
|
|
||||||
|
- name: Configure Nomad
|
||||||
|
register: conf_update
|
||||||
|
template:
|
||||||
|
src: files/nomad.hcl.j2
|
||||||
|
dest: /tmp/nomad.hcl
|
||||||
|
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ mountopt = "nodev"
|
|||||||
# If the thinpool is in use when the driver attempts to remove it, the driver
|
# If the thinpool is in use when the driver attempts to remove it, the driver
|
||||||
# tells the kernel to remove it as soon as possible. Note this does not free
|
# tells the kernel to remove it as soon as possible. Note this does not free
|
||||||
# up the disk space, use deferred deletion to fully remove the thinpool.
|
# up the disk space, use deferred deletion to fully remove the thinpool.
|
||||||
# use_deferred_removal = "True"
|
use_deferred_removal = "True"
|
||||||
|
|
||||||
# use_deferred_deletion marks thinpool device for deferred deletion.
|
# use_deferred_deletion marks thinpool device for deferred deletion.
|
||||||
# If the device is busy when the driver attempts to delete it, the driver
|
# If the device is busy when the driver attempts to delete it, the driver
|
||||||
@@ -187,7 +187,7 @@ mountopt = "nodev"
|
|||||||
# If the program using the driver exits, the driver will continue attempting
|
# If the program using the driver exits, the driver will continue attempting
|
||||||
# to cleanup the next time the driver is used. Deferred deletion permanently
|
# to cleanup the next time the driver is used. Deferred deletion permanently
|
||||||
# deletes the device and all data stored in device will be lost.
|
# deletes the device and all data stored in device will be lost.
|
||||||
# use_deferred_deletion = "True"
|
use_deferred_deletion = "True"
|
||||||
|
|
||||||
# xfs_nospace_max_retries specifies the maximum number of retries XFS should
|
# xfs_nospace_max_retries specifies the maximum number of retries XFS should
|
||||||
# attempt to complete IO when ENOSPC (no space) error is returned by
|
# attempt to complete IO when ENOSPC (no space) error is returned by
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
- containernetworking-plugins
|
- containernetworking-plugins
|
||||||
- crun
|
- crun
|
||||||
- fuse-overlayfs
|
- fuse-overlayfs
|
||||||
|
- slirp4netns
|
||||||
|
|
||||||
- name: Disable Docker Emulation warning
|
- name: Disable Docker Emulation warning
|
||||||
file:
|
file:
|
||||||
@@ -22,6 +23,11 @@
|
|||||||
dest: /etc/containers/containers.conf
|
dest: /etc/containers/containers.conf
|
||||||
src: containers.conf
|
src: containers.conf
|
||||||
|
|
||||||
|
- name: Configure storage.conf
|
||||||
|
copy:
|
||||||
|
dest: /etc/containers/storage.conf
|
||||||
|
src: storage.conf
|
||||||
|
|
||||||
- name: Configure cr.wks registry
|
- name: Configure cr.wks registry
|
||||||
copy:
|
copy:
|
||||||
dest: /etc/containers/registries.conf.d/cr.wks.conf
|
dest: /etc/containers/registries.conf.d/cr.wks.conf
|
||||||
|
|||||||
59
site.yaml
59
site.yaml
@@ -5,11 +5,66 @@
|
|||||||
- role: common
|
- role: common
|
||||||
tags: common
|
tags: common
|
||||||
|
|
||||||
- hosts: ~pine.*\.wks
|
- hosts: pine01.wks
|
||||||
|
vars:
|
||||||
|
nomad_pool: sys
|
||||||
roles:
|
roles:
|
||||||
- role: nummer5
|
- role: nummer5
|
||||||
tags: nummer5
|
tags: nummer5
|
||||||
- role: armbian
|
- role: armbian
|
||||||
tags: armbian
|
tags: armbian
|
||||||
- role: debian
|
- role: debian
|
||||||
tags: debian
|
tags: debian
|
||||||
|
|
||||||
|
- hosts: pine02.wks
|
||||||
|
vars:
|
||||||
|
nomad_pool: apps
|
||||||
|
roles:
|
||||||
|
- role: nummer5
|
||||||
|
tags: nummer5
|
||||||
|
- role: armbian
|
||||||
|
tags: armbian
|
||||||
|
- role: debian
|
||||||
|
tags: debian
|
||||||
|
|
||||||
|
- hosts: pine03.wks
|
||||||
|
vars:
|
||||||
|
nomad_pool: apps
|
||||||
|
roles:
|
||||||
|
- role: nummer5
|
||||||
|
tags: nummer5
|
||||||
|
- role: armbian
|
||||||
|
tags: armbian
|
||||||
|
- role: debian
|
||||||
|
tags: debian
|
||||||
|
|
||||||
|
- hosts: pine04.wks
|
||||||
|
vars:
|
||||||
|
nomad_pool: apps
|
||||||
|
roles:
|
||||||
|
- role: nummer5
|
||||||
|
tags: nummer5
|
||||||
|
- role: armbian
|
||||||
|
tags: armbian
|
||||||
|
- role: debian
|
||||||
|
tags: debian
|
||||||
|
|
||||||
|
- hosts: pine05.wks
|
||||||
|
vars:
|
||||||
|
nomad_pool: sys
|
||||||
|
roles:
|
||||||
|
- role: nummer5
|
||||||
|
tags: nummer5
|
||||||
|
- role: armbian
|
||||||
|
tags: armbian
|
||||||
|
- role: debian
|
||||||
|
tags: debian
|
||||||
|
|
||||||
|
#- hosts: ~pine.*\.wks
|
||||||
|
# roles:
|
||||||
|
# - role: nummer5
|
||||||
|
# tags: nummer5
|
||||||
|
# - role: armbian
|
||||||
|
# tags: armbian
|
||||||
|
# - role: debian
|
||||||
|
# tags: debian
|
||||||
Reference in New Issue
Block a user