mirror of
https://github.com/Luzifer/hetzner-alpine-k8s.git
synced 2024-12-21 02:11:19 +00:00
Add a little documentation, make self-contained by downloading tools
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
18d705f49a
commit
24c1842a27
3 changed files with 29 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
||||||
config.json
|
config.json
|
||||||
|
envrun_*
|
||||||
|
yq_*
|
||||||
|
|
25
Makefile
25
Makefile
|
@ -1,17 +1,20 @@
|
||||||
ALPINE_VERSION:=3.17.0
|
ALPINE_VERSION:=3.17
|
||||||
PACKER_VERSION:=1.8.4-r2
|
PACKER_VERSION:=1.8.4-r3
|
||||||
ANSIBLE_CORE_VERSION:=2.13.6-r0
|
ANSIBLE_CORE_VERSION:=2.13.6-r0
|
||||||
JQ_VERSION:=1.6-r2
|
JQ_VERSION:=1.6-r2
|
||||||
|
|
||||||
|
ENVRUN_VERSION:=v0.6.2
|
||||||
|
YQ_VERSION:=v4.31.2
|
||||||
|
|
||||||
export DOCKER_BUILDKIT:=1
|
export DOCKER_BUILDKIT:=1
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
config.json:
|
config.json: yq_$(YQ_VERSION)
|
||||||
yq -ojson . config.yaml | jq -S . >config.json
|
./yq_$(YQ_VERSION) -ojson . config.yaml | jq -S . >config.json
|
||||||
|
|
||||||
create-snapshot: docker-build config.json
|
create-snapshot: docker-build config.json envrun_$(ENVRUN_VERSION)
|
||||||
envrun -- docker run --rm -i \
|
./envrun_$(ENVRUN_VERSION) -- docker run --rm -i \
|
||||||
-e "HCLOUD_TOKEN" \
|
-e "HCLOUD_TOKEN" \
|
||||||
-v "$(CURDIR):/config:ro" \
|
-v "$(CURDIR):/config:ro" \
|
||||||
registry.local/alpine-on-hetzner:latest \
|
registry.local/alpine-on-hetzner:latest \
|
||||||
|
@ -26,4 +29,14 @@ docker-build:
|
||||||
-t registry.local/alpine-on-hetzner \
|
-t registry.local/alpine-on-hetzner \
|
||||||
./alpine-on-hetzner
|
./alpine-on-hetzner
|
||||||
|
|
||||||
|
# --- Tools
|
||||||
|
|
||||||
|
envrun_$(ENVRUN_VERSION):
|
||||||
|
curl -sSfL "https://github.com/Luzifer/envrun/releases/download/$(ENVRUN_VERSION)/envrun_linux_amd64.tar.gz" | tar -xz
|
||||||
|
mv envrun_linux_amd64 $@
|
||||||
|
|
||||||
|
yq_$(YQ_VERSION):
|
||||||
|
curl -sSfLo $@ "https://github.com/mikefarah/yq/releases/download/$(YQ_VERSION)/yq_linux_amd64"
|
||||||
|
chmod +x $@
|
||||||
|
|
||||||
.PHONY: config.json
|
.PHONY: config.json
|
||||||
|
|
8
README.md
Normal file
8
README.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Luzifer / hetzner-alpine-k8s
|
||||||
|
|
||||||
|
This repo contains my configuration for the [MathiasPius/alpine-on-hetzner](https://github.com/MathiasPius/alpine-on-hetzner) build tooling.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
- Create an `.env` file containing an `HCLOUD_TOKEN=someimportanttoken`
|
||||||
|
- Execute `make create-snapshot`
|
Loading…
Reference in a new issue