{"id":46697213,"url":"https://github.com/cfengine/starter_pack","last_synced_at":"2026-03-09T05:33:25.303Z","repository":{"id":41113818,"uuid":"111619559","full_name":"cfengine/starter_pack","owner":"cfengine","description":"A starting point for new CFEngine (Enterprise) developers","archived":false,"fork":false,"pushed_at":"2025-11-05T11:46:54.000Z","size":198,"stargazers_count":4,"open_issues_count":2,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-11-05T13:22:35.895Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfengine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-11-22T01:06:16.000Z","updated_at":"2025-11-05T11:46:59.000Z","dependencies_parsed_at":"2025-01-14T14:37:57.214Z","dependency_job_id":"c74c5682-f76e-43d9-b858-a16255309f46","html_url":"https://github.com/cfengine/starter_pack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cfengine/starter_pack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfengine%2Fstarter_pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfengine%2Fstarter_pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfengine%2Fstarter_pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfengine%2Fstarter_pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfengine","download_url":"https://codeload.github.com/cfengine/starter_pack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfengine%2Fstarter_pack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-09T05:33:24.808Z","updated_at":"2026-03-09T05:33:25.277Z","avatar_url":"https://github.com/cfengine.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CFEngine starter pack\n\nCFEngine enterprise can be pretty hard/tedious to build, because of many repos and dependencies.\nThis is an attempt to make it easier for new developers.\nIt is by no means finished, please add GitHub Issues and Pull Requests :)\n\n## Installing vagrant and virtualbox\n\nIt is recommended, but not required, to run builds and tests inside VMs managed by vagrant.\n\nInstall virtualbox:\nhttps://www.virtualbox.org/\n\nInstall vagrant:\nhttps://www.vagrantup.com/docs/installation/\n\nInstall guest additions plugin:\n\n```\nvagrant plugin install vagrant-vbguest\n```\n\nIt is also possible to use libvirt (KVM) instead of VirtualBox. Apart from the\nworking `qemu-kvm` setup and `libvirt`, the `vagrant-libvirt` plugin has to be\ninstalled too. It may either be provided as a package in your distribution or it\ncan be installed by vagrant itself:\n\n```\nvagrant plugin install vagrant-libvirt\n```\n\nPlease see the [libvirt notes](#libvirt-notes) section for some more details and\nsuggestions.\n\n## Recommended setup\n\n### Folder structure\n\nHave all your Northern.tech projects in\n`/northern.tech`. Or export `NTECH_ROOT` with the path to your base\nfolder.\n\nFor example:\n\n```\nexport NTECH_ROOT=\"$HOME/northern.tech\"\n```\n\nCFEngine projects in `$NTECH_ROOT/cfengine` (similar for zener, and so on.)\nThe reason to place it at root is so it can have the same absolute path on all VMs, using a mounted shared folder.\nIt is not a strict requirement, it's just easier.\nIf you use another path, you will have to update Vagrantfile and bash scripts.\n\nSomething like this does the job:\n\n```\nsudo mkdir -p /northern.tech/cfengine\nexport NTECH_ROOT=/northern.tech\ncd $NTECH_ROOT/cfengine\ngit clone git@github.com:cfengine/starter_pack.git\n```\n\nIf your local username doesn't match your github username then provide it to clone.sh\n\n```\nbash ./starter_pack/repos/clone.sh my_github_username\ncd starter_pack\n```\n\nIf they match, just use:\n\n```\nbash ./starter_pack/repos/clone.sh\ncd starter_pack\n```\n\n**Note:** The `clone.sh` script clones all CFEngine repos into the current directory\n\n### SSH keys\n\n```\nbash scripts/keygen.sh\n```\n\nWill generate `./keys/insecure[.pub]`.\nThis will be installed to `~/.ssh/id_rsa[.pub]` on all vagrant machines.\n`./keys/insecure.pub` is added to build user's `authorized_keys` so build-remote can work.\n\nThe `Vagrantfile` also has code to copy your SSH key from your home directory, to `authorized_keys` in the VMs, so you can use regular `ssh` commands (instead of `vagrant ssh`).\n\n### Custom init script\n\nIf you'd like to make custom changes to the VMs, such as fixing your `PATH` variable, or installing your own dotfiles, you can put code in the file `./scripts/custom_vm_init.sh`.\nThis file is ignored by git, so won't be committed, it will be custom to you.\nAs an example, here is what I (Ole) have in my `./scripts/custom_vm_init.sh`:\n\n```\n#!/usr/bin/env bash\ncurl -L -s https://raw.githubusercontent.com/olehermanse/dotfiles/master/install.sh | bash\n```\n\n## Getting started with the dev machine\n\nThe development machine has all development libraries already installed.\nIt is ready to run autogen, make etc.\nIt will **NOT** work with `build-remote`.\n(See the sections on the buildslave machine below.)\n\n### Creating a base box for development\n\nThe vagrant VMs use a custom base box where some dependencies are installed.\nTo create this box locally, run:\n\n```\nbash ./basebox/create.sh\n```\n\n(vagrant required).\nThis will run commands from `basebox/bootstrap.sh` on an Ubuntu VM.\nIf you're not using vagrant, you can run/adapt that script on a build/development machine of your choice.\n\nIf you get the following error:\n\n```\n/home/larsewi/.vagrant.d/gems/3.3.8/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb:84:in `block in guess_local_iso': undefined method `exists?' for class File (NoMethodError)\n\n            path \u0026\u0026 File.exists?(path)\n                        ^^^^^^^^\nDid you mean?  exist?\n```\n\nThen, the reason is a bug in `vagrant-vbguest` plugin. This is an archived repository.\nSo it will not be fixed any time soon. You'd better just fix it yourself. E.g.:\n\n```\nsed -i 's/File.exists/File.exist/g' ~/.vagrant.d/gems/3.3.8/gems/vagrant-vbguest-0.32.0/lib/vagrant-vbguest/hosts/virtualbox.rb\n```\n\n### Starting the development machine\n\n```\nvagrant up dev\n```\n\nIf you ever need a clean dev machine, log out and:\n\n```\nvagrant destroy dev\n```\n\nfollowed by:\n\n```\nvagrant up dev\n```\n\nThis is great, because you don't have to be careful not to mess up your dev machine.\nYou can always get a new one within a minute.\n\n### Compiling CFEngine Community in the development machine\n\nLogin to dev machine:\n\n```\nvagrant ssh dev\n```\n\nConfigure and compile CFEngine Core:\n\n```\ncd /northern.tech/cfengine/core\n./autogen.sh --enable-debug\nmake -j2\n```\n\nConfigure the Masterfiles Policy Framework:\n\n```\ncd ../masterfiles\n./autogen.sh\n```\n\n### Installing CFEngine Community on a test machine\n\n#### Hub\n\nBring up and login to the hub machine:\n\n```\nvagrant up hub\nvagrant ssh hub\n```\n\nConfigure, compile and install CFEngine Core:\n\n```\ncd /northern.tech/cfengine/core\n./configure \u0026\u0026 make \u0026\u0026 sudo make -j2 install\n```\n\nConfigure and install the Masterfiles Policy Framework:\n\n```\ncd ../masterfiles\n./configure \u0026\u0026 make \u0026\u0026 sudo make -j2 install\n```\n\nGenerate keys and bootstrap to self (as root):\n\n```\nsudo /var/cfengine/bin/cf-key\nsudo /var/cfengine/bin/cf-agent --bootstrap 192.168.56.90\n```\n\n**Note:** You could use `localhost` as the IP, but this would prevent other hosts from bootstrapping to the hub.\n\n#### Client\n\nBring up and login to the hub machine:\n\n```\nvagrant up client\nvagrant ssh client\n```\n\nConfigure, compile and install CFEngine Core:\n\n```\ncd /northern.tech/cfengine/core\n./configure \u0026\u0026 make \u0026\u0026 sudo make -j2 install\n```\n\nGenerate keys and bootstrap to hub:\n\n```\nsudo /var/cfengine/bin/cf-key\nsudo /var/cfengine/bin/cf-agent --bootstrap 192.168.56.90\n```\n\n## build-remote on buildslave\n\nThe `buildslave` machine is set up specifically for the `build-remote` script.\nThis script checks that certain dependencies are installed, while others are not installed, to avoid conflicting dependencies.\nRunning `build-remote` from `dev` VM to `buildslave` VM is the easiest.\n\n### Example: mingw cross compile for windows using build-remote\n\nIf you haven't already, create the buildslave base box:\n\n```\nbash ./buildslave/create.sh\n```\n\nThis VM has some extra dependencies for performing buildslave tasks.\nYou can now use build-remote from dev machine to build on buildslave.\n\nBring up the build machine:\n\n```\nvagrant up buildslave\n```\n\nBring up and login to the dev machine:\n\n```\nvagrant up dev\nvagrant ssh dev\n```\n\nLogin to buildmachine from dev machine:\n\n```\nssh build@buildslave\n```\n\nAnswer yes to verify the authenticity of the host:\n\n```\nThe authenticity of host 'buildslave (192.168.56.100)' can't be established.\nECDSA key fingerprint is SHA256:VoU/qb7Y7Pt1HYBw7ze1DXHF3E99hQvhBjoUjme9+3c.\nAre you sure you want to continue connecting (yes/no)? yes\nWarning: Permanently added 'buildslave,192.168.56.100' (ECDSA) to the list of known hosts.\n```\n\nType logout or simply press `CTRL + D` to return to the dev machine:\n\n```\nlogout\n```\n\n**Didn't work?** Check out [Troubleshooting](#troubleshooting)\n\nFrom the dev machine, execute the build-remote script:\n\n```\nbash /northern.tech/cfengine/buildscripts/build-remote -c x64-mingw --source /northern.tech/cfengine --verbose build@buildslave\n```\n\nThis currently works for building dependencies as well as our binaries, but not packaging.\nThe `wix.exe` dependency is not installed on buildslave, and adding it is not trivial.\n\nIf you need packages to test your code, a workaround is to get jenkins to build a package.\nYou can then install the package once, and as you make changes, upload the locally compiled `.exe` files via `scp` or similar.\n\n## Building CFEngine Enterprise locally\n\n### Compiling core, enterprise and nova on the dev machine\n\nBring up and login to the dev machine:\n\n```\nvagrant up dev\nvagrant ssh dev\n```\n\nUsing `cf-builder.py`:\n\n```\ncd /northern.tech/cfengine/starter_pack\npython3 cf-builder.py --autogen --make --core --masterfiles --enterprise --nova\n```\n\nBy running:\n\n```\npython3 cf-builder.py --build-all --dry-run\n```\n\nthe individual steps will be outputted:\n\n```\nThese commands would run if you didn't specify --dry-run:\ncd /northern.tech/cfengine \u0026\u0026 cd core \u0026\u0026 ./autogen.sh --enable-debug\ncd /northern.tech/cfengine \u0026\u0026 cd core \u0026\u0026 make -j2\ncd /northern.tech/cfengine \u0026\u0026 cd enterprise \u0026\u0026 ./autogen.sh --enable-debug\ncd /northern.tech/cfengine \u0026\u0026 cd enterprise \u0026\u0026 make -j2\ncd /northern.tech/cfengine \u0026\u0026 cd nova \u0026\u0026 ./autogen.sh --enable-debug --with-postgresql-hub=/usr\ncd /northern.tech/cfengine \u0026\u0026 cd nova \u0026\u0026 make -j2\n```\n\n(You can run the steps without using `cf-builder.py`, simplify the `cd` commands if you'd like)\n\n### WIP! Installing CFEngine Enterprise on hub machine\n\nIn general, don't install on your dev machine, and don't run sudo commands on the dev machine.\nEverything you're doing there should work without sudo.\nUse the `hub` and `client` machines to install and bootstrap.\n\nAfter compiling on `dev` machine, use `cf-builder.py` to install on `hub`.\n\nBring up and login to the hub machine:\n\n```\nvagrant up hub\nvagrant ssh hub\n```\n\nInstall CFEngine Enterprise (as root):\n\n```\ncd /northern.tech/cfengine/starter_pack\nsudo python3 cf-builder.py --install --all-repos\n```\n\nGenerate keys, initialize the database and bootstrap to self (as root):\n\n```\nsudo /var/cfengine/bin/cf-key\nsudo bash scripts/initdb.sh\nsudo /var/cfengine/bin/cf-agent --bootstrap 192.168.56.90\n```\n\n### WIP! Running no-install reporting test\n\n## docs.cfengine.com\n\nThe documentation is built with Jekyll and some custom tooling. Some very\nspecific tool versions are supported.\n\n- [cfengine/documentation](https://github.com/cfengine/documentation)\n- [cfengine/documentation-generator](https://github.com/cfengine/documentation-generator)\n\n### Bring up build host\n\n```\nvagrant up docbuildslave\n```\n\nDuring provisioning it runs `_scripts/provisioning-install-build-tool-chain.sh`\n\nTo perform a build log into docbuildslave and run `starter_pack/build-docs.sh`\nfrom the documentation-generator repository.\n\n```\nvagrant ssh docbuildslave\nvagrant@docbuildslave ~ $ bash /northern.tech/cfengine/documentation-generator/_scripts/starter_pack-build-docs.sh\n```\n\nBrowse the site in `$NTECH_ROOT/cfengine/documentation-generator/_site/index.html`\n\n#### How Nick last build successfully\n\nThese are some raw notes about how I last used this successfully. I iterated until I got a successful run of jekyll, site preview didn't quite work, but it helped me iterate on fixing up links which can be difficult if the auto linking doesn't work.\n\n```\nrm -rf /northern.tech/cfengine/documentation\nrsync -avz ~/CFEngine/documentation /northern.tech/cfengine/\nrm -rf /northern.tech/cfengine/documentation-generator\nrsync -avz ~/CFEngine/documentation-generator /northern.tech/cfengine/\n\ncd /northern.tech/cfengine/core\ngit checkout master\ngit pull --rebase upstream master\n\ncd /northern.tech/cfengine/mission-portal\ngit checkout master\ngit pull --rebase upstream master\n\ncd /northern.tech/cfengine/nova\ngit checkout master\ngit pull --rebase upstream master\n\ncd /northern.tech/cfengine/masterfiles\ngit checkout master\ngit pull --rebase upstream master\n\ncd /northern.tech/cfengine/enterprise\ngit checkout master\ngit pull --rebase upstream master\n\ncd /northern.tech/cfengine/nova\ngit checkout master\ngit pull --rebase upstream master\n\ncd ~/CFEngine/starter_pack\nvagrant rsync docbuildslave\nvagrant ssh docbuildslave -c \"bash /northern.tech/cfengine/documentation-generator/_scripts/starter_pack-build-docs.sh\"\n\nvagrant ssh-config docbuildslave \u003e /tmp/docbuildslave.ssh-config\nscp -rF /tmp/docbuildslave.ssh-config docbuildslave:/northern.tech/cfengine/documentation-generator/_site ./\n```\n\n### Installing a pre-built hub package\n\nThe `hub` VM comes with dependencies already installed to make it easy to build and install CFEngine Enterprise hub locally.\nIf you would rather install a pre-built hub package, remove PostgreSQL:\n\n```\napt purge postgresql*\nwget http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-9281/PACKAGES_HUB_x86_64_linux_ubuntu_20/cfengine-nova-hub_3.22.0a.8c38b8b08~25630.ubuntu20_amd64.deb\nsudo dpkg -i cfengine-nova-hub_*.deb\nsudo /var/cfengine/bin/cf-agent -B 192.168.56.90\n```\n\n(This is just an example using the URL from a PR build, replace the 2nd line with the hub package you want to test, or use cf-remote, etc.)\n\nYou should be able to open MP in your browser with the IP afterwards:\n\nhttps://192.168.56.90/\n\n### Notes and TODOs\n\nThe .git subdirectories get deleted during `_run_jekyll.sh` but I don't know\nwhy. Perhaps something to do with jenkins. So you will want to keep a separate\nrepo and sync your changes to it.\n\n```\nrsync -avz $NTECH_ROOT/cfengine/documentation $HOME/CFEngine/documentation/\n```\n\n## libvirt notes\n\n### Building baseboxes\n\nThere is a step in the `create.sh` scripts for building baseboxes where they try\nto package the box (e.g. `vagrant package basebox --output base.box`). This may\nfail due to the VM image file not being readable for the current user. However,\n_vagrant_ even prints out the command to fix it (change the permissions) so just\nrun the suggested command. Unfortunately, the `create.sh` script stops on this\nso the particular step has to be run again and then all the follow-up steps have\nto be run. It would be nice if the permissions could be fixed in advance, but\nthere seems to be no easy way to get the image path for a given vagrant machine.\n\n### Synced folders\n\nvagrant-libvirt doesn't support the mechanisms for sharing folders between VMs\nand the host system. So it either uses _rsync_ to sync the folders (that's why\nwe have some extra rsync options in the `Vagrantfile`) or sets up NFS to share\nthe folders. However, it quite often fails to set NFS up properly, so it may be\nnecessary to enforce rsync syncing. This can be done by adding `type: \"rsync\"` to\nthe `synced_folder` lines. So something like this:\n\n```\n-    config.vm.synced_folder \".\", \"/vagrant\",\n+    config.vm.synced_folder \".\", \"/vagrant\", type: \"rsync\",\n```\n\n## Troubleshooting\n\n### ssh: connect to host 192.168.56.100 port 22: Protocol not available\n\nIf you get the following error when trying to ssh into the buildslave from the dev machine:\n\n```\nssh: connect to host 192.168.56.100 port 22: Protocol not available\n```\n\nThen I experienced the same issue. Not sure if it was an ARP cache bug or a lingering ghost VM.\nNevertheless, when I tried to connect, I saw that the ARP cache was updated with a different MAC address then that of the buildslave.\nHowever, by doing the reverse connection. E.g. (run this command from your host machine):\n\n```\nvagrant ssh buildslave -c \"ping -c1 192.168.56.10\"\n```\n\nI was able to repopulate the ARP cache with the correct MAC address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfengine%2Fstarter_pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfengine%2Fstarter_pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfengine%2Fstarter_pack/lists"}