If you're a new user, or haven't already read it, we highly recommend
following along with the getting started tutorial in our documentation.
Through it, you'll learn how to install CFEngine, explore the Web UI and
reports for the first time, download ready to use modules, and more:
Getting started with CFEngine.
cf-remote
or
the enterprise download page.
Follow the steps below to install and bootstrap CFEngine:
Find the IP address of both the client and the hub because you'll
have to put them into the commands wherever we refer to
HUB
and CLIENT
.
Run the following command to download and automatically install the CFEngine hub package:
wget https://s3.amazonaws.com/cfengine.packages/quick-install-cfengine-enterprise.sh && sudo bash ./quick-install-cfengine-enterprise.sh hub
If your hub and client are on different /16
subnets,
meaning the first 2 numbers in their IP addresses (IPv4 dot-decimal
notation) are not identical, you will have to specify which IP
addresses/subnets are trusted.
See the documentation for more details, or simply replace HUB
and CLIENT
with
their respective IP addresses and run this command on the hub:
echo '{"variables": {"default:def.acl": ["HUB", "CLIENT"]}}' > /var/cfengine/masterfiles/def.json
With the hub package of CFEngine correctly installed and configured,
you must start CFEngine, by bootstrapping the hub to itself. Replace
HUB
with the appropriate IP address and run this
command:
sudo /var/cfengine/bin/cf-agent --bootstrap HUB
Run the following command on any machine you'd like to connect to the hub; it will download and automatically install the agent.
wget https://s3.amazonaws.com/cfengine.packages/quick-install-cfengine-enterprise.sh && sudo bash ./quick-install-cfengine-enterprise.sh agent
Now bootstrap the agent to the hub. Just like above, replace
HUB
in the following command:
sudo /var/cfengine/bin/cf-agent --bootstrap HUB
In any modern browser, visit the IP address of your hub from step 2 above.
Log in with username: admin & password: admin
cf-remote install
command since you've already
installed CFEngine).