You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step 2 - Edit the respective JSON files, e.g. `ubuntu/ubuntu-22.04.json` file or `photon/photon-3.0.json`. For Ubuntu 20.04 and 22.04, adapt the `user-data` cloud-init file with the desired configuration ([documentation](https://ubuntu.com/server/docs/install/autoinstall-reference) for reference).
38
+
Step 2 - Make a copy (or change) and adapt the [cloud definition file](https://github.com/cloudmaniac/packer-templates/tree/main/builds/clouds) to your environment (you will find them in the `builds/clouds` folder).
39
+
40
+
Step 3 - Update the `buils/common.pkrvars.hcl` file with your desired user credentials (or SSH key).
41
+
42
+
Step 4 - Navigate to the folder that matches the operating system (and version) that you want to build. E.g.: `builds/ubuntu/22.04`.
43
+
44
+
Step 4 - From that folder, edit the respective HCL file with your values, e.g. `ubuntu-22.04.auto.pkrvars.hcl` file or `photon-4.0.auto.pkrvars.hcl`. For Ubuntu 20.04 and 22.04, adapt the `user-data` cloud-init file with the desired configuration ([documentation](https://ubuntu.com/server/docs/install/autoinstall-reference) for reference).
37
45
38
-
Step 3 - Adapt one of the [cloud definition JSON file](https://github.com/cloudmaniac/packer-templates/tree/master/clouds) to your environment (you will find them in the `clouds` folder).
46
+
Step 5 - Run `packer init .` to install the required plugin(s).
39
47
40
-
Step 4 - Build the template(s).
48
+
Step 6 - Build your template with `packer build -force -var-file="../../clouds/infra-z67.pkrvars.hcl" -var-file="../../common.pkrvars.hcl" .`.
49
+
*Note: adapt to filenames and location relevant to your environment.*
41
50
42
-
* Either manually by using the `packer` CLI: `packer build -var-file=../clouds/var-infra-z67.json ubuntu-20.04.json`
43
-
* Or by using a quick script, e.g.: `./ubuntu/build-ubuntu-20.04.sh`
51
+
Step 7 - Rinse and repeat for all templates you want to build. \o/
44
52
45
53
## Todo
46
54
47
-
* Migrate from JSON to HCL2
48
55
* Add support for additional OS (Debian, CentOS, Windows)
0 commit comments