Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local setup improvements #1085

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
1 change: 0 additions & 1 deletion local/jimm/setup-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '"')