Skip to content

Commit de10efa

Browse files
authored
e2e: hc-install consul-cni (#23612)
now that the version with tproxy CNI_ARGS is on releases.hashicorp.com
1 parent afbd283 commit de10efa

File tree

1 file changed

+3
-21
lines changed
  • e2e/terraform/packer/ubuntu-jammy-amd64

1 file changed

+3
-21
lines changed

e2e/terraform/packer/ubuntu-jammy-amd64/setup.sh

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,6 @@ sudo apt-get install -y \
6666
consul-enterprise \
6767
nomad
6868

69-
# TODO(tgross: replace with downloading the binary from releases.hashicorp.com
70-
# once the official 1.4.2 release has shipped
71-
echo "Installing consul-cni plugin"
72-
sudo apt-get install -y build-essential git
73-
74-
pushd /tmp
75-
curl -LO https://go.dev/dl/go1.22.2.linux-amd64.tar.gz
76-
sudo tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
77-
git clone --depth=1 https://github.com/hashicorp/consul-k8s.git
78-
pushd consul-k8s
79-
export PATH="$PATH:/usr/local/go/bin"
80-
make control-plane-dev
81-
82-
sudo mv control-plane/cni/bin/consul-cni /opt/cni/bin
83-
sudo chown root:root /opt/cni/bin/consul-cni
84-
sudo chmod +x /opt/cni/bin/consul-cni
85-
popd
86-
popd
87-
# save us a bunch of disk space
88-
/usr/local/go/bin/go clean -cache -modcache
89-
9069
# Note: neither service will start on boot because we haven't enabled
9170
# the systemd unit file and we haven't uploaded any configuration
9271
# files for Consul and Nomad
@@ -118,6 +97,9 @@ wget -q -O - \
11897
https://github.com/containernetworking/plugins/releases/download/v1.0.0/cni-plugins-linux-amd64-v1.0.0.tgz \
11998
| sudo tar -C /opt/cni/bin -xz
12099

100+
echo "Installing consul-cni plugin"
101+
sudo hc-install install --path /opt/cni/bin --version 1.5.1 consul-cni
102+
121103
# Copy cni_args plugin and network configuration files into opt/cni/bin and opt/cni/config
122104
sudo mv /tmp/linux/cni_args.conflist /opt/cni/config
123105
sudo mv /tmp/linux/cni_args.sh /opt/cni/bin

0 commit comments

Comments
 (0)