Skip to content

Commit 8e554a6

Browse files
authored
add support for fedora 42 (#8)
* docs: update code examples to latest releases for direct copying * feat: add support for Fedora 42 Fixes #7
1 parent 8ff9e95 commit 8e554a6

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ Blog post: [Golden Images and Proxmox Templates with cloud-init]
1515
- [`build-template`](/scripts/build-template): Create a proxmox template.
1616
- [`image-update`](/scripts/image-update): Check for an updated image and
1717
download the latest or missing image.
18-
- Works with `centos`, `debian` and `ubuntu` cloud images.
19-
- Limited support for `fedora`, as the image value is hardcoded to the latest
20-
version.
18+
- Works with `centos`, `debian`, `fedora` and `ubuntu` cloud images.
2119
- **Requires** `curl`
2220
- **Note**: This script will change the file extension to `*.img` for visibility in the Proxmox GUI, `qm disk import`
2321
will automatically convert disk image.
@@ -83,11 +81,11 @@ image-update -d debian -r 12
8381
```
8482

8583
```bash
86-
image-update -d fedora -r 40
84+
image-update -d fedora -r 42
8785
```
8886

8987
```bash
90-
image-update -d ubuntu -r 22
88+
image-update -d ubuntu -r 24
9189
```
9290

9391
</details>
@@ -99,7 +97,7 @@ image-update -d ubuntu -r 22
9997
# usage
10098
image-update <DISTRO_NAME>-<RELEASE_NAME> [ARGS]
10199
# example
102-
image-update ubuntu-20 --remove
100+
image-update ubuntu-24 --remove
103101
```
104102

105103
</details>
@@ -117,7 +115,7 @@ Adding the `--backup` flag will backup existing images for the set **distributio
117115
latest image, using the naming scheme: `IMAGE_NAME.backup.img`.
118116

119117
Adding the `--date` flag will append the release date to name in `YYYY-MM-DD` or `YYYY-MMM-DD` format, e.g.
120-
`ubuntu-20.04-server-cloudimg-amd64-YYYY-MM-DD.img`. The format is not configurable as it is pulled from the
118+
`ubuntu-24.04-server-cloudimg-amd64-YYYY-MM-DD.img`. The format is not configurable as it is pulled from the
121119
distribution's release page.
122120

123121
#### Automatically Check for Updates Using Cron
@@ -142,7 +140,7 @@ crontab -e
142140

143141
#### Automatically Check for Updates Using Systemd Timers
144142

145-
The `image-update` script can also parse a single argument for distribution and release, `image-update ubuntu-20`, which
143+
The `image-update` script can also parse a single argument for distribution and release, `image-update ubuntu-24`, which
146144
is useful in creating systemd timers. You can still pass the `--remove` and `--storage` flags as well, however,
147145
`--distro` and `--release` are overridden when using this approach.
148146

@@ -193,7 +191,7 @@ step 3. Or create a service and timer template, as follows:
193191

194192
```bash
195193
# enable and start a timer
196-
systemctl enable image-update@ubuntu-20.timer --now
194+
systemctl enable image-update@ubuntu-24.timer --now
197195
```
198196

199197
Additional commands:
@@ -203,13 +201,13 @@ Additional commands:
203201
systemctl list-timers --all
204202

205203
# view timer status
206-
systemctl status image-update@ubuntu-20.timer
204+
systemctl status image-update@ubuntu-24.timer
207205

208206
# disable a timer
209-
systemctl disable image-update@ubuntu-20.timer
207+
systemctl disable image-update@ubuntu-24.timer
210208

211209
# view script update logs
212-
systemctl status image-update@ubuntu-20.service
210+
systemctl status image-update@ubuntu-24.service
213211
```
214212

215213
### Proxmox Template Script
@@ -227,7 +225,7 @@ build-template -i <vm_id> -n <vm_name> --img <vm_image> [ARGS]
227225
Example:
228226

229227
```bash
230-
build-template -i 9000 -n ubuntu20 --img /var/lib/vz/template/iso/ubuntu-20.04-server-cloudimg-amd64.img
228+
build-template -i 9000 -n ubuntu24 --img /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
231229
```
232230

233231
| CLI Flags | Description | Default | Required |

scripts/image-update

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ function set_image_values() {
207207
remote_shasum_url="https://download.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-41-1.4-x86_64-CHECKSUM"
208208
shasum_algorithm="256"
209209
;;
210+
42)
211+
file_name="Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
212+
remote_url="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
213+
remote_shasum_url="https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-42-1.1-x86_64-CHECKSUM"
214+
shasum_algorithm="256"
215+
;;
210216
*)
211217
err "Unknown distro, only works for Fedora 40+"
212218
;;

0 commit comments

Comments
 (0)