Skip to content

Conversation

heytrav
Copy link

@heytrav heytrav commented May 10, 2023

Add defaults to some variables and move some to local block to allow definition by interpolation

This runs pretty smoothly for building an image based on Ubuntu Jammy and the image builds a working 1.27.1 cluster.

See https://gist.github.com/heytrav/802f83e8db5b58b46f8d56c87c9beca2 for example json var-files passed to packer.

packer build -only openstack.kubernetes -var kubernetes_version=1.27.1 \
    -var-file ubuntu-22.04.json \
    -var-file local-config.json \
    -var-file kubernetes.json \
    packer/kubernetes.pkr.hcl

Note: I did need to modify one Ansible task in image_builder so that unpacking the containerd archive wouldn't overwrite the /bin folder.

* Add defaults to some variables and move some to local block to allow
  definition by interpolation.
* Add `kubernetes_version` and use to populate other variables.

This runs pretty smoothly for building an image based on Ubuntu
Jammy.

See https://gist.github.com/heytrav/802f83e8db5b58b46f8d56c87c9beca2
for example json var-files passed to packer.

```
packer build -only openstack.kubernetes -var kubernetes_version=1.27.1 \
  -var-file ubuntu-22.04.json \
  -var-file local-config.json \
  -var-file kubernetes.json \
  packer/kubernetes.pkr.hcl
```

Note: I did need to modify one Ansible task in image_builder so that
unpacking the containerd archive wouldn't overwrite the /bin folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant