Merge lp:~johnsca/charms/trusty/tomcat/explicit into lp:charms/trusty/tomcat

Proposed by Cory Johns
Status: Merged
Merge reported by: Matt Bruzek
Merged at revision: not available
Proposed branch: lp:~johnsca/charms/trusty/tomcat/explicit
Merge into: lp:charms/trusty/tomcat
Diff against target: 62 lines (+28/-2)
3 files modified
README.md (+17/-0)
hooks/webapp-relation-joined (+6/-0)
metadata.yaml (+5/-2)
To merge this branch: bzr merge lp:~johnsca/charms/trusty/tomcat/explicit
Reviewer Review Type Date Requested Status
Matt Bruzek (community) Approve
Review via email: mp+247363@code.launchpad.net

Description of the change

Added explicit relation for charms to provide webapps to Tomcat.
Added instruction to the README on how to manually deploy webapps.

To post a comment you must log in.
Revision history for this message
Matt Bruzek (mbruzek) wrote :

+1 LGTM

Please recommend the same change for the precise version of tomcat so we can get this for the precise series as well.

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 2014-03-21 15:07:22 +0000
3+++ README.md 2015-01-22 23:31:26 +0000
4@@ -103,6 +103,23 @@
5 # set bio connector
6 juju set tomcat http_connector=bio
7
8+## Deploying a WebApp to Tomcat
9+
10+A webapp can be deployed with the Tomcat charm in one of two ways: it can
11+be provided by another charm, or you can manually upload it.
12+
13+For another charm to provide a webapp, it must be a subordinate charm that
14+supports the `java-webapp` relation.
15+
16+To upload a webapp to Tomcat, simply use the following:
17+
18+ juju scp webapp.war tomcat/0:
19+ juju ssh tomcat/0 'sudo mv webapp.war /var/lib/tomcat7/webapps'
20+
21+(If you changed the version of tomcat being deployed, you will need to adjust
22+the path appropriately.)
23+
24+
25 ## Java Debugger (JDB)
26
27 Remote debugging can be useful for application development and diagnosing
28
29=== added file 'hooks/webapp-relation-joined'
30--- hooks/webapp-relation-joined 1970-01-01 00:00:00 +0000
31+++ hooks/webapp-relation-joined 2015-01-22 23:31:26 +0000
32@@ -0,0 +1,6 @@
33+#!/bin/bash
34+
35+set -ex
36+
37+VERSION=`config-get tomcat_version`
38+relation-set webapp-path /var/lib/$VERSION/webapps
39
40=== modified file 'metadata.yaml'
41--- metadata.yaml 2014-03-21 01:33:15 +0000
42+++ metadata.yaml 2015-01-22 23:31:26 +0000
43@@ -2,14 +2,17 @@
44 summary: Apache Tomcat 6 or 7 Servlet and JSP engine
45 maintainer: Matthew Bruzek <mattew.bruzek@canonical.com>
46 description: |
47- Apache Tomcat is an open source implementation of the Java Servlet and
48- JavaServer Pages (JSP) specifications, and provides a "pure Java" HTTP
49+ Apache Tomcat is an open source implementation of the Java Servlet and
50+ JavaServer Pages (JSP) specifications, and provides a "pure Java" HTTP
51 web server environment for Java web applications to run.
52
53 categories: ["app-servers"]
54 provides:
55 website:
56 interface: http
57+ webapp:
58+ interface: java-webapp
59+ scope: container
60 requires:
61 jndi-memcached:
62 interface: memcache

Subscribers

People subscribed via source and target branches

to all changes: