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
1diff --git a/README.md b/README.md
2index 9ca4d72..2e2d77c 100644
3--- a/README.md
4+++ b/README.md
5@@ -19,7 +19,7 @@ Below is a minimal bundle example that can be used to deploy the charm using juj
6 snap-store-proxy:
7 charm: snap-store-proxy-charm
8 options:
9- registration_bundle: <content of registration file base64 encoded>
10+ registration_bundle: <content of registration file>
11
12 relations:
13 - - postgresql:db-admin
14@@ -45,7 +45,7 @@ There are some mandatory config options that have to be configured for the charm
15
16 * **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:
17
18- juju config snap-store-proxy registration_bundle=$(cat <path to file created with snapstore-client> | base64)
19+ juju config snap-store-proxy registration_bundle=$(cat <path to file created with snapstore-client>)
20
21 ## Juju resource usage
22
23@@ -62,7 +62,7 @@ An example bundle to do such a deployment will look like the following.
24 snap-store-proxy:
25 charm: snap-store-proxy
26 options:
27- registration_bundle: <content of registration file base64 encoded>
28+ registration_bundle: <content of registration file>
29 resources:
30 snap-store-proxy: ./snap-store-proxy.snap
31 core: ./core20.snap
32diff --git a/config.yaml b/config.yaml
33index 1a194a6..1bf660f 100644
34--- a/config.yaml
35+++ b/config.yaml
36@@ -8,7 +8,7 @@ options:
37 registration_bundle:
38 default: null
39 desciption: |
40- A bundle created via `snapstore-proxy_registration_bundle` added as a base64
41- encoded string. ie "$(cat <file> | base64)"
42+ Registration file generated via `store-admin`, added as ie \
43+ $(cat <generated file>)
44 type: string
45
46diff --git a/docs/install.md b/docs/install.md
47index 3f6ba93..e924349 100644
48--- a/docs/install.md
49+++ b/docs/install.md
50@@ -56,13 +56,13 @@ can be used for installation.
51
52 In both the installation examples above, the charm still needs to be
53 registered. This registration has to be done via the snap `store-admin` and
54-will produce a registration file. This registration file needs to be added,
55-encoded using base64, to the charm option called `registration_bundle`.
56+will produce a registration file. This registration file needs to be added
57+to the charm option called `registration_bundle`.
58
59 I this file is called `register.json` the following command can be used:
60
61 juju config snap-store-proxy \
62- registration_bundle=$(cat register.json | base64 -w 0)
63+ registration_bundle=$(cat <output of store-admin register>)
64
65 Obviously this can also be added to the juju deployment bundle, both methods,
66 registering during installation, or after installation, are supported.
67diff --git a/docs/snap-store-proxy-charm docs - index.md b/docs/snap-store-proxy-charm docs - index.md
68index ff47ce5..62cb23f 100644
69--- a/docs/snap-store-proxy-charm docs - index.md
70+++ b/docs/snap-store-proxy-charm docs - index.md
71@@ -6,7 +6,7 @@ To get started, deploy the charm in a test environment as follows:
72 juju deploy snap-store-proxy-charm
73 juju relate postgresql:db-admin snap-store-proxy-charm:db-admin
74 juju config snap-store-proxy-charm registration_bundle=\
75- $(cat <registration bundle> | base64)
76+ $(cat <registration bundle>)
77
78 For more information on how to obtain a registration bundle [see here](https://snapcraft.io/store-admin).
79
80diff --git a/juju/overlay.yaml.example b/juju/overlay.yaml.example
81index d6f4220..55b72d7 100644
82--- a/juju/overlay.yaml.example
83+++ b/juju/overlay.yaml.example
84@@ -1,4 +1,4 @@
85 applications:
86 snap-store-proxy:
87 options:
88- registration_bundle: `cat <registation file> | base64`
89+ registration_bundle: $(`cat <registation file>`)

Subscribers

People subscribed via source and target branches

to all changes: