Skip to content

Commit

Permalink
docs: improve Hetzner documentation
Browse files Browse the repository at this point in the history
Add another way to upload an image.

Signed-off-by: PRIHLOP <ilya.prihlop@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
PRIHLOP authored and smira committed Dec 18, 2024
1 parent 7d39b9e commit 6ef2596
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ aliases:
Hetzner Cloud does not support uploading custom images.
You can email their support to get a Talos ISO uploaded by following [issues:3599](https://github.com/siderolabs/talos/issues/3599#issuecomment-841172018) or you can prepare image snapshot by yourself.

There are two options to upload your own.
There are three options to upload your own.

1. Run an instance in rescue mode and replace the system OS with the Talos image
2. Use [Hashicorp packer](https://www.packer.io/docs/builders/hetzner-cloud) to prepare an image
3. Use special utility [hcloud-upload-image](https://github.com/apricote/hcloud-upload-image/)

### Rescue mode

Expand Down Expand Up @@ -145,6 +146,26 @@ export IMAGE_ID=<image-id-in-packer-output>

After doing this, you can find the snapshot in the console interface.

### hcloud-upload-image

Install process described [here](https://github.com/apricote/hcloud-upload-image/?tab=readme-ov-file#getting-started) (you can download binary or build from source, it is also possible to use Docker).

For process simplification you can use this `bash` script:

```bash
#!/usr/bin/env bash
export TALOS_IMAGE_VERSION={{< release >}} # You can change to the current version
export TALOS_IMAGE_ARCH=amd64 # You can change to arm architecture
export HCLOUD_SERVER_ARCH=x86 # HCloud server architecture can be x86 or arm
wget https://factory.talos.dev/image/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/${TALOS_IMAGE_VERSION}/hcloud-${TALOS_IMAGE_ARCH}.raw.xz
hcloud-upload-image upload \
--image-path *.xz \
--architecture $HCLOUD_SERVER_ARCH \
--compression xz
```

After these actions, you can find the snapshot in the console interface.

## Creating a Cluster via the CLI

This section assumes you have the [hcloud console utility](https://community.hetzner.com/tutorials/howto-hcloud-cli) on your local machine.
Expand Down Expand Up @@ -268,6 +289,12 @@ Bootstrap `etcd` on the first control plane node with:
talosctl --talosconfig talosconfig bootstrap
```

After a successful bootstrap, you should see that all the members have joined:

```bash
talosctl --talosconfig talosconfig -n <control-plane-1-IP> get members
```

### Retrieve the `kubeconfig`

At this point we can retrieve the admin `kubeconfig` by running:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ aliases:
Hetzner Cloud does not support uploading custom images.
You can email their support to get a Talos ISO uploaded by following [issues:3599](https://github.com/siderolabs/talos/issues/3599#issuecomment-841172018) or you can prepare image snapshot by yourself.

There are two options to upload your own.
There are three options to upload your own.

1. Run an instance in rescue mode and replace the system OS with the Talos image
2. Use [Hashicorp packer](https://www.packer.io/docs/builders/hetzner-cloud) to prepare an image
3. Use special utility [hcloud-upload-image](https://github.com/apricote/hcloud-upload-image/)

### Rescue mode

Expand Down Expand Up @@ -145,6 +146,26 @@ export IMAGE_ID=<image-id-in-packer-output>

After doing this, you can find the snapshot in the console interface.

### hcloud-upload-image

Install process described [here](https://github.com/apricote/hcloud-upload-image/?tab=readme-ov-file#getting-started) (you can download binary or build from source, it is also possible to use Docker).

For process simplification you can use this `bash` script:

```bash
#!/usr/bin/env bash
export TALOS_IMAGE_VERSION={{< release >}} # You can change to the current version
export TALOS_IMAGE_ARCH=amd64 # You can change to arm architecture
export HCLOUD_SERVER_ARCH=x86 # HCloud server architecture can be x86 or arm
wget https://factory.talos.dev/image/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/${TALOS_IMAGE_VERSION}/hcloud-${TALOS_IMAGE_ARCH}.raw.xz
hcloud-upload-image upload \
--image-path *.xz \
--architecture $HCLOUD_SERVER_ARCH \
--compression xz
```

After these actions, you can find the snapshot in the console interface.

## Creating a Cluster via the CLI

This section assumes you have the [hcloud console utility](https://community.hetzner.com/tutorials/howto-hcloud-cli) on your local machine.
Expand Down Expand Up @@ -268,6 +289,12 @@ Bootstrap `etcd` on the first control plane node with:
talosctl --talosconfig talosconfig bootstrap
```

After a successful bootstrap, you should see that all the members have joined:

```bash
talosctl --talosconfig talosconfig -n <control-plane-1-IP> get members
```

### Retrieve the `kubeconfig`

At this point we can retrieve the admin `kubeconfig` by running:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ aliases:
Hetzner Cloud does not support uploading custom images.
You can email their support to get a Talos ISO uploaded by following [issues:3599](https://github.com/siderolabs/talos/issues/3599#issuecomment-841172018) or you can prepare image snapshot by yourself.

There are two options to upload your own.
There are three options to upload your own.

1. Run an instance in rescue mode and replace the system OS with the Talos image
2. Use [Hashicorp packer](https://www.packer.io/docs/builders/hetzner-cloud) to prepare an image
3. Use special utility [hcloud-upload-image](https://github.com/apricote/hcloud-upload-image/)

### Rescue mode

Expand Down Expand Up @@ -145,6 +146,26 @@ export IMAGE_ID=<image-id-in-packer-output>

After doing this, you can find the snapshot in the console interface.

### hcloud-upload-image

Install process described [here](https://github.com/apricote/hcloud-upload-image/?tab=readme-ov-file#getting-started) (you can download binary or build from source, it is also possible to use Docker).

For process simplification you can use this `bash` script:

```bash
#!/usr/bin/env bash
export TALOS_IMAGE_VERSION={{< release >}} # You can change to the current version
export TALOS_IMAGE_ARCH=amd64 # You can change to arm architecture
export HCLOUD_SERVER_ARCH=x86 # HCloud server architecture can be x86 or arm
wget https://factory.talos.dev/image/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/${TALOS_IMAGE_VERSION}/hcloud-${TALOS_IMAGE_ARCH}.raw.xz
hcloud-upload-image upload \
--image-path *.xz \
--architecture $HCLOUD_SERVER_ARCH \
--compression xz
```

After these actions, you can find the snapshot in the console interface.

## Creating a Cluster via the CLI

This section assumes you have the [hcloud console utility](https://community.hetzner.com/tutorials/howto-hcloud-cli) on your local machine.
Expand Down Expand Up @@ -268,6 +289,12 @@ Bootstrap `etcd` on the first control plane node with:
talosctl --talosconfig talosconfig bootstrap
```

After a successful bootstrap, you should see that all the members have joined:

```bash
talosctl --talosconfig talosconfig -n <control-plane-1-IP> get members
```

### Retrieve the `kubeconfig`

At this point we can retrieve the admin `kubeconfig` by running:
Expand Down

0 comments on commit 6ef2596

Please sign in to comment.