diff --git a/1-coreos/1-prepare-ignition-files/example.bu b/1-coreos/1-prepare-ignition-files/example.bu index 6326db5..b82a72d 100644 --- a/1-coreos/1-prepare-ignition-files/example.bu +++ b/1-coreos/1-prepare-ignition-files/example.bu @@ -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 \ No newline at end of file + - 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 \ No newline at end of file diff --git a/1-coreos/1-prepare-ignition-files/example.ign b/1-coreos/1-prepare-ignition-files/example.ign index c0d8c38..eb3a02b 100644 --- a/1-coreos/1-prepare-ignition-files/example.ign +++ b/1-coreos/1-prepare-ignition-files/example.ign @@ -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" + } + ] } } diff --git a/1-coreos/1-prepare-ignition-files/hashicorp.repo b/1-coreos/1-prepare-ignition-files/hashicorp.repo new file mode 100644 index 0000000..5e06b88 --- /dev/null +++ b/1-coreos/1-prepare-ignition-files/hashicorp.repo @@ -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 \ No newline at end of file diff --git a/1-coreos/1-prepare-ignition-files/rpm-ostree-install-hashistack.service b/1-coreos/1-prepare-ignition-files/rpm-ostree-install-hashistack.service new file mode 100644 index 0000000..423bf66 --- /dev/null +++ b/1-coreos/1-prepare-ignition-files/rpm-ostree-install-hashistack.service @@ -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 \ No newline at end of file