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

Subscribers

People subscribed via source and target branches

to all changes: