summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2013-02-05 19:57:38 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2013-02-06 11:02:38 -0500
commitbdf0cac45f0ef9585a19d40999ae328e5a034056 (patch)
tree93c4a787d45a9cedfa27736250cbdab5b52ac949
parentd98679ecc33015fc5787d3110cf003bac7729add (diff)
downloadpki-direct-deployment2.zip
pki-direct-deployment2.tar.gz
pki-direct-deployment2.tar.xz
Deploying webapps from shared folder.direct-deployment2
-rw-r--r--base/ca/shared/conf/Catalina/localhost/ca.xml3
-rw-r--r--base/common/shared/conf/Catalina/localhost/ROOT.xml3
-rw-r--r--base/deploy/src/scriptlets/webapp_deployment.py52
-rw-r--r--base/kra/shared/conf/Catalina/localhost/kra.xml3
-rw-r--r--base/ocsp/shared/conf/Catalina/localhost/ocsp.xml3
-rw-r--r--base/tks/shared/conf/Catalina/localhost/tks.xml3
-rw-r--r--specs/pki-core.spec14
7 files changed, 24 insertions, 57 deletions
diff --git a/base/ca/shared/conf/Catalina/localhost/ca.xml b/base/ca/shared/conf/Catalina/localhost/ca.xml
index 975ecab..bb3fc1b 100644
--- a/base/ca/shared/conf/Catalina/localhost/ca.xml
+++ b/base/ca/shared/conf/Catalina/localhost/ca.xml
@@ -22,7 +22,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context crossContext="true" allowLinking="true"
+ docBase="/usr/share/pki/ca/webapps/ca">
<Valve className="com.netscape.cms.tomcat.SSLAuthenticatorWithFallback" />
diff --git a/base/common/shared/conf/Catalina/localhost/ROOT.xml b/base/common/shared/conf/Catalina/localhost/ROOT.xml
index c29b458..2634dbb 100644
--- a/base/common/shared/conf/Catalina/localhost/ROOT.xml
+++ b/base/common/shared/conf/Catalina/localhost/ROOT.xml
@@ -22,6 +22,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context crossContext="true" allowLinking="true"
+ docBase="/usr/share/pki/server/webapps/ROOT">
</Context>
diff --git a/base/deploy/src/scriptlets/webapp_deployment.py b/base/deploy/src/scriptlets/webapp_deployment.py
index a3b459a..19ff00f 100644
--- a/base/deploy/src/scriptlets/webapp_deployment.py
+++ b/base/deploy/src/scriptlets/webapp_deployment.py
@@ -64,18 +64,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
"localhost"),
overwrite_flag=True)
- # Copy /usr/share/pki/server/webapps/ROOT
- # to <instance>/webapps/ROOT
- util.directory.create(master['pki_tomcat_webapps_root_path'])
- util.directory.copy(
- os.path.join(
- config.PKI_DEPLOYMENT_SOURCE_ROOT,
- "server",
- "webapps",
- "ROOT"),
- master['pki_tomcat_webapps_root_path'],
- overwrite_flag=True)
-
# Copy /usr/share/pki/common-ui
# to <instance>/webapps/pki
util.directory.create(master['pki_tomcat_webapps_common_path'])
@@ -132,46 +120,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
"localhost"),
overwrite_flag=True)
- # Copy /usr/share/pki/<subsystem>/webapps/<subsystem>
- # to <instance>/webapps/<subsystem>
- util.directory.copy(
- os.path.join(
- config.PKI_DEPLOYMENT_SOURCE_ROOT,
- master['pki_subsystem'].lower(),
- "webapps",
- master['pki_subsystem'].lower()),
- master['pki_tomcat_webapps_subsystem_path'],
- overwrite_flag=True)
-
- util.directory.create(
- master['pki_tomcat_webapps_subsystem_webinf_classes_path'])
- util.directory.create(
- master['pki_tomcat_webapps_subsystem_webinf_lib_path'])
- # establish Tomcat webapps subsystem WEB-INF lib symbolic links
- util.symlink.create(master['pki_certsrv_jar'],
- master['pki_certsrv_jar_link'])
- util.symlink.create(master['pki_cmsbundle'],
- master['pki_cmsbundle_jar_link'])
- util.symlink.create(master['pki_cmscore'],
- master['pki_cmscore_jar_link'])
- util.symlink.create(master['pki_cms'],
- master['pki_cms_jar_link'])
- util.symlink.create(master['pki_cmsutil'],
- master['pki_cmsutil_jar_link'])
- util.symlink.create(master['pki_nsutil'],
- master['pki_nsutil_jar_link'])
- if master['pki_subsystem'] == "CA":
- util.symlink.create(master['pki_ca_jar'],
- master['pki_ca_jar_link'])
- elif master['pki_subsystem'] == "KRA":
- util.symlink.create(master['pki_kra_jar'],
- master['pki_kra_jar_link'])
- elif master['pki_subsystem'] == "OCSP":
- util.symlink.create(master['pki_ocsp_jar'],
- master['pki_ocsp_jar_link'])
- elif master['pki_subsystem'] == "TKS":
- util.symlink.create(master['pki_tks_jar'],
- master['pki_tks_jar_link'])
# set ownerships, permissions, and acls
util.directory.set_mode(master['pki_tomcat_webapps_subsystem_path'])
return self.rv
diff --git a/base/kra/shared/conf/Catalina/localhost/kra.xml b/base/kra/shared/conf/Catalina/localhost/kra.xml
index 975ecab..8e8627c 100644
--- a/base/kra/shared/conf/Catalina/localhost/kra.xml
+++ b/base/kra/shared/conf/Catalina/localhost/kra.xml
@@ -22,7 +22,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context crossContext="true" allowLinking="true"
+ docBase="/usr/share/pki/kra/webapps/kra">
<Valve className="com.netscape.cms.tomcat.SSLAuthenticatorWithFallback" />
diff --git a/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml b/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml
index 975ecab..5e8e1e7 100644
--- a/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml
+++ b/base/ocsp/shared/conf/Catalina/localhost/ocsp.xml
@@ -22,7 +22,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context crossContext="true" allowLinking="true"
+ docBase="/usr/share/pki/ocsp/webapps/ocsp">
<Valve className="com.netscape.cms.tomcat.SSLAuthenticatorWithFallback" />
diff --git a/base/tks/shared/conf/Catalina/localhost/tks.xml b/base/tks/shared/conf/Catalina/localhost/tks.xml
index 975ecab..56e4e21 100644
--- a/base/tks/shared/conf/Catalina/localhost/tks.xml
+++ b/base/tks/shared/conf/Catalina/localhost/tks.xml
@@ -22,7 +22,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context crossContext="true" allowLinking="true"
+ docBase="/usr/share/pki/tks/webapps/tks">
<Valve className="com.netscape.cms.tomcat.SSLAuthenticatorWithFallback" />
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index d661f41..058ffe8 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -503,6 +503,20 @@ cd build
cd build
%{__make} install DESTDIR=%{buildroot} INSTALL="install -p"
+# Create links in each webapp
+for subsystem in ca kra ocsp tks
+do
+ %{__mkdir_p} %{buildroot}/usr/share/pki/$subsystem/webapps/$subsystem/WEB-INF/lib
+ cd %{buildroot}/usr/share/pki/$subsystem/webapps/$subsystem/WEB-INF/lib
+ ln -s "%{_javadir}/pki/pki-$subsystem.jar"
+ ln -s "%{_javadir}/pki/pki-certsrv.jar"
+ ln -s "%{_javadir}/pki/pki-cmsbundle.jar"
+ ln -s "%{_javadir}/pki/pki-cmscore.jar"
+ ln -s "%{_javadir}/pki/pki-cms.jar"
+ ln -s "%{_javadir}/pki/pki-cmsutil.jar"
+ ln -s "%{_javadir}/pki/pki-nsutil.jar"
+done
+
# Fedora 18 and 17: Substitute 'tomcat7jss.jar' for 'tomcatjss.jar'
%if 0%{?fedora} <= 18
sed -i -e 's/grant codeBase "file:\/usr\/share\/java\/tomcatjss.jar" {/grant codeBase "file:\/usr\/share\/java\/tomcat7jss.jar" {/' %{buildroot}%{_datadir}/pki/server/conf/pki.policy