summaryrefslogtreecommitdiffstats
path: root/testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp
diff options
context:
space:
mode:
authorwangyaoguang <sunshine.wang@huawei.com>2016-04-06 09:49:42 +0800
committerwangyaoguang <sunshine.wang@huawei.com>2016-04-06 10:07:42 +0800
commit922c3005c3e60a1e570bf98589f9ecf9c35bacb9 (patch)
treef62a31eda148d4d557a192e3f343963916e5bc3e /testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp
parent708e3c7eacb563bfe029719bc7f4c7d0c6d233b7 (diff)
add puppet manifests and conf files for rubbos httpd module
1. add two manifests 2. add two configuration files,httpd.conf and workers.properties JIRA: BOTTLENECK-52 Change-Id: Icb651238f597a91ac9b748db487c24959825485c Signed-off-by: wangyaoguang <sunshine.wang@huawei.com>
Diffstat (limited to 'testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp')
-rw-r--r--testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp85
1 files changed, 85 insertions, 0 deletions
diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp b/testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp
new file mode 100644
index 00000000..5d5f3839
--- /dev/null
+++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_httpd/manifests/rubbos_httpd_off.pp
@@ -0,0 +1,85 @@
+#############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+class rubbos_httpd::rubbos_httpd_off {
+
+ include params::rubbos_params
+
+ # Declare some variables
+ $rubbos_app_tools = $params::rubbos_params::rubbos_app_tools
+
+ # Ensure apache2 service is stopped
+ service {'stop apache http server':
+ ensure => stopped,
+ hasstatus => false,
+ status => "ps aux | grep 'bin/httpd.*start$'",
+ start => "${rubbos_app_tools}/apache2/bin/apachectl -f ${rubbos_app_tools}/apache2/conf/httpd.conf -k start",
+ stop => "${rubbos_app_tools}/apache2/bin/apachectl -f ${rubbos_app_tools}/apache2/conf/httpd.conf -k stop",
+ }
+
+ # delete directory
+ file {'${rubbos_app_tools}/httpd-2.0.64.tar.gz':
+ ensure => absent,
+ path => "${rubbos_app_tools}/httpd-2.0.64.tar.gz",
+ force => true,
+ backup => false,
+ }
+
+ file {'${rubbos_app_tools}/httpd-2.0.64':
+ ensure => absent,
+ path => "${rubbos_app_tools}/httpd-2.0.64",
+ force => true,
+ recurse => true,
+ backup => false,
+ require => Service['stop apache http server'],
+ }
+
+ file {'${rubbos_app_tools}/tomcat-connectors-1.2.32-src.tar.gz':
+ ensure => absent,
+ path => "${rubbos_app_tools}/tomcat-connectors-1.2.32-src.tar.gz",
+ force => true,
+ backup => false,
+ }
+
+ file {'${rubbos_app_tools}/tomcat-connectors-1.2.32-src':
+ ensure => absent,
+ path => "${rubbos_app_tools}/tomcat-connectors-1.2.32-src",
+ force => true,
+ recurse => true,
+ backup => false,
+ require => Service['stop apache http server'],
+ }
+
+ # Delete apache2 directory
+ exec {'rm -rf ${rubbos_app_tools}/apache2':
+ cwd => "${rubbos_app_tools}/",
+ command => "rm -rf ${rubbos_app_tools}/apache2",
+ path => ["/bin","/sbin","/usr/bin","/usr/sbin","/usr/local/bin","/usr/local/sbin"],
+ onlyif => "test -d ${rubbos_app_tools}/apache2",
+ }
+
+ # delete user and group
+ user {'apache':
+ name => "apache",
+ ensure => absent,
+ groups => "apache",
+ password => "apache",
+ require => [
+ File['${rubbos_app_tools}/httpd-2.0.64'],
+ File['${rubbos_app_tools}/tomcat-connectors-1.2.32-src'],
+ Exec['rm -rf ${rubbos_app_tools}/apache2']],
+ }
+ group {'apache':
+ name => "apache",
+ ensure => absent,
+ require => User['apache'],
+ }
+
+}