]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.support/src/org/argeo/slc/lib/linux/redhat.xml
Make core runtime features independent of Spring.
[gpl/argeo-slc.git] / org.argeo.slc.support / src / org / argeo / slc / lib / linux / redhat.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4 Copyright (C) 2007-2012 Argeo GmbH
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18 -->
19 <!-- Copyright (C) 2007-2012 Mathieu Baudier Licensed under the Apache License,
20 Version 2.0 (the "License"); you may not use this file except in compliance
21 with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
22 Unless required by applicable law or agreed to in writing, software distributed
23 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
24 OR CONDITIONS OF ANY KIND, either express or implied. See the License for
25 the specific language governing permissions and limitations under the License. -->
26 <beans xmlns="http://www.springframework.org/schema/beans"
27 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
28 xmlns:aop="http://www.springframework.org/schema/aop" xmlns:flow="http://www.argeo.org/schema/slc-flow"
29 xsi:schemaLocation="
30 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
31 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
32 http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-1.2.xsd">
33
34 <bean id="hostManager" class="org.argeo.slc.lib.linux.RedhatHostManager">
35 <property name="sshTarget" ref="sshTarget" />
36 <property name="host" ref="host" />
37 </bean>
38
39 <!-- Execution Flows -->
40 <bean flow:as-flow="deployConfig" class="org.argeo.slc.core.execution.tasks.MethodCall"
41 p:target-ref="hostManager" p:method="deployConfig" />
42
43 <bean flow:as-flow="system/reboot" p:command="shutdown -r now"
44 p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />
45
46 <bean flow:as-flow="system/shutdown" p:command="shutdown -h now"
47 p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />
48
49 <bean flow:as-flow="system/packages/install" class="org.argeo.slc.core.execution.tasks.MethodCall"
50 p:target-ref="hostManager" p:method="installPackages" />
51
52 <bean flow:as-flow="system/packages/update" p:sshTarget-ref="sshTarget"
53 class="org.argeo.slc.jsch.RemoteExec">
54 <property name="systemCall">
55 <bean class="org.argeo.slc.core.execution.tasks.SystemCall">
56 <property name="cmd" value="yum -y update" />
57 </bean>
58 </property>
59 </bean>
60
61 <bean flow:as-flow="system/security/firewall" p:script="osgibundle:/scripts/firewall.sh"
62 p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />
63
64 <flow:flow name="system/security/authconfig">
65 <flow:spec>
66 <flow:primitive name="ldapserver" />
67 <flow:primitive name="ldapbasedn" />
68 </flow:spec>
69 <bean p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec">
70 <flow:variable />
71 <property name="systemCall">
72 <bean class="org.argeo.slc.core.execution.tasks.SystemCall">
73 <property name="command">
74 <list>
75 <value>authconfig</value>
76 <value>--enableldap</value>
77 <value>--enableldapauth</value>
78 <value>--enablecache</value>
79 <value>--enablemkhomedir</value>
80 <value>--ldapserver=@{ldapserver}</value>
81 <value>--ldapbasedn=@{ldapbasedn}</value>
82 <value>--passalgo=sha256</value>
83 <value>--updateall</value>
84 </list>
85 </property>
86 </bean>
87 </property>
88 </bean>
89 </flow:flow>
90
91 </beans>