Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ifeulner/packer-hcloud-microos
Build a MicroOS snapshot for Hetzner Cloud
https://github.com/ifeulner/packer-hcloud-microos
hcloud hetzner-cloud microos packer suse
Last synced: 22 days ago
JSON representation
Build a MicroOS snapshot for Hetzner Cloud
- Host: GitHub
- URL: https://github.com/ifeulner/packer-hcloud-microos
- Owner: ifeulner
- License: mit
- Created: 2022-11-12T14:10:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-13T07:18:43.000Z (about 2 years ago)
- Last Synced: 2024-10-12T22:35:27.479Z (about 1 month ago)
- Topics: hcloud, hetzner-cloud, microos, packer, suse
- Language: HCL
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SuSE MicroOS image snapshot on Hetzner Cloud
Create an MicroOS-based snapshot on [Hetzner Cloud](https://www.hetzner.com/cloud) using [packer](https://www.packer.io).
## Installing
On macOS just use [brew](https://brew.sh):
```bash
brew install packer
```For other OSes and more details see the [packer documentation](https://developer.hashicorp.com/packer).
## Building
Get an API token for your hcloud project (see [here](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/)) and run `packer build`.
```bash
export HCLOUD_TOKEN=
packer build hcloud-microos-snapshot.pkr.hcl
```The snapshot is created in your project and can then be used.
## Using the snapshotYou can refere to the snapshot by using it's ID.
```bash
# list the snapshot by using it's label
> hcloud image list -l microos-snapshot
ID TYPE NAME DESCRIPTION IMAGE SIZE DISK SIZE CREATED DEPRECATED
88945574 snapshot - microos-snapshot 0.38 GB 40 GB Sat Nov 12 14:28:08 CET 2022 -# retrieve just the ID
> hcloud image list -o noheader -o "columns=id" -l microos-snapshot
88945574# create a server based on this snapshot. Ensure you provide an SSH-Key as
# MicroOS does not allow login via password
> hcloud server create --image 88945574 --type cx21 --name MicroOS-test --ssh-key k3s
1m1s [===================================] 100.00%
Waiting for server 25527457 to have started
... done
Server 25527457 created
IPv4: 95.217.214.186
IPv6: 2a01:4f9:c010:3e1c::1
IPv6 Network: 2a01:4f9:c010:3e1c::/64```