Merge ~jamesh5979/bootstack-specs:glance-sync-slave-layer into bootstack-specs:master

Proposed by James Hilling
Status: Needs review
Proposed branch: ~jamesh5979/bootstack-specs:glance-sync-slave-layer
Merge into: bootstack-specs:master
Diff against target: 180 lines (+174/-0)
1 file modified
backlog/glance-sync-slave-layer.rst (+174/-0)
Reviewer Review Type Date Requested Status
Jeremy Lounder Pending
Review via email: mp+359021@code.launchpad.net

Commit message

[James Hilling] Glance Sync Slave charm spec

Description of the change

Created Glance Sync Slave charm spec.

To post a comment you must log in.

Unmerged commits

41f83eb... by James Hilling

[James Hilling] Final version of 'glance-sync-slave-layer' spec, ready for review

05671d2... by James Hilling

[James Hilling] Third draft of 'glance-sync-slave-layer' spec

57796b7... by James Hilling

[James Hilling] Second draft of 'glance-sync-slave-layer' spec

5b82c4a... by James Hilling

[James Hilling] First draft of 'glance-sync-slave-layer' spec

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/backlog/glance-sync-slave-layer.rst b/backlog/glance-sync-slave-layer.rst
2new file mode 100644
3index 0000000..2fcf431
4--- /dev/null
5+++ b/backlog/glance-sync-slave-layer.rst
6@@ -0,0 +1,174 @@
7+..
8+ Copyright 2018 Canonical
9+
10+ This work is licensed under a Creative Commons Attribution 3.0
11+ Unported License.
12+ http://creativecommons.org/licenses/by/3.0/legalcode
13+
14+..
15+ This template should be in ReSTructured text. Please do not delete
16+ any of the sections in this template. If you have nothing to say
17+ for a whole section, just write: "None". For help with syntax, see
18+ http://sphinx-doc.org/rest.html To test out your formatting, see
19+ http://www.tele3.cz/jbar/rest/rest.html
20+
21+===============================
22+Glance Sync Slave Layer
23+===============================
24+
25+This spec is intended for the creation of a charm that can sync glance images
26+from a master OpenStack installation to a local OpenStack installation. This
27+will utilize two charms to transfer the images, which will act in a
28+Master/Slave dynamic, (i.e. Host/Client).
29+
30+Problem Description
31+===================
32+
33+Customers sometimes have workflows that require their glance images to be
34+replicated across different OpenStack installations. An application is
35+therefore required that is capable of pulling glance images from one site, and
36+replicating them across to another site. Finally, the images need to get
37+imported into the glance application on the local site.
38+
39+Proposed Change
40+===============
41+
42+We want to create a charm that will act as the 'slave' component within a
43+glance image sync, that can be deployed across multiple OpenStack
44+installations. The name of this charm will be referred to as the Glance Sync
45+Slave, or GSS for short. The GSS must allow OpenStack installations to pull
46+and import glance images across sites, to fulfil a glance image replication.
47+
48+The GSS will pull the images from a 'master' OpenStack installation, using the
49+Glance Sync Master charm, or the GSM for short.
50+
51+The GSM will create a local rsync directory on the master OpenStack
52+installation, where the images can be pulled by the GSS units, using rsync
53+over SSH, that forms the connection between the various OpenStacks to the
54+master OpenStack installation, where the GSM is deployed.
55+
56+The GSS/GSM units will initiate the rsync at regular intervals, by the means of
57+cronjobs. The metadata for the glance images will also need to be rsynced,
58+which will be in the form of a separate json file. The file should contain the
59+md5 checksums for the images that the GSS will use to verify after image
60+transfer, before the image gets importing into the local glance store.
61+
62+The images that get rsynced between OpenStacks must have the same UUIDs
63+between all copies of the image, that is it should be the same across all
64+client and master OpenStack glance instances.
65+
66+The images imported by the GSS application should also reflect any changes
67+made to the images on the master OpenStack installation, (including image
68+deletions). To handle this, if an image deletion occurs on the master
69+OpenStack installation, the GSM should delete the same image from its local
70+rsync directory, which ideally should propagate the changes to the file-system
71+on the GSS, where the images are stored on a local disk. Unfortunately, this
72+will introduce a problem, whereby if there was ever an occasion where an image
73+got accidentally deleted from the master glance instance, and subsequently
74+from the slave, that is after image deletion propagation, then there would be
75+no way to re-add the image back into glance with the same image UUID, without
76+manual database surgery, on both the local and master OpenStack installations.
77+To avoid this, image deletions should not get performed by GSS units.
78+
79+Alternatives
80+------------
81+
82+* One charm could instead be used, acting as both the Glance Sync Master and
83+ the Glance Sync Slave, where a `juju config` parameter could be set to
84+ distinguish what 'mode' the charm should operate in, that is be it master or
85+ slave mode. This will involve a rewrite of the two charms into a single
86+ charm, and as there is currently already work done towards a Master/Slave
87+ implementation of the charm, this method is currently only an alternative.
88+
89+* A bidirectional sync application could be implemented, which could instead
90+ be used to sync images in either direction. You can think of it as each
91+ charm both acting as a master and a slave, simultaneously. This would
92+ require significantly more work to implement, as we already have a lot of
93+ code written for the current Master/Slave charm implementation.
94+
95+Implementation
96+==============
97+
98+Assignee(s)
99+-----------
100+
101+* Primary assignee:
102+
103+ * <woutervb>
104+ * <j.hilling>
105+
106+Gerrit Topic
107+------------
108+
109+* None
110+
111+Work Items
112+----------
113+
114+* Creation of additional functional tests.
115+
116+* Possible merging of both the Glance Sync Master layer and the Glance
117+ Sync Slave layer into a single charm layer that uses `juju config`
118+ parameters to determine whether the charm is going to function as either a
119+ 'master' or a 'slave'.
120+
121+Repositories
122+------------
123+
124+* Two repositories already exist for the Glance Sync application:
125+
126+ * Glance Sync Master: https://launchpad.net/glance-sync-master-layer
127+ * Glance Sync Slave: https://launchpad.net/glance-sync-slave-layer
128+
129+* A new launchpad repository will need to be created if the charms for the
130+ Glance Sync Master and the Glance Sync Slave are to be merged into a single
131+ universal Glance Sync charm.
132+
133+Documentation
134+-------------
135+
136+* There is currently limited documentation available for this charm outside of
137+ the README.md files, located within the Glance Sync Master/Slave layer
138+ project repositories respectively.
139+
140+ If this charm is to make it to the charm store, it will require some form of
141+ additional online documentation.
142+
143+* Wiki documentation is also desirable.
144+
145+* Glance Sync charmers launchpad page:
146+
147+ * Glance Sync Charmers page: https://launchpad.net/~glance-sync-charmers
148+
149+Security
150+--------
151+
152+* The connection between the Glance Sync Master and the Slave units will
153+ utilize an SSH connection, where the Glance Sync Master will host the SSH
154+ server, and the Glance Sync Slave will make up the SSH clients.
155+
156+* For security purposes, the SSH connection should be purposely
157+ command-limited, where the Glance Sync Slaves are authorised via a
158+ `juju config` parameter on the Glance Sync Master.
159+
160+* The Glance Sync Master and Glance Sync Slave applications should also be
161+ deployed into LXD containers, which should add an additional layer of
162+ security via the principles of compartmentalisation.
163+
164+Testing
165+-------
166+
167+* Unit tests.
168+
169+* Integration tests.
170+
171+* Functional tests.
172+
173+* Charmlab deployment.
174+
175+Dependencies
176+============
177+
178+* Glance Sync Master charm.
179+
180+* Customer dependency.

Subscribers

People subscribed via source and target branches

to all changes: