Add ignition files
This commit is contained in:
45
ignition/base-install-docker.bu
Normal file
45
ignition/base-install-docker.bu
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
variant: fcos
|
||||||
|
version: 1.6.0
|
||||||
|
passwd:
|
||||||
|
users:
|
||||||
|
# Add user to docker group
|
||||||
|
- name: core
|
||||||
|
groups:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
storage:
|
||||||
|
files:
|
||||||
|
- path: /var/home/core/.bashrc
|
||||||
|
append:
|
||||||
|
- inline: "alias dc='docker compose -f /var/docker/docker-compose.yml'"
|
||||||
|
directories:
|
||||||
|
- path: /var/docker
|
||||||
|
user:
|
||||||
|
name: core
|
||||||
|
group:
|
||||||
|
name: docker
|
||||||
|
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
# Install Docker CE
|
||||||
|
- name: rpm-ostree-install-docker-ce.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Install Docker CE
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/curl --output-dir "/etc/yum.repos.d" --remote-name https://download.docker.com/linux/fedora/docker-ce.repo
|
||||||
|
ExecStart=/usr/bin/rpm-ostree override remove moby-engine containerd runc docker-cli --install docker-ce
|
||||||
|
ExecStart=/usr/bin/touch /var/lib/%N.stamp
|
||||||
|
ExecStart=/usr/bin/systemctl enable docker.service
|
||||||
|
ExecStart=/usr/bin/systemctl --no-block reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
48
ignition/base-install-docker.ign
Normal file
48
ignition/base-install-docker.ign
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"ignition": {
|
||||||
|
"version": "3.5.0"
|
||||||
|
},
|
||||||
|
"passwd": {
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"groups": [
|
||||||
|
"docker"
|
||||||
|
],
|
||||||
|
"name": "core"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"directories": [
|
||||||
|
{
|
||||||
|
"group": {
|
||||||
|
"name": "docker"
|
||||||
|
},
|
||||||
|
"path": "/var/docker",
|
||||||
|
"user": {
|
||||||
|
"name": "core"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "/var/home/core/.bashrc",
|
||||||
|
"append": [
|
||||||
|
{
|
||||||
|
"compression": "",
|
||||||
|
"source": "data:,alias%20dc%3D'docker%20compose%20-f%20%2Fvar%2Fdocker%2Fdocker-compose.yml'"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"systemd": {
|
||||||
|
"units": [
|
||||||
|
{
|
||||||
|
"contents": "[Unit]\nDescription=Install Docker CE\nWants=network-online.target\nAfter=network-online.target\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/curl --output-dir \"/etc/yum.repos.d\" --remote-name https://download.docker.com/linux/fedora/docker-ce.repo\nExecStart=/usr/bin/rpm-ostree override remove moby-engine containerd runc docker-cli --install docker-ce\nExecStart=/usr/bin/touch /var/lib/%N.stamp\nExecStart=/usr/bin/systemctl enable docker.service\nExecStart=/usr/bin/systemctl --no-block reboot\n\n[Install]\nWantedBy=multi-user.target",
|
||||||
|
"enabled": true,
|
||||||
|
"name": "rpm-ostree-install-docker-ce.service"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
56
ignition/base-install-supporting-services.bu
Normal file
56
ignition/base-install-supporting-services.bu
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# Depends on base-install-docker
|
||||||
|
# Installs Komodo Periphery, Telegraf and Certbot
|
||||||
|
variant: fcos
|
||||||
|
version: 1.6.0
|
||||||
|
|
||||||
|
storage:
|
||||||
|
directories:
|
||||||
|
- path: /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services
|
||||||
|
user:
|
||||||
|
name: core
|
||||||
|
group:
|
||||||
|
name: docker
|
||||||
|
files:
|
||||||
|
- path: /var/docker/.supporting-services/telegraf/telegraf.conf
|
||||||
|
user:
|
||||||
|
name: core
|
||||||
|
group:
|
||||||
|
name: docker
|
||||||
|
contents:
|
||||||
|
source: https://git.mrmeeb.stream/mrmeeb-labs/supporting-services/telegraf.conf
|
||||||
|
- path: /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/docker-compose.yml
|
||||||
|
user:
|
||||||
|
name: core
|
||||||
|
group:
|
||||||
|
name: docker
|
||||||
|
contents:
|
||||||
|
source: https://git.mrmeeb.stream/mrmeeb-labs/supporting-services/raw/branch/main/docker-compose.yml
|
||||||
|
- path: /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/.env
|
||||||
|
user:
|
||||||
|
name: core
|
||||||
|
group:
|
||||||
|
name: docker
|
||||||
|
contents:
|
||||||
|
source: https://git.mrmeeb.stream/mrmeeb-labs/supporting-services/raw/branch/main/.env
|
||||||
|
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
# Install supporting services
|
||||||
|
- name: rpm-ostree-install-supporting-services.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Install Supporting Services
|
||||||
|
Wants=network-online.target
|
||||||
|
After=rpm-ostree-install-docker-ce.service
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/docker compose -p "supporting-services" --env-file /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/.env -f /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/docker-compose.yml up -d
|
||||||
|
ExecStart=/usr/bin/touch /var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
65
ignition/base-install-supporting-services.ign
Normal file
65
ignition/base-install-supporting-services.ign
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"ignition": {
|
||||||
|
"version": "3.5.0"
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"directories": [
|
||||||
|
{
|
||||||
|
"group": {
|
||||||
|
"name": "docker"
|
||||||
|
},
|
||||||
|
"path": "/var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services",
|
||||||
|
"user": {
|
||||||
|
"name": "core"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"group": {
|
||||||
|
"name": "docker"
|
||||||
|
},
|
||||||
|
"path": "/var/docker/.supporting-services/telegraf/telegraf.conf",
|
||||||
|
"user": {
|
||||||
|
"name": "core"
|
||||||
|
},
|
||||||
|
"contents": {
|
||||||
|
"source": "https://git.mrmeeb.stream/mrmeeb-labs/supporting-services/telegraf.conf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": {
|
||||||
|
"name": "docker"
|
||||||
|
},
|
||||||
|
"path": "/var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/docker-compose.yml",
|
||||||
|
"user": {
|
||||||
|
"name": "core"
|
||||||
|
},
|
||||||
|
"contents": {
|
||||||
|
"source": "https://git.mrmeeb.stream/mrmeeb-labs/supporting-services/raw/branch/main/docker-compose.yml"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": {
|
||||||
|
"name": "docker"
|
||||||
|
},
|
||||||
|
"path": "/var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/.env",
|
||||||
|
"user": {
|
||||||
|
"name": "core"
|
||||||
|
},
|
||||||
|
"contents": {
|
||||||
|
"source": "https://git.mrmeeb.stream/mrmeeb-labs/supporting-services/raw/branch/main/.env"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"systemd": {
|
||||||
|
"units": [
|
||||||
|
{
|
||||||
|
"contents": "[Unit]\nDescription=Install Supporting Services\nWants=network-online.target\nAfter=rpm-ostree-install-docker-ce.service\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/docker compose -p \"supporting-services\" --env-file /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/.env -f /var/docker/.supporting-services/komodo/repos/mrmeeb-labs/supporting-services/docker-compose.yml up -d\nExecStart=/usr/bin/touch /var/lib/%N.stamp\n\n[Install]\nWantedBy=multi-user.target",
|
||||||
|
"enabled": true,
|
||||||
|
"name": "rpm-ostree-install-supporting-services.service"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
41
ignition/base.bu
Normal file
41
ignition/base.bu
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
variant: fcos
|
||||||
|
version: 1.6.0
|
||||||
|
storage:
|
||||||
|
files:
|
||||||
|
- path: /etc/zincati/config.d/51-rollout-wariness.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[identity]
|
||||||
|
rollout_wariness = 0.8
|
||||||
|
- path: /etc/zincati/config.d/55-updates-strategy.toml
|
||||||
|
contents:
|
||||||
|
inline: |
|
||||||
|
[updates]
|
||||||
|
strategy = "periodic"
|
||||||
|
[[updates.periodic.window]]
|
||||||
|
days = [ "Sat","Sun" ]
|
||||||
|
start_time = "06:00"
|
||||||
|
length_minutes = 60
|
||||||
|
|
||||||
|
systemd:
|
||||||
|
units:
|
||||||
|
# Install qemu-guest-agent
|
||||||
|
- name: rpm-ostree-install-qemu-guest-agent.service
|
||||||
|
enabled: true
|
||||||
|
contents: |
|
||||||
|
[Unit]
|
||||||
|
Description=Install QEMU Guest Agent
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
Before=zincati.service
|
||||||
|
ConditionPathExists=!/var/lib/%N.stamp
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/rpm-ostree install qemu-guest-agent
|
||||||
|
ExecStart=/usr/bin/touch /var/lib/%N.stamp
|
||||||
|
ExecStart=/usr/bin/systemctl --no-block reboot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
32
ignition/base.ign
Normal file
32
ignition/base.ign
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"ignition": {
|
||||||
|
"version": "3.5.0"
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "/etc/zincati/config.d/51-rollout-wariness.toml",
|
||||||
|
"contents": {
|
||||||
|
"compression": "",
|
||||||
|
"source": "data:,%5Bidentity%5D%0Arollout_wariness%20%3D%200.8%0A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/etc/zincati/config.d/55-updates-strategy.toml",
|
||||||
|
"contents": {
|
||||||
|
"compression": "",
|
||||||
|
"source": "data:;base64,W3VwZGF0ZXNdCnN0cmF0ZWd5ID0gInBlcmlvZGljIgpbW3VwZGF0ZXMucGVyaW9kaWMud2luZG93XV0KZGF5cyA9IFsgIlNhdCIsIlN1biIgXQpzdGFydF90aW1lID0gIjA2OjAwIgpsZW5ndGhfbWludXRlcyA9IDYwCg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"systemd": {
|
||||||
|
"units": [
|
||||||
|
{
|
||||||
|
"contents": "[Unit]\nDescription=Install QEMU Guest Agent\nWants=network-online.target\nAfter=network-online.target\nBefore=zincati.service\nConditionPathExists=!/var/lib/%N.stamp\n\n[Service]\nType=oneshot\nRemainAfterExit=yes\nExecStart=/usr/bin/rpm-ostree install qemu-guest-agent\nExecStart=/usr/bin/touch /var/lib/%N.stamp\nExecStart=/usr/bin/systemctl --no-block reboot\n\n[Install]\nWantedBy=multi-user.target",
|
||||||
|
"enabled": true,
|
||||||
|
"name": "rpm-ostree-install-qemu-guest-agent.service"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user