Skip to content

Commit

Permalink
Tag images with latest and upate docs with repository URLs
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Doherty <chris.doherty4@gmail.com>
  • Loading branch information
chrisdoherty4 committed Mar 13, 2024
1 parent eb6fa85 commit 23334e4
Show file tree
Hide file tree
Showing 13 changed files with 216 additions and 152 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ push: $(addprefix push-,$(ACTIONS))

.PHONY: push-%
push-%: ## Push a specific action image to the registry. This recipe assumes you are already authenticated with the registry.
IMAGE_NAME=$(CONTAINER_REPOSITORY)/$*:$(GIT_COMMIT)
docker tag $*:latest $$IMAGE_NAME
docker push $$IMAGE_NAME
IMAGE_NAME=$(CONTAINER_REPOSITORY)/$*
docker tag $*:latest $$IMAGE_NAME:$(GIT_COMMIT)
docker tag $*:latest $$IMAGE_NAME:latest
docker push $$IMAGE_NAME:$(GIT_COMMIT)
docker push $$IMAGE_NAME:latest

formatters: ## Run all formatters.
formatters: $(toolBins)
Expand Down
40 changes: 29 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,32 @@ This repository is a suite of reusable Tinkerbell Actions that are used to compo

| Name | Description |
| --- | --- |
| [archive2disk](/archive2disk/) | Write archives to a block device |
| [cexec](/cexec/) | chroot and execute binaries |
| [grub2disk](/grub2disk/) | Write grub configs to a block device |
| [image2disk](/image2disk/) | Write images to a block device |
| [kexec](/kexec/) | kexec to a Linux Kernel |
| [oci2disk](/oci2disk/) | Stream OCI compliant images from a registry and write to a block device |
| [qemuimg2disk](/qemuimg2disk/) | Stream images and write to a block device |
| [rootio](/rootio/) | Manage disks (partition, format etc) |
| [slurp](/slurp/) | Stream a block device to a remote server |
| [syslinux](/syslinux/) | Install the syslinux bootloader to a block device |
| [writefile](/writefile/) | Write a file to a file system on a block device |
| [archive2disk](/archive2disk/) | Write archives to a block device |
| [cexec](/cexec/) | chroot and execute binaries |
| [grub2disk](/grub2disk/) | Write grub configs to a block device |
| [image2disk](/image2disk/) | Write images to a block device |
| [kexec](/kexec/) | kexec to a Linux Kernel |
| [oci2disk](/oci2disk/) | Stream OCI compliant images from a registry and write to a block device |
| [qemuimg2disk](/qemuimg2disk/) | Stream images and write to a block device |
| [rootio](/rootio/) | Manage disks (partition, format etc)
| [slurp](/slurp/) | Stream a block device to a remote server |
| [syslinux](/syslinux/) | Install the syslinux bootloader to a block device |
| [writefile](/writefile/) | Write a file to a file system on a block device |

## Releases

Actions are released on a per revision basis. With each PR merged, all actions are built and pushed
to quay.io tagged with the Git revision. The `latest` tag is updated to point to the new image.

We try not to make changes that would break actions, but we do not provide a backward compatibility
guarantee. We recommend using the static Git revision tag for most deployments.

Our release process may provide stronger compatibility guarantees in the future.

## Community actions

These actions are built and maintained by third parties. To add your own action to the list, raise
a PR. If you find an action that's no longer maintained, please raise an issue.

| Name | Description | Repo |
| --- | --- | --- |
66 changes: 35 additions & 31 deletions archive2disk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```
quay.io/tinkerbell/actions/archive2disk:latest
```

This action will stream a compressed filesystem archive into archive2disk
where it will mount a block device and uncompress this archive to a destination path on
it's filesystem. Usually the `DEST_PATH` should be `/` as we normally will be writing a
Expand Down Expand Up @@ -25,41 +29,41 @@ Environment Variables:

```yaml
actions:
- name: "expand-ubuntu-filesystem-to-root"
image: quay.io/tinkerbell-actions/archive2disk:v1.0.0
timeout: 90
environment:
ARCHIVE_URL: http://192.168.1.2/ubuntu.tar.gz
ARCHIVE_TYPE: targz
TARFILE_CHECKSUM: sha256:f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
DEST_DISK: /dev/sda3
FS_TYPE: ext4
DEST_PATH: /
HTTP_CLIENT_TIMEOUT_MINUTES: 1
- name: "expand-ubuntu-filesystem-to-root"
image: quay.io/tinkerbell/actions/archive2disk:latest
timeout: 90
environment:
ARCHIVE_URL: http://192.168.1.2/ubuntu.tar.gz
ARCHIVE_TYPE: targz
TARFILE_CHECKSUM: sha256:f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
DEST_DISK: /dev/sda3
FS_TYPE: ext4
DEST_PATH: /
HTTP_CLIENT_TIMEOUT_MINUTES: 1
```
```yaml
actions:
- name: "expand-ubuntu-filesystem-to-root"
image: quay.io/tinkerbell-actions/archive2disk:v1.0.0
timeout: 90
environment:
ARCHIVE_URL: http://192.168.1.2/ubuntu.tar.gz
ARCHIVE_TYPE: targz
TARFILE_CHECKSUM: sha512:0e3e75234abc68f4378a86b3f4b32a198ba301845b0cd6e50106e874345700cc6663a86c1ea125dc5e92be17c98f9a0f85ca9d5f595db2012f7cc3571945c123
DEST_DISK: /dev/sda3
FS_TYPE: ext4
DEST_PATH: /
- name: "expand-ubuntu-filesystem-to-root"
image: quay.io/tinkerbell/actions/archive2disk:latest
timeout: 90
environment:
ARCHIVE_URL: http://192.168.1.2/ubuntu.tar.gz
ARCHIVE_TYPE: targz
TARFILE_CHECKSUM: sha512:0e3e75234abc68f4378a86b3f4b32a198ba301845b0cd6e50106e874345700cc6663a86c1ea125dc5e92be17c98f9a0f85ca9d5f595db2012f7cc3571945c123
DEST_DISK: /dev/sda3
FS_TYPE: ext4
DEST_PATH: /
```
```yaml
actions:
- name: "expand-ubuntu-filesystem-to-root"
image: quay.io/tinkerbell-actions/archive2disk:v1.0.0
timeout: 90
environment:
ARCHIVE_URL: http://192.168.1.2/ubuntu.tar.gz
ARCHIVE_TYPE: targz
DEST_DISK: /dev/sda3
FS_TYPE: ext4
DEST_PATH: /
INSECURE_NO_TARFILE_CHECKSUM_VERIFICATION: true
- name: "expand-ubuntu-filesystem-to-root"
image: quay.io/tinkerbell/actions/archive2disk:latest
timeout: 90
environment:
ARCHIVE_URL: http://192.168.1.2/ubuntu.tar.gz
ARCHIVE_TYPE: targz
DEST_DISK: /dev/sda3
FS_TYPE: ext4
DEST_PATH: /
INSECURE_NO_TARFILE_CHECKSUM_VERIFICATION: true
```
38 changes: 21 additions & 17 deletions cexec/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
```
quay.io/tinkerbell/actions/cexec:latest
```

The `cexec` action performs *execution* either within a [chroot](https://en.wikipedia.org/wiki/Chroot) environment
or within the base filesystem. The primary use-case is being able to provision
files/an Operating System to disk and then being able to execute something that
perhaps resides within that filesystem.

```yaml
actions:
- name: "Install Grub"
image: quay.io/tinkerbell-actions/cexec:v1.0.0
timeout: 90
environment:
BLOCK_DEVICE: /dev/sda3
FS_TYPE: ext4
CHROOT: y
CMD_LINE: "grub-install --root-directory=/boot /dev/sda"
- name: "Install Grub"
image: quay.io/tinkerbell/actions/cexec:latest
timeout: 90
environment:
BLOCK_DEVICE: /dev/sda3
FS_TYPE: ext4
CHROOT: y
CMD_LINE: "grub-install --root-directory=/boot /dev/sda"
```
In order to execute multiple commands (seperated by a semi-colon) we will
Expand All @@ -21,13 +25,13 @@ This interpreter will then parse your commands.

```yaml
actions:
- name: "Update packages"
image: quay.io/tinkerbell-actions/cexec:v1.0.0
timeout: 90
environment:
BLOCK_DEVICE: /dev/sda3
FS_TYPE: ext4
CHROOT: y
DEFAULT_INTERPRETER: "/bin/sh -c"
CMD_LINE: "apt-get -y update; apt-get -y upgrade"
- name: "Update packages"
image: quay.io/tinkerbell/actions/cexec:latest
timeout: 90
environment:
BLOCK_DEVICE: /dev/sda3
FS_TYPE: ext4
CHROOT: y
DEFAULT_INTERPRETER: "/bin/sh -c"
CMD_LINE: "apt-get -y update; apt-get -y upgrade"
```
6 changes: 5 additions & 1 deletion grub2disk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```
quay.io/tinkerbell/actions/grub2disk:latest
```

The `grub2disk` mounts and writes a grub onto a block device. This lets you see a grub menu during the boot process and select OS of your choice and which is deployed in the system. As a part of the process, [chroot](https://en.wikipedia.org/wiki/Chroot) operation is also performed on `GRUB_INSTALL_PATH`. For this reason respective `volumes` as described in the below template is required.

```yaml
Expand All @@ -23,7 +27,7 @@ tasks:
- /boot:/boot
actions:
- name: "grub_2_disk"
image: grub2disk
image: quay.io/tinkerbell/actions/grub2disk:latest
timeout: 180
environment:
GRUB_INSTALL_PATH: /dev/sda
Expand Down
32 changes: 18 additions & 14 deletions image2disk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```
quay.io/tinkerbell/actions/image2disk:latest
```

This action will stream a remote disk image (raw) to a block device, and
is mainly used to write cloud images to a disk. It is recommended to use the `qemu-img`
tool to convert disk images into raw, it is also possible to compress the raw images
Expand All @@ -8,13 +12,13 @@ it to the block storage disk `/dev/sda`. The raw image is uncompressed in this e

```yaml
actions:
- name: "stream ubuntu"
image: quay.io/tinkerbell-actions/image2disk:v1.0.0
timeout: 90
environment:
IMG_URL: http://192.168.1.2/ubuntu.raw
DEST_DISK: /dev/sda
COMPRESSED: false
- name: "stream ubuntu"
image: quay.io/tinkerbell/actions/image2disk:latest
timeout: 90
environment:
IMG_URL: http://192.168.1.2/ubuntu.raw
DEST_DISK: /dev/sda
COMPRESSED: false
```
The below example will stream a compressed raw ubuntu cloud image (converted by qemu-img)
Expand All @@ -27,13 +31,13 @@ gzip ubuntu.raw

```yaml
actions:
- name: "stream ubuntu"
image: quay.io/tinkerbell-actions/image2disk:v1.0.0
timeout: 90
environment:
IMG_URL: http://192.168.1.2/ubuntu.tar.gz
DEST_DISK: /dev/sda
COMPRESSED: true
- name: "stream ubuntu"
image: quay.io/tinkerbell/actions/image2disk:latest
timeout: 90
environment:
IMG_URL: http://192.168.1.2/ubuntu.tar.gz
DEST_DISK: /dev/sda
COMPRESSED: true
```
## Compression format supported:
Expand Down
24 changes: 14 additions & 10 deletions kexec/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```
quay.io/tinkerbell/actions/kexec:latest
```

This action makes use of the kexec function that should be compiled into the
tinkie kernel. This provides a faster alternative to rebooting, and allows an action to
effectively jump straight into the newly provisioned Operating System
Expand All @@ -13,16 +17,16 @@ understand the `CMD_LINE`.

```yaml
actions:
- name: "kexec ubuntu"
image: quay.io/tinkerbell-actions/kexec:v1.0.0
timeout: 90
pid: host
environment:
BLOCK_DEVICE: /dev/sda3
FS_TYPE: ext4
KERNEL_PATH: /boot/vmlinuz
INITRD_PATH: /boot/initrd
CMD_LINE: "root=/dev/sda3 ro"
- name: "kexec ubuntu"
image: quay.io/tinkerbell/actions/kexec:latest
timeout: 90
pid: host
environment:
BLOCK_DEVICE: /dev/sda3
FS_TYPE: ext4
KERNEL_PATH: /boot/vmlinuz
INITRD_PATH: /boot/initrd
CMD_LINE: "root=/dev/sda3 ro"
```
Troubleshooting:
Expand Down
18 changes: 11 additions & 7 deletions oci2disk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```
quay.io/tinkerbell/actions/oci2disk:latest
```

This action provides the capability to stream a raw (compressed) disk
image from an OCI compliant registry and write this to a block device on a server

Expand All @@ -17,13 +21,13 @@ We can then use this image by referring too it with teh `IMG_URL` environment va

```yaml
actions:
- name: "stream-debian-image"
image: oci2disk:v1.0.0
timeout: 600
environment:
DEST_DISK: /dev/nvme0n1
IMG_URL: "192.168.0.173/test/debian:raw.gz"
COMPRESSED: true
- name: "stream-debian-image"
image: quay.io/tinkerbell/actions/oci2disk:latest
timeout: 600
environment:
DEST_DISK: /dev/nvme0n1
IMG_URL: "192.168.0.173/test/debian:raw.gz"
COMPRESSED: true
```
## Compression format supported:
Expand Down
16 changes: 10 additions & 6 deletions qemuimg2disk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```
quay.io/tinkerbell/actions/qemuimg2disk:latest
```

This action will stream a remote disk image to a block device, and
is mainly used to write cloud images to a disk.

Expand All @@ -12,10 +16,10 @@ directly from Canonical onto block storage disk `/dev/sda` like so:

```yaml
actions:
- name: "stream ubuntu"
image: quay.io/tinkerbell-actions/qemuimg2disk:v1.0.0
timeout: 300
environment:
IMG_URL: https://cloud-images.ubuntu.com/daily/server/focal/current/focal-server-cloudimg-amd64.img
DEST_DISK: /dev/sda
- name: "stream ubuntu"
image: quay.io/tinkerbell/actions/qemuimg2disk:latest
timeout: 300
environment:
IMG_URL: https://cloud-images.ubuntu.com/daily/server/focal/current/focal-server-cloudimg-amd64.img
DEST_DISK: /dev/sda
```
Loading

0 comments on commit 23334e4

Please sign in to comment.