hashipi

Raspberry Pi Test Cluster for HashiCorp Vault, Nomad and Consul
git clone https://git.in0rdr.ch/hashipi.git
Log | Files | Refs | README

commit e66a00162c87fd29c404559d066b9ca71fe42261
parent b4093f852a6ebb1e5edb196de2c393eb5563255d
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Tue, 18 Jan 2022 23:36:32 +0100

remove flasher post-processor

Diffstat:
M.gitmodules | 3---
MREADME.md | 26++++++++++++++++++++++----
Mhashi-pi.json | 8--------
Dpacker-post-processor-flasher | 1-
4 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -1,6 +1,3 @@ [submodule "packer-builder-arm"] path = packer-builder-arm url = https://github.com/mkaczanowski/packer-builder-arm -[submodule "packer-post-processor-flasher"] - path = packer-post-processor-flasher - url = https://github.com/mkaczanowski/packer-post-processor-flasher diff --git a/README.md b/README.md @@ -69,14 +69,32 @@ consul keygen ## Authorized Keys Copy the contents of an openssh pubkey to `authorized_keys` Packer variable. -## Troubleshooting +## Run Packer +Fetch the submodules: ```bash -* Post-processor failed: unexpected EOF +git submodule init +git submodule update ``` -Ensure that the `flash_device_path` exists or comment/disable the [flasher `post-processor`](https://github.com/mkaczanowski/packer-post-processor-flasher) -To [write the resulting image file to the sd card](https://www.raspberrypi.org/documentation/installation/installing-images/linux.md) with `dd` without the "flasher" post-processor: +Build `packer-builder-arm` plugin according to projects instructions and move it to the working directory: +```bash +cd packer-builder-arm-src/ +go build +cd .. +cp packer-builder-arm-src/packer-builder-arm . +``` + +Run packer with a value file to build an image for one host: +```bash +sudo packer build -var-file=hosts/pi0.json hashi-pi.json +``` + +Don't forget to create a new set of [Consul TLS certificates](#Consul) after each run. + +## Write Image to SD Card + +To [write the resulting image file to the sd card](https://www.raspberrypi.org/documentation/installation/installing-images/linux.md) with `dd`: ```bash sudo dd bs=4M if=HashiPi-pi1.img of=/dev/sda status=progress conv=fsync diff --git a/hashi-pi.json b/hashi-pi.json @@ -155,13 +155,5 @@ "type": "shell", "inline": ["mv /etc/resolv.conf.bck /etc/resolv.conf"] } - ], - "post-processors": [ - { - "type": "flasher", - "device": "{{ user `flash_device_path` }}", - "block_size": "4096", - "interactive": true - } ] } \ No newline at end of file diff --git a/packer-post-processor-flasher b/packer-post-processor-flasher @@ -1 +0,0 @@ -Subproject commit 7856deb48d98958299544741fbec09d5e7f9fd9e