Merge ~woutervb/snap-store-proxy-charm:sync_doc_with_store-admin_register into snap-store-proxy-charm:master

Proposed by Wouter van Bommel
Status: Merged
Approved by: Wouter van Bommel
Approved revision: 3da1eea7206419a90d98778a5bd1292629e56f6b
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~woutervb/snap-store-proxy-charm:sync_doc_with_store-admin_register
Merge into: snap-store-proxy-charm:master
Diff against target: 89 lines (+10/-10)
5 files modified
README.md (+3/-3)
config.yaml (+2/-2)
docs/install.md (+3/-3)
docs/snap-store-proxy-charm docs - index.md (+1/-1)
juju/overlay.yaml.example (+1/-1)
Reviewer Review Type Date Requested Status
Jonathan Hartley (community) Approve
Review via email: mp+416925@code.launchpad.net

Commit message

Remove base64 references for registration_bundle

Since the tools `store-admin` will already output the data in the
correct format for juju config to consume, there is no need for the end
user to do any manipulation. So the documentation is updated to reflect
this.

To post a comment you must log in.
Revision history for this message
Jonathan Hartley (tartley) wrote :

Oooh! Updated docs! :-) Approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/README.md b/README.md
index 9ca4d72..2e2d77c 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ Below is a minimal bundle example that can be used to deploy the charm using juj
19 snap-store-proxy:19 snap-store-proxy:
20 charm: snap-store-proxy-charm20 charm: snap-store-proxy-charm
21 options:21 options:
22 registration_bundle: <content of registration file base64 encoded>22 registration_bundle: <content of registration file>
2323
24 relations:24 relations:
25 - - postgresql:db-admin25 - - postgresql:db-admin
@@ -45,7 +45,7 @@ There are some mandatory config options that have to be configured for the charm
4545
46* **registration_bundle** - A bundle created with a snap called `snapstore-admin`. This tool supports accounts with 2 Factor authentication for Ubuntu One accounts, and contains everything to reproduce the proxy. This is the recommended way to configure the proxy. It is also a required way, if the machine on which the proxy is installed does not have an internet connection to the store. Easiest way to provide this option on the cli is the following:46* **registration_bundle** - A bundle created with a snap called `snapstore-admin`. This tool supports accounts with 2 Factor authentication for Ubuntu One accounts, and contains everything to reproduce the proxy. This is the recommended way to configure the proxy. It is also a required way, if the machine on which the proxy is installed does not have an internet connection to the store. Easiest way to provide this option on the cli is the following:
4747
48 juju config snap-store-proxy registration_bundle=$(cat <path to file created with snapstore-client> | base64)48 juju config snap-store-proxy registration_bundle=$(cat <path to file created with snapstore-client>)
4949
50## Juju resource usage50## Juju resource usage
5151
@@ -62,7 +62,7 @@ An example bundle to do such a deployment will look like the following.
62 snap-store-proxy:62 snap-store-proxy:
63 charm: snap-store-proxy63 charm: snap-store-proxy
64 options:64 options:
65 registration_bundle: <content of registration file base64 encoded>65 registration_bundle: <content of registration file>
66 resources:66 resources:
67 snap-store-proxy: ./snap-store-proxy.snap67 snap-store-proxy: ./snap-store-proxy.snap
68 core: ./core20.snap68 core: ./core20.snap
diff --git a/config.yaml b/config.yaml
index 1a194a6..1bf660f 100644
--- a/config.yaml
+++ b/config.yaml
@@ -8,7 +8,7 @@ options:
8 registration_bundle:8 registration_bundle:
9 default: null9 default: null
10 desciption: |10 desciption: |
11 A bundle created via `snapstore-proxy_registration_bundle` added as a base64 11 Registration file generated via `store-admin`, added as ie \
12 encoded string. ie "$(cat <file> | base64)"12 $(cat <generated file>)
13 type: string13 type: string
1414
diff --git a/docs/install.md b/docs/install.md
index 3f6ba93..e924349 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -56,13 +56,13 @@ can be used for installation.
5656
57In both the installation examples above, the charm still needs to be57In both the installation examples above, the charm still needs to be
58registered. This registration has to be done via the snap `store-admin` and58registered. This registration has to be done via the snap `store-admin` and
59will produce a registration file. This registration file needs to be added,59will produce a registration file. This registration file needs to be added
60encoded using base64, to the charm option called `registration_bundle`.60to the charm option called `registration_bundle`.
6161
62I this file is called `register.json` the following command can be used:62I this file is called `register.json` the following command can be used:
6363
64 juju config snap-store-proxy \64 juju config snap-store-proxy \
65 registration_bundle=$(cat register.json | base64 -w 0)65 registration_bundle=$(cat <output of store-admin register>)
6666
67Obviously this can also be added to the juju deployment bundle, both methods,67Obviously this can also be added to the juju deployment bundle, both methods,
68registering during installation, or after installation, are supported.68registering during installation, or after installation, are supported.
diff --git a/docs/snap-store-proxy-charm docs - index.md b/docs/snap-store-proxy-charm docs - index.md
index ff47ce5..62cb23f 100644
--- a/docs/snap-store-proxy-charm docs - index.md
+++ b/docs/snap-store-proxy-charm docs - index.md
@@ -6,7 +6,7 @@ To get started, deploy the charm in a test environment as follows:
6 juju deploy snap-store-proxy-charm6 juju deploy snap-store-proxy-charm
7 juju relate postgresql:db-admin snap-store-proxy-charm:db-admin7 juju relate postgresql:db-admin snap-store-proxy-charm:db-admin
8 juju config snap-store-proxy-charm registration_bundle=\8 juju config snap-store-proxy-charm registration_bundle=\
9 $(cat <registration bundle> | base64)9 $(cat <registration bundle>)
1010
11For more information on how to obtain a registration bundle [see here](https://snapcraft.io/store-admin).11For more information on how to obtain a registration bundle [see here](https://snapcraft.io/store-admin).
1212
diff --git a/juju/overlay.yaml.example b/juju/overlay.yaml.example
index d6f4220..55b72d7 100644
--- a/juju/overlay.yaml.example
+++ b/juju/overlay.yaml.example
@@ -1,4 +1,4 @@
1applications:1applications:
2 snap-store-proxy:2 snap-store-proxy:
3 options:3 options:
4 registration_bundle: `cat <registation file> | base64`4 registration_bundle: $(`cat <registation file>`)

Subscribers

People subscribed via source and target branches

to all changes: