diff --git a/.github/workflows/build-snap.yml b/.github/workflows/build-snap.yml index 9e2e984..9718a18 100644 --- a/.github/workflows/build-snap.yml +++ b/.github/workflows/build-snap.yml @@ -66,8 +66,6 @@ jobs: export COLUMNS=256 sudo snap install ${{ needs.build-amd64.outputs.snap }} --dangerous maas-anvil prepare-node-script | bash -x - sudo snap connect maas-anvil:juju-bin juju:juju-bin - sudo snap connect maas-anvil:dot-local-share-juju sg snap_daemon "maas-anvil -v cluster bootstrap --role database --role region --role agent --role haproxy --accept-defaults" - name: Collect juju status if: always() @@ -96,8 +94,6 @@ jobs: # export COLUMNS=256 # sudo snap install ${{ needs.build-arm64.outputs.snap }} --dangerous # maas-anvil prepare-node-script | bash -x - # sudo snap connect maas-anvil:juju-bin juju:juju-bin - # sudo snap connect maas-anvil:dot-local-share-juju # sg snap_daemon "maas-anvil -v cluster bootstrap --role database --role region --role agent --role haproxy --accept-defaults" # - name: Collect juju status # if: always() diff --git a/anvil-python/anvil/commands/prepare_node.py b/anvil-python/anvil/commands/prepare_node.py index 8ba0d89..2323e38 100644 --- a/anvil-python/anvil/commands/prepare_node.py +++ b/anvil-python/anvil/commands/prepare_node.py @@ -73,6 +73,12 @@ # Workaround a bug between snapd and juju mkdir -p $HOME/.local/share mkdir -p $HOME/.config/anvil + +# Connect snap to the Juju snap interface and provide access to Juju directory. +# These actions will allow anvil bootstrap Juju controller and manage the +# Juju model. +sudo snap connect maas-anvil:juju-bin juju:juju-bin +sudo snap connect maas-anvil:dot-local-share-juju """