Install nomad and consul on the hosts

This commit is contained in:
2023-12-03 00:11:08 +11:00
parent 42e9090c38
commit e710b74a12
4 changed files with 69 additions and 3 deletions

View File

@@ -1,7 +1,18 @@
variant: fcos
version: 1.4.0
version: 1.5.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJwojmm5GUDQTt/ic1w3yf5c0fyiPqhy8D9Y4qMVljEA othrayte@gmail.com
systemd:
units:
- name: rpm-ostree-install-hashistack.service
enabled: true
contents_local: rpm-ostree-install-hashistack.service
storage:
files:
- path: /etc/yum.repos.d/hashicorp.repo
contents:
local: hashicorp.repo
mode: 0311

View File

@@ -1,6 +1,6 @@
{
"ignition": {
"version": "3.3.0"
"version": "3.4.0"
},
"passwd": {
"users": [
@@ -11,5 +11,26 @@
]
}
]
},
"storage": {
"files": [
{
"path": "/etc/yum.repos.d/hashicorp.repo",
"contents": {
"compression": "gzip",
"source": "data:;base64,H4sIAAAAAAAC/7SPPcvCQBCE+/sVKdIm+76tkN5eO7HYXMY7ydexuwr+e4kfZ2EjgtXOMvAMzy6yxqOfJe3dxCOa9fMvNsbtgKIqypYVLD66JZxkaKJZ0hWRpLEWDGCF1plU+3mkA7pZmMpHfYZQ5pDe0A7Tcrrm34UUfITv77HH5ZOJkIJzL4HKoPZmsYXaTxyWtWzw97XBNQAA//9Dsu7agQEAAA=="
},
"mode": 201
}
]
},
"systemd": {
"units": [
{
"contents": "[Unit]\nDescription=Layer nomad \u0026 consul with rpm-ostree\nWants=network-online.target\nAfter=network-online.target\n# We run before `zincati.service` to avoid conflicting rpm-ostree\n# transactions.\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\n# `--allow-inactive` ensures that rpm-ostree does not return an error\n# if the package is already installed. This is useful if the package is\n# added to the root image in a future Fedora CoreOS release as it will\n# prevent the service from failing.\nExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive nomad consul\nExecStart=/bin/touch /var/lib/%N.stamp\n\n[Install]\nWantedBy=multi-user.target",
"enabled": true,
"name": "rpm-ostree-install-hashistack.service"
}
]
}
}

View File

@@ -0,0 +1,13 @@
[hashicorp]
name=Hashicorp Stable - $basearch
baseurl=https://rpm.releases.hashicorp.com/fedora/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://rpm.releases.hashicorp.com/gpg
[hashicorp-test]
name=Hashicorp Test - $basearch
baseurl=https://rpm.releases.hashicorp.com/fedora/$releasever/$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://rpm.releases.hashicorp.com/gpg

View File

@@ -0,0 +1,21 @@
[Unit]
Description=Layer nomad & consul with rpm-ostree
Wants=network-online.target
After=network-online.target
# We run before `zincati.service` to avoid conflicting rpm-ostree
# transactions.
Before=zincati.service
ConditionPathExists=!/var/lib/%N.stamp
[Service]
Type=oneshot
RemainAfterExit=yes
# `--allow-inactive` ensures that rpm-ostree does not return an error
# if the package is already installed. This is useful if the package is
# added to the root image in a future Fedora CoreOS release as it will
# prevent the service from failing.
ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive nomad consul
ExecStart=/bin/touch /var/lib/%N.stamp
[Install]
WantedBy=multi-user.target