From 1bf49f199bce806d987fe465eb9a5c586cea7875 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Wed, 30 Mar 2022 12:21:58 +0100 Subject: [PATCH] Remove references to HOSTNAME as it's not required --- README.md | 6 ++---- docker-compose.yaml | 1 - docker-entrypoint.sh | 7 ------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7a392df..e08abdf 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,8 @@ Distributed & E2EE self-hosting. The goal is to have nodes voluntarily join the 1. Clone the repo. 2. Create a directory to hold the config and certificates. 3. Copy `node-config.yaml` as `config.yaml` in the new directory. -4. Update the `docker-compose.yaml` to... - 1. Set the `hostname` value. - 2. Bind mount the newly created directory to `/etc/nebula`. +4. Update the `docker-compose.yaml` to bind mount the newly created directory to `/etc/nebula`. 5. Run the container with `docker-compose up -d`. This will create two files, `host.key` and `host.csr`. -6. Send the contents of the `host.csr` file and your chosen hostname to a cluster admin to sign. +6. Send the contents of the `host.csr` file to a cluster admin to sign. 7. The signed certificate should go alongside the `host.csr` file and be called, `host.crt`. 8. Start the container again and it should find the config and certificates and then connect to the existing cluster. diff --git a/docker-compose.yaml b/docker-compose.yaml index 02b88e9..fb5c661 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,6 @@ version: "3" services: nebula: container_name: infranet - hostname: __HOSTNAME__ image: dcr.wallace.sh/scott/infranet:latest volumes: - /path/to/infranet/config:/etc/nebula diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 304dca6..e728173 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -3,12 +3,6 @@ ARCH=$(uname -m) BIN_DIR=/app/linux-${ARCH} DATA_DIR=/etc/nebula -HOSTNAME=$(hostname) - -if test "${HOSTNAME}" == '__HOSTNAME__'; then - echo 'You did not set a hostname for the Docker container' - exit 2 -fi # --------------------- TESTING ONLY ------------------------ # Build host certs if they don't exist @@ -18,7 +12,6 @@ if ! test -f ${DATA_DIR}/host.crt; then "${BIN_DIR}/nebula-cert" keygen -out-key host.key -out-pub host.csr # shellcheck disable=SC2016 echo 'You will need to get the `host.csr` file signed by a cluster admin' - echo "Provide them with the hostname (${HOSTNAME}) and the \`host.csr\` file" exit 3 else # shellcheck disable=SC2016