1999 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // This file: template/header.php // // // echo "\n"; print ""; echo "\n"; echo ""; echo ""; echo "Rossberry.com - The Home of the Mobile Linux Lab"; if ($title != "") { echo " -- $title"; } echo "\n"; // The next line lets us link the header page below // the top ditrectory, and have the buttons work // RPH -- 011124 echo ""; // // scheme://user:pass@host:port/path?query#fragment // //$REQUEST_URI = $_SERVER[REQUEST_URI]; $url=parse_url("$REQUEST_URI"); $svr=$url[host]; //$svr="www.rossberry.net"; $svr="www.rossberry.com"; $server = $server_name ; print ""; ?>

Rossberry.com

Home of the Mobile Linux Lab

Home Overview Philosophy Infrastructure
Version Control Blogs Files cfengine

Rossberry CFEngine RPMS and related files

To use these rpms you need two machines; a 'master' and a 'client'. They need to have port 5308 open to each other. (an iptables rule similar to

-A INPUT -i INTERFACENAME -p tcp -m tcp --dport 5308 -j ACCEPT

will work.

Installation steps

  1. Select the master
  2. Install the cfengine rpm
  3. Place rossberry_cf in /etc/sysconfig and update with the IP and subnet of the master
  4. Install rossberry-cf-master rpm
  5. You should see
    Q: ".../bin/date": Wed Apr 20 07:57:02 CDT 2011
    I: Last 1 quoted lines were generated by promiser "/bin/date"
    R: Hello, world.
    Q: ".../bin/date": Wed Apr 20 07:57:03 CDT 2011
    I: Last 1 quoted lines were generated by promiser "/bin/date"
    R: Hello, world.
    on the screen and in /var/log/messages. There should also be an empty file called /tmp/CFENGINE_WORKS and one called /cf-test.txt.
  6. run
    echo "#Hi" > /var/cfengine/masterfiles/inputs/hi.cf
    cf-agent -K
    cat /var/cfengine/inputs/hi.cf

    and the file should now exist with the expected content.
  7. On the client, install the cfengine rpm
  8. Copy rossberry_cf to /etc/sysconfig and change the IP for the master and the allowed hosts (should be the master)
  9. Install the rossberry-cf-client rpm
  10. You should see
    Q: ".../bin/date": Wed Apr 20 07:57:02 CDT 2011
    I: Last 1 quoted lines were generated by promiser "/bin/date"
    R: Hello, world.
    Q: ".../bin/date": Wed Apr 20 07:57:03 CDT 2011
    I: Last 1 quoted lines were generated by promiser "/bin/date"
    R: Hello, world.
    on the screen and in /var/log/messages. There should also be an empty files called /tmp/CFENGINE_WORKS, and /cf-test.txt, and /var/cfengine/inputs/hi.cf should exist. (It will have been copied from the master).
  11. You can create another file in master:/var/cfengine/masterfiles/inputs, run cf-agent -K on either the master or the client and it should be copied to /var/cfengine/inputs on the machine you are running on. Note that the file cannot be empty and all lines should be commented out until you understand the syntax.
  12. If you create a file in /var/cf-rootdir and run cf-agent -K that file will be copied into the file structure of the machine you are on. This will replace existing files!! If you create /var/cf-rootdir/etc/passwd, if will be replaced!

CONGRATULATIONS!!

You know have a working cfengine pair and have demonstrated
  • Reporting
  • Creating a file
  • Updating from the master
  • Secure file copy within the cfengine control tree
  • Secure file copy into the client's general file system
  • cf-execd running (check the log files after 15 minutes)
1999 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // This file: template/footer.php // print "


"; // print " \n \n \n "; // $url=parse_url("$REQUEST_URI"); $scheme = $url[scheme]; $host = $url[host]; $whereami = $url[path]; $basename = exec("basename $whereami"); $REFERRER=exec("basename $whereami .php"); $SMURF = exec(" ls | grep $REFERRER | grep txt "); if ($SMURF != "") { ## echo ""; ## This next line of code opens the displayed code in a new window when uncommented echo ""; echo "\"View of "; echo ""; echo "$basename"; } else { print "\n"; print "\n"; } // print " Contact mll@rossberry.com Copyright\n © 2010, 2011 Jim Wildman.\n "; print "
All rights reserved.
"; ?>