summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-08-18 18:18:56 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-08-18 18:18:56 -0700
commit9827b8991d73e91b913e15f0ef6ed0451ee057ea (patch)
tree49ae35adb33da92902622307d55da5bb851990ca /doc
parent4dce71879f5d15af6754c15c606554b1feccdeac (diff)
parent727fb197d8ee9f536fb8f06e00a15599332421c7 (diff)
downloadinfinitytier-9827b8991d73e91b913e15f0ef6ed0451ee057ea.tar.gz
infinitytier-9827b8991d73e91b913e15f0ef6ed0451ee057ea.zip
Merge branch 'edge' of http://10.6.6.2/zerotier/ZeroTierOne into edge
Diffstat (limited to 'doc')
-rw-r--r--doc/ext/kubernetes/.zerotierCliSettings2
-rw-r--r--doc/ext/kubernetes/Dockerfile3
-rw-r--r--doc/ext/kubernetes/entrypoint.sh26
3 files changed, 15 insertions, 16 deletions
diff --git a/doc/ext/kubernetes/.zerotierCliSettings b/doc/ext/kubernetes/.zerotierCliSettings
index abe4cf6c..86fc3a39 100644
--- a/doc/ext/kubernetes/.zerotierCliSettings
+++ b/doc/ext/kubernetes/.zerotierCliSettings
@@ -5,7 +5,7 @@
"defaultOne": "@local",
"things": {
"local": {
- "auth": "XXXXXXXXXXXXXXXXXXXXXXXX",
+ "auth": "local_service_auth_token_replaced_automatically",
"type": "one",
"url": "http://127.0.0.1:9993/"
},
diff --git a/doc/ext/kubernetes/Dockerfile b/doc/ext/kubernetes/Dockerfile
index 74af6c1a..6437a2bb 100644
--- a/doc/ext/kubernetes/Dockerfile
+++ b/doc/ext/kubernetes/Dockerfile
@@ -4,7 +4,8 @@ EXPOSE 8080/tcp 9993/udp
# Install ZT network conf files
RUN mkdir -p /var/lib/zerotier-one/networks.d
ADD *.conf /var/lib/zerotier-one/networks.d/
-ADD zerotier /
+ADD *.conf /
+ADD zerotier-one /
ADD zerotier-cli /
ADD .zerotierCliSettings /
diff --git a/doc/ext/kubernetes/entrypoint.sh b/doc/ext/kubernetes/entrypoint.sh
index 881d92cf..e94363d6 100644
--- a/doc/ext/kubernetes/entrypoint.sh
+++ b/doc/ext/kubernetes/entrypoint.sh
@@ -1,23 +1,21 @@
+#!/bin/bash
+
echo '*** ZeroTier-Kubernetes self-auth test script'
chown -R daemon /var/lib/zerotier-one
chgrp -R daemon /var/lib/zerotier-one
su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1'
-virtip4=""
-while [ -z "$virtip4" ]; do
- sleep 0.2
- virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1`
- dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'`
-done
-echo '*** Up and running at' $virtip4 ' on network: ' $nwid
+dev=""
-echo '*** Self-Authorizing to deployment network'
nwconf=$(ls *.conf)
nwid="${nwconf%.*}"
-AUTHTOKEN=$(cat /var/lib/zerotier-one/authtoken.secret)
-sed "s|\local_service_auth_token|${AUTHTOKEN}|" .zerotierCliSettings > /root/.zerotierCliSettings
-
-./zerotier-cli join $(nwid).conf
-./zerotier-cli net-auth $(nwid) $(dev)
+sleep 10
+dev=$(cat /var/lib/zerotier-one/identity.public| cut -d ':' -f 1)
-# node server.js \ No newline at end of file
+echo '*** Joining'
+./zerotier-cli join "$nwid".conf
+AUTHTOKEN=$(cat /var/lib/zerotier-one/authtoken.secret)
+sed "s|\local_service_auth_token_replaced_automatically|${AUTHTOKEN}|" .zerotierCliSettings > /root/.zerotierCliSettings
+echo '*** Authorizing'
+./zerotier-cli net-auth @my.zerotier.com "$nwid" "$dev"
+node server.js \ No newline at end of file