Files
oam/knowledge base/cfengine3.md
Michele Cereda d42f25f1be fix: typo
2023-05-24 19:56:38 +02:00

1.8 KiB

CFEngine

Table of contents

  1. TL;DR
  2. Installation
  3. Further readings
  4. Sources

TL;DR

Command Configuration
cf-remote ~/.cfengine/cf-remote/
# List packages available for download.
cf-remote list

# Add hosts to groups.
# Will allow to use groups in other commands.
cf-remote save -H 'root@cfengine.lan' --role 'hub' --name 'hubs-group-name'
cf-remote save -H 'user@client.lan' --role 'client' --name 'clients-group-name'

# Show hosts spawned by `cf-remote` or added to it.
cf-remote show
cf-remote show --ansible-inventory

# Get info about hosts.
cf-remote info -H 'host-alias'

# Bootstrap remote hosts.
cf-remote install -B 'hub'
cf-remote --log-level 'INFO' install -B 'hub'

# Install a specific edition on remote hosts.
cf-remote install -E 'community' -c 'client'
cf-remote install -E 'enterprise' --hub 'hub'

# Reset `cf-remote` settings.
rm -r "${HOME}/.cfengine/cf-remote"

# Print the contents of DB files.
cf-check dump

# Assess the health of one or more DB files.
cf-check diagnose

# Diagnose databases, then backup and delete any one found corrupted.
cf-check repair

Installation

On the development machine:

pip3 install 'cfbs' 'cf-remote'
cf-remote save -H 'root@cfengine.lan' --role 'hub' --name 'hub'
cf-remote install --hub 'hub' --bootstrap 'hub'

Further readings

Sources

All the references in the further readings section, plus the following: