aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdeploy/aws/oom_cluster_host_install.sh24
-rwxr-xr-xdeploy/rancher/oom_rancher_setup.sh15
2 files changed, 24 insertions, 15 deletions
diff --git a/deploy/aws/oom_cluster_host_install.sh b/deploy/aws/oom_cluster_host_install.sh
index a65e661..8b6cbd4 100755
--- a/deploy/aws/oom_cluster_host_install.sh
+++ b/deploy/aws/oom_cluster_host_install.sh
@@ -39,6 +39,7 @@ Prereq:
-e [AWS efs id] : AWS Elastic File System ID prefix
-r [AWS region prefix] : AWS Region prefix
-t [token] : registration token
+-h [agent ver] : agent version (default 1.2.9 for 1.6.14
-c [true/false] : use computed client address
-a [IP address] : client address ip - no FQDN
-v [validate true/false]: optional
@@ -50,6 +51,7 @@ register_node() {
DOCKERDATA_NFS=dockerdata-nfs
DOCKER_VER=17.03
USERNAME=ubuntu
+ PORT=8880
if [[ "$IS_NODE" != false ]]; then
sudo curl https://releases.rancher.com/install-docker/$DOCKER_VER.sh | sh
@@ -61,11 +63,11 @@ register_node() {
if [[ "$IS_NODE" != false ]]; then
echo "Running agent docker..."
if [[ "$COMPUTEADDRESS" != false ]]; then
- echo "sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN"
- sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN
+ echo "sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN"
+ sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN
else
- echo "sudo docker run -e CATTLE_AGENT_IP=\"$ADDRESS\" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN"
- sudo docker run -e CATTLE_AGENT_IP="$ADDRESS" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$MASTER:8880/v1/scripts/$TOKEN
+ echo "sudo docker run -e CATTLE_AGENT_IP=\"$ADDRESS\" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN"
+ sudo docker run -e CATTLE_AGENT_IP="$ADDRESS" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v$AGENT_VER http://$MASTER:$PORT/v1/scripts/$TOKEN
fi
fi
}
@@ -75,10 +77,11 @@ MASTER=
TOKEN=
AWS_REGION=
AWS_EFS=
+AGENT_VER=1.2.9
COMPUTEADDRESS=true
ADDRESS=
VALIDATE=
-while getopts ":u:n:s:e:r:t:c:a:v" PARAM; do
+while getopts ":u:n:s:e:r:t:h:c:a:v" PARAM; do
case $PARAM in
u)
usage
@@ -99,6 +102,9 @@ while getopts ":u:n:s:e:r:t:c:a:v" PARAM; do
t)
TOKEN=${OPTARG}
;;
+ h)
+ AGENT_VER=${OPTARG}
+ ;;
c)
COMPUTEADDRESS=${OPTARG}
;;
@@ -120,6 +126,8 @@ if [ -z $MASTER ]; then
exit 1
fi
-register_node $IS_NODE $MASTER $AWS_EFS $AWS_REGION $TOKEN $COMPUTEADDRESS $ADDRESS $VALIDATE
-echo "if you get ERROR: http://$MASTER:8880/v1 is not accessible (The requested URL returned error: 404 Not Found) - check your token"
-printf "**** Done ****\n"
+register_node $IS_NODE $MASTER $AWS_EFS $AWS_REGION $TOKEN $AGENT_VER $COMPUTEADDRESS $ADDRESS $VALIDATE
+echo "check dockerdata-nfs"
+sudo ls /dockerdata-nfs
+echo "if you get http://$MASTER:8880/v1 is not accessible (The requested URL returned error: 404 Not Found) - check your token"
+printf "**** Success: Done ****\n"
diff --git a/deploy/rancher/oom_rancher_setup.sh b/deploy/rancher/oom_rancher_setup.sh
index 45107ea..9b6bf3b 100755
--- a/deploy/rancher/oom_rancher_setup.sh
+++ b/deploy/rancher/oom_rancher_setup.sh
@@ -149,8 +149,8 @@ install_onap() {
HOST_REG_COMMAND=`echo $REGISTRATION_TOKENS | jq -r .data[0].command`
echo "Running agent docker..."
if [[ "$COMPUTEADDRESS" != false ]]; then
- echo "sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/racher:/var/lib/rancher $REGISTRATION_DOCKER $RANCHER_URL/v1/scripts/$REGISTRATION_TOKEN"
- sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/racher:/var/lib/rancher $REGISTRATION_DOCKER $RANCHER_URL/v1/scripts/$REGISTRATION_TOKEN
+ echo "sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher $REGISTRATION_DOCKER $RANCHER_URL/v1/scripts/$REGISTRATION_TOKEN"
+ sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher $REGISTRATION_DOCKER $RANCHER_URL/v1/scripts/$REGISTRATION_TOKEN
else
echo "sudo docker run -e CATTLE_AGENT_IP=\"$ADDRESS\" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$SERVER:$PORT/v1/scripts/$TOKEN"
sudo docker run -e CATTLE_AGENT_IP="$ADDRESS" --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://$SERVER:$PORT/v1/scripts/$REGISTRATION_TOKEN
@@ -209,11 +209,12 @@ EOF
echo "add local helm repo"
sudo helm repo add local http://127.0.0.1:8879
sudo helm repo list
- echo "enabling grafana dashboard"
- kubectl expose -n kube-system deployment monitoring-grafana --type=LoadBalancer --name monitoring-grafana-client
- echo "get the nodeport for a specific VM"
- kubectl get services --all-namespaces | grep graf
- echo "finished"
+ echo "To enable grafana dashboard - do this after running cd.sh which brings up onap - or you may get a 302xx port conflict"
+ echo "kubectl expose -n kube-system deployment monitoring-grafana --type=LoadBalancer --name monitoring-grafana-client"
+ echo "to get the nodeport for a specific VM running grafana"
+ echo "kubectl get services --all-namespaces | grep graf"
+ kubectl get pods --all-namespaces
+ echo "finished!"
}
BRANCH=