Skip to content

Commit c0fa79c

Browse files
authored
Merge pull request #1889 from mgrzybek/flatcar-butane
fix(flatcar): use newer butane instead of ct
2 parents 923f40d + d3ad3bf commit c0fa79c

File tree

6 files changed

+19
-30
lines changed

6 files changed

+19
-30
lines changed

images/capi/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ deps-powervs: deps-common
143143
deps-ignition: ## Installs/checks dependencies for generating Ignition files
144144
deps-ignition:
145145
hack/ensure-jq.sh
146-
hack/ensure-ct.sh
146+
hack/ensure-butane.sh
147147

148148
.PHONY: deps-nutanix
149149
deps-nutanix: ## Installs/checks dependencies for Nutanix builds
@@ -1155,7 +1155,7 @@ json-sort: ## Sort all JSON files alphabetically
11551155
.PHONY: gen-ignition
11561156
ignition_files = bootstrap-pass-auth bootstrap-cloud
11571157
gen-ignition: deps-ignition ## Generates Ignition files from CLC
1158-
for f in $(ignition_files); do (ct < packer/files/flatcar/clc/$$f.yaml | jq '.' > packer/files/flatcar/ignition/$$f.json) || exit 1; done
1158+
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
11591159

11601160
## --------------------------------------
11611161
## ISO checksum updates
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -o pipefail
2020

2121
[[ -n ${DEBUG:-} ]] && set -o xtrace
2222

23-
_version="v0.9.3"
23+
_version="v0.25.1"
2424

2525
# Change directories to the parent directory of the one in which this
2626
# script is located.
@@ -33,11 +33,11 @@ if command -v ct >/dev/null 2>&1; then exit 0; fi
3333
mkdir -p .local/bin && cd .local/bin
3434

3535
if [[ ${HOSTOS} == "linux" ]]; then
36-
_binfile="ct-${_version}-x86_64-unknown-linux-gnu"
36+
_binfile="butane-x86_64-unknown-linux-gnu"
3737
elif [[ ${HOSTOS} == "darwin" ]]; then
38-
_binfile="ct-${_version}-x86_64-apple-darwin"
38+
_binfile="butane-x86_64-apple-darwin"
3939
fi
40-
_bin_url="https://github.com/flatcar/container-linux-config-transpiler/releases/download/${_version}/${_binfile}"
41-
curl -SsL "${_bin_url}" -o ct
42-
chmod 0755 ct
43-
echo "'ct' has been installed to $(pwd), make sure this directory is in your \$PATH"
40+
_bin_url="https://github.com/coreos/butane/releases/download/${_version}/${_binfile}"
41+
curl -SsL "${_bin_url}" -o butane
42+
chmod 0755 butane
43+
echo "'butane' has been installed to $(pwd), make sure this directory is in your \$PATH"

images/capi/packer/files/flatcar/clc/bootstrap-cloud.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
# authorize SSH keys (typically cloud providers such as AWS or Azure). On such platforms, no SSH
33
# configuration needs to be done via Ignition. The actions in this file are performed before Packer
44
# provisioners (e.g. Ansible) are executed.
5+
variant: flatcar
6+
version: 1.1.0
57
systemd:
68
units:
79
- name: docker.service
8-
enable: true
10+
enabled: true
911
# Mask update-engine and locksmithd to disable automatic updates during image creation.
1012
- name: update-engine.service
1113
mask: true

images/capi/packer/files/flatcar/clc/bootstrap-pass-auth.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# This file is used for initial provisioning of a Flatcar machine on platforms which use SSH
22
# password authentication during the build process. The actions in this file are performed before
33
# Packer provisioners (e.g. Ansible) are executed.
4+
variant: flatcar
5+
version: 1.1.0
46
passwd:
57
users:
68
- name: builder
@@ -13,7 +15,7 @@ passwd:
1315
systemd:
1416
units:
1517
- name: docker.service
16-
enable: true
18+
enabled: true
1719
# Mask update-engine and locksmithd to disable automatic updates during image creation.
1820
- name: update-engine.service
1921
mask: true

images/capi/packer/files/flatcar/ignition/bootstrap-cloud.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
{
22
"ignition": {
3-
"config": {},
4-
"security": {
5-
"tls": {}
6-
},
7-
"timeouts": {},
8-
"version": "2.3.0"
3+
"version": "3.4.0"
94
},
10-
"networkd": {},
11-
"passwd": {},
12-
"storage": {},
135
"systemd": {
146
"units": [
157
{
16-
"enable": true,
8+
"enabled": true,
179
"name": "docker.service"
1810
},
1911
{

images/capi/packer/files/flatcar/ignition/bootstrap-pass-auth.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
{
22
"ignition": {
3-
"config": {},
4-
"security": {
5-
"tls": {}
6-
},
7-
"timeouts": {},
8-
"version": "2.3.0"
3+
"version": "3.4.0"
94
},
10-
"networkd": {},
115
"passwd": {
126
"users": [
137
{
@@ -21,11 +15,10 @@
2115
}
2216
]
2317
},
24-
"storage": {},
2518
"systemd": {
2619
"units": [
2720
{
28-
"enable": true,
21+
"enabled": true,
2922
"name": "docker.service"
3023
},
3124
{

0 commit comments

Comments
 (0)