Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Modify default variables and interpolate some common ansible args #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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