Merge pull request #84 from netfoundry/update-clint-start-scripts

latest changes to work with terminators/master
This commit is contained in:
dovholuknf
2020-04-22 14:06:47 -04:00
committed by GitHub
5 changed files with 20 additions and 9 deletions
@@ -1,6 +1,6 @@
#!/bin/bash
cat > ${ZITI_HOME}/${ZITI_EDGE_ROUTER_NAME}.yaml <<HereDocForEdgeRouter
v: 2
v: 3
identity:
cert: ${ZITI_PKI}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_EDGE_ROUTER_HOSTNAME}-router-client.cert
+3 -3
View File
@@ -13,7 +13,7 @@ default:
" > $ZITI_HOME/identities.yml
echo "v: 2
echo "v: 3
identity:
cert: ${ZITI_PKI}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_ROUTER_BR_HOSTNAME}-client.cert
@@ -28,7 +28,7 @@ link:
listener: tls:${ZITI_ROUTER_BR_HOSTNAME}:6001
" > $ZITI_HOME/${ZITI_ROUTER_BR_NAME}.yaml
echo "v: 2
echo "v: 3
identity:
cert: ${ZITI_PKI}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_ROUTER_BLUE_HOSTNAME}-client.cert
@@ -41,7 +41,7 @@ ctrl:
" > $ZITI_HOME/${ZITI_ROUTER_BLUE_NAME}.yaml
echo "v: 2
echo "v: 3
identity:
cert: ${ZITI_PKI}/${ZITI_CONTROLLER_INTERMEDIATE_NAME}/certs/${ZITI_ROUTER_RED_HOSTNAME}-client.cert
+2
View File
@@ -99,5 +99,7 @@ export PS1="ZITI IS RUNNING: "
echo "adding pki-functions to bash shell"
. ${curdir}/pki-functions.sh
alias zec='ziti edge controller'
HERE
)
-2
View File
@@ -1,9 +1,7 @@
# if needed, initialize the controller
ziti-controller edge init "${ZITI_HOME}/controller.yaml" -u "${ZITI_USER}" -p "${ZITI_PWD}"
# tail all the log files that will be created to see any issues
mkdir -p ${ZITI_HOME}
tail -F ${ZITI_HOME}/ziti-*log &
# run the controller
ziti-controller run "${ZITI_HOME}/controller.yaml" > "${ZITI_HOME}/ziti-controller.log" 2>&1 &
Regular → Executable
+14 -3
View File
@@ -1,9 +1,20 @@
ziti edge controller create config netcat ziti-tunneler-client.v1 '{ "hostname" : "localhost", "port" : 7256 }'
ziti edge controller login "${ZITI_EDGE_API_HOSTNAME}" -u "${ZITI_USER}" -p "${ZITI_PWD}" -c "${ZITI_PKI}/${ZITI_EDGE_ROOTCA_NAME}/certs/${ZITI_EDGE_INTERMEDIATE_NAME}.cert"
ziti edge controller create service netcat7256 --configs netcat
ziti edge controller delete service netcatsvc
ziti edge controller delete service zcatsvc
ziti edge controller create terminator netcat7256 "${ZITI_ROUTER_BR_HOSTNAME}" tcp://localhost:7256
ziti edge controller delete config netcatconfig
ziti edge controller delete config zcatsvcconfig
ziti edge controller create config netcatconfig ziti-tunneler-client.v1 '{ "hostname" : "localhost", "port" : 7256 }'
ziti edge controller create service netcatsvc --configs netcatconfig
ziti edge controller create terminator netcatsvc "${ZITI_EDGE_ROUTER_NAME}" tcp:localhost:7256
ziti edge controller create config zcatconfig ziti-tunneler-client.v1 '{ "hostname" : "zcat", "port" : 7256 }'
ziti edge controller create service zcatsvc --configs zcatconfig
ziti edge controller create terminator zcatsvc "${ZITI_EDGE_ROUTER_NAME}" tcp:localhost:7256
ziti edge controller delete identity "test_identity"
ziti edge controller create identity device "test_identity" -o "${ZITI_HOME}/test_identity".jwt
ziti edge controller create service-policy dial-all Dial --service-roles '#all' --identity-roles '#all'