Skip to content

Commit

Permalink
Merge 'main' into 'forward-jimmctl-changes' (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
ale8k committed Sep 15, 2023
1 parent 161d01d commit 1d1d295
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/access.log
/parts/
/prime/
/snap/.snapcraft/
/snap/
/stage/
/vendor
/version/commit.txt
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ jimm-image:
jimm-snap:
mkdir -p ./snap
cp ./snaps/jimm/snapcraft.yaml ./snap/
snapcraft
snapcraft

jimmctl-snap:
mkdir -p ./snap
cp -R ./snaps/jimmctl/* ./snap/
snapcraft

push-microk8s: jimm-image
docker tag jimm:latest localhost:32000/jimm:latest
Expand Down
9 changes: 8 additions & 1 deletion local/candid/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ identity-providers:
groups:
- group1
- group2
joe:
name: Joe user (non superuser)
email: [email protected]
password: joe
groups:
- group1
- group2
hidden: false
require-mfa: false
require-mfa: false
3 changes: 0 additions & 3 deletions snaps/jimmctl/files/jimmctl.wrapper

This file was deleted.

3 changes: 3 additions & 0 deletions snaps/jimmctl/local/jimmctl.wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

JUJU_DATA=$SNAP_REAL_HOME/.local/share/juju "$SNAP"/bin/jimmctl "$@"
17 changes: 13 additions & 4 deletions snaps/jimmctl/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
name: jimmctl
version: git
summary: JAAS client
description: Client for controlling JAAS multi-cloud juju controllers.
version: git
grade: stable
base: core20
confinement: strict

plugs:
# We use personal-files instead of the home interface
# as the home interface does not permit access to hidden files/directories.
# See: https://askubuntu.com/questions/1238211/how-to-make-snaps-access-hidden-files-and-folders-in-home
# And: https://snapcraft.io/docs/personal-files-interface
#
# The personal-files interface is also a none auto-connect, and must
# typically be connected via: snap connect jimmctl:dot-local-share-juju
#
# In our scenario, we are going to request auto-connect.
dot-local-share-juju:
interface: personal-files
read:
- $HOME/.local/share/juju
- $HOME/.local/share/juju/cookies

apps:
jimmctl:
Expand All @@ -19,7 +29,6 @@ apps:
- dot-local-share-juju
- network


parts:
jimmctl:
plugin: go
Expand All @@ -31,9 +40,9 @@ parts:
set -e
go install -mod readonly -ldflags '-linkmode=external' github.com/canonical/jimm/cmd/jimmctl
files:
wrapper:
plugin: dump
source: snaps/jimmctl/files/
source: snaps/jimmctl/local/
source-type: local
organize:
jimmctl.wrapper: bin/wrappers/jimmctl
Expand Down

0 comments on commit 1d1d295

Please sign in to comment.