mirror of
https://github.com/Luzifer/hetzner-alpine-k8s.git
synced 2024-12-21 02:11:19 +00:00
Initial setup
This commit is contained in:
commit
3650886da2
5 changed files with 133 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
config.json
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "alpine-on-hetzner"]
|
||||
path = alpine-on-hetzner
|
||||
url = https://github.com/MathiasPius/alpine-on-hetzner.git
|
29
Makefile
Normal file
29
Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
ALPINE_VERSION:=3.17.0
|
||||
PACKER_VERSION:=1.8.4-r2
|
||||
ANSIBLE_CORE_VERSION:=2.13.6-r0
|
||||
JQ_VERSION:=1.6-r2
|
||||
|
||||
export DOCKER_BUILDKIT:=1
|
||||
|
||||
default:
|
||||
|
||||
config.json:
|
||||
yq -S . config.yaml >config.json
|
||||
|
||||
create-snapshot: docker-build config.json
|
||||
envrun -- docker run --rm -i \
|
||||
-e "HCLOUD_TOKEN" \
|
||||
-v "$(CURDIR):/config:ro" \
|
||||
registry.local/alpine-on-hetzner:latest \
|
||||
/config/config.json
|
||||
|
||||
docker-build:
|
||||
docker build \
|
||||
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
|
||||
--build-arg PACKER_VERSION=$(PACKER_VERSION) \
|
||||
--build-arg ANSIBLE_CORE_VERSION=$(ANSIBLE_CORE_VERSION) \
|
||||
--build-arg JQ_VERSION=$(JQ_VERSION) \
|
||||
-t registry.local/alpine-on-hetzner \
|
||||
./alpine-on-hetzner
|
||||
|
||||
.PHONY: config.json
|
1
alpine-on-hetzner
Submodule
1
alpine-on-hetzner
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1d21f3e35c65bcef267c0f98144d3e5d4ab3c4a3
|
99
config.yaml
Normal file
99
config.yaml
Normal file
|
@ -0,0 +1,99 @@
|
|||
---
|
||||
|
||||
apk_tools_version: v2.12.10
|
||||
apk_tools_arch: x86_64
|
||||
apk_tools_url: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic//{{ apk_tools_version }}/{{ apk_tools_arch }}/apk.static
|
||||
apk_tools_checksum: sha256:d7506bb11327b337960910daffed75aa289d8bb350feab624c52965be82ceae8
|
||||
|
||||
alpine_version: edge
|
||||
alpine_mirror: http://dl-cdn.alpinelinux.org/alpine
|
||||
alpine_repositories: [ main, community, testing ]
|
||||
|
||||
boot_size: +100m
|
||||
root_size: '0'
|
||||
hostname: alpine-k8s
|
||||
|
||||
packages:
|
||||
# Alpine base system
|
||||
openssh: ''
|
||||
syslinux: ''
|
||||
linux-virt: ''
|
||||
cloud-init: '@community'
|
||||
|
||||
# K8s requirements
|
||||
open-iscsi: ''
|
||||
open-iscsi-openrc: ''
|
||||
|
||||
cni-plugin-flannel: '@community'
|
||||
cni-plugins: '@community'
|
||||
flannel: '@testing'
|
||||
flannel-contrib-cni: '@testing'
|
||||
docker: '@community'
|
||||
uuidgen: ''
|
||||
nfs-utils: ''
|
||||
|
||||
kubelet: '@testing=1.25.0-r4'
|
||||
kubeadm: '@testing=1.25.0-r4'
|
||||
kubectl: '@testing=1.25.0-r4'
|
||||
|
||||
services:
|
||||
devfs: sysinit
|
||||
dmesg: sysinit
|
||||
mdev: sysinit
|
||||
hwdrivers: sysinit
|
||||
|
||||
hwclock: boot
|
||||
modules: boot
|
||||
sysctl: boot
|
||||
hostname: boot
|
||||
bootmisc: boot
|
||||
syslog: boot
|
||||
networking: boot
|
||||
|
||||
mount-ro: shutdown
|
||||
killprocs: shutdown
|
||||
savecache: shutdown
|
||||
|
||||
sshd: default
|
||||
|
||||
# K8s requirements
|
||||
docker: default
|
||||
iscsid: default
|
||||
kubelet: default
|
||||
ntpd: default
|
||||
|
||||
nameservers:
|
||||
- 185.12.64.1
|
||||
- 185.12.64.2
|
||||
- 2a01:4ff:ff00::add:1
|
||||
- 2a01:4ff:ff00::add:2
|
||||
|
||||
sysctl: {}
|
||||
|
||||
extlinux_modules:
|
||||
- ext4
|
||||
|
||||
kernel_features:
|
||||
- base
|
||||
- ext4
|
||||
- keymap
|
||||
- virtio
|
||||
|
||||
kernel_modules:
|
||||
- ipv6
|
||||
- af_packet
|
||||
|
||||
default_kernel_opts:
|
||||
- quiet
|
||||
|
||||
chroot_commands:
|
||||
# kernel stuff
|
||||
- 'echo "br_netfilter" >/etc/modules-load.d/k8s.conf'
|
||||
- 'echo "net.bridge.bridge-nf-call-iptables=1" >>/etc/sysctl.conf'
|
||||
|
||||
# Fix prometheus errors
|
||||
- 'echo -e "#!/bin/sh\nmount --make-rshared /" >/etc/local.d/sharemetrics.start'
|
||||
- 'chmod +x /etc/local.d/sharemetrics.start'
|
||||
- 'rc-update add local'
|
||||
|
||||
...
|
Loading…
Reference in a new issue