From b25db18410f681bfba53b5dfa3d33650e8313bf2 Mon Sep 17 00:00:00 2001 From: marcushines <80116818+marcushines@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:47:35 -0600 Subject: [PATCH] update packer (#571) * update packer * add bridge --- cloudbuild/external.pkr.hcl | 6 +++++- cloudbuild/internal.pkr.hcl | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cloudbuild/external.pkr.hcl b/cloudbuild/external.pkr.hcl index 742f8679..9441074b 100644 --- a/cloudbuild/external.pkr.hcl +++ b/cloudbuild/external.pkr.hcl @@ -77,6 +77,10 @@ build { "echo \"fs.inotify.max_user_watches=25600000\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers "echo \"fs.inotify.max_queued_events=13107200\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers "echo \"kernel.pid_max=1048575\" | sudo tee -a /etc/sysctl.conf", # configure pid_max for cisco 8000e containers + "sudo modprobe br_netfilter", + "sudo echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables", + "sudo echo 1 > /proc/sys/net/ipv4/ip_forward", + "sudo sysctl --system", "sudo sysctl -p", ] } @@ -134,7 +138,7 @@ build { provisioner "shell" { inline = [ "echo Installing kind...", - "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.22.0", + "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.24.0", "curl --create-dirs -o third_party/licenses/kind/LICENSE https://raw.githubusercontent.com/kubernetes-sigs/kind/main/LICENSE", "sudo cp /home/$USER/go/bin/kind /usr/local/bin/", "/home/$USER/go/bin/kind version", diff --git a/cloudbuild/internal.pkr.hcl b/cloudbuild/internal.pkr.hcl index eaec6b48..912d0d15 100644 --- a/cloudbuild/internal.pkr.hcl +++ b/cloudbuild/internal.pkr.hcl @@ -114,6 +114,11 @@ build { "sudo install -o root -g root -m 0755 cri-dockerd /usr/local/bin/cri-dockerd", "sudo install packaging/systemd/* /etc/systemd/system", "sudo sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service", + "sudo modprobe br_netfilter", + "sudo echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables", + "sudo echo 1 > /proc/sys/net/ipv4/ip_forward", + "sudo sysctl --system", + "sudo sysctl -p", "sudo systemctl daemon-reload", "sudo systemctl enable cri-docker.socket", "sudo systemctl enable cri-docker.service", @@ -130,7 +135,7 @@ build { provisioner "shell" { inline = [ "echo Installing kind...", - "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.22.0", + "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.24.0", "sudo cp /home/$USER/go/bin/kind /usr/local/bin/", "/home/$USER/go/bin/kind version", ]