cf-remote is now available via pip
Posted by: Ole Herman Elgesem
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.
Installing cf-remote is as easy as:
pip install cf-remote
pip3 if that is your
pip for python 3. Requires python 3.6 or newer, but only on the one machine where you run
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 firstname.lastname@example.org --bootstrap 184.108.40.206
In this example,
email@example.com is where we want to SSH, and
220.127.116.11, 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
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:
If you run into any issues, have any questions, or need help, feel free to start a thread on our GitHub Discussions:
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: