From 2e33495326bf8d0cc0b44317390ad8de13eae647 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 17 Feb 2017 13:45:05 +0000 Subject: [PATCH 1/6] Update Kubernetes instructions - use `kube-system` namespace - use prefered URL instead of backward-compatible one --- site/installing.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/installing.md b/site/installing.md index f9f97f078..b831ebb70 100644 --- a/site/installing.md +++ b/site/installing.md @@ -215,7 +215,7 @@ Weave Cloud hosts the Scope UI for you, provides secure access control for your Sign up for a [Weave Cloud account](https://cloud.weave.works/) and obtain a token. Replace `` with your token by running this on the master node or on whatever machine that has `kubectl` configured to authenticate to your Kubernetes cluster: - $ kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml?service-token=' + $ kubectl apply --namespace kube-system -f 'https://cloud.weave.works/k8s/scope.yaml?service-token=' **SECURITY NOTE: This allows control of your Kubernetes cluster from Weave Cloud, which is a hosted service.** @@ -223,7 +223,7 @@ Sign up for a [Weave Cloud account](https://cloud.weave.works/) and obtain a tok The simplest way to get the latest release of Scope deployed onto a Kubernetes cluster is by running the following: - $ kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml' + $ kubectl apply --namespace kube-system -f 'https://cloud.weave.works/k8s/scope.yaml' This runs a recent Scope image from Dockerhub and launches a probe onto every node as well as a single Scope app. Once launched, Scope doesn’t require any other configuration. @@ -235,11 +235,11 @@ Allowable parameters for the launcher URL: To download and read the Scope manifest run: - curl --silent -L --remote-name https://cloud.weave.works/launch/k8s/weavescope.yaml + curl --silent --location --remote-name https://cloud.weave.works/k8s/scope.yaml **Open Scope in Your Browser** - kubectl port-forward $(kubectl get pod --selector=weave-scope-component=app -o jsonpath='{.items..metadata.name}') 4040 + kubectl port-forward -n kube-system "$(kubectl get -n kube-system pod --selector=weave-scope-component=app -o jsonpath='{.items..metadata.name}')" 4040 The URL is: http://localhost:4040. From faf308eca3276e5d4fce11f277fa845f13c3211f Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 17 Feb 2017 13:57:14 +0000 Subject: [PATCH 2/6] Make all commands formatted consistently --- site/installing.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/site/installing.md b/site/installing.md index b831ebb70..08c4ee093 100644 --- a/site/installing.md +++ b/site/installing.md @@ -85,18 +85,18 @@ Suppose you have the following nodes in a cluster: **1. To begin run the following on each node:** - sudo curl -L git.io/scope -o /usr/local/bin/scope - sudo chmod a+x /usr/local/bin/scope + sudo curl -L git.io/scope -o /usr/local/bin/scope + sudo chmod a+x /usr/local/bin/scope **2. Then on the first node launch scope with:** - scope launch 192.168.100.18 192.168.100.19 192.168.100.20 + scope launch 192.168.100.18 192.168.100.19 192.168.100.20 **3. And do the same for all of the other nodes in your cluster:** - scope launch 192.168.100.17 192.168.100.20 192.168.100.21 - scope launch 192.168.100.17 192.168.100.18 192.168.100.21 - scope launch 192.168.100.17 192.198.100.19 192.168.100.20 + scope launch 192.168.100.17 192.168.100.20 192.168.100.21 + scope launch 192.168.100.17 192.168.100.18 192.168.100.21 + scope launch 192.168.100.17 192.198.100.19 192.168.100.20 ### Weave Net and Scope @@ -107,7 +107,7 @@ Each probe sends its reports to every app registered at this address. If you hav If you don’t want to use weaveDNS, then Scope can be instructed to cluster with other Scope instances on the command line. Hostnames and IP addresses are acceptable, both with and without ports, for example: - # scope launch scope1:4030 192.168.0.12 192.168.0.11:4030 + scope launch scope1:4030 192.168.0.12 192.168.0.11:4030 Hostnames will be regularly resolved as A records, and each answer used as a target. @@ -215,7 +215,7 @@ Weave Cloud hosts the Scope UI for you, provides secure access control for your Sign up for a [Weave Cloud account](https://cloud.weave.works/) and obtain a token. Replace `` with your token by running this on the master node or on whatever machine that has `kubectl` configured to authenticate to your Kubernetes cluster: - $ kubectl apply --namespace kube-system -f 'https://cloud.weave.works/k8s/scope.yaml?service-token=' + kubectl apply --namespace kube-system -f 'https://cloud.weave.works/k8s/scope.yaml?service-token=' **SECURITY NOTE: This allows control of your Kubernetes cluster from Weave Cloud, which is a hosted service.** @@ -223,7 +223,7 @@ Sign up for a [Weave Cloud account](https://cloud.weave.works/) and obtain a tok The simplest way to get the latest release of Scope deployed onto a Kubernetes cluster is by running the following: - $ kubectl apply --namespace kube-system -f 'https://cloud.weave.works/k8s/scope.yaml' + kubectl apply --namespace kube-system -f 'https://cloud.weave.works/k8s/scope.yaml' This runs a recent Scope image from Dockerhub and launches a probe onto every node as well as a single Scope app. Once launched, Scope doesn’t require any other configuration. From ce24f3dec9260816ea88517084a7575b7e4bac38 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 17 Feb 2017 14:05:41 +0000 Subject: [PATCH 3/6] Document installation on OpenShift --- site/installing.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/site/installing.md b/site/installing.md index 08c4ee093..acacbeafe 100644 --- a/site/installing.md +++ b/site/installing.md @@ -243,6 +243,32 @@ To download and read the Scope manifest run: The URL is: http://localhost:4040. +##Installing Scope on OpenShift + +To install Weave Scope on OpenShift, you first need to login as `admin` user: + + oc login -u admin + +Next, create a dedicated project for Weave Scope and apply policy permissions to allow Weave Scope to access Kubernetes API: + + oc new-project weave-scope + oc adm policy add-scc-to-user privileged system:serviceaccount:weave-scope:default + oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:weave-scope:default + +The installation method for Scope on OpenShift is very similar to the one described above for Kubernetes, but instead of `kubectl apply -n kube-system ...` you need to use +`oc apply ...` and install it into the namespace of the `weave-scope` project you have just created, and not the `kube-system` namesapce, i.e.: + +#### With Weave Cloud (recommended) + + oc apply -f 'https://cloud.weave.works/k8s/scope.yaml?service-token=' + + +#### Without Weave Cloud (run Scope in standalone mode) + + oc apply -f 'https://cloud.weave.works/k8s/scope.yaml' + +To access standalone Scope app from the browser, please refer to Kubernetes instructions above. + ##Installing Scope on Amazon ECS There are currently three options for launching Weave Scope in ECS: From 4ef338e04c6f30c09bd1e4c238248c7d3071820f Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 17 Feb 2017 16:02:59 +0000 Subject: [PATCH 4/6] Improve text in OpenShift section --- site/installing.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/site/installing.md b/site/installing.md index acacbeafe..683bf4bec 100644 --- a/site/installing.md +++ b/site/installing.md @@ -245,11 +245,11 @@ The URL is: http://localhost:4040. ##Installing Scope on OpenShift -To install Weave Scope on OpenShift, you first need to login as `admin` user: +To install Weave Scope on OpenShift, you first need to login as `admin` user with the following command: oc login -u admin -Next, create a dedicated project for Weave Scope and apply policy permissions to allow Weave Scope to access Kubernetes API: +Next, create a dedicated project for Weave Scope then apply policy permissions that allow Weave Scope to access Kubernetes API: oc new-project weave-scope oc adm policy add-scc-to-user privileged system:serviceaccount:weave-scope:default @@ -258,12 +258,11 @@ Next, create a dedicated project for Weave Scope and apply policy permissions to The installation method for Scope on OpenShift is very similar to the one described above for Kubernetes, but instead of `kubectl apply -n kube-system ...` you need to use `oc apply ...` and install it into the namespace of the `weave-scope` project you have just created, and not the `kube-system` namesapce, i.e.: -#### With Weave Cloud (recommended) +If you are to use Weave Cloud run this command: oc apply -f 'https://cloud.weave.works/k8s/scope.yaml?service-token=' - -#### Without Weave Cloud (run Scope in standalone mode) +And if you are to deploy Scope in standalone mode run: oc apply -f 'https://cloud.weave.works/k8s/scope.yaml' From b63bc0a4611ad1277c6f03d1e4d54a654fac88ef Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Tue, 7 Mar 2017 13:01:16 +0000 Subject: [PATCH 5/6] Comment out the OpenShift section until https://github.com/weaveworks/scope/issues/2258 is fixed --- site/installing.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/installing.md b/site/installing.md index 683bf4bec..bba7306d8 100644 --- a/site/installing.md +++ b/site/installing.md @@ -243,11 +243,12 @@ To download and read the Scope manifest run: The URL is: http://localhost:4040. + ##Installing Scope on Amazon ECS From b415a860380c1e5b3c0f0804bdc3d43d2cbc9bc3 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Tue, 7 Mar 2017 13:09:45 +0000 Subject: [PATCH 6/6] Fix indentation --- site/installing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/site/installing.md b/site/installing.md index bba7306d8..167296b44 100644 --- a/site/installing.md +++ b/site/installing.md @@ -75,13 +75,13 @@ This example assumes a local cluster that is not networked with Weave Net, and a Suppose you have the following nodes in a cluster: - 192.168.100.16 - 192.168.100.17 - 192.168.100.18 - 192.168.100.19 - 192.168.100.20 + 192.168.100.16 + 192.168.100.17 + 192.168.100.18 + 192.168.100.19 + 192.168.100.20 - Using the above IP addresses, you will manually peer each node with all of the other nodes during Scope launch: +Using the above IP addresses, you will manually peer each node with all of the other nodes during Scope launch: **1. To begin run the following on each node:**