|
|
@ -1,5 +1,7 @@ |
|
|
|
#!/bin/bash |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
. setup-rancher-path.sh |
|
|
|
|
|
|
|
|
|
|
|
cd $(dirname $0)/.. |
|
|
|
cd $(dirname $0)/.. |
|
|
|
IP=$(ip addr show dev docker0 | grep -w inet | awk '{print $2}' | cut -f1 -d/) |
|
|
|
IP=$(ip addr show dev docker0 | grep -w inet | awk '{print $2}' | cut -f1 -d/) |
|
|
|
docker run \ |
|
|
|
docker run \ |
|
|
@ -16,4 +18,4 @@ docker run \ |
|
|
|
-v /var/lib/cni \ |
|
|
|
-v /var/lib/cni \ |
|
|
|
-v /usr/lib/x86_64-linux-gnu/libsqlite3.so.0:/usr/lib/x86_64-linux-gnu/libsqlite3.so.0:ro \ |
|
|
|
-v /usr/lib/x86_64-linux-gnu/libsqlite3.so.0:/usr/lib/x86_64-linux-gnu/libsqlite3.so.0:ro \ |
|
|
|
--privileged \ |
|
|
|
--privileged \ |
|
|
|
ubuntu:18.04 /usr/bin/k3s-agent agent -t $(<~/.rancher/k3s/server/node-token) -s https://${IP}:6443 |
|
|
|
ubuntu:18.04 /usr/bin/k3s-agent agent -t $(<${RANCHER_PATH}/k3s/server/node-token) -s https://${IP}:6443 |
|
|
|