From cf8019333fd1a79d0bfc98ff6764d0fecafbad49 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:09:04 +0000 Subject: [PATCH 1/9] consolidate Weave Cloud instructions The instructions for installing via Weave Cloud were rather out of date, and in any case are embedded in Weave Cloud itself, so there is no point repeating them here. --- site/installing.md | 130 +++++++-------------------------------------- 1 file changed, 20 insertions(+), 110 deletions(-) diff --git a/site/installing.md b/site/installing.md index dae51c728..bb63b7c9b 100644 --- a/site/installing.md +++ b/site/installing.md @@ -7,27 +7,32 @@ search_type: Documentation Weave Scope consists of three parts: the probe, the app and the user interface. Scope can be deployed in either a standalone configuration, where you run everything yourself, or you can use Weave Cloud. -Weave Cloud is the recommended option if: +The following topics are discussed: + + * [Installing Scope via Weave Cloud](#weave-cloud) + * [Installing Scope on Docker](#docker) + * [Installing Scope on a Local Cluster Without Weave Net](#cluster-no-net) + * [Weave Net and Scope](#net-scope) + * [Using Docker Compose](#docker-compose) + * [Installing Scope on Kubernetes](#k8s) + * [Installing Scope on Amazon ECS](#ecs) + * [Installing Scope on minimesos](#minimesos) + * [Installing Scope on Mesosphere DC/OS](#dcos) + +## Installing Scope via Weave Cloud + +Weave Cloud is a SaaS that simplifies deployment, monitoring and +management of your containers and microservices. Installing Weave +Scope via Weave Cloud is the recommended option if: * You are deploying to larger clusters. * You require secure remote access. * You want to share access with your coworkers. * You want to minimize Weave Scope memory and CPU usage. -The following topics are discussed: - - * [Installing Scope on Docker](#docker) - * [Using Weave Cloud](#docker-weave-cloud) - * [Installing Scope on a Local Cluster Without Weave Net](#cluster-no-net) - * [Weave Net and Scope](#net-scope) - * [Using Docker Compose](#docker-compose) - * [Using Docker Compose in Weave Cloud](#docker-compose-cloud) - * [Installing Scope on Kubernetes](#k8s) - * [With Weave Cloud](#k8s-weave-cloud) - * [Without Weave Cloud](#k8s-standalone) - * [Installing Scope on Amazon ECS](#ecs) - * [Installing Scope on minimesos](#minimesos) - * [Installing Scope on Mesosphere DC/OS](#dcos) +Weave Cloud provides easy step-by-step instructions for installation +on a variety of platforms and orchestrators. To get started with Weave +Cloud, [sign up for a free trial](https://cloud.weave.works/). ## Installing Scope on Docker @@ -49,27 +54,6 @@ Where, >**Note:** Scope allows anyone with access to the user interface, control over your containers. As such, the Scope app endpoint (port 4040) should not be made accessible on the Internet. Also traffic between the app and the probe is insecure and should not traverse the Internet. This means that you should either use the private / internal IP addresses of your nodes when setting it up, or route this traffic through Weave Net. Put Scope behind a password, by using an application like [Caddy](https://github.com/mholt/caddy) to protect the endpoint and by making port 4040 available to localhost with Caddy proxying it. Or you can skip these steps, and just use Weave Cloud to manage the security for you. -### Using Weave Cloud - -First, obtain a Weave Cloud token by signing up at [https://cloud.weave.works](https://cloud.weave.works/). - -!['Weave Cloud Token'](images/weave-cloud-token.png) - -Launch Scope onto your nodes: - - sudo curl -L git.io/scope -o /usr/local/bin/scope - sudo chmod a+x /usr/local/bin/scope - scope launch --service-token= - -Where, - -* `--service-token=` is the token you obtained from Weave Cloud. - -This script downloads and runs a recent Scope Docker image from the Docker Hub. Scope needs to be installed onto every machine that you want to monitor. - -Open your web browser to [https://cloud.weave.works](https://cloud.weave.works) and login. Click 'View Instance' to see the Scope user interface. - - ### Installing Scope on a Local Cluster Without Weave Net This example assumes a local cluster that is not networked with Weave Net, and also has no special hostnames or DNS settings. You will launch Scope with the IP addresses of all of the nodes in the cluster. @@ -154,76 +138,8 @@ After it’s been launched, open your browser to `http://localhost:4040`. Version 2 of this YAML file supports networks and volumes as defined by any plugins you might be using. See [Compose File Reference](https://docs.docker.com/compose/compose-file/) for more information. -### Using Docker Compose with Weave Cloud - -**1.** First, obtain a Cloud token from Weave Cloud by signing up at [https://cloud.weave.works](https://cloud.weave.works/). - -!['Weave Cloud Token'](images/weave-cloud-token.png) - -**2.** Decide on which format version to use: - -**Docker Compose Format Version 1:** - - probe: - image: weaveworks/scope:1.7.3 - net: "host" - pid: "host" - privileged: true - labels: - - "works.weave.role=system" - volumes: - - "/var/run/docker.sock:/var/run/docker.sock:rw" - command: - - "--probe.docker=true" - - "--service-token=${SCOPE_SERVICE_TOKEN}" - -**Docker Compose Format Version 2:** - - version: '2' - services: - probe: - image: weaveworks/scope:1.7.3 - network_mode: "host" - pid: "host" - privileged: true - labels: - - "works.weave.role=system" - volumes: - - "/var/run/docker.sock:/var/run/docker.sock:rw" - command: - - "--probe.docker=true" - - "--service-token=${SCOPE_SERVICE_TOKEN}" - -Version 2 of this YAML file supports a network mode that may be required with any Docker plugins that you are using. See [Compose File Reference](https://docs.docker.com/compose/compose-file/) for more information. - -Copy the contents of one of the above fragments into a file `docker-compose.yml`. - -**3.** Once you've set up a compose file, launch Scope onto your local machine: - - SCOPE_SERVICE_TOKEN= docker-compose up -d - -Where, - -* `SCOPE_SERVICE_TOKEN=` is the token you obtained after you signed up for Weave Cloud. - -Note that you will need to launch Scope on every node that you want to monitor. - -**4.** Go to [https://cloud.weave.works](https://cloud.weave.works) and click 'View Instance'. - ## Installing Scope on Kubernetes -### With Weave Cloud (recommended) - -Weave Cloud hosts the Scope UI for you, provides secure access control for your team and saves resources such as CPU or memory usage. - -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/k8s/scope.yaml?service-token=&k8s-version=$(kubectl version | base64 | tr -d '\n')" - -**SECURITY NOTE: This allows control of your Kubernetes cluster from Weave Cloud, which is a hosted service.** - -### Without Weave Cloud (run Scope in standalone mode) - 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/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')" @@ -261,12 +177,6 @@ Next, create a dedicated project for Weave Scope then apply policy changes neede The installation method for Scope on OpenShift is very similar to the one described above for Kubernetes, but instead of `kubectl apply ...` you need to use `oc apply ...` and install it into the namespace of the `weave-scope` project you have just created, and not the `weave` namespace, i.e.: -If you are to use Weave Cloud run this command: - - oc apply -f 'https://cloud.weave.works/k8s/scope.yaml?service-token=' - -And if you are to deploy Scope in standalone mode run: - oc apply -f 'https://cloud.weave.works/k8s/scope.yaml' To access standalone Scope app from the browser, please refer to Kubernetes instructions above. From 0de93e45849aba6287e039dba68bd9466f4c735b Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:12:58 +0000 Subject: [PATCH 2/9] cosmetic: remove trailing whitespace --- site/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/installing.md b/site/installing.md index bb63b7c9b..e64c8bb31 100644 --- a/site/installing.md +++ b/site/installing.md @@ -44,7 +44,7 @@ To install Scope in stand-alone mode, run the following commands: This script downloads and runs a recent Scope image from Docker Hub. Scope needs to be installed onto every machine that you want to monitor. -After Scope is installed, open your browser to `http://localhost:4040`. +After Scope is installed, open your browser to `http://localhost:4040`. If you are using docker-machine, you can find the IP by running, `docker-machine ip `. From a2b78e223da648c94e3727e5f027886956e28766 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:14:00 +0000 Subject: [PATCH 3/9] extol more Weave Cloud goodness --- site/installing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/installing.md b/site/installing.md index e64c8bb31..1fb29580c 100644 --- a/site/installing.md +++ b/site/installing.md @@ -25,10 +25,12 @@ Weave Cloud is a SaaS that simplifies deployment, monitoring and management of your containers and microservices. Installing Weave Scope via Weave Cloud is the recommended option if: + * You are new to Weave Scope. * You are deploying to larger clusters. * You require secure remote access. * You want to share access with your coworkers. * You want to minimize Weave Scope memory and CPU usage. + * You want to benefit from Weave Cloud features beyond Weave Scope. Weave Cloud provides easy step-by-step instructions for installation on a variety of platforms and orchestrators. To get started with Weave From a5ed279c1502785ca0bf33461c193f4625afe9b0 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:18:19 +0000 Subject: [PATCH 4/9] tweak k8s instructions --- site/installing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/installing.md b/site/installing.md index 1fb29580c..889200b65 100644 --- a/site/installing.md +++ b/site/installing.md @@ -142,11 +142,11 @@ Version 2 of this YAML file supports networks and volumes as defined by any plug ## Installing Scope on Kubernetes -The simplest way to get the latest release of Scope deployed onto a Kubernetes cluster is by running the following: +To install Weave Scope on your Kubernetes cluster, run kubectl apply -f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')" -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. +This downloads 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. Allowable parameters for the launcher URL: From 07aaee22949478c075d61ea18afb8a120fb8c480 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:20:20 +0000 Subject: [PATCH 5/9] add GKE instructions --- site/installing.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/installing.md b/site/installing.md index 889200b65..1e48c2e7d 100644 --- a/site/installing.md +++ b/site/installing.md @@ -142,6 +142,11 @@ Version 2 of this YAML file supports networks and volumes as defined by any plug ## Installing Scope on Kubernetes +If your cluster is on GKE, first you need to grant permissions for the +installation with: + + kubectl create clusterrolebinding "cluster-admin-$(whoami)" --clusterrole=cluster-admin --user="$(gcloud config get-value core/account)" + To install Weave Scope on your Kubernetes cluster, run kubectl apply -f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')" From 5ffd0a841b8f6c854fd2288725bbb2e4c5b89ecd Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:41:57 +0000 Subject: [PATCH 6/9] clarify the difference between standalone and Weave Cloud install --- site/installing.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/installing.md b/site/installing.md index 1e48c2e7d..0958909c0 100644 --- a/site/installing.md +++ b/site/installing.md @@ -4,8 +4,7 @@ menu_order: 20 search_type: Documentation --- - -Weave Scope consists of three parts: the probe, the app and the user interface. Scope can be deployed in either a standalone configuration, where you run everything yourself, or you can use Weave Cloud. +Weave Scope consists of three parts: the probe, the app and the user interface. Scope can be deployed in either a standalone configuration, where you run everything yourself, or you can use Weave Cloud, in which case only the probes run in your environment, and the app and UI are hosted by Weave Cloud. The following topics are discussed: From be1445bcb6306bd5d02ec32f03bd4146bb4e8592 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:46:55 +0000 Subject: [PATCH 7/9] revamp installation instruction structure --- site/installing.md | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/site/installing.md b/site/installing.md index 0958909c0..38f6f8ffb 100644 --- a/site/installing.md +++ b/site/installing.md @@ -6,19 +6,20 @@ search_type: Documentation Weave Scope consists of three parts: the probe, the app and the user interface. Scope can be deployed in either a standalone configuration, where you run everything yourself, or you can use Weave Cloud, in which case only the probes run in your environment, and the app and UI are hosted by Weave Cloud. -The following topics are discussed: - - * [Installing Scope via Weave Cloud](#weave-cloud) - * [Installing Scope on Docker](#docker) - * [Installing Scope on a Local Cluster Without Weave Net](#cluster-no-net) - * [Weave Net and Scope](#net-scope) + * [Installing on any Platform and Orchestrator, via Weave Cloud](#weave-cloud) + * [Installing on Docker](#docker) + * [Single-node](#docker-single-node) + * [Cluster](#docker-cluster) + * [Cluster with Weave Net](#docker-cluster-net) * [Using Docker Compose](#docker-compose) - * [Installing Scope on Kubernetes](#k8s) - * [Installing Scope on Amazon ECS](#ecs) - * [Installing Scope on minimesos](#minimesos) - * [Installing Scope on Mesosphere DC/OS](#dcos) + * [Installing on Orchestrators](#orchestrators) + * [Kubernetes](#k8s) + * [OpenShift](#ose) + * [Amazon ECS](#ecs) + * [minimesos](#minimesos) + * [Mesosphere DC/OS](#dcos) -## Installing Scope via Weave Cloud +## Installing on any Platform and Orchestrator, via Weave Cloud Weave Cloud is a SaaS that simplifies deployment, monitoring and management of your containers and microservices. Installing Weave @@ -35,7 +36,9 @@ Weave Cloud provides easy step-by-step instructions for installation on a variety of platforms and orchestrators. To get started with Weave Cloud, [sign up for a free trial](https://cloud.weave.works/). -## Installing Scope on Docker +## Installing on Docker + +### Single-node To install Scope in stand-alone mode, run the following commands: @@ -55,7 +58,7 @@ Where, >**Note:** Scope allows anyone with access to the user interface, control over your containers. As such, the Scope app endpoint (port 4040) should not be made accessible on the Internet. Also traffic between the app and the probe is insecure and should not traverse the Internet. This means that you should either use the private / internal IP addresses of your nodes when setting it up, or route this traffic through Weave Net. Put Scope behind a password, by using an application like [Caddy](https://github.com/mholt/caddy) to protect the endpoint and by making port 4040 available to localhost with Caddy proxying it. Or you can skip these steps, and just use Weave Cloud to manage the security for you. -### Installing Scope on a Local Cluster Without Weave Net +### Cluster This example assumes a local cluster that is not networked with Weave Net, and also has no special hostnames or DNS settings. You will launch Scope with the IP addresses of all of the nodes in the cluster. @@ -84,8 +87,7 @@ Using the above IP addresses, you will manually peer each node with all of the o 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 +### Cluster with Weave Net If Scope is running on the same machine as the Weave Network, then the probe uses weaveDNS to automatically discover any other apps on the network. Scope does this by registering itself under the address `scope.weave.local`. @@ -139,7 +141,9 @@ After it’s been launched, open your browser to `http://localhost:4040`. Version 2 of this YAML file supports networks and volumes as defined by any plugins you might be using. See [Compose File Reference](https://docs.docker.com/compose/compose-file/) for more information. -## Installing Scope on Kubernetes +## Installing on Orchestrators + +### Kubernetes If your cluster is on GKE, first you need to grant permissions for the installation with: @@ -164,7 +168,7 @@ Allowable parameters for the launcher URL: The URL is: http://localhost:4040. -## Installing Scope on OpenShift +### OpenShift To install Weave Scope on OpenShift, you first need to login as `system:admin` user with the following command: @@ -187,7 +191,7 @@ The installation method for Scope on OpenShift is very similar to the one descri To access standalone Scope app from the browser, please refer to Kubernetes instructions above. -## Installing Scope on Amazon ECS +### Amazon ECS There are currently three options for launching Weave Scope in ECS: @@ -212,7 +216,7 @@ The link below will launch a sample app using a Cloudformation template, but you For step by step instructions on how to configure the stack, see: [Install Weave to AWS with One-Click](https://www.weave.works/docs/cloud/latest/install/ec2-no-kubernetes/) -## Installing Scope on minimesos +### minimesos The [minimesos](https://github.com/ContainerSolutions/minimesos) project enables you to run an Apache Mesos cluster on a single machine, which makes it very easy to develop Mesos frameworks. @@ -224,7 +228,7 @@ If Weave Scope is removed from your minimesos cluster, you can add it back with minimesos install --marathonFile https://raw.githubusercontent.com/weaveworks/scope/master/examples/mesos/minimesos.json ``` -## Installing Scope as a DC/OS Package +### DC/OS Scope can be installed as a DC/OS Package through the open Universe. From a855358901d57779fdeed40af96238bc02f21a1c Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 3 Feb 2018 12:50:23 +0000 Subject: [PATCH 8/9] remove some references to 'standalone' mode since _all_ the instructions refer to that. --- site/installing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/installing.md b/site/installing.md index 38f6f8ffb..857e591cb 100644 --- a/site/installing.md +++ b/site/installing.md @@ -40,7 +40,7 @@ Cloud, [sign up for a free trial](https://cloud.weave.works/). ### Single-node -To install Scope in stand-alone mode, run the following commands: +To install Scope on a single node, run the following commands: sudo curl -L git.io/scope -o /usr/local/bin/scope sudo chmod a+x /usr/local/bin/scope @@ -101,7 +101,7 @@ Hostnames will be regularly resolved as A records, and each answer used as a tar ### Using Docker Compose -To install Scope on your local Docker machine in Standalone Mode using Docker Compose, copy the contents of one of the two fragments below into a file `docker-compose.yml` and run +To install Scope on your local Docker machine using Docker Compose, copy the contents of one of the two fragments below into a file `docker-compose.yml` and run docker-compose up -d @@ -189,7 +189,7 @@ The installation method for Scope on OpenShift is very similar to the one descri oc apply -f 'https://cloud.weave.works/k8s/scope.yaml' -To access standalone Scope app from the browser, please refer to Kubernetes instructions above. +To access the Scope app from the browser, please refer to Kubernetes instructions above. ### Amazon ECS From 7e807175d9bae1cb11f6ed206d7bb3976f5365bd Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 5 Feb 2018 14:39:32 +0000 Subject: [PATCH 9/9] link to k8s instructions from openshift instructions --- site/installing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/installing.md b/site/installing.md index 857e591cb..f80db9a7e 100644 --- a/site/installing.md +++ b/site/installing.md @@ -184,12 +184,12 @@ Next, create a dedicated project for Weave Scope then apply policy changes neede # Scope app has an init daemon that has to run as UID 0, so grant 'anyuid' SCC for 'default' service account oc adm policy add-scc-to-user anyuid -z default -The installation method for Scope on OpenShift is very similar to the one described above for Kubernetes, but instead of `kubectl apply ...` you need to use +The installation method for Scope on OpenShift is very similar to the one described [above](#k8s) for Kubernetes, but instead of `kubectl apply ...` you need to use `oc apply ...` and install it into the namespace of the `weave-scope` project you have just created, and not the `weave` namespace, i.e.: oc apply -f 'https://cloud.weave.works/k8s/scope.yaml' -To access the Scope app from the browser, please refer to Kubernetes instructions above. +To access the Scope app from the browser, please refer to Kubernetes instructions [above](#k8s). ### Amazon ECS