configuring systems with cfengine
DESCRIPTION
Member: Wei-Jie Hsiao 、 Hui-Hsiung Chung Advisor: Quicy Wu Date: Mar.23. Configuring Systems with cfengine. Outline. Getting an Overview of cfengine Learning the Basic Setup. Getting an Overview of cfengine. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/1.jpg)
Member: Wei-Jie Hsiao 、 Hui-Hsiung Chung
Advisor: Quicy Wu
Date: Mar.23
1
![Page 2: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/2.jpg)
Outline Getting an Overview of cfengine Learning the Basic Setup
2
![Page 3: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/3.jpg)
Getting an Overview of cfengine
Cfengine is software you can use to automate changes on UNIX (and UNIX- like) systems.
It is a high- level language that describes system state, not a general- purpose programming language such as Perl or a shell.
3
![Page 4: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/4.jpg)
Getting an Overview of cfengine(cont.)
Cfengine can use Several ways to management the systems as follows:Setup the network interfaceEdit the system filesEdit the permission to access filesDelete the unused flies
4
![Page 5: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/5.jpg)
The Components of cfengine:
CfagentCfservdCfexecdCfkeycfrun
5
![Page 6: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/6.jpg)
cfagnet
The autonomous configuration agent (the heart of the framework). This command can be run manually (on demand),cfexecd on a regular basis, and/or by cfservd when triggered by a remote cfrun invocation. The necessary and sufficient condition for using cfengine is to run cfagent somehow.
6
![Page 7: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/7.jpg)
Cfservd
The file- transfer and remote- activation daemon. You must run this on any cfengine file servers and on any system where you would like to execute cfagent remotely.
7
![Page 8: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/8.jpg)
Cfexecd
Generates public/private key pairs and needs to be run only once on every host.
8
![Page 9: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/9.jpg)
cfkey
The execution and reporting daemon. You run this either as a daemon or as a regular cron job. In either case, it handles running _b]cajp and reporting its output.
9
![Page 10: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/10.jpg)
cfrun
You can run this command from a remote system that will contact the clients (through cfservd) and tell them to execute cfagent.
10
![Page 11: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/11.jpg)
Learning the Basic Setup
Download the Cfengine from here http://www.cfengine.org, or any other website and install it.
Example:Step1:
○ $ tar zxf cfengine-2.x.x.tar.gz ○ $ cd ./cfengine-2.x.x ○ $ ./configure ○ $ make ○ $ sudo make install
12
![Page 12: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/12.jpg)
Learning the Basic Setup(cont.)
Then create the working directly as follows:Step2:
○ # mkdir /var/cfengine ○ # mkdir /var/cfengine/bin ○ # mkdir /var/cfengine/inputs
13
![Page 13: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/13.jpg)
Learning the Basic Setup(cont.)
Copy the binary code of cfengine to working directlyStep3:
○ # cp /usr/local/sbin/cfagent /var/cfengine/bin ○ # cp /usr/local/sbin/cfexecd /var/cfengine/bin ○ # cp /usr/local/sbin/cfservd /var/cfengine/bin ○ # chown -R root:0 /var/cfengine ○ # chmod -R 755 /var/cfengine
14
![Page 14: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/14.jpg)
Learning the Basic Setup(cont.)
The first time we use the cfengine# /usr/local/sbin/cfkey # /var/cfengine/bin/cfagent cfengine::/bin/echo Dange: Danger, Will Robinson!
Then we can check whether the cfengine is successfully working or not#/var/cfengine/inputs/cfagent.conf control: actionsequence = ( shellcommands ) shellcommands: “/bin/echo Danger, Will Robinson!”
15
![Page 15: Configuring Systems with cfengine](https://reader035.vdocuments.site/reader035/viewer/2022062500/568151c9550346895dc001ad/html5/thumbnails/15.jpg)
Thanks for listening!!
16