summaryrefslogtreecommitdiffstats
path: root/base/server
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-04-22 18:33:11 -0400
committerEndi S. Dewata <edewata@redhat.com>2015-04-23 01:08:38 -0400
commit4d3049c36d8e6a5a0c999daaa6fdd856af00525c (patch)
treeea67c617e5a5a08af4e19358cc02f9b860fda83d /base/server
parent982bfec653fc6993839eaacb42dc62a57a7fafd5 (diff)
downloadpki-4d3049c36d8e6a5a0c999daaa6fdd856af00525c.tar.gz
pki-4d3049c36d8e6a5a0c999daaa6fdd856af00525c.tar.xz
pki-4d3049c36d8e6a5a0c999daaa6fdd856af00525c.zip
Added direct deployment for theme.
The deployment tool has been modified to deploy the theme files directly from /usr/share/pki. New deployment descriptors have been added for admin templates and JS library. https://fedorahosted.org/pki/ticket/499
Diffstat (limited to 'base/server')
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/instance_layout.py60
-rw-r--r--base/server/tomcat7/conf/Catalina/localhost/ROOT.xml2
-rw-r--r--base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml30
-rw-r--r--base/server/tomcat7/conf/Catalina/localhost/pki#js.xml30
-rw-r--r--base/server/tomcat7/conf/Catalina/localhost/pki.xml2
-rw-r--r--base/server/tomcat8/conf/Catalina/localhost/ROOT.xml2
-rw-r--r--base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml32
-rw-r--r--base/server/tomcat8/conf/Catalina/localhost/pki#js.xml32
-rw-r--r--base/server/tomcat8/conf/Catalina/localhost/pki.xml2
9 files changed, 163 insertions, 29 deletions
diff --git a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
index 3a4d3faa3..ebcedc2e0 100644
--- a/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
+++ b/base/server/python/pki/server/deployment/scriptlets/instance_layout.py
@@ -60,7 +60,9 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.deploy_webapp(
"ROOT",
os.path.join(
- deployer.mdict['pki_tomcat_common_webapps_path'],
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "server",
+ "webapps",
"ROOT"),
os.path.join(
deployer.mdict['pki_source_server_path'],
@@ -68,18 +70,46 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
"localhost",
"ROOT.xml"))
- # Deploy pki web application
+ # Deploy theme web application
deployer.deploy_webapp(
"pki",
- os.path.join(
- deployer.mdict['pki_tomcat_common_webapps_path'],
- "pki"),
+ deployer.mdict['pki_theme_server_dir'],
os.path.join(
deployer.mdict['pki_source_server_path'],
"Catalina",
"localhost",
"pki.xml"))
+ # Deploy admin templates
+ deployer.deploy_webapp(
+ "pki#admin",
+ os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "server",
+ "webapps",
+ "pki",
+ "admin"),
+ os.path.join(
+ deployer.mdict['pki_source_server_path'],
+ "Catalina",
+ "localhost",
+ "pki#admin.xml"))
+
+ # Deploy JS library
+ deployer.deploy_webapp(
+ "pki#js",
+ os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "server",
+ "webapps",
+ "pki",
+ "js"),
+ os.path.join(
+ deployer.mdict['pki_source_server_path'],
+ "Catalina",
+ "localhost",
+ "pki#js.xml"))
+
# establish Tomcat instance base
deployer.directory.create(deployer.mdict['pki_tomcat_common_path'])
deployer.directory.create(
@@ -99,26 +129,6 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.mdict['pki_instance_lib_log4j_properties'])
deployer.directory.create(deployer.mdict['pki_tomcat_tmpdir_path'])
- # Copy /usr/share/pki/server/webapps to <instance>/common/webapps
- deployer.directory.copy(
- os.path.join(
- config.PKI_DEPLOYMENT_SOURCE_ROOT,
- "server",
- "webapps"),
- deployer.mdict['pki_tomcat_common_webapps_path'])
-
- # If desired and available,
- # copy selected server theme
- # to <instance>/common/webapps/pki
- if config.str2bool(deployer.mdict['pki_theme_enable']) and\
- os.path.exists(deployer.mdict['pki_theme_server_dir']):
- deployer.directory.copy(
- deployer.mdict['pki_theme_server_dir'],
- os.path.join(
- deployer.mdict['pki_tomcat_common_webapps_path'],
- "pki"),
- overwrite_flag=True)
-
deployer.directory.create(deployer.mdict['pki_tomcat_work_path'])
deployer.directory.create(
deployer.mdict['pki_tomcat_work_catalina_path'])
diff --git a/base/server/tomcat7/conf/Catalina/localhost/ROOT.xml b/base/server/tomcat7/conf/Catalina/localhost/ROOT.xml
index ce98bfa4e..2a052f52c 100644
--- a/base/server/tomcat7/conf/Catalina/localhost/ROOT.xml
+++ b/base/server/tomcat7/conf/Catalina/localhost/ROOT.xml
@@ -22,7 +22,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context docBase="/usr/share/pki/server/webapps/ROOT" crossContext="true" allowLinking="true">
<Manager
secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
diff --git a/base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml b/base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
new file mode 100644
index 000000000..e7f2e54a3
--- /dev/null
+++ b/base/server/tomcat7/conf/Catalina/localhost/pki#admin.xml
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- BEGIN COPYRIGHT BLOCK
+ Copyright (C) 2012 Red Hat, Inc.
+ All rights reserved.
+ Modifications: configuration parameters
+ END COPYRIGHT BLOCK
+-->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Context docBase="/usr/share/pki/server/webapps/pki/admin" crossContext="true" allowLinking="true">
+
+ <Manager
+ secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
+
+</Context>
diff --git a/base/server/tomcat7/conf/Catalina/localhost/pki#js.xml b/base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
new file mode 100644
index 000000000..cef2f1c6b
--- /dev/null
+++ b/base/server/tomcat7/conf/Catalina/localhost/pki#js.xml
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- BEGIN COPYRIGHT BLOCK
+ Copyright (C) 2012 Red Hat, Inc.
+ All rights reserved.
+ Modifications: configuration parameters
+ END COPYRIGHT BLOCK
+-->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Context docBase="/usr/share/pki/server/webapps/pki/js" crossContext="true" allowLinking="true">
+
+ <Manager
+ secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
+
+</Context>
diff --git a/base/server/tomcat7/conf/Catalina/localhost/pki.xml b/base/server/tomcat7/conf/Catalina/localhost/pki.xml
index ce98bfa4e..77d1f27b1 100644
--- a/base/server/tomcat7/conf/Catalina/localhost/pki.xml
+++ b/base/server/tomcat7/conf/Catalina/localhost/pki.xml
@@ -22,7 +22,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true" allowLinking="true">
+<Context docBase="/usr/share/pki/common-ui" crossContext="true" allowLinking="true">
<Manager
secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
diff --git a/base/server/tomcat8/conf/Catalina/localhost/ROOT.xml b/base/server/tomcat8/conf/Catalina/localhost/ROOT.xml
index e70dd2055..f7659800c 100644
--- a/base/server/tomcat8/conf/Catalina/localhost/ROOT.xml
+++ b/base/server/tomcat8/conf/Catalina/localhost/ROOT.xml
@@ -22,7 +22,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true">
+<Context docBase="/usr/share/pki/server/webapps/ROOT" crossContext="true">
<Manager
secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
diff --git a/base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml b/base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
new file mode 100644
index 000000000..16db43605
--- /dev/null
+++ b/base/server/tomcat8/conf/Catalina/localhost/pki#admin.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- BEGIN COPYRIGHT BLOCK
+ Copyright (C) 2012 Red Hat, Inc.
+ All rights reserved.
+ Modifications: configuration parameters
+ END COPYRIGHT BLOCK
+-->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Context docBase="/usr/share/pki/server/webapps/pki/admin" crossContext="true">
+
+ <Manager
+ secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
+
+ <Resources allowLinking="true" />
+
+</Context>
diff --git a/base/server/tomcat8/conf/Catalina/localhost/pki#js.xml b/base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
new file mode 100644
index 000000000..9b0903ddf
--- /dev/null
+++ b/base/server/tomcat8/conf/Catalina/localhost/pki#js.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!-- BEGIN COPYRIGHT BLOCK
+ Copyright (C) 2012 Red Hat, Inc.
+ All rights reserved.
+ Modifications: configuration parameters
+ END COPYRIGHT BLOCK
+-->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<Context docBase="/usr/share/pki/server/webapps/pki/js" crossContext="true">
+
+ <Manager
+ secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>
+
+ <Resources allowLinking="true" />
+
+</Context>
diff --git a/base/server/tomcat8/conf/Catalina/localhost/pki.xml b/base/server/tomcat8/conf/Catalina/localhost/pki.xml
index e70dd2055..1e87c1cd5 100644
--- a/base/server/tomcat8/conf/Catalina/localhost/pki.xml
+++ b/base/server/tomcat8/conf/Catalina/localhost/pki.xml
@@ -22,7 +22,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<Context crossContext="true">
+<Context docBase="/usr/share/pki/common-ui" crossContext="true">
<Manager
secureRandomProvider="Mozilla-JSS" secureRandomAlgorithm="pkcs11prng"/>