initial commit

This commit is contained in:
2021-11-05 21:12:47 -07:00
commit 4d6711e92f
4 changed files with 56 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*~

11
README.md Normal file
View File

@@ -0,0 +1,11 @@
Initlal Provisioning
--------------------
- ```git clone https://github.com/hypriot/flash```
- make flash executable and patch it with flash-fix.patch
- download latest Hypriot release from https://github.com/hypriot/image-builder-rpi
- write to SD card: ```sudo ./flash -d /dev/sda -u userdata.yml --hostname k8s00 hypriotos-rpi-v1.12.3.img```
- install SD card in a Raspberry Pi 4
- wait maybe 10 minutes after boot for it to configure and update
documentation for userdata.yml: https://blog.hypriot.com/post/cloud-init-cloud-on-hypriot-x64/

10
flash-fix.patch Normal file
View File

@@ -0,0 +1,10 @@
--- /tmp/flash/flash~ 2021-11-05 20:16:44.000000000 -0700
+++ /tmp/flash/flash 2021-11-05 20:32:51.866897708 -0700
@@ -418,6 +418,7 @@
wait_for_disk() {
echo "Waiting for device $1"
udevadm settle
+ sleep 3
sudo hdparm -z "$1"
}

34
userdata.yml Normal file
View File

@@ -0,0 +1,34 @@
#cloud-config
hostname: k8s01
manage_etc_hosts: true
apt_preserve_sources_list: true
users:
- name: salfter # use any user name you like
primary-group: users
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users,docker,adm,dialout,audio,plugdev,netdev,video
ssh-import-id: None
lock_passwd: true
ssh-authorized-keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJQgbySEtaT8SqZ37tT7S4Z/gZeGH+V5vGZ9i9ELpmU salfter@janeway
package_update: true
package_upgrade: true
package_reboot_if_required: true
packages:
- ntp
locale: "en_US.UTF-8"
timezone: "US/Pacific"
write_files:
- path: "/etc/docker/daemon.json"
owner: "root:root"
content: |
{
"labels": [ "os=linux", "arch=arm64" ],
"experimental": true
}