Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove obsolete example_config. Use masterfiles/ and Design Center in…

…stead
  • Loading branch information...
commit 9e93241d4c25f615caed1b59dfef15a0c2083f63 1 parent 8c007b9
@dottedmag dottedmag authored
View
1  configure.ac
@@ -923,7 +923,6 @@ AC_CONFIG_FILES([Makefile
docs/reference/Makefile
docs/tools/Makefile
examples/Makefile
- examples/example_config/Makefile
masterfiles/Makefile
tests/Makefile
tests/acceptance/Makefile
View
3  examples/Makefile.am
@@ -1,6 +1,3 @@
-SUBDIRS = example_config
-DIST_SUBDIRS = example_config
-
examplesdir = $(projdocdir)/examples
dist_examples_DATA = $(srcdir)/*.cf
View
26 examples/example_config/Makefile.am
@@ -1,26 +0,0 @@
-exampleconfigdir = $(projdocdir)/example_config
-dist_exampleconfig_DATA = $(srcdir)/failsafe.cf $(top_srcdir)/masterfiles/cfengine_stdlib.cf $(srcdir)/promises.cf $(srcdir)/site.cf $(srcdir)/update.cf
-
-#
-# Some basic clean ups
-#
-MOSTLYCLEANFILES = *~
-
-#
-# Get everything removed down to where rebuilding requires:
-# "make; make install"
-#
-CLEANFILES =
-
-#
-# Get everything removed down to where rebuilding requires:
-# "configure; make; make install"
-#
-DISTCLEANFILES =
-
-#
-# Get everything removed down to where rebuilding requires:
-# "aclocal; autoconf; autoheader; automake --add-missing"
-# "configure; make; make install"
-#
-MAINTAINERCLEANFILES = Makefile.in
View
33 examples/example_config/failsafe.cf
@@ -1,33 +0,0 @@
-# Copyright (C) Cfengine AS
-
-# This file is part of Cfengine 3 - written and maintained by Cfengine AS.
-
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; version 3.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-# To the extent this program is licensed as part of the Enterprise
-# versions of Cfengine, the applicable Commerical Open Source License
-# (COSL) may apply to this file if you as a licensee so wish it. See
-# included file COSL.txt.
-
-#
-# Failsafe file
-#
-
-body common control
-
-{
-bundlesequence => { "update" };
-
-inputs => { "update.cf" };
-}
View
113 examples/example_config/promises.cf
@@ -1,113 +0,0 @@
-# Copyright (C) Cfengine AS
-
-# This file is part of Cfengine 3 - written and maintained by Cfengine AS.
-
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; version 3.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-# To the extent this program is licensed as part of the Enterprise
-# versions of Cfengine, the applicable Commerical Open Source License
-# (COSL) may apply to this file if you as a licensee so wish it. See
-# included file COSL.txt.
-
-#######################################################
-#
-# promises.cf
-#
-#######################################################
-
-body common control
-
-{
-bundlesequence => {
- "update",
- "garbage_collection",
- "main",
- "cfengine"
- };
-
-inputs => {
- "update.cf",
- "site.cf",
- "cfengine_stdlib.cf"
- };
-}
-
-#######################################################
-
-body agent control
-{
-# if default runtime is 5 mins we need this for long jobs
-ifelapsed => "15";
-}
-
-#######################################################
-
-body monitor control
-{
-forgetrate => "0.7";
-histograms => "true";
-}
-
-#######################################################
-
-body executor control
-
-{
-splaytime => "1";
-mailto => "cfengine_mail@example.org";
-smtpserver => "localhost";
-mailmaxlines => "30";
-
-# Instead of a separate update script, now do this
-
-exec_command => "$(sys.workdir)/bin/cf-agent -f failsafe.cf && $(sys.workdir)/bin/cf-agent";
-}
-
-#######################################################
-
-body reporter control
-
-{
-reports => { "performance", "last_seen", "monitor_history" };
-build_directory => "$(sys.workdir)/reports";
-report_output => "html";
-}
-
-#######################################################
-
-body runagent control
-{
-hosts => {
- "127.0.0.1"
- # , "myhost.example.com:5308", ...
- };
-
-}
-
-#######################################################
-
-body server control
-
-{
-allowconnects => { "127.0.0.1" , "::1" };
-allowallconnects => { "127.0.0.1" , "::1" };
-trustkeysfrom => { "127.0.0.1" , "::1" };
-
-# Make updates and runs happen in one
-
-cfruncommand => "$(sys.workdir)/bin/cf-agent -f failsafe.cf && $(sys.workdir)/bin/cf-agent";
-allowusers => { "root" };
-}
-
-
View
329 examples/example_config/site.cf
@@ -1,329 +0,0 @@
-# Copyright (C) Cfengine AS
-
-# This file is part of Cfengine 3 - written and maintained by Cfengine AS.
-
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; version 3.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-# To the extent this program is licensed as part of the Enterprise
-# versions of Cfengine, the applicable Commerical Open Source License
-# (COSL) may apply to this file if you as a licensee so wish it. See
-# included file COSL.txt.
-
-#######################################################
-#
-# Site specific promises
-#
-#######################################################
-
-bundle common g
-{
-vars:
-
- SuSE::
-
- "crontab" string => "/var/spool/cron/tabs/root";
-
- redhat::
-
- "crontab" string => "/var/spool/cron/root";
-
- (!SuSE).(!redhat)::
-
- "crontab" string => "/var/spool/cron/crontabs/root";
-
-}
-
-#######################################################
-# Start with cfengine itself
-#######################################################
-
-bundle agent cfengine
-
-{
-classes:
-
- "integrate_cfengine2"
-
- and => {
- fileexists("$(sys.workdir)/inputs/cfagent.conf"),
- fileexists("$(sys.workdir)/bin/cfagent")
- };
-
-vars:
-
- "cf2bits" slist => { "cfenvd", "cfservd", "cfexecd" };
-
-commands:
-
- integrate_cfengine2::
-
- "$(sys.workdir)/bin/cfagent"
-
- action => if_elapsed("240");
-
-files:
-
- # Warn about rules relating to cfengine 2 in inputs - could conflict
-
- "$(sys.workdir)/inputs/.*"
-
- comment => "Check if there are still promises about cfengine 2 that need removing",
- edit_line => delete_lines_matching(".*$(cf2bits).*"),
- file_select => OldCf2Files,
- action => warn_only;
-
- # Check cf-execd and schedule is in crontab
-
- "$(g.crontab)"
- comment => "Add cfengine as a cron job, or check for cfengine 2 jobs to replace",
- create => "true",
- edit_line => upgrade_cfexecd;
-
-processes:
-
- exec_fix::
-
- "cron" signals => { "hup" };
-
-
-}
-
-#######################################################
-# General site issues can be in bundles like this one
-#######################################################
-
-bundle agent main
-
-{
-vars:
-
- "component" slist => { "cf-monitord", "cf-serverd" };
-
- # - - - - - - - - - - - - - - - - - - - - - - - -
-
-files:
-
- "$(sys.resolv)" # test on "/tmp/resolv.conf" #
-
- comment => "Edit the resolver file",
- create => "true",
- edit_line => resolver,
- edit_defaults => def;
-
- # Uncomment this to perform a change-detection scan
-
- # "/usr"
- # changes => lay_trip_wire,
- # depth_search => recurse("inf"),
- # action => measure;
-
-processes:
-
- "cfenvd" signals => { "term" };
-
- # Uncomment this if/when you are ready to upgrade a cf2 server
- #
- # "cfservd" signals => { "term" };
- #
-
- # Now make sure the new parts are running, cf-serverd will fail if
- # the old server is still running
-
- "$(component)" restart_class => canonify("start_$(component)");
-
- # - - - - - - - - - - - - - - - - - - - - - - - -
-
-commands:
-
- "$(sys.workdir)/bin/$(component)"
-
- ifvarclass => canonify("start_$(component)");
-
-}
-
-#######################################################
-# Garbage collection issues
-#######################################################
-
-bundle agent garbage_collection
-{
-files:
-
- "$(sys.workdir)/outputs"
-
- delete => tidy,
- file_select => days_old("3"),
- depth_search => recurse("inf");
-
-
-}
-
-#######################################################
-
-bundle edit_line resolver
-
-{
-vars:
-
- "search" slist => { "search cfengine.com" };
-
-delete_lines:
-
- "search.*";
-
-insert_lines:
-
- "$(search)" location => start;
-}
-
-###########################################################
-
-body file_select OldCf2Files
-{
-leaf_name => {
- "promises.cf",
- "site.cf",
- "library.cf",
- "failsafe.cf",
- ".*.txt",
- ".*.html",
- ".*~",
- "#.*"
- };
-
-file_result => "!leaf_name";
-}
-
-###########################################################
-
-body action measure
-{
-measurement_class => "Detect Changes in /usr";
-ifelapsed => "240";
-expireafter => "240";
-}
-
-#######################################################
-# Anomaly monitoring
-#######################################################
-
-bundle agent anomalies
-{
-reports:
-
-rootprocs_high_dev2::
-
- "RootProc anomaly high 2 dev on $(mon.host) at $(mon.env_time)
- measured value $(mon.value_rootprocs) av $(mon.av_rootprocs) pm $(mon.dev_rootprocs)"
-
- showstate => { "rootprocs" };
-
-entropy_www_in_high&anomaly_hosts.www_in_high_anomaly::
-
- "HIGH ENTROPY Incoming www anomaly high anomaly dev!! on $(mon.host) at $(mon.env_time)
- - measured value $(mon.value_www_in) av $(mon.av_www_in) pm $(mon.dev_www_in)"
-
- showstate => { "incoming.www" };
-
- entropy_www_in_low.anomaly_hosts.www_in_high_anomaly::
-
- "LOW ENTROPY Incoming www anomaly high anomaly dev!! on $(mon.host) at $(mon.env_time)
- - measured value $(svalue_www_in) av $(av_www_in) pm $(dev_www_in)"
-
- showstate => { "incoming.www" };
-
-entropy_tcpsyn_in_low.anomaly_hosts.tcpsyn_in_high_dev2::
-
- "Anomalous number of new TCP connections on $(mon.host) at $(mon.env_time)
- - measured value $(mon.value_tcpsyn_in) av $(mon.av_tcpsyn_in) pm $(mon.dev_tcpsyn_in)"
-
- showstate => { "incoming.tcpsyn" };
-
- entropy_dns_in_low.anomaly_hosts.dns_in_high_anomaly::
-
- "Anomalous (3dev) incoming DNS packets on $(mon.host) at $(mon.env_time)
- - measured value $(mon.value_dns_in) av $(av_dns_in) pm $(mon.dev_dns_in)"
-
- showstate => { "incoming.dns" };
-
- entropy_dns_in_low.anomaly_hosts.udp_in_high_dev2::
-
- "Anomalous (2dev) incoming (non-DNS) UDP traffic on $(mon.host) at $(mon.env_time)
- - measured value $(mon.value_udp_in) av $(mon.av_udp_in) pm $(mon.dev_udp_in)"
-
- showstate => { "incoming.udp" };
-
- anomaly_hosts.icmp_in_high_anomaly.!entropy_icmp_in_high::
-
- "Anomalous low entropy (3dev) incoming ICMP traffic on $(mon.host) at $(mon.env_time)
- - measured value $(mon.value_icmp_in) av $(mon.av_icmp_in) pm $(mon.dev_icmp_in)"
-
- showstate => { "incoming.icmp" };
-}
-
-#######################################################
-# Server configuration
-#######################################################
-
-bundle server access_rules()
-{
-access:
-
- "/home/mark/LapTop"
-
- admit => { "127.0.0.1" };
-
- "/home/mark/.cfagent/bin/cf-agent"
-
- admit => { "127.0.0.1" };
-
-roles:
-
- ".*" authorize => { "mark" };
-}
-
-
-########################################################
-
-bundle edit_line upgrade_cfexecd
- {
- classes:
-
- "exec_fix" not => regline(".*cf-execd.*","$(edit.filename)");
-
- insert_lines:
-
- exec_fix::
-
- "0,5,10,15,20,25,30,35,40,45,50,55 * * * * /var/cfengine/bin/cf-execd -F";
-
- replace_patterns:
-
- "cfexecd" replace_with => value("cf-execd");
-
- reports:
-
- exec_fix::
-
- "Added a 5 minute schedule to crontabs";
- }
-
-#######################################################
-
-body edit_defaults def
-{
-empty_file_before_editing => "false";
-edit_backup => "false";
-max_file_size => "100000";
-}
View
89 examples/example_config/update.cf
@@ -1,89 +0,0 @@
-# Copyright (C) Cfengine AS
-
-# This file is part of Cfengine 3 - written and maintained by Cfengine AS.
-
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; version 3.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-# To the extent this program is licensed as part of the Enterprise
-# versions of Cfengine, the applicable Commerical Open Source License
-# (COSL) may apply to this file if you as a licensee so wish it. See
-# included file COSL.txt.
-
-#########################################################
-
-bundle agent update
-{
-vars:
-
- "master_location" string => "/var/cfengine/masterfiles";
-
-files:
-
- "/var/cfengine/inputs"
-
- perms => u_p("600"),
- copy_from => mycopy("$(master_location)","localhost"),
- depth_search => urecurse("inf"),
- action => uimmediate;
-
- "/var/cfengine/bin"
-
- perms => u_p("700"),
- copy_from => mycopy("/usr/local/sbin","localhost"),
- file_select => cf3_files,
- depth_search => urecurse("inf"),
- action => uimmediate;
-}
-
-############################################
-
-body perms u_p(p)
-
-{
-mode => "$(p)";
-}
-
-############################################
-
-body file_select cf3_files
-
-{
-leaf_name => { "cf-.*" };
-
-file_result => "leaf_name";
-}
-
-#########################################################
-
-body copy_from mycopy(from,server)
-
-{
-source => "$(from)";
-compare => "digest";
-}
-
-#########################################################
-
-body action uimmediate
-{
-ifelapsed => "1";
-}
-
-############################################
-
-body depth_search urecurse(d)
-
-{
-depth => "$(d)";
-}

0 comments on commit 9e93241

Please sign in to comment.
Something went wrong with that request. Please try again.