diff --git a/README.md b/README.md index 3e70216f..34b3ae04 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,6 @@ This repository contains [Weave Net](https://www.weave.works/products/weave-net/), the first product developed by Weaveworks, with over 8 million downloads to date. Weave Net enables you to get started with Docker clusters and portable apps in a fraction of the time required by other solutions. -## Weave Cloud: - -[Weave Cloud](https://www.weave.works/product/cloud/) is software-as-a-service that simplifies deployment, monitoring and management for containers and microservices. It extends and complements popular orchestrators, and enables developers and DevOps to realize faster deployments, insightful monitoring, visualization and networking. - -Weave Cloud is built using these Open Source projects: [Weave Scope](https://www.weave.works/products/weave-scope/), a powerful container visualization tool that automatically maps Docker containers and their interactions, [Weave Cortex](https://github.com/weaveworks/cortex), a horizontally-scalable version of Prometheus, and [Weave Flux](https://www.weave.works/products/weave-flux/), a continuous deployment tool that works with Kubernetes. - # Weave Net Weave Net creates a virtual network that connects Docker containers across multiple hosts and enables their automatic discovery. With Weave Net, portable microservices-based applications consisting of multiple containers can run anywhere: on one host, multiple hosts or even across cloud providers and data centers. Applications use the network just as if the containers were all plugged into the same network switch, without having to configure port mappings, ambassadors or links. diff --git a/site/install.md b/site/install.md index b84fae42..5ed6e849 100644 --- a/site/install.md +++ b/site/install.md @@ -4,17 +4,15 @@ menu_order: 30 search_type: Documentation --- -Install Weave Net from the command line on its own or if you are using Docker, Kubernetes or Mesosphere as a Docker or a CNI plugin. Weave Net can also be launched as a cloud agent within Weave Cloud to visualize and troubleshoot peer connections. +Install Weave Net from the command line on its own or if you are using Docker, Kubernetes or Mesosphere as a Docker or a CNI plugin. -## Installing Weave Net Stand-alone and in Weave Cloud +## Installing Weave Net * [Installing Weave Net](https://www.weave.works/docs/net/latest/install/installing-weave/) * [Launching Weave Net](https://www.weave.works/docs/net/latest/install/using-weave/) -* [Visualizing Weave Net in Weave Cloud](https://www.weave.works/docs/net/latest/install/weave-cloud/) * [Using Weave with Systemd](https://www.weave.works/docs/net/latest/install/systemd/) - ## Weave Net Docker Plugin * [How the Weave Net Docker Network Plugins Work](https://www.weave.works/docs/net/latestplugin/plugin-how-it-works/) diff --git a/site/install/using-weave.md b/site/install/using-weave.md index 937933d9..be816cad 100644 --- a/site/install/using-weave.md +++ b/site/install/using-weave.md @@ -135,7 +135,6 @@ Weave Net supports *any* protocol, and it doesn't have to be over TCP/IP. For ex **See Also** * [Installing Weave Net](/site/install/installing-weave.md) - * [Using Weave Cloud to get started with Weave Net](/site/install/weave-cloud.md) * [Using Fastdp With Weave Net](/site/tasks/manage/fastdp.md) * [Integrating Docker via the Network Plugin (Legacy)](/site/install/plugin/plugin.md) * [Integrating Docker via the Network Plugin (V2)](/site/install/plugin/plugin-v2.md) diff --git a/site/install/weave-cloud-token.png b/site/install/weave-cloud-token.png deleted file mode 100644 index 165ea8b8..00000000 Binary files a/site/install/weave-cloud-token.png and /dev/null differ diff --git a/site/install/weave-cloud.md b/site/install/weave-cloud.md deleted file mode 100644 index 85780780..00000000 --- a/site/install/weave-cloud.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: Visualizing Weave Net in Weave Cloud -menu_order: 30 -search_type: Documentation ---- - -Weave Net provides a simple to deploy networking solution for containerized apps. Here, we describe how to manage a Weave container network using a sample application which consists of two simple `netcat` services deployed to containers on two separate hosts. - -This section contains the following topics: - - * [Signing in to Weave Cloud](#signing-in) - * [Launching Weave Net](#launching) - * [Launching on Additional Hosts](#peer-connections) - * [How Peer Discovery Works](#how-it-works) - -### Signing in to Weave Cloud - -Weave Cloud is a fast and simple way to visualize, manage and monitor -containers and microservices. In order to use Weave Cloud to set up -Weave Net, you must sign up to Weave Cloud and create an "Instance". - -The instance will have a Service Token which is a 32-character string -used to uniquely identify it. Get hold of the Service Token for your -Instance, as shown below: - -![UI to get a Service Token](weave-cloud-token.png) - -For the purpose of these instructions we will use a dummy Service -Token `dk6hz1acdd58aea6b75migoy4axqasdf`. - - -### Launching Weave Net - -Before launching Weave Net and deploying your apps, ensure that Docker -is [installed](https://docs.docker.com/engine/installation/) on both -hosts. - -On `$HOST1` run: - - host1$ weave launch --token=dk6hz1acdd58aea6b75migoy4axqasdf - host1$ eval $(weave env) - host1$ docker run --name a1 -ti weaveworks/ubuntu - -Where, - - * The first line runs Weave Net. - -* The second line configures the Weave Net environment, so that containers launched via the Docker command line are automatically attached to the Weave network, and, - * The third line runs the [application container](/site/faq.md#own-image) using [a Docker command](https://docs.docker.com/engine/reference/run/). - -> **Note** If the first command results in an error like -> ``` -> Cannot connect to the Docker daemon. Is the docker daemon running on this host? -> ``` -> then you likely need to be 'root' in order to connect to the Docker -> daemon. If so, run the above and all subsequent commands in a -> *single* root shell: -> ``` -> host1$ sudo -s -> host1# weave launch --token=dk6hz1acdd58aea6b75migoy4axqasdf -> host1# eval $(weave env) -> host1# docker run --name a1 -ti weaveworks/ubuntu -> ``` -> Do *not* prefix individual commands with `sudo`, since some commands -> modify environment entries and hence they all need to be executed from -> the same shell. - -Weave Net must be launched once per host. The relevant container images will be pulled down from Docker Hub on demand during `weave launch`. - -You can also preload the images by running `weave setup`. Preloaded images are useful for automated deployments, and ensure there are no delays during later operations. - -If you are deploying an application that consists of more than one container to the same host, launch them one after another using `docker run`, as appropriate. - - -### Launching on Additional Hosts - -To launch Weave Net on an additional host and create a peer -connection, run exactly the same commands as on the first host: - - host2$ weave launch --token=dk6hz1acdd58aea6b75migoy4axqasdf - host2$ eval $(weave env) - host2$ docker run --name a2 -ti weaveworks/ubuntu - -Because you are using Weave Cloud, the second peer will discover the -first and automatically create a connection to it. - ->**Note:** If there is a firewall between `$HOST1` and `$HOST2`, you must permit traffic to flow through TCP 6783 and UDP 6783/6784, which are Weave’s control and data ports. - -Now you can proceed to [test container communications](/site/install/using-weave#testing) - -### How Peer Discovery Works - -The Weave Cloud back-end maintains a database of all the peers that -have registered in each instance. You can create as many instances as -you like in the Weave Cloud console: for different projects, or to -separate test and production. - -As each peer starts up, it looks for all network instances that -another peer might be able to contact it on, and registers those with the back-end. -If you want to control which addresses are used, add the `--advertise-address` flag: - - host1$ weave launch --token=dk6hz1acdd58aea6b75migoy4axqasdf --advertise-address=192.0.2.1,198.51.100.4 - -When the new peer registers itself, it also fetches a list of all -other peers in the instance, and begins to contact them. - -If the peer cannot contact the Weave Cloud back-end it will print an -error message in its log and exit. To check the logs run: - - host1$ docker logs weave - -When a Weave Net instance is formed for the first time, the peers must -initialize the [IP Allocation Manager](/site/tasks/ipam/ipam.md). This process, -and the configuration options available, are unchanged when using -Weave Cloud. - -When you shut down a peer for good, use [the `weave reset` -command](/site/tasks/ipam/stop-remove-peers-ipam.md) and it will be removed -from the Weave Cloud database so future peers will not attempt to -connect to it. - -**See Also** - - * [Installing Weave Net](/site/install/installing-weave.md) - * [Launching Weave Net](/site/install/using-weave.md) - * [Using Fastdp With Weave Net](/site/tasks/manage/fastdp.md) - * [Integrating Docker via the Network Plugin (Legacy)](/site/install/plugin/plugin.md) - * [Integrating Docker via the Network Plugin (V2)](/site/install/plugin/plugin-v2.md) diff --git a/site/kubernetes/kube-addon.md b/site/kubernetes/kube-addon.md index a236311f..04e250ca 100644 --- a/site/kubernetes/kube-addon.md +++ b/site/kubernetes/kube-addon.md @@ -314,12 +314,6 @@ $ kubectl exec -n kube-system weave-net-1jkl6 -c weave -- /home/weave/weave --lo DefaultSubnet: 10.32.0.0/12 ``` -3\. Finally you could also use [Weave Cloud](https://cloud.weave.works/) and monitor all your pods, including Weave Net's ones, from there. - -![Weave Net status screen in Weave Cloud](weave-cloud-net-status.png) - -For more information see [What is Weave Cloud?](https://www.weave.works/docs/cloud/latest/overview/) - ### Troubleshooting Blocked Connections If you suspect that legitimate traffic is being blocked by the Weave Network Policy Controller, the first thing to do is check the `weave-npc` container's logs. @@ -416,84 +410,9 @@ The problem occurs because of a behaviour change in cni v1.1.0, which caused a r ## Changing Configuration Options -#### Using `cloud.weave.works` - -You can customise the YAML you get from `cloud.weave.works` by passing some of Weave Net's options, arguments and environment variables as query parameters: - - - `version`: Weave Net's version. Default: `latest`, i.e. latest release. *N.B.*: This only changes the specified version inside the generated YAML file, it does not ensure that the rest of the YAML is compatible with that version. To freeze the YAML version save a copy of the YAML file from the [release page](https://github.com/weaveworks/weave/releases) and use that copy instead of downloading it each time from `cloud.weave.works`. - - `password-secret`: name of the Kubernetes secret containing your password. *N.B*: The Kubernetes secret name must correspond to a name of a file containing your password. - Example: - - $ echo "s3cr3tp4ssw0rd" > /var/lib/weave/weave-passwd - $ kubectl create secret -n kube-system generic weave-passwd --from-file=/var/lib/weave/weave-passwd - $ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&password-secret=weave-passwd" - - - `known-peers`: comma-separated list of hosts. Default: empty. - - `trusted-subnets`: comma-separated list of CIDRs. Default: empty. - - `disable-npc`: boolean (`true|false`). Default: `false`. - - `env.NAME=VALUE`: add environment variable `NAME` and set it to `VALUE`. - - `seLinuxOptions.NAME=VALUE`: add SELinux option `NAME` and set it to `VALUE`, e.g. `seLinuxOptions.type=spc_t` - -The list of variables you can set is: - -* `CHECKPOINT_DISABLE` - if set to 1, disable checking for new Weave Net - versions (default is blank, i.e. check is enabled) -* `CONN_LIMIT` - soft limit on the number of connections between - peers. Defaults to 200. -* `HAIRPIN_MODE` - Weave Net defaults to enabling hairpin on the bridge side of - the `veth` pair for containers attached. If you need to disable hairpin, e.g. your - kernel is one of those that can panic if hairpin is enabled, then you can disable it - by setting `HAIRPIN_MODE=false`. -* `IPALLOC_RANGE` - the range of IP addresses used by Weave Net - and the subnet they are placed in (CIDR format; default `10.32.0.0/12`) -* `EXPECT_NPC` - set to 0 to disable Network Policy Controller (default is on) -* `KUBE_PEERS` - list of addresses of peers in the Kubernetes cluster - (default is to fetch the list from the api-server) -* `IPALLOC_INIT` - set the initialization mode of the [IP Address - Manager](/site/operational-guide/concepts.md#ip-address-manager) - (defaults to consensus amongst the `KUBE_PEERS`) -* `WEAVE_EXPOSE_IP` - set the IP address used as a gateway from the - Weave network to the host network - this is useful if you are - configuring the addon as a static pod. -* `WEAVE_METRICS_ADDR` - address and port that the Weave Net - daemon will serve Prometheus-style metrics on (defaults to 0.0.0.0:6782) -* `WEAVE_STATUS_ADDR` - address and port that the Weave Net - daemon will serve status requests on (defaults to disabled) -* `WEAVE_MTU` - Weave Net defaults to 1376 bytes, but you can set a - smaller size if your underlying network has a tighter limit, or set - a larger size for better performance if your network supports jumbo - frames - see [here](/site/tasks/manage/fastdp.md#mtu) for more - details. -* `NO_MASQ_LOCAL` - set to 0 to disable preserving the client source IP address when - accessing Service annotated with `service.spec.externalTrafficPolicy=Local`. - This feature works only with Weave IPAM (default). -* `IPTABLES_BACKEND` - set to `nft` to use `nftables` backend for `iptables` (default is `iptables`) - -Example: -``` -$ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.WEAVE_MTU=1337" -``` -This command -- notice `&env.WEAVE_MTU=1337` at the end of the URL -- generates a YAML file containing, among others: - -``` -[...] - containers: - - name: weave -[...] - env: - - name: WEAVE_MTU - value: '1337' -[...] -``` - -**Note**: The YAML file can also be saved for later use or manual editing by using, for example: -``` -$ curl -fsSLo weave-daemonset.yaml "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')" -``` - #### Manually editing the YAML file -Whether you saved the YAML file served from `cloud.weave.works` or downloaded a static YAML file from our [releases page](https://github.com/weaveworks/weave/releases), you can manually edit it to suit your needs. +You can manually edit the YAML file downloaded from our [releases page](https://github.com/weaveworks/weave/releases), For example, - additional arguments may be supplied to the Weave router process by adding them to the `command:` array in the YAML file, diff --git a/site/tasks/manage/metrics.md b/site/tasks/manage/metrics.md index 43c93db8..c2131241 100644 --- a/site/tasks/manage/metrics.md +++ b/site/tasks/manage/metrics.md @@ -147,21 +147,3 @@ kubectl create -f prometheus-serviceWeaveNet.yaml -n kube-system kubectl create -f prometheus-serviceMonitorWeaveNet.yaml -n monitoring ``` **Note:** If you want to make changes to the created yamls, please modify the weave-net.jsonnet and recreate the manifests before applying. - -# Weave Cloud Integration - -Finally, you can configure your local Prometheus instance to push -metrics to Weave Cloud by including the following fragment in the -`prometheus.yml` above (after replacing `` with -your own token): - -``` -remote_write: - url: http://frontend.dev.weave.works/api/prom/push - basic_auth: - password: -``` - -For information on getting started with Weave Cloud metrics, including -on how to obtain your Weave Cloud token, please go -[here](https://github.com/weaveworks/cortex).