Merge lp:~mbruzek/charms/precise/tomcat/trunk into lp:charms/tomcat

Proposed by Matt Bruzek
Status: Merged
Merged at revision: 15
Proposed branch: lp:~mbruzek/charms/precise/tomcat/trunk
Merge into: lp:charms/tomcat
Diff against target: 96 lines (+18/-14)
4 files modified
hooks/webapp-container-relation-joined (+6/-0)
hooks/webapp-relation-joined (+0/-6)
metadata.yaml (+6/-2)
tests/10-configured-deploy.py (+6/-6)
To merge this branch: bzr merge lp:~mbruzek/charms/precise/tomcat/trunk
Reviewer Review Type Date Requested Status
Kevin W Monroe Approve
Cory Johns (community) Approve
Review via email: mp+284188@code.launchpad.net

Description of the change

A user suggested a different relation name that makes more sense.

This involved updating the metadata.yaml and renaming the relation file.

I also updated the tests to run with our latest best practices.

To post a comment you must log in.
Revision history for this message
Cory Johns (johnsca) wrote :

LGTM

review: Approve
Revision history for this message
Matt Bruzek (mbruzek) wrote :
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

LGTM, merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'hooks/webapp-container-relation-joined'
--- hooks/webapp-container-relation-joined 1970-01-01 00:00:00 +0000
+++ hooks/webapp-container-relation-joined 2016-01-27 22:05:19 +0000
@@ -0,0 +1,6 @@
1#!/bin/bash
2
3set -ex
4
5VERSION=`config-get tomcat_version`
6relation-set webapp-path /var/lib/$VERSION/webapps
07
=== removed file 'hooks/webapp-relation-joined'
--- hooks/webapp-relation-joined 2015-01-22 23:19:37 +0000
+++ hooks/webapp-relation-joined 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1#!/bin/bash
2
3set -ex
4
5VERSION=`config-get tomcat_version`
6relation-set webapp-path /var/lib/$VERSION/webapps
70
=== modified file 'metadata.yaml'
--- metadata.yaml 2015-01-22 23:19:37 +0000
+++ metadata.yaml 2016-01-27 22:05:19 +0000
@@ -6,11 +6,15 @@
6 JavaServer Pages (JSP) specifications, and provides a "pure Java" HTTP6 JavaServer Pages (JSP) specifications, and provides a "pure Java" HTTP
7 web server environment for Java web applications to run.7 web server environment for Java web applications to run.
88
9categories: ["app-servers"]9tags:
10 - application_development
11 - java
12 - webapp
13
10provides:14provides:
11 website:15 website:
12 interface: http16 interface: http
13 webapp:17 webapp-container:
14 interface: java-webapp18 interface: java-webapp
15 scope: container19 scope: container
16requires:20requires:
1721
=== modified file 'tests/10-configured-deploy.py'
--- tests/10-configured-deploy.py 2014-10-10 08:56:18 +0000
+++ tests/10-configured-deploy.py 2016-01-27 22:05:19 +0000
@@ -55,7 +55,7 @@
55 'cluster_enabled': True55 'cluster_enabled': True
56}56}
5757
58d = amulet.Deployment()58d = amulet.Deployment(series='precise')
59# Add the tomcat charm to the deployment.59# Add the tomcat charm to the deployment.
60d.add('tomcat', units=scale)60d.add('tomcat', units=scale)
61d.add('memcached')61d.add('memcached')
@@ -83,18 +83,18 @@
83 raise83 raise
8484
85# Get the sentry unit for tomcat0.85# Get the sentry unit for tomcat0.
86tomcat_unit = d.sentry.unit['tomcat/0']86tomcat_unit = d.sentry['tomcat'][0]
87# Get the public address for tomcat0.87# Get the public address for tomcat0.
88tomcat0_address = tomcat_unit.info['public-address']88tomcat0_address = tomcat_unit.info['public-address']
89# Get the terracotta unit.89# Get the terracotta unit.
90terracotta_unit = d.sentry.unit['terracotta/0']90terracotta_unit = d.sentry['terracotta'][0]
91# Get the relation to terracotta.91# Get the relation to terracotta.
92terracotta_relation = terracotta_unit.relation('dso', 'tomcat:jndi-terracotta')92terracotta_relation = terracotta_unit.relation('dso', 'tomcat:jndi-terracotta')
93# Get the private address of terracotta to ensure the relation has that data.93# Get the private address of terracotta to ensure the relation has that data.
94terracotta_private_address = terracotta_relation['private-address']94terracotta_private_address = terracotta_relation['private-address']
95print("terracotta private address " + terracotta_private_address)95print("terracotta private address " + terracotta_private_address)
96# Get the memcached unit.96# Get the memcached unit.
97memcached_unit = d.sentry.unit['memcached/0']97memcached_unit = d.sentry['memcached'][0]
98# Get the relation to memcached.98# Get the relation to memcached.
99memcached_relation = memcached_unit.relation('cache', 'tomcat:jndi-memcached')99memcached_relation = memcached_unit.relation('cache', 'tomcat:jndi-memcached')
100# Get the private address of memcached to ensure the relation has that data.100# Get the private address of memcached to ensure the relation has that data.
@@ -118,7 +118,7 @@
118tomcat1_address = address.decode().rstrip('\n')118tomcat1_address = address.decode().rstrip('\n')
119119
120###############################################################################120###############################################################################
121## Read the /etc/tomcatX/default file to verifiy configuration settings.121## Read the /etc/tomcatX/default file to verify configuration settings.
122###############################################################################122###############################################################################
123# Read in the default file from the tomcat unit.123# Read in the default file from the tomcat unit.
124default_tomcat = tomcat_unit.file_contents('/etc/default/{0}'.format(124default_tomcat = tomcat_unit.file_contents('/etc/default/{0}'.format(
@@ -169,7 +169,7 @@
169static_member = server_xml[index:].split('\n')[0]169static_member = server_xml[index:].split('\n')[0]
170print(static_member)170print(static_member)
171print(tomcat1_address)171print(tomcat1_address)
172# Search for tomcat1 address in the tomcat0 server.xml to verifiy clustered.172# Search for tomcat1 address in the tomcat0 server.xml to verify clustered.
173static_member.index(tomcat1_address)173static_member.index(tomcat1_address)
174174
175###############################################################################175###############################################################################

Subscribers

People subscribed via source and target branches

to all changes: