diff --git a/images/capi/Makefile b/images/capi/Makefile index 92711544ee..7dec9c232f 100644 --- a/images/capi/Makefile +++ b/images/capi/Makefile @@ -143,7 +143,7 @@ deps-powervs: deps-common deps-ignition: ## Installs/checks dependencies for generating Ignition files deps-ignition: hack/ensure-jq.sh - hack/ensure-ct.sh + hack/ensure-butane.sh .PHONY: deps-nutanix deps-nutanix: ## Installs/checks dependencies for Nutanix builds @@ -1155,7 +1155,7 @@ json-sort: ## Sort all JSON files alphabetically .PHONY: gen-ignition ignition_files = bootstrap-pass-auth bootstrap-cloud gen-ignition: deps-ignition ## Generates Ignition files from CLC - for f in $(ignition_files); do (ct < packer/files/flatcar/clc/$$f.yaml | jq '.' > packer/files/flatcar/ignition/$$f.json) || exit 1; done + for f in $(ignition_files); do (butane --pretty --strict < packer/files/flatcar/clc/$$f.yaml | jq '.' > packer/files/flatcar/ignition/$$f.json) || exit 1; done ## -------------------------------------- ## ISO checksum updates diff --git a/images/capi/hack/ensure-ct.sh b/images/capi/hack/ensure-butane.sh similarity index 73% rename from images/capi/hack/ensure-ct.sh rename to images/capi/hack/ensure-butane.sh index b58474acb1..40f9a3e67d 100755 --- a/images/capi/hack/ensure-ct.sh +++ b/images/capi/hack/ensure-butane.sh @@ -20,7 +20,7 @@ set -o pipefail [[ -n ${DEBUG:-} ]] && set -o xtrace -_version="v0.9.3" +_version="v0.25.1" # Change directories to the parent directory of the one in which this # script is located. @@ -33,11 +33,11 @@ if command -v ct >/dev/null 2>&1; then exit 0; fi mkdir -p .local/bin && cd .local/bin if [[ ${HOSTOS} == "linux" ]]; then - _binfile="ct-${_version}-x86_64-unknown-linux-gnu" + _binfile="butane-x86_64-unknown-linux-gnu" elif [[ ${HOSTOS} == "darwin" ]]; then - _binfile="ct-${_version}-x86_64-apple-darwin" + _binfile="butane-x86_64-apple-darwin" fi -_bin_url="https://github.com/flatcar/container-linux-config-transpiler/releases/download/${_version}/${_binfile}" -curl -SsL "${_bin_url}" -o ct -chmod 0755 ct -echo "'ct' has been installed to $(pwd), make sure this directory is in your \$PATH" +_bin_url="https://github.com/coreos/butane/releases/download/${_version}/${_binfile}" +curl -SsL "${_bin_url}" -o butane +chmod 0755 butane +echo "'butane' has been installed to $(pwd), make sure this directory is in your \$PATH" diff --git a/images/capi/packer/files/flatcar/clc/bootstrap-cloud.yaml b/images/capi/packer/files/flatcar/clc/bootstrap-cloud.yaml index 6f04aa040e..8594349eb3 100644 --- a/images/capi/packer/files/flatcar/clc/bootstrap-cloud.yaml +++ b/images/capi/packer/files/flatcar/clc/bootstrap-cloud.yaml @@ -2,10 +2,12 @@ # authorize SSH keys (typically cloud providers such as AWS or Azure). On such platforms, no SSH # configuration needs to be done via Ignition. The actions in this file are performed before Packer # provisioners (e.g. Ansible) are executed. +variant: flatcar +version: 1.1.0 systemd: units: - name: docker.service - enable: true + enabled: true # Mask update-engine and locksmithd to disable automatic updates during image creation. - name: update-engine.service mask: true diff --git a/images/capi/packer/files/flatcar/clc/bootstrap-pass-auth.yaml b/images/capi/packer/files/flatcar/clc/bootstrap-pass-auth.yaml index 13b364452d..3aef9d32f3 100644 --- a/images/capi/packer/files/flatcar/clc/bootstrap-pass-auth.yaml +++ b/images/capi/packer/files/flatcar/clc/bootstrap-pass-auth.yaml @@ -1,6 +1,8 @@ # This file is used for initial provisioning of a Flatcar machine on platforms which use SSH # password authentication during the build process. The actions in this file are performed before # Packer provisioners (e.g. Ansible) are executed. +variant: flatcar +version: 1.1.0 passwd: users: - name: builder @@ -13,7 +15,7 @@ passwd: systemd: units: - name: docker.service - enable: true + enabled: true # Mask update-engine and locksmithd to disable automatic updates during image creation. - name: update-engine.service mask: true diff --git a/images/capi/packer/files/flatcar/ignition/bootstrap-cloud.json b/images/capi/packer/files/flatcar/ignition/bootstrap-cloud.json index 58ee4eef34..8a937079d8 100644 --- a/images/capi/packer/files/flatcar/ignition/bootstrap-cloud.json +++ b/images/capi/packer/files/flatcar/ignition/bootstrap-cloud.json @@ -1,19 +1,11 @@ { "ignition": { - "config": {}, - "security": { - "tls": {} - }, - "timeouts": {}, - "version": "2.3.0" + "version": "3.4.0" }, - "networkd": {}, - "passwd": {}, - "storage": {}, "systemd": { "units": [ { - "enable": true, + "enabled": true, "name": "docker.service" }, { diff --git a/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json b/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json index 64b5030d89..418b6187e4 100644 --- a/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json +++ b/images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json @@ -1,13 +1,7 @@ { "ignition": { - "config": {}, - "security": { - "tls": {} - }, - "timeouts": {}, - "version": "2.3.0" + "version": "3.4.0" }, - "networkd": {}, "passwd": { "users": [ { @@ -21,11 +15,10 @@ } ] }, - "storage": {}, "systemd": { "units": [ { - "enable": true, + "enabled": true, "name": "docker.service" }, {