Merge lp:~bigdata-dev/charms/trusty/apache-zeppelin/trunk into lp:charms/trusty/apache-zeppelin

Proposed by Cory Johns
Status: Merged
Merged at revision: 20
Proposed branch: lp:~bigdata-dev/charms/trusty/apache-zeppelin/trunk
Merge into: lp:charms/trusty/apache-zeppelin
Diff against target: 243 lines (+29/-155)
7 files modified
README.md (+1/-1)
resources.yaml (+2/-2)
tests/00-setup (+0/-8)
tests/01-basic-deployment.py (+26/-0)
tests/100-deploy-spark-hdfs-yarn (+0/-62)
tests/remote/test_dist_config.py (+0/-72)
tests/tests.yaml (+0/-10)
To merge this branch: bzr merge lp:~bigdata-dev/charms/trusty/apache-zeppelin/trunk
Reviewer Review Type Date Requested Status
Kevin W Monroe Approve
Review via email: mp+273429@code.launchpad.net

Description of the change

Remove trivial test in favor of bundle tests.

To post a comment you must log in.
38. By Cory Johns

Re-added trivial test

39. By Cory Johns

Update mailing list

40. By Cory Johns

Switch to S3 for zeppelin binaries

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

LGTM, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2015-08-25 02:14:22 +0000
3+++ README.md 2015-10-06 20:45:04 +0000
4@@ -70,7 +70,7 @@
5
6 ## Contact Information
7
8-- <bigdata-dev@lists.launchpad.net>
9+- <bigdata@lists.ubuntu.com>
10
11
12 ## Help
13
14=== modified file 'resources.yaml'
15--- resources.yaml 2015-08-25 02:14:22 +0000
16+++ resources.yaml 2015-10-06 20:45:04 +0000
17@@ -7,10 +7,10 @@
18 pypi: jujubigdata>=4.0.0,<5.0.0
19 optional_resources:
20 zeppelin-ppc64le:
21- url: https://git.launchpad.net/bigdata-data/plain/apache/ppc64le/zeppelin-0.5.0-SNAPSHOT.tar.gz?id=c34a21c939f5fce9ab89b95d65fe2df50e7bbab0
22+ url: https://s3.amazonaws.com/jujubigdata/apache/ppc64le/zeppelin-0.5.0-SNAPSHOT-817f57d.tar.gz
23 hash: 817f57d58e2ad84d195ea82008692bad270c23e30fc95e7f971708fa52b5408e
24 hash_type: sha256
25 zeppelin-x86_64:
26- url: https://git.launchpad.net/bigdata-data/plain/apache/x86_64/zeppelin-0.5.0-SNAPSHOT.tar.gz?id=c34a21c939f5fce9ab89b95d65fe2df50e7bbab0
27+ url: https://s3.amazonaws.com/jujubigdata/apache/x86_64/zeppelin-0.5.0-SNAPSHOT-de32cc4.tar.gz
28 hash: de32cc4ebdf0ca54fff975ab0b2810d42b0a939fa4ec0757152f1e52989d1afc
29 hash_type: sha256
30
31=== added directory 'tests'
32=== removed directory 'tests'
33=== removed file 'tests/00-setup'
34--- tests/00-setup 2015-09-16 20:23:04 +0000
35+++ tests/00-setup 1970-01-01 00:00:00 +0000
36@@ -1,8 +0,0 @@
37-#!/bin/bash
38-
39-if ! dpkg -s amulet &> /dev/null; then
40- echo Installing Amulet...
41- sudo add-apt-repository -y ppa:juju/stable
42- sudo apt-get update
43- sudo apt-get -y install amulet
44-fi
45
46=== added file 'tests/01-basic-deployment.py'
47--- tests/01-basic-deployment.py 1970-01-01 00:00:00 +0000
48+++ tests/01-basic-deployment.py 2015-10-06 20:45:04 +0000
49@@ -0,0 +1,26 @@
50+#!/usr/bin/env python3
51+
52+import unittest
53+import amulet
54+
55+
56+class TestDeploy(unittest.TestCase):
57+ """
58+ Trivial deployment test for Apache Zeppelin.
59+
60+ This charm cannot do anything useful by itself, so integration testing
61+ is done in the bundle.
62+ """
63+
64+ def test_deploy(self):
65+ self.d = amulet.Deployment(series='trusty')
66+ self.d.add('spark', 'apache-spark')
67+ self.d.add('zeppelin', 'apache-zeppelin')
68+ self.d.relate('spark:spark', 'zeppelin:spark')
69+ self.d.setup(timeout=900)
70+ self.d.sentry.wait(timeout=1800)
71+ self.unit = self.d.sentry['zeppelin'][0]
72+
73+
74+if __name__ == '__main__':
75+ unittest.main()
76
77=== removed file 'tests/100-deploy-spark-hdfs-yarn'
78--- tests/100-deploy-spark-hdfs-yarn 2015-09-22 03:48:01 +0000
79+++ tests/100-deploy-spark-hdfs-yarn 1970-01-01 00:00:00 +0000
80@@ -1,62 +0,0 @@
81-#!/usr/bin/env python3
82-
83-import unittest
84-import amulet
85-
86-
87-class TestDeploy(unittest.TestCase):
88- """
89- Deployment test for Apache Spark+Zeppelin using HDFS as shared storage
90- and YARN as cluster job manager.
91- """
92-
93- @classmethod
94- def setUpClass(cls):
95- cls.d = amulet.Deployment(series='trusty')
96- # Deploy a hadoop cluster
97- cls.d.add('yarn-master', charm='cs:trusty/apache-hadoop-yarn-master')
98- cls.d.add('hdfs-master', charm='cs:trusty/apache-hadoop-hdfs-master')
99- cls.d.add('compute-slave', charm='cs:trusty/apache-hadoop-compute-slave', units=3)
100- cls.d.add('plugin', charm='cs:trusty/apache-hadoop-plugin')
101- cls.d.relate('yarn-master:namenode', 'hdfs-master:namenode')
102- cls.d.relate('compute-slave:nodemanager', 'yarn-master:nodemanager')
103- cls.d.relate('compute-slave:datanode', 'hdfs-master:datanode')
104- cls.d.relate('plugin:resourcemanager', 'yarn-master:resourcemanager')
105- cls.d.relate('plugin:namenode', 'hdfs-master:namenode')
106-
107- # Add Spark Service
108- cls.d.add('spark', charm='cs:trusty/apache-spark')
109- cls.d.relate('spark:hadoop-plugin', 'plugin:hadoop-plugin')
110-
111- # Add Apache Zeppelin
112- cls.d.add('zeppelin', charm='cs:trusty/apache-zeppelin')
113- cls.d.relate('zeppelin:spark', 'spark:spark')
114-
115- cls.d.setup(timeout=3600)
116- cls.d.sentry.wait(timeout=3600)
117- cls.unit = cls.d.sentry.unit['spark/0']
118-
119-###########################################################################
120-# Validate that the Spark HistoryServer is running
121-###########################################################################
122- def test_spark_status(self):
123- o, c = self.unit.run("pgrep -a java | grep HistoryServer")
124- assert c == 0, "Spark HistoryServer not running"
125-
126-###########################################################################
127-# Validate that the Zeppelin process is running
128-###########################################################################
129- def test_zeppelin_status(self):
130- o, c = self.unit.run("pgrep -a java | grep zeppelin")
131- assert c == 0, "Zeppelin daemon not running"
132-
133-###########################################################################
134-# Validate Spark commandline operation - run SparkPi
135-###########################################################################
136- def test_spark_job(self):
137- o, c = self.unit.run("su ubuntu -c '/home/ubuntu/sparkpi.sh'")
138- assert c == 0, "SparkPi test failed: %s" % o
139-
140-
141-if __name__ == '__main__':
142- unittest.main()
143
144=== removed directory 'tests/remote'
145=== removed file 'tests/remote/test_dist_config.py'
146--- tests/remote/test_dist_config.py 2015-08-21 21:52:10 +0000
147+++ tests/remote/test_dist_config.py 1970-01-01 00:00:00 +0000
148@@ -1,72 +0,0 @@
149-#!/usr/bin/env python
150-
151-import grp
152-import os
153-import pwd
154-import unittest
155-
156-from charmhelpers.contrib import bigdata
157-
158-
159-class TestDistConfig(unittest.TestCase):
160- """
161- Test that the ``dist.yaml`` settings were applied properly, such as users, groups, and dirs.
162-
163- This is done as a remote test on the deployed unit rather than a regular
164- test under ``tests/`` because filling in the ``dist.yaml`` requires Juju
165- context (e.g., config).
166- """
167- @classmethod
168- def setUpClass(cls):
169- config = None
170- config_dir = os.environ['JUJU_CHARM_DIR']
171- config_file = 'dist.yaml'
172- if os.path.isfile(os.path.join(config_dir, config_file)):
173- config = os.path.join(config_dir, config_file)
174- if not config:
175- raise IOError('Could not find {} in {}'.format(config_file, config_dir))
176- reqs = ['vendor', 'hadoop_version', 'packages', 'groups', 'users',
177- 'dirs', 'ports']
178- cls.dist_config = bigdata.utils.DistConfig(config, reqs)
179-
180- def test_groups(self):
181- for name in self.dist_config.groups:
182- try:
183- grp.getgrnam(name)
184- except KeyError:
185- self.fail('Group {} is missing'.format(name))
186-
187- def test_users(self):
188- for username, details in self.dist_config.users.items():
189- try:
190- user = pwd.getpwnam(username)
191- except KeyError:
192- self.fail('User {} is missing'.format(username))
193- for groupname in details['groups']:
194- try:
195- group = grp.getgrnam(groupname)
196- except KeyError:
197- self.fail('Group {} referenced by user {} does not exist'.format(
198- groupname, username))
199- if group.gr_gid != user.pw_gid:
200- self.assertIn(username, group.gr_mem, 'User {} not in group {}'.format(
201- username, groupname))
202-
203- def test_dirs(self):
204- for name, details in self.dist_config.dirs.items():
205- dirpath = self.dist_config.path(name)
206- self.assertTrue(dirpath.isdir(), 'Dir {} is missing'.format(name))
207- stat = dirpath.stat()
208- owner = pwd.getpwuid(stat.st_uid).pw_name
209- group = grp.getgrgid(stat.st_gid).gr_name
210- perms = stat.st_mode & ~0o40000
211- self.assertEqual(owner, details.get('owner', 'root'),
212- 'Dir {} ({}) has wrong owner: {}'.format(name, dirpath, owner))
213- self.assertEqual(group, details.get('group', 'root'),
214- 'Dir {} ({}) has wrong group: {}'.format(name, dirpath, group))
215- self.assertEqual(perms, details.get('perms', 0o755),
216- 'Dir {} ({}) has wrong perms: 0o{:o}'.format(name, dirpath, perms))
217-
218-
219-if __name__ == '__main__':
220- unittest.main()
221
222=== added file 'tests/tests.yaml'
223--- tests/tests.yaml 1970-01-01 00:00:00 +0000
224+++ tests/tests.yaml 2015-10-06 20:45:04 +0000
225@@ -0,0 +1,3 @@
226+reset: false
227+packages:
228+ - amulet
229
230=== removed file 'tests/tests.yaml'
231--- tests/tests.yaml 2015-06-26 16:46:56 +0000
232+++ tests/tests.yaml 1970-01-01 00:00:00 +0000
233@@ -1,10 +0,0 @@
234-# Driver for bundletester: https://github.com/juju-solutions/bundletester
235-#
236-# It may be useful to alter the defaults during manual testing. For example,
237-# set 'reset: false' to reuse existing charms instead of redeploying them.
238-
239-# Allow bootstrap of current env, default: true
240-bootstrap: true
241-
242-# Use juju-deployer to reset env between test, default: true
243-reset: true

Subscribers

People subscribed via source and target branches