Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit ae7107b

Browse files
author
Vishal Lal
committed
Fix documentation
1 parent 697080b commit ae7107b

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

deployment/docker-swarm.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,11 @@ Using any IP from the command: `terraform output`
136136

137137
<!-- deploy-doc-hidden run-tests
138138
139-
cat > /root/boot.sh <<-EOF
140-
#!/usr/bin/env bash
141-
docker service create -\-constraint='node.role == manager' -\-network=dockerswarm_default -\-name healthcheck weaveworksdemos/healthcheck:snapshot -s user,catalogue,carts,shipping,payment,orders -r 5
142-
sleep 60
143-
ID=\$(docker ps -a | grep healthcheck | awk '{print \$1}' | head -n1)
144-
docker logs -f \$ID
145-
EOF
146-
147139
master_ip=$(terraform output -json | jq -r '.master_address.value' )
148-
scp -i ~/.ssh/docker-swarm.pem /root/boot.sh ubuntu@$master_ip:/home/ubuntu/
149-
ssh -i ~/.ssh/docker-swarm.pem ubuntu@$master_ip "chmod +x boot.sh; ./boot.sh"
140+
ssh -i ~/.ssh/docker-swarm.pem ubuntu@$master_ip "docker service create -\-constraint='node.role == manager' -\-network=dockerswarm_default -\-name healthcheck weaveworksdemos/healthcheck:snapshot -s user,catalogue,carts,shipping,payment,orders -r 5"
141+
sleep 60
142+
ID=$(ssh -i ~/.ssh/docker-swarm.pem ubuntu@$master_ip sh -c "docker ps -a | grep healthcheck | awk '{print $1}' | head -n1")
143+
ssh -i ~/.ssh/docker-swarm.pem ubuntu@$master_ip sh -c "docker logs -f $ID"
150144
151145
if [ $? -ne 0 ]; then
152146
exit 1;

deployment/kubernetes.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ Our master node makes use of some of the files in this repo so lets securely cop
8080

8181
master_ip=$(terraform output -json | jq -r '.master_address.value')
8282
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip sudo kubeadm init > k8s-init.log
83+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "sudo cp /etc/kubernetes/admin.conf /home/ubuntu/"
84+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "sudo chown \$(id -u):\$(id -g) \$HOME/admin.conf"
8385
grep -e --token k8s-init.log > join.cmd
84-
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f https://git.io/weave-kube
86+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip KUBECONFIG=\$HOME/admin.conf kubectl apply -f https://git.io/weave-kube-1.6
8587

8688
<!-- deploy-doc-end -->
8789

@@ -107,7 +109,7 @@ There are two options for running Weave Scope, either you can run the UI locally
107109
<!-- deploy-doc-start create-infrastructure -->
108110

109111
master_ip=$(terraform output -json | jq -r '.master_address.value')
110-
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml'
112+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip KUBECONFIG=\$HOME/admin.conf kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml'
111113

112114
<!-- deploy-doc-end -->
113115

@@ -139,7 +141,7 @@ You may optionally choose to configure Weave Flux which allows automatic deploym
139141
<!-- deploy-doc-start create-infrastructure -->
140142

141143
master_ip=$(terraform output -json | jq -r '.master_address.value')
142-
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f /tmp/manifests/sock-shop-ns.yaml -f /tmp/manifests/zipkin-ns.yaml -f /tmp/manifests
144+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip KUBECONFIG=\$HOME/admin.conf kubectl apply -f /tmp/manifests/sock-shop-ns.yaml -f /tmp/manifests/zipkin-ns.yaml -f /tmp/manifests
143145

144146
<!-- deploy-doc-end -->
145147

@@ -194,7 +196,7 @@ This will send some traffic to the application, which will form the connection g
194196
docker run --rm weaveworksdemos/load-test -d 300 -h $elb_url -c 2 -r 100
195197
196198
master_ip=$(terraform output -json | jq -r '.master_address.value')
197-
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "kubectl run -i -t -\-namespace=sock-shop healthcheck -\-restart=Never -\-image=weaveworksdemos/healthcheck:snapshot -- -s orders,carts,payment,user,catalogue,shipping,queue-master -d 60 -r 5"
199+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip "KUBECONFIG=\$HOME/admin.conf kubectl run -i -t -\-namespace=sock-shop healthcheck -\-restart=Never -\-image=weaveworksdemos/healthcheck:snapshot -- -s orders,carts,payment,user,catalogue,shipping,queue-master -d 60 -r 5"
198200
199201
set +e
200202

0 commit comments

Comments
 (0)