cf-remote is now available via pip

February 11, 2021

cf-remote is a tool for downloading and installing/deploying CFEngine. It automates a lot of the things you have to do before CFEngine is actually installed on your infrastructure, such as provisioning cloud instances, downloading CFEngine installers, copying them to remote hosts and installing / bootstrapping. To make it as easy as possible to get started with cf-remote and CFEngine, it is now available on pypi.

Getting started

Installing cf-remote is as easy as:

pip install cf-remote

Use pip3 if that is your pip for python 3. Requires python 3.6 or newer, but only on the one machine where you run cf-remote. Adding sudo to the beginning of that command might be necessary, depending on your operating system and how you installed python. Hosts are managed using SSH, and simple shell commands (no python on the remote machine). Provided you already have passwordless SSH access, installing CFEngine is as simple as:

cf-remote install --hub user@1.2.3.4 --bootstrap 4.3.2.1

In this example, user@1.2.3.4 is where we want to SSH, and 4.3.2.1, is the IP we want CFEngine bootstrapped to. (It might not be the same public IP address / interface that you use for SSH). The latest LTS release will be automatically downloaded and installed.

Downloading nightly CFEngine packages

cf-remote can do much more. For example, if you want to test the latest features, you can download our nightly packages from the master branch:

cf-remote --version master download hub deb

The tags, hub and deb, are optional, and means we will only download .deb packages for CFEngine Enterprise Hub.

Provisioning instances in AWS

cf-remote spawn can create cloud instances on demand, for example in AWS EC2, but you’ll have to add some credentials and settings. To see examples of how to do this and other things, like deploying new versions of policy, look at the README file: https://github.com/cfengine/cf-remote#examples

Getting help

If you run into any issues, have any questions, or need help, feel free to start a thread on our GitHub Discussions: https://github.com/cfengine/core/discussions/categories/q-a

How we make new releases of cf-remote

We are using GitHub Actions, triggered by GitHub releases, to make releases entirely from the GitHub UI, and publish to pypi.org, without committing or tagging anything from the command line. If you are interested in how this works or have some python projects you’d like to publish, see this video: