Merge lp:~xfactor973/openstack-mojo-specs/gluster into lp:openstack-mojo-specs

Proposed by Chris Holcombe
Status: Merged
Merged at revision: 286
Proposed branch: lp:~xfactor973/openstack-mojo-specs/gluster
Merge into: lp:openstack-mojo-specs
Diff against target: 101 lines (+62/-0)
5 files modified
helper/bundles/gluster-default.yaml (+12/-0)
helper/collect/collect-gluster-default (+1/-0)
helper/tests/test_gluster.py (+34/-0)
specs/file_storage/gluster/default/3.7/SPEC_INFO.txt (+2/-0)
specs/file_storage/gluster/default/3.7/manifest (+13/-0)
To merge this branch: bzr merge lp:~xfactor973/openstack-mojo-specs/gluster
Reviewer Review Type Date Requested Status
David Ames Pending
Review via email: mp+298845@code.launchpad.net

Description of the change

This adds Gluster into mojo CI testing. I plan on expanding on this so that we can test integration with Gluster as a glance backing store. Mojo is basically my only testing option at this point because Gluster only uses juju storage and amulet doesn't have support for that currently.

To post a comment you must log in.
265. By Chris Holcombe

Clean up lint warnings and add xenial series to testing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'helper/bundles/gluster-default.yaml'
2--- helper/bundles/gluster-default.yaml 1970-01-01 00:00:00 +0000
3+++ helper/bundles/gluster-default.yaml 2016-10-07 18:04:15 +0000
4@@ -0,0 +1,12 @@
5+base:
6+ series:
7+ - trusty
8+ - xenial
9+ services:
10+ gluster:
11+ charm: gluster
12+ num_units: 3
13+ storage:
14+ brick: 1,5G
15+ options:
16+ volume_name: test
17
18=== added file 'helper/collect/collect-gluster-default'
19--- helper/collect/collect-gluster-default 1970-01-01 00:00:00 +0000
20+++ helper/collect/collect-gluster-default 2016-10-07 18:04:15 +0000
21@@ -0,0 +1,1 @@
22+gluster git://github.com/cholcombe973/gluster-charm
23
24=== added file 'helper/tests/test_gluster.py'
25--- helper/tests/test_gluster.py 1970-01-01 00:00:00 +0000
26+++ helper/tests/test_gluster.py 2016-10-07 18:04:15 +0000
27@@ -0,0 +1,34 @@
28+#!/usr/bin/python
29+
30+import sys
31+
32+import utils.mojo_utils as mojo_utils
33+
34+
35+def main(argv):
36+ # Mount the storage volume
37+ mojo_utils.remote_run(
38+ 'gluster/0',
39+ 'mkdir /mnt/gluster && mount -t glusterfs localhost:test /mnt/gluster')
40+ mojo_utils.remote_run(
41+ 'gluster/1',
42+ 'mkdir /mnt/gluster && mount -t glusterfs localhost:test /mnt/gluster')
43+ mojo_utils.remote_run(
44+ 'gluster/2',
45+ 'mkdir /mnt/gluster && mount -t glusterfs localhost:test /mnt/gluster')
46+
47+ # Check
48+ mojo_utils.remote_run('gluster/0',
49+ 'echo 123456789 > /mnt/gluster/test_input')
50+
51+ # Check
52+ output = mojo_utils.remote_run('gluster/1', 'cat /mnt/gluster/test_input')
53+
54+ # Cleanup
55+ mojo_utils.remote_run('gluster/2', 'rm /mnt/gluster/test_input')
56+ if output[0].strip() != "123456789":
57+ sys.exit(1)
58+
59+
60+if __name__ == "__main__":
61+ sys.exit(main(sys.argv))
62
63=== added directory 'specs/file_storage'
64=== added directory 'specs/file_storage/gluster'
65=== added directory 'specs/file_storage/gluster/default'
66=== added directory 'specs/file_storage/gluster/default/3.7'
67=== added file 'specs/file_storage/gluster/default/3.7/SPEC_INFO.txt'
68--- specs/file_storage/gluster/default/3.7/SPEC_INFO.txt 1970-01-01 00:00:00 +0000
69+++ specs/file_storage/gluster/default/3.7/SPEC_INFO.txt 2016-10-07 18:04:15 +0000
70@@ -0,0 +1,2 @@
71+This spec deploys a 3 gluster node cluster. It then tests to verify
72+you can write to and read from the cluster.
73
74=== added symlink 'specs/file_storage/gluster/default/3.7/check_juju.py'
75=== target is u'../../../../../helper/tests/check_juju.py'
76=== added symlink 'specs/file_storage/gluster/default/3.7/collect-gluster-default'
77=== target is u'../../../../../helper/collect/collect-gluster-default'
78=== added symlink 'specs/file_storage/gluster/default/3.7/gluster-default.yaml'
79=== target is u'../../../../../helper/bundles/gluster-default.yaml'
80=== added file 'specs/file_storage/gluster/default/3.7/manifest'
81--- specs/file_storage/gluster/default/3.7/manifest 1970-01-01 00:00:00 +0000
82+++ specs/file_storage/gluster/default/3.7/manifest 2016-10-07 18:04:15 +0000
83@@ -0,0 +1,13 @@
84+# Collect the charm branches from Launchpad
85+collect config=collect-gluster-default
86+
87+# Use juju deployer with gluster-default.yaml bundle
88+deploy config=gluster-default.yaml delay=0 wait=True target=base
89+
90+# Check juju statuses are green and that hooks have finished
91+verify config=check_juju.py
92+
93+# Test obj store by sending and recieving files
94+verify config=test_gluster.py
95+
96+# Success
97
98=== added symlink 'specs/file_storage/gluster/default/3.7/test_gluster.py'
99=== target is u'../../../../../helper/tests/test_gluster.py'
100=== added symlink 'specs/file_storage/gluster/default/3.7/utils'
101=== target is u'../../../../../helper/utils'

Subscribers

People subscribed via source and target branches