cluster:Cfengine/302/server
See also troubleshooting for this page.
Contents |
cfengine policyhost v.3.0.2
Prepare
Strictly speaking, the cfengine software do not use a client-server model. It can be named as an agent-server model, where server is an agent, installed into the master host. The reference installation configuration are stored into the subversion (svn) repository of Karlsruhe Institute of Technology. Thus, some preparation steps include:
- download the dgiref.repo from
http://mirror.scc.kit.edu/downloads/yum.repo/sl-dgiref.repointo/etc/yum.repos.d/ - install
subversionto communicate with svn server - install the dependencies (
db4 db4-devel pcre gcc byacc flex bison openssl openssl-devel) packages - to install the current CAs certificates manually, please use this link
- Firewall configuration
Port 5308 should be open (how to open port in firewall).
administrator's script: prepare.sh
#!/bin/bash# prepare cfengine masterhost#-> start routineREPO_URL="http://dgiref.d-grid.de/svn/dgiref/PROD/cf3/repl/repos/external/"
wget -O /etc/yum.repos.d/sl-dgiref.repo ${REPO_URL}/sl-dgiref.repo
yum -y install subversion
yum -y install db4 db4-devel pcre gcc byacc flex bison openssl openssl-devel
#yum -y install krb5-libs.i386 openldap.i386 cyrus-sasl.i386 compat-openldap.i386#<- end routine
Install
The following step is needed to install a cfengine server (execute as root user):
| use yum or rpm to install cfengine masterhost from http://mirror.scc.kit.edu/downloads/
|
administrator's script: install.sh
#!/bin/bash# install cfengine masterhost#-> start routineyum -y install cfengine-community-3.0.3-1
#<- end routine
Configure
- download the
cf3-srv.preconffrom codebase repository into cfengine directory/var/cfengine/ - change mode to executable and execute
/var/cfengine/cf3-srv.preconfbash script. - configure the site by changing the parameters in the
/var/cfengine/masterfiles/inputs/library/variables.cf - run
cf-agentto constrain cfengine master host configuration
administrator's script: configure.sh
#!/bin/bash# prepare cfengine masterhost#-> start routinewget -O /var/cfengine/cf3.preconf http://dgiref.d-grid.de/svn/dgiref/PROD/cf3/cf3.preconf
chmod +x /var/cfengine/cf3.preconf
sh /var/cfengine/cf3.preconf PROD
# configure the /var/cfengine/masterfiles/inputs/library/variables.cf# run cf-agentcf-agent
#<- end routine
Proceed
To run the agent use the cf-agent command.
administrator's script: proceed.sh
#!/bin/bash# prepare cfengine masterhost#-> start routine# run cf-agentcf-agent
#<- end routine
Initial test
Examine the output for the cf-agent or test the individual promise with cf-promise promise.name
administrator's script: test.sh
#!/bin/bash# prepare cfengine masterhost#-> start routine# Examine the output for the cf-agent or# test the individual promise with cf-promise promise.namecf-agent
#<- end routine
Update
Use yum update/remove to update or remove the package.
administrator's script: update.sh
#!/bin/bash# prepare cfengine masterhost#-> start routine# use yum to updateyum update cfengine-3.0.2# use yum to removeyum remove cfengine-3.0.2#<- end routine