@@ -66,27 +66,6 @@ sudo apt-get install -y \
66
66
consul-enterprise \
67
67
nomad
68
68
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
-
90
69
# Note: neither service will start on boot because we haven't enabled
91
70
# the systemd unit file and we haven't uploaded any configuration
92
71
# files for Consul and Nomad
@@ -118,6 +97,9 @@ wget -q -O - \
118
97
https://github.com/containernetworking/plugins/releases/download/v1.0.0/cni-plugins-linux-amd64-v1.0.0.tgz \
119
98
| sudo tar -C /opt/cni/bin -xz
120
99
100
+ echo " Installing consul-cni plugin"
101
+ sudo hc-install install --path /opt/cni/bin --version 1.5.1 consul-cni
102
+
121
103
# Copy cni_args plugin and network configuration files into opt/cni/bin and opt/cni/config
122
104
sudo mv /tmp/linux/cni_args.conflist /opt/cni/config
123
105
sudo mv /tmp/linux/cni_args.sh /opt/cni/bin
0 commit comments