From e139d7efdc179c430c78a4c384a55e3f425d8c83 Mon Sep 17 00:00:00 2001 From: Kian Parvin Date: Tue, 7 Nov 2023 14:29:26 +0200 Subject: [PATCH] Local setup improvements --- local/README.md | 16 +++++++++------- local/jimm/setup-controller.sh | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/local/README.md b/local/README.md index 48cca61c2..743d4a894 100644 --- a/local/README.md +++ b/local/README.md @@ -6,13 +6,15 @@ used for integration testing within the JIMM test suite. # Starting the environment 1. Ensure you have docker above v18, confirm this with `docker --version` -2. Ensure you are in the root JIMM directory. -3. Run `make pull/candid` to get a local image of candid (this is subject to change!) -4. Run `cd local/traefik/certs; ./certs.sh; cd -`, this will setup some self signed certs and add them to your cert pool. -5. Run `touch ./local/vault/approle.json && touch ./local/vault/roleid.txt` -6. Run `make version/commit.txt && make version/version.txt` to populate the repo with the git commit and version info. -7. Run `go mod vendor` to vendor JIMM's dependencies and reduce repeated setup time. -8. `docker compose --profile dev up` if you encounter an error like "Error response from daemon: network ... not found" then the command `docker compose --profile dev up --force-recreate` should help. +2. Ensure you have Go installed, confirm this with `go version` or install it with `sudo snap install go --classic` +3. Install build-essentials to build the jimmctl tool (this tool is used to communicate with the JIMM server), `sudo apt install -y build-essential` +4. Ensure you are in the root JIMM directory. +5. Run `make pull/candid` to get a local image of candid (this is subject to change!) +6. Run `cd local/traefik/certs; ./certs.sh; cd -`, this will setup some self signed certs and add them to your cert pool. +7. Run `touch ./local/vault/approle.json && touch ./local/vault/roleid.txt` +8. Run `make version/commit.txt && make version/version.txt` to populate the repo with the git commit and version info. +9. Run `go mod vendor` to vendor JIMM's dependencies and reduce repeated setup time. +10. `docker compose --profile dev up` if you encounter an error like "Error response from daemon: network ... not found" then the command `docker compose --profile dev up --force-recreate` should help. After this initial setup, subsequent use of the compose can be done with `docker compose --profile dev up --force-recreate` diff --git a/local/jimm/setup-controller.sh b/local/jimm/setup-controller.sh index c9eaf407e..a18833ec9 100755 --- a/local/jimm/setup-controller.sh +++ b/local/jimm/setup-controller.sh @@ -24,4 +24,3 @@ printf "$CLOUDINIT_TEMPLATE" "$(lxc network get lxdbr0 ipv4.address | cut -f1 -d echo "Bootstrapping controller" juju bootstrap localhost "${CONTROLLER_NAME}" --config allow-model-access=true --config "${CLOUDINIT_FILE}" --config login-token-refresh-url=https://jimm.localhost/.well-known/jwks.json -CONTROLLER_ID=$(juju show-controller --format json | jq --arg name "${CONTROLLER_NAME}" '.[$name]."controller-machines"."0"."instance-id"' | tr -d '"')