Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Configure the Masterfiles Policy Framework:

```
cd ../masterfiles
./autogen.sh --enable-debug
./autogen.sh
```

### Installing CFEngine Community on a test machine
Expand Down Expand Up @@ -288,6 +288,8 @@ Type logout or simply press `CTRL + D` to return to the dev machine:
logout
```

**Didn't work?** Check out [Troubleshooting](#troubleshooting)

From the dev machine, execute the build-remote script:

```
Expand Down Expand Up @@ -492,3 +494,23 @@ the `synced_folder` lines. So something like this:
- config.vm.synced_folder ".", "/vagrant",
+ config.vm.synced_folder ".", "/vagrant", type: "rsync",
```

## Troubleshooting

### ssh: connect to host 192.168.56.100 port 22: Protocol not available

If you get the following error when trying to ssh into the buildslave from the dev machine:

```
ssh: connect to host 192.168.56.100 port 22: Protocol not available
```

Then I experienced the same issue. Not sure if it was an ARP cache bug or a lingering ghost VM.
Nevertheless, when I tried to connect, I saw that the ARP cache was updated with a different MAC address then that of the buildslave.
However, by doing the reverse connection. E.g. (run this command from your host machine):

```
vagrant ssh buildslave -c "ping -c1 192.168.56.10"
```

I was able to repopulate the ARP cache with the correct MAC address.
8 changes: 4 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
# Use a custom box:
# https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one
config.vm.box = "basebox"
# config.vm.box = "ubuntu/focal64"
# config.vm.box = "ubuntu/jammy64"

# make sure SSH always has host keys
config.vm.provision "ssh-host-keys", type: "shell", path: "scripts/ssh-host-keys.sh"
Expand Down Expand Up @@ -152,7 +152,7 @@ Vagrant.configure("2") do |config|

# Clean test machine:
config.vm.define "clean", autostart: false do |clean|
clean.vm.box = "ubuntu/focal64"
clean.vm.box = "ubuntu/jammy64"
clean.vm.hostname = "clean"
clean.vm.network "private_network", ip: "192.168.56.92"
clean.vm.provider :libvirt do |v, override|
Expand Down Expand Up @@ -194,7 +194,7 @@ Vagrant.configure("2") do |config|

# Prepackage a box on disk:
config.vm.define "basebox", autostart: false do |basebox|
basebox.vm.box = "ubuntu/focal64"
basebox.vm.box = "ubuntu/jammy64"
basebox.vm.provision "bootstrap", type: "shell", path: "basebox/bootstrap.sh"
basebox.ssh.insert_key = false
basebox.vm.provider "virtualbox" do |v|
Expand All @@ -210,7 +210,7 @@ Vagrant.configure("2") do |config|

# Prepackage a box on disk:
config.vm.define "buildslavebox", autostart: false do |buildslavebox|
buildslavebox.vm.box = "ubuntu/focal64"
buildslavebox.vm.box = "ubuntu/jammy64"
buildslavebox.vm.provision "bootstrap", type: "shell", path: "buildslave/bootstrap.sh"
buildslavebox.ssh.insert_key = false
buildslavebox.vm.provider "virtualbox" do |v|
Expand Down
4 changes: 2 additions & 2 deletions basebox/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ apt-get install -y cargo
apt-get install -y jq

# Nova deps:
apt-get install -y postgresql-12 postgresql-contrib-12 # libpq-dev pgadmin3
apt-get install -y postgresql postgresql-contrib # libpq-dev pgadmin3
apt-get install -y libpgtypes3 libecpg-dev libldap2-dev librsync-dev
apt-get install -y software-properties-common
add-apt-repository -y ppa:ondrej/php
apt-get update -y
apt-get install -y php7.3-dev
apt-get install -y php-dev

# mingw cross compile deps:
apt-get install -y dpkg-dev debhelper g++ libncurses5 pkg-config build-essential libpam0g-dev mingw-w64
Expand Down