Compare commits

..
38 Commits
Author SHA1 Message Date
Bryan Boreham 041b6fe251 Add release v1.9.5 2017-05-04 08:49:15 +00:00
Marc Carré d128488339 Merge pull request #2926 from weaveworks/issues/2808-improve-hairpin-messages
Fixes #2808. Improve hairpin log messages.
2017-05-03 20:21:20 +01:00
Marc Carré c8c61adca4 Merge pull request #2907 from weaveworks/issues/2771-checkpoint-net-modes
Add checkpoint flag per connection type
2017-05-03 18:20:30 +01:00
Bryan Boreham 7c8f33f525 Add checkpoint flag per connection type 2017-05-03 16:56:49 +00:00
Bryan Boreham 15bf6eab1e Merge pull request #2925 from weaveworks/doc-search-tag
added search tag type
2017-05-03 17:35:00 +01:00
abuehrle 10333b0f3e added search tag type 2017-05-03 16:33:40 +00:00
Ilya Dmitrichenko 52a5ca8f88 Fix broken link in docs 2017-05-03 16:43:57 +01:00
Bryan Boreham b19f2df6f8 Improve hairpin log messages 2017-05-03 14:35:20 +00:00
Bryan Boreham b3ac56e3d2 Update mesh library and check for errors newly returned 2017-05-03 11:08:28 +00:00
Marc Carré cc77ad2c65 Merge pull request #2912 from weaveworks/issues/2904-filter-ipv6-kube-peers
Filter out IPv6 addresses from kube-peers
2017-05-02 11:45:31 +01:00
Bryan Boreham 24c2743a58 Check addresses are IPv4 in kube-peers 2017-04-28 11:05:38 +00:00
Bryan Boreham b49f5bdb99 Merge pull request #2916 from ocadotechnology/allow-for-externalip
fix(kube-peers): Add support for ExternalIP addresses
2017-04-27 15:29:02 +01:00
Marc CARRE 28a1578d20 Please ./tools/lint -nocomment -notestpackage.
Fixes:
- `test/run-integration-tests.sh:160:75: arithmetic expressions must consist of names and numbers`
- `test/run-integration-tests.sh:265:56: arithmetic expressions must consist of names and numbers`
- `test/run-integration-tests.sh:295:61: arithmetic expressions must consist of names and numbers`
- `test/run-integration-tests.sh:309:49: arithmetic expressions must consist of names and numbers`
- `test/run-integration-tests.sh:316:41: arithmetic expressions must consist of names and numbers`
- `test/run-integration-tests.sh: run shfmt -i 4 -w test/run-integration-tests.sh`

See also: https://circleci.com/gh/weaveworks/weave/8685
2017-04-27 14:06:42 +00:00
Mike Bryant e78be1fc35 fix(kube-peers): Add support for ExternalIP addresses
Why:
* In some environments Nodes have an ExternalIP but no InternalIP

This change addresses the need by:
* Falling back to ExternalIP addresses if there isn't an InternalIP for a node
2017-04-27 13:56:23 +01:00
Marc Carré 402fe094f4 Merge pull request #2893 from weaveworks/ipam-ops-reentrant. Fixes #2892.
IPAM: Make sure we have a ring before calling tryOps()
2017-04-12 13:25:32 +01:00
Bryan Boreham 1c1b3248c0 Make sure we have a ring before calling tryOps()
because otherwise the pending ops can be modified from inside Try()
2017-04-11 15:36:53 +00:00
Ilya Dmitrichenko 5cae747b36 Consisten spacing in Markdown headings
Jekyll doesn't tolerate this, and it's generally cosidered a cleaner
style, we've had a bit of mixed style and this makes it consistent.
2017-04-10 12:44:38 +00:00
Bryan Boreham ef0dae4ed3 Simple example is only on two hosts 2017-04-10 11:37:06 +00:00
Bryan Boreham 2686be1b93 Update mention of Docker 1.6 to 1.10 2017-04-10 10:45:42 +00:00
Marc Carré b845360091 Merge pull request #2887 from weaveworks/issues/add-gcloud-to-circle-path
Fix gcloud dependency for CI builds
2017-04-07 15:01:20 +01:00
Martynas Pumputis 953d451105 Check for gcloud in verify_dependencies
In CI builds, we rely on gcloud installed by Circle CI. Any change to
Circle $PATH or the installation might break CI builds in non-obvious
way.
2017-04-07 14:44:31 +01:00
Martynas Pumputis 75d80c4828 Add /opt/google-cloud-sk/bin to PATH of circle.yml
Otherwise, "gcloud" cannot be found.
2017-04-07 14:43:35 +01:00
Bryan Boreham 877658d22e Merge pull request #2886 from weaveworks/lock-kubeadm-version
Lock kubeadm's Kubernetes version
2017-04-06 14:37:58 +01:00
Marc CARRE 1c797ca901 Upgrade to latest version of build-tools.
This brings a fix to the Ansible playbook which enables locking of `kubeadm`'s Kubernetes version.
2017-04-06 13:49:51 +01:00
Marc CARRE 520a72c8e6 Lock kubeadm's Kubernetes version.
Without this commit, `kubeadm` typically upgrades whichever version of Kubernetes is installed, sometimes leading to conflicts in between components' version.

This fixes the issue behind #2876 and should avoid build failures like [weave/8373](https://circleci.com/gh/weaveworks/weave/8373).
2017-04-06 13:49:48 +01:00
Marc CARRE 98fec7e5aa Revert "Disable temporary 840 smoke tests"
This reverts commit b687484dda.
2017-04-06 10:43:56 +01:00
Bryan Boreham 038aac41fd Fix weave-kube doc table of contents 2017-04-05 13:56:17 +00:00
Martynas Pumputis c54fe016b1 Merge pull request #2880 from weaveworks/upgrade-build-tools
Upgrade to latest build-tools.
2017-04-04 15:44:05 +01:00
Marc CARRE 9c9b46479d Upgrade to latest build-tools.
Adds better support for CentOS, for Kubernetes 1.6 (default: 1.6.1), and makes Docker installation role configurable, among others.
2017-04-04 15:13:41 +01:00
Bryan Boreham 28c290074b Merge pull request #2876 from weaveworks/issues/disable-840
Disable temporary the 840 weave kube smoke test
2017-03-31 18:55:59 +02:00
Martynas Pumputis b687484dda Disable temporary 840 smoke tests
To trigger doc publishing
2017-03-30 17:45:20 +01:00
Bryan Boreham fd731beb87 Merge pull request #2871 from weaveworks/weave-kube-formatting
Fix formatting of code snippets in site/kube-addon.md.
2017-03-29 11:53:07 +01:00
Marc CARRE 35cc653737 Add links to URLs and relevant resources. 2017-03-29 11:28:49 +01:00
Marc CARRE 1254d680ed Fix formatting of env. vars. in site/kube-addon.md. 2017-03-29 11:28:42 +01:00
Marc CARRE 23c0b6a04b Fix formatting of kubectl apply snippets in site/kube-addon.md. 2017-03-29 11:28:36 +01:00
Martynas Pumputis ede1ec970c Merge pull request #2861 from weaveworks/weave-kube-1.6-docs
Update weave-kube docs for k8s  1.6
2017-03-29 10:36:49 +01:00
Bryan Boreham fbab5a7280 Review feedback 2017-03-29 08:37:28 +00:00
Bryan Boreham a92cfc1ffe Added instructions for Kubernetes 1.6 changes 2017-03-21 15:28:41 +00:00
70 changed files with 199 additions and 47 deletions

No files matched your search

+20
View File
@@ -1,3 +1,23 @@
## Release 1.9.5
Bug fixes and minor improvements
* Improve log messages generated if "hairpin" conditions are detected,
to make clear which kind is likely to cause problems #2808/#2926
* Filter out IPv6 peer addresses from Kubernetes; Weave Net currently
only supports IPv4 #2904/#2912
* Fix rare crash during initialization of weave-kube #2893/#2892
* Include overlay and encryption modes in checkpoint reports, in case
this is relevant to a version upgrade #2771/#2907
Build and Testing
* Ensure CI build can run gcloud tools #2887
* Prevent kubeadm from upgrading Kubernetes if we are trying to test an older version #2886
* Upgrade build scripts to support Kubernetes 1.6 #2880
[Full list of changes](https://github.com/weaveworks/weave/milestone/54?closed=1).
## Release 1.9.4 ## Release 1.9.4
Bug fixes and minor improvements Bug fixes and minor improvements
+1 -1
View File
@@ -11,7 +11,7 @@ machine:
environment: environment:
GOPATH: /home/ubuntu:$GOPATH GOPATH: /home/ubuntu:$GOPATH
SRCDIR: /home/ubuntu/src/github.com/weaveworks/weave SRCDIR: /home/ubuntu/src/github.com/weaveworks/weave
PATH: $PATH:$HOME/.local/bin PATH: $PATH:$HOME/.local/bin:/opt/google-cloud-sdk/bin
CLOUDSDK_CORE_DISABLE_PROMPTS: 1 CLOUDSDK_CORE_DISABLE_PROMPTS: 1
STATE: /home/ubuntu/state.env STATE: /home/ubuntu/state.env
# Base name of VMs for integration tests: # Base name of VMs for integration tests:
+8
View File
@@ -265,6 +265,10 @@ func (alloc *Allocator) tryPendingOps() {
alloc.tryOps(&alloc.pendingAllocates) alloc.tryOps(&alloc.pendingAllocates)
} }
func (alloc *Allocator) havePendingOps() bool {
return len(alloc.pendingPrimes)+len(alloc.pendingClaims)+len(alloc.pendingAllocates) > 0
}
func (alloc *Allocator) spaceRequestDenied(sender mesh.PeerName, r address.Range) { func (alloc *Allocator) spaceRequestDenied(sender mesh.PeerName, r address.Range) {
for i := 0; i < len(alloc.pendingClaims); { for i := 0; i < len(alloc.pendingClaims); {
claim := alloc.pendingClaims[i].(*claim) claim := alloc.pendingClaims[i].(*claim)
@@ -696,9 +700,13 @@ func (alloc *Allocator) actorLoop(actionChan <-chan func(), stopChan <-chan stru
// Retry things in case messages got lost between here and recipients // Retry things in case messages got lost between here and recipients
if alloc.awaitingConsensus { if alloc.awaitingConsensus {
alloc.propose() alloc.propose()
} else if alloc.havePendingOps() {
if alloc.ring.Empty() {
alloc.establishRing()
} else { } else {
alloc.tryPendingOps() alloc.tryPendingOps()
} }
}
alloc.removeDeadContainers() alloc.removeDeadContainers()
} }
+18 -2
View File
@@ -3,6 +3,7 @@ package main
import ( import (
"fmt" "fmt"
"log" "log"
"net"
"k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes"
api "k8s.io/client-go/pkg/api/v1" api "k8s.io/client-go/pkg/api/v1"
@@ -35,10 +36,25 @@ func getKubePeers() ([]string, error) {
} }
addresses := make([]string, 0, len(nodeList.Items)) addresses := make([]string, 0, len(nodeList.Items))
for _, peer := range nodeList.Items { for _, peer := range nodeList.Items {
var internalIP, externalIP string
for _, addr := range peer.Status.Addresses { for _, addr := range peer.Status.Addresses {
if addr.Type == "InternalIP" { // Check it's a valid ipv4 address
addresses = append(addresses, addr.Address) ip := net.ParseIP(addr.Address)
if ip == nil || ip.To4() == nil {
continue
} }
if addr.Type == "InternalIP" {
internalIP = ip.To4().String()
} else if addr.Type == "ExternalIP" {
externalIP = ip.To4().String()
}
}
// Fallback for cases where a Node has an ExternalIP but no InternalIP
if internalIP != "" {
addresses = append(addresses, internalIP)
} else if externalIP != "" {
addresses = append(addresses, externalIP)
} }
} }
return addresses, nil return addresses, nil
+17 -4
View File
@@ -6,6 +6,7 @@ import (
"time" "time"
"github.com/weaveworks/go-checkpoint" "github.com/weaveworks/go-checkpoint"
weave "github.com/weaveworks/weave/router"
) )
var checker *checkpoint.Checker var checker *checkpoint.Checker
@@ -16,7 +17,7 @@ const (
updateCheckPeriod = 6 * time.Hour updateCheckPeriod = 6 * time.Hour
) )
func checkForUpdates(dockerVersion string, network string) { func checkForUpdates(dockerVersion string, router *weave.NetworkRouter) {
newVersion.Store("") newVersion.Store("")
success.Store(true) success.Store(true)
@@ -51,9 +52,6 @@ func checkForUpdates(dockerVersion string, network string) {
"docker-version": dockerVersion, "docker-version": dockerVersion,
"kernel-version": kernelVersion, "kernel-version": kernelVersion,
} }
if network != "" {
flags["network"] = network
}
// Start background version checking // Start background version checking
params := checkpoint.CheckParams{ params := checkpoint.CheckParams{
@@ -61,6 +59,21 @@ func checkForUpdates(dockerVersion string, network string) {
Version: version, Version: version,
SignatureFile: "", SignatureFile: "",
Flags: flags, Flags: flags,
ExtraFlags: func() []checkpoint.Flag { return checkpointFlags(router) },
} }
checker = checkpoint.CheckInterval(&params, updateCheckPeriod, handleResponse) checker = checkpoint.CheckInterval(&params, updateCheckPeriod, handleResponse)
} }
func checkpointFlags(router *weave.NetworkRouter) []checkpoint.Flag {
flags := []checkpoint.Flag{}
status := weave.NewNetworkRouterStatus(router)
for _, conn := range status.Connections {
if connectionName, ok := conn.Attrs["name"].(string); ok {
if _, encrypted := conn.Attrs["encrypted"]; encrypted {
connectionName = connectionName + " encrypted"
}
flags = append(flags, checkpoint.Flag{Key: "network", Value: connectionName})
}
}
return flags
}
+11 -9
View File
@@ -231,7 +231,8 @@ func main() {
if bridge != nil { if bridge != nil {
if err := weavenet.DetectHairpin("vethwe-bridge", Log); err != nil { if err := weavenet.DetectHairpin("vethwe-bridge", Log); err != nil {
Log.Errorf("DetectHairpin failed: %s", err) Log.Errorf("Setting may cause connectivity issues : %s", err)
Log.Infof("Hairpin mode may have been enabled by other software on this machine")
} }
} }
@@ -254,7 +255,8 @@ func main() {
checkFatal(err) checkFatal(err)
defer db.Close() defer db.Close()
router := weave.NewNetworkRouter(config, networkConfig, name, nickName, overlay, db) router, err := weave.NewNetworkRouter(config, networkConfig, name, nickName, overlay, db)
checkFatal(err)
Log.Println("Our name is", router.Ourself) Log.Println("Our name is", router.Ourself)
if peers, err = router.InitialPeers(resume, peers); err != nil { if peers, err = router.InitialPeers(resume, peers); err != nil {
@@ -274,11 +276,7 @@ func main() {
dockerVersion = dockerCli.DockerVersion() dockerVersion = dockerCli.DockerVersion()
} }
network := "" checkForUpdates(dockerVersion, router)
if isAWSVPC {
network = "awsvpc"
}
checkForUpdates(dockerVersion, network)
observeContainers := func(o docker.ContainerObserver) { observeContainers := func(o docker.ContainerObserver) {
if dockerCli != nil { if dockerCli != nil {
@@ -476,7 +474,9 @@ func createAllocator(router *weave.NetworkRouter, config ipamConfig, preClaims [
allocator := ipam.NewAllocator(c) allocator := ipam.NewAllocator(c)
allocator.SetInterfaces(router.NewGossip("IPallocation", allocator)) gossip, err := router.NewGossip("IPallocation", allocator)
checkFatal(err)
allocator.SetInterfaces(gossip)
allocator.Start() allocator.Start()
router.Peers.OnGC(func(peer *mesh.Peer) { allocator.PeerGone(peer.Name) }) router.Peers.OnGC(func(peer *mesh.Peer) { allocator.PeerGone(peer.Name) })
@@ -486,7 +486,9 @@ func createAllocator(router *weave.NetworkRouter, config ipamConfig, preClaims [
func createDNSServer(config dnsConfig, router *mesh.Router, isKnownPeer func(mesh.PeerName) bool) (*nameserver.Nameserver, *nameserver.DNSServer) { func createDNSServer(config dnsConfig, router *mesh.Router, isKnownPeer func(mesh.PeerName) bool) (*nameserver.Nameserver, *nameserver.DNSServer) {
ns := nameserver.New(router.Ourself.Peer.Name, config.Domain, isKnownPeer) ns := nameserver.New(router.Ourself.Peer.Name, config.Domain, isKnownPeer)
router.Peers.OnGC(func(peer *mesh.Peer) { ns.PeerGone(peer.Name) }) router.Peers.OnGC(func(peer *mesh.Peer) { ns.PeerGone(peer.Name) })
ns.SetGossip(router.NewGossip("nameserver", ns)) gossip, err := router.NewGossip("nameserver", ns)
checkFatal(err)
ns.SetGossip(gossip)
upstream := nameserver.NewUpstream(config.ResolvConf, config.EffectiveListenAddress) upstream := nameserver.NewUpstream(config.ResolvConf, config.EffectiveListenAddress)
dnsserver, err := nameserver.NewDNSServer(ns, config.Domain, config.ListenAddress, dnsserver, err := nameserver.NewDNSServer(ns, config.Domain, config.ListenAddress,
upstream, uint32(config.TTL), config.ClientTimeout) upstream, uint32(config.TTL), config.ClientTimeout)
+1 -1
View File
@@ -1224,7 +1224,7 @@ func (fastdp *FastDatapath) send(fops FlowOp, frame []byte, lock *fastDatapathLo
} }
if fastdp.isHairpinFlow(&flow) { if fastdp.isHairpinFlow(&flow) {
log.Error("Vetoed installation of hairpin flow ", flow) log.Warning("Vetoed installation of hairpin flow ", flow)
return return
} }
+7 -3
View File
@@ -51,7 +51,7 @@ type NetworkRouter struct {
db db.DB db db.DB
} }
func NewNetworkRouter(config mesh.Config, networkConfig NetworkConfig, name mesh.PeerName, nickName string, overlay NetworkOverlay, db db.DB) *NetworkRouter { func NewNetworkRouter(config mesh.Config, networkConfig NetworkConfig, name mesh.PeerName, nickName string, overlay NetworkOverlay, db db.DB) (*NetworkRouter, error) {
if overlay == nil { if overlay == nil {
overlay = NullNetworkOverlay{} overlay = NullNetworkOverlay{}
} }
@@ -59,7 +59,11 @@ func NewNetworkRouter(config mesh.Config, networkConfig NetworkConfig, name mesh
networkConfig.Bridge = NullBridge{} networkConfig.Bridge = NullBridge{}
} }
router := &NetworkRouter{Router: mesh.NewRouter(config, name, nickName, overlay, common.LogLogger()), NetworkConfig: networkConfig, db: db} meshRouter, err := mesh.NewRouter(config, name, nickName, overlay, common.LogLogger())
if err != nil {
return nil, err
}
router := &NetworkRouter{Router: meshRouter, NetworkConfig: networkConfig, db: db}
router.Peers.OnInvalidateShortIDs(overlay.InvalidateShortIDs) router.Peers.OnInvalidateShortIDs(overlay.InvalidateShortIDs)
router.Routes.OnChange(overlay.InvalidateRoutes) router.Routes.OnChange(overlay.InvalidateRoutes)
router.Macs = NewMacCache(macMaxAge, router.Macs = NewMacCache(macMaxAge,
@@ -67,7 +71,7 @@ func NewNetworkRouter(config mesh.Config, networkConfig NetworkConfig, name mesh
log.Println("Expired MAC", mac, "at", peer) log.Println("Expired MAC", mac, "at", peer)
}) })
router.Peers.OnGC(func(peer *mesh.Peer) { router.Macs.Delete(peer) }) router.Peers.OnGC(func(peer *mesh.Peer) { router.Macs.Delete(peer) })
return router return router, nil
} }
// Start listening for TCP connections, locally captured packets, and // Start listening for TCP connections, locally captured packets, and
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Building Weave Net title: Building Weave Net
menu_order: 120 menu_order: 120
search_type: Documentation
--- ---
You only need to build Weave Net if you want to work on the Weave Net codebase You only need to build Weave Net if you want to work on the Weave Net codebase
(or you just enjoy building software). (or you just enjoy building software).
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Integrating Kubernetes and Mesos via the CNI Plugin title: Integrating Kubernetes and Mesos via the CNI Plugin
menu_order: 65 menu_order: 65
search_type: Documentation
--- ---
> The recommended way of using Weave with Kubernetes is via the new > The recommended way of using Weave with Kubernetes is via the new
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: FAQ title: FAQ
menu_order: 200 menu_order: 200
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Feature Overview title: Feature Overview
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
* [Virtual Ethernet Switch](#virtual-ethernet-switch) * [Virtual Ethernet Switch](#virtual-ethernet-switch)
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Understanding how Weave Net Works title: Understanding how Weave Net Works
menu_order: 90 menu_order: 90
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: How Weave Net Implements Encryption title: How Weave Net Implements Encryption
menu_order: 70 menu_order: 70
search_type: Documentation
--- ---
This section describes some details of Weave Net's built-in This section describes some details of Weave Net's built-in
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Encryption and Weave Net title: Encryption and Weave Net
menu_order: 60 menu_order: 60
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: How Fast Datapath Works title: How Fast Datapath Works
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: IP Addresses, Routes and Networks title: IP Addresses, Routes and Networks
menu_order: 50 menu_order: 50
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: How Weave Net Interprets Network Topology title: How Weave Net Interprets Network Topology
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
This section contains the following topics: This section contains the following topics:
@@ -1,6 +1,7 @@
--- ---
title: Weave Net Router Sleeve Encapsulation title: Weave Net Router Sleeve Encapsulation
menu_order: 10 menu_order: 10
search_type: Documentation
--- ---
When the Weave Net router forwards packets to peers in `sleeve` mode When the Weave Net router forwards packets to peers in `sleeve` mode
+2 -1
View File
@@ -1,11 +1,12 @@
--- ---
title: Installing Weave Net title: Installing Weave Net
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
Ensure you are running Linux (kernel 3.8 or later) and have Docker Ensure you are running Linux (kernel 3.8 or later) and have Docker
(version 1.6.0 or later) installed. (version 1.10.0 or later) installed.
Install Weave Net by running the following: Install Weave Net by running the following:
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Using Weave with Systemd title: Using Weave with Systemd
menu_order: 130 menu_order: 130
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Introducing Weave Net title: Introducing Weave Net
menu_order: 10 menu_order: 10
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Allocating IP Addresses title: Allocating IP Addresses
menu_order: 70 menu_order: 70
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Automatic Allocation Across Multiple Subnets title: Automatic Allocation Across Multiple Subnets
menu_order: 10 menu_order: 10
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Starting, Stopping and Removing Peers title: Starting, Stopping and Removing Peers
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Troubleshooting the IP Allocator title: Troubleshooting the IP Allocator
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
+37 -13
View File
@@ -1,12 +1,13 @@
--- ---
title: Integrating Kubernetes via the Addon title: Integrating Kubernetes via the Addon
menu_order: 63 menu_order: 63
search_type: Documentation
--- ---
The following topics are discussed: The following topics are discussed:
* [Installation](#install) * [Installation](#install)
* [Network Policy Controller](#npc) * [Upgrading Kubernetes to version 1.6](#kube-1.6-upgrade)
* [Upgrading the Daemon Sets](#daemon-sets) * [Upgrading the Daemon Sets](#daemon-sets)
* [Network Policy Controller](#npc) * [Network Policy Controller](#npc)
* [Troubleshooting Blocked Connections](#blocked-connections) * [Troubleshooting Blocked Connections](#blocked-connections)
@@ -18,8 +19,16 @@ The following topics are discussed:
Weave Net can be installed onto your CNI-enabled Kubernetes cluster Weave Net can be installed onto your CNI-enabled Kubernetes cluster
with a single command: with a single command:
* Kubernetes versions `1.6` and above:
``` ```
kubectl apply -f https://git.io/weave-kube $ kubectl apply -f https://git.io/weave-kube-1.6
```
* Kubernetes versions up to `1.5`:
```
$ kubectl apply -f https://git.io/weave-kube
``` ```
After a few seconds, a Weave Net pod should be running on each After a few seconds, a Weave Net pod should be running on each
@@ -51,11 +60,26 @@ Shut down Kubernetes, and _on all nodes_ perform the following:
Then relaunch Kubernetes and install the addon as described Then relaunch Kubernetes and install the addon as described
above. above.
The URL [https://git.io/weave-kube](https://git.io/weave-kube) points The URLs [https://git.io/weave-kube](https://git.io/weave-kube) and [https://git.io/weave-kube-1.6](https://git.io/weave-kube-1.6) point
to the YAML file for the latest release of the Weave Net addon. to the YAML file for the [latest release](https://github.com/weaveworks/weave/releases/tag/latest_release) of the Weave Net addon.
Historic versions are archived on our [GitHub release Historic versions are archived on our [GitHub release
page](https://github.com/weaveworks/weave/releases). page](https://github.com/weaveworks/weave/releases).
## <a name="kube-1.6-upgrade"></a> Upgrading Kubernetes to version 1.6
In version 1.6, Kubernetes has increased security, so we need to
create a special service account to run Weave Net. This is done in
the file `weave-daemonset-k8s-1.6.yaml` attached to the [Weave Net
release](https://github.com/weaveworks/weave/releases/latest).
Also, the
[toleration](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/taint-toleration-dedicated.md)
required to let Weave Net run on master nodes has moved from an
annotation to a field on the DaemonSet spec object.
If you have edited the Weave Net DaemonSet from a previous release,
you will need to re-make your changes against the new version.
### <a name="daemon-sets"></a> Upgrading the Daemon Sets ### <a name="daemon-sets"></a> Upgrading the Daemon Sets
Kubernetes does not currently support rolling upgrades of daemon sets, Kubernetes does not currently support rolling upgrades of daemon sets,
@@ -138,20 +162,20 @@ inserted into the YAML file like this:
The list of variables you can set is: The list of variables you can set is:
* CHECKPOINT\_DISABLE - if set to 1, disable checking for new Weave Net * `CHECKPOINT_DISABLE` - if set to 1, disable checking for new Weave Net
versions (default is blank, i.e. check is enabled) versions (default is blank, i.e. check is enabled)
* IPALLOC\_RANGE - the range of IP addresses used by Weave Net * `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) 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) * `EXPECT_NPC` - set to 0 to disable Network Policy Controller (default is on)
* KUBE\_PEERS - list of addresses of peers in the Kubernetes cluster * `KUBE_PEERS` - list of addresses of peers in the Kubernetes cluster
(default is to fetch the list from the api-server) (default is to fetch the list from the api-server)
* IPALLOC\_INIT - set the initialization mode of the [IP Address * `IPALLOC_INIT` - set the initialization mode of the [IP Address
Manager](/site/operational-guide/concepts.md#ip-address-manager) Manager](/site/operational-guide/concepts.md#ip-address-manager)
(defaults to consensus amongst the KUBE\_PEERS) (defaults to consensus amongst the `KUBE_PEERS`)
* WEAVE\_EXPOSE\_IP - set the IP address used as a gateway from the * `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 Weave network to the host network - this is useful if you are
configuring the addon as a static pod. configuring the addon as a static pod.
* WEAVE\_MTU - Weave Net defaults to 1376 bytes, but you can set a * `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 smaller size if your underlying network has a tighter limit, or set
a larger size for better performance if your network supports jumbo a larger size for better performance if your network supports jumbo
frames - see [here](/site/using-weave/fastdp.md#mtu) for more frames - see [here](/site/using-weave/fastdp.md#mtu) for more
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Monitoring with Prometheus title: Monitoring with Prometheus
menu_order: 105 menu_order: 105
search_type: Documentation
--- ---
Two endpoints are exposed: one for the Weave Net router, and, when deployed as Two endpoints are exposed: one for the Weave Net router, and, when deployed as
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Operational Guide title: Operational Guide
menu_order: 45 menu_order: 45
search_type: Documentation
--- ---
This operational guide is intended to give you an overview of how to This operational guide is intended to give you an overview of how to
operate and manage a Weave Network in production. It consists of three operate and manage a Weave Network in production. It consists of three
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Autoscaling title: Autoscaling
menu_order: 40 menu_order: 40
search_type: Documentation
--- ---
### Bootstrapping ### Bootstrapping
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Concepts title: Concepts
menu_order: 10 menu_order: 10
search_type: Documentation
--- ---
This section describes some of the essential concepts with which you will This section describes some of the essential concepts with which you will
need to be familiar before continuing to the example deployment need to be familiar before continuing to the example deployment
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Interactive Deployment title: Interactive Deployment
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
Weave Net can be launched interactively on the command line, and as Weave Net can be launched interactively on the command line, and as
long as Docker is configured to start on boot, the network will survive long as Docker is configured to start on boot, the network will survive
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Administrative Tasks title: Administrative Tasks
menu_order: 60 menu_order: 60
search_type: Documentation
--- ---
The following administrative tasks are discussed: The following administrative tasks are discussed:
@@ -1,6 +1,7 @@
--- ---
title: Uniform Dynamic Clusters title: Uniform Dynamic Clusters
menu_order: 50 menu_order: 50
search_type: Documentation
--- ---
A uniform dynamic cluster has the following characteristics: A uniform dynamic cluster has the following characteristics:
@@ -1,6 +1,7 @@
--- ---
title: Uniform Fixed Clusters title: Uniform Fixed Clusters
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
This scenario describes a production deployment of a fixed number of N This scenario describes a production deployment of a fixed number of N
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Integrating Docker via the Network Plugin title: Integrating Docker via the Network Plugin
menu_order: 60 menu_order: 60
search_type: Documentation
--- ---
* [Launching Weave Net and Running Containers Using the Plugin](#launching) * [Launching Weave Net and Running Containers Using the Plugin](#launching)
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: How the Weave Net Docker Network Plugin Works title: How the Weave Net Docker Network Plugin Works
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Troubleshooting Weave Net title: Troubleshooting Weave Net
menu_order: 110 menu_order: 110
search_type: Documentation
--- ---
+2 -1
View File
@@ -1,9 +1,10 @@
--- ---
title: Using Weave Net title: Using Weave Net
menu_order: 40 menu_order: 40
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, and sometimes extended across three hosts. 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: This section contains the following topics:
@@ -1,6 +1,7 @@
--- ---
title: Isolating Applications on a Weave Network title: Isolating Applications on a Weave Network
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
A single Weave network can host multiple, isolated applications where each application's containers are able A single Weave network can host multiple, isolated applications where each application's containers are able
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Using IP Routing on an Amazon Web Services Virtual Private Cloud title: Using IP Routing on an Amazon Web Services Virtual Private Cloud
menu_order: 110 menu_order: 110
search_type: Documentation
--- ---
If your container infrastructure is running entirely within Amazon Web Services (AWS) If your container infrastructure is running entirely within Amazon Web Services (AWS)
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Allocating IPs in a Specific Range title: Allocating IPs in a Specific Range
menu_order: 15 menu_order: 15
search_type: Documentation
--- ---
The default configurations for both Weave Net and Docker use [Private The default configurations for both Weave Net and Docker use [Private
@@ -1,6 +1,7 @@
--- ---
title: Dynamically Attaching and Detaching Applications title: Dynamically Attaching and Detaching Applications
menu_order: 40 menu_order: 40
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Using Fast Datapath title: Using Fast Datapath
menu_order: 96 menu_order: 96
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: Adding and Removing Hosts Dynamically title: Adding and Removing Hosts Dynamically
menu_order: 90 menu_order: 90
search_type: Documentation
--- ---
To add a host to an existing Weave network, launch Weave Net on the To add a host to an existing Weave network, launch Weave Net on the
@@ -1,6 +1,7 @@
--- ---
title: Integrating with the Host Network title: Integrating with the Host Network
menu_order: 60 menu_order: 60
search_type: Documentation
--- ---
Weave application networks can be integrated with an external host network, establishing connectivity between the host and with application containers running anywhere. Weave application networks can be integrated with an external host network, establishing connectivity between the host and with application containers running anywhere.
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Manually Specifying the IP Address of a Container title: Manually Specifying the IP Address of a Container
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
Containers are automatically allocated an IP address that is unique across the Weave network. You can see which address was allocated by running, [`weave ps`](/site/troubleshooting.md#weave-status): Containers are automatically allocated an IP address that is unique across the Weave network. You can see which address was allocated by running, [`weave ps`](/site/troubleshooting.md#weave-status):
@@ -1,6 +1,7 @@
--- ---
title: Enabling Multi-Cloud, Multi-Hop Networking and Routing title: Enabling Multi-Cloud, Multi-Hop Networking and Routing
menu_order: 100 menu_order: 100
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: Securing Connections Across Untrusted Networks title: Securing Connections Across Untrusted Networks
menu_order: 80 menu_order: 80
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Managing Services - Exporting, Importing, Binding and Routing title: Managing Services - Exporting, Importing, Binding and Routing
menu_order: 70 menu_order: 70
search_type: Documentation
--- ---
This section contains the following topics: This section contains the following topics:
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Integrating Docker via the API Proxy title: Integrating Docker via the API Proxy
menu_order: 50 menu_order: 50
search_type: Documentation
--- ---
The Docker API proxy automatically attaches containers to the Weave The Docker API proxy automatically attaches containers to the Weave
@@ -1,6 +1,7 @@
--- ---
title: Using Automatic Discovery With the Weave Net Proxy title: Using Automatic Discovery With the Weave Net Proxy
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
Containers launched via the proxy use [weaveDNS](/site/weavedns.md) Containers launched via the proxy use [weaveDNS](/site/weavedns.md)
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Automatic IP Allocation and the Weave Proxy title: Automatic IP Allocation and the Weave Proxy
menu_order: 25 menu_order: 25
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: Launching Containers With Weave Run (without the Proxy) title: Launching Containers With Weave Run (without the Proxy)
menu_order: 50 menu_order: 50
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: Name resolution via `/etc/hosts` title: Name resolution via `/etc/hosts`
menu_order: 40 menu_order: 40
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Securing the Docker Communications With TLS title: Securing the Docker Communications With TLS
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
If you are [connecting to the docker daemon with If you are [connecting to the docker daemon with
@@ -1,6 +1,7 @@
--- ---
title: Troubleshooting title: Troubleshooting
menu_order: 60 menu_order: 60
search_type: Documentation
--- ---
The command The command
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Using The Weave Docker API Proxy title: Using The Weave Docker API Proxy
menu_order: 10 menu_order: 10
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: Discovering Containers with WeaveDNS title: Discovering Containers with WeaveDNS
menu_order: 80 menu_order: 80
search_type: Documentation
--- ---
+1
View File
@@ -1,6 +1,7 @@
--- ---
title: How Weave Finds Containers title: How Weave Finds Containers
menu_order: 10 menu_order: 10
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: Load Balancing and Fault Resilience with weaveDNS title: Load Balancing and Fault Resilience with weaveDNS
menu_order: 20 menu_order: 20
search_type: Documentation
--- ---
+2 -1
View File
@@ -1,6 +1,7 @@
--- ---
title: Managing Domains title: Managing Domains
menu_order: 30 menu_order: 30
search_type: Documentation
--- ---
The following topics are discussed: The following topics are discussed:
@@ -44,6 +45,6 @@ link-local as per [RFC6762](https://tools.ietf.org/html/rfc6762),
(though this is not strictly necessary). (though this is not strictly necessary).
* [How Weave Finds Containers](/site/how-works-weavedns.md.md) * [How Weave Finds Containers](/site/how-works-weavedns.md)
* [Load Balancing and Fault Resilience with WeaveDNS](/site/weavedns/load-balance-fault-weavedns.md) * [Load Balancing and Fault Resilience with WeaveDNS](/site/weavedns/load-balance-fault-weavedns.md)
* [Managing Domain Entries](/site/weavedns/managing-entries-weavedns.md) * [Managing Domain Entries](/site/weavedns/managing-entries-weavedns.md)
@@ -1,6 +1,7 @@
--- ---
title: Managing Domain Entries title: Managing Domain Entries
menu_order: 40 menu_order: 40
search_type: Documentation
--- ---
@@ -1,6 +1,7 @@
--- ---
title: Troubleshooting and Present Limitations title: Troubleshooting and Present Limitations
menu_order: 50 menu_order: 50
search_type: Documentation
--- ---
+5 -1
View File
@@ -24,7 +24,11 @@ tear_down_kubeadm
docker_on $HOST1 run --rm --privileged --net=host --entrypoint=/usr/sbin/ipset weaveworks/weave-npc create test_840_ipset bitmap:ip range 192.168.1.0/24 || true docker_on $HOST1 run --rm --privileged --net=host --entrypoint=/usr/sbin/ipset weaveworks/weave-npc create test_840_ipset bitmap:ip range 192.168.1.0/24 || true
docker_on $HOST1 run --rm --privileged --net=host --entrypoint=/usr/sbin/ipset weaveworks/weave-npc add test_840_ipset 192.168.1.11 docker_on $HOST1 run --rm --privileged --net=host --entrypoint=/usr/sbin/ipset weaveworks/weave-npc add test_840_ipset 192.168.1.11
run_on $HOST1 "sudo systemctl start kubelet && sudo kubeadm init --token=$TOKEN" # kubeadm init upgrades to latest Kubernetes version by default, therefore we try to lock the version using the below option:
k8s_version="$(run_on $HOST1 "kubelet --version" | grep -oP "(?<=Kubernetes )v[\d\.\-beta]+")"
k8s_version_option="$([[ "$k8s_version" > "v1.6" ]] && echo "kubernetes-version" || echo "use-kubernetes-version")"
run_on $HOST1 "sudo systemctl start kubelet && sudo kubeadm init --$k8s_version_option=$k8s_version --token=$TOKEN"
run_on $HOST2 "sudo systemctl start kubelet && sudo kubeadm join --token=$TOKEN $HOST1IP" run_on $HOST2 "sudo systemctl start kubelet && sudo kubeadm join --token=$TOKEN $HOST1IP"
run_on $HOST3 "sudo systemctl start kubelet && sudo kubeadm join --token=$TOKEN $HOST1IP" run_on $HOST3 "sudo systemctl start kubelet && sudo kubeadm join --token=$TOKEN $HOST1IP"
+1 -1
View File
@@ -2,7 +2,7 @@ This directory contains integration tests for weave.
## Requirements ## Requirements
You need three VMs with `docker` (`>=1.6.0`) installed and listening on TCP You need three VMs with `docker` (`>=1.10.0`) installed and listening on TCP
port `2375` (see below). You also need to be able to SSH to these VMs without port `2375` (see below). You also need to be able to SSH to these VMs without
having to input anything. having to input anything.
+12 -6
View File
@@ -65,7 +65,7 @@ function print_vars() {
} }
function verify_dependencies() { function verify_dependencies() {
local deps=(python terraform ansible-playbook) local deps=(python terraform ansible-playbook gcloud)
for dep in "${deps[@]}"; do for dep in "${deps[@]}"; do
if [ ! "$(which "$dep")" ]; then if [ ! "$(which "$dep")" ]; then
echo >&2 "$dep is not installed or not in PATH." echo >&2 "$dep is not installed or not in PATH."
@@ -157,7 +157,8 @@ function create_image() {
terraform destroy -force "$DIR/../tools/provisioning/gcp" terraform destroy -force "$DIR/../tools/provisioning/gcp"
rm terraform.tfstate* rm terraform.tfstate*
echo echo
greenly echo "> Created GCP image $IMAGE_NAME in $(date -u -d @$(($(date +%s) - begin_img)) +"%T")." local end_img=$(date +%s)
greenly echo "> Created GCP image $IMAGE_NAME in $(date -u -d @$((end_img - begin_img)) +"%T")."
else else
wait_for_image wait_for_image
fi fi
@@ -261,7 +262,8 @@ function provision() {
esac esac
[ "$1" == "on" ] && set_hosts [ "$1" == "on" ] && set_hosts
echo echo
greenly echo "> Provisioning took $(date -u -d @$(($(date +%s) - begin_prov)) +"%T")." local end_prov=$(date +%s)
greenly echo "> Provisioning took $(date -u -d @$((end_prov - begin_prov)) +"%T")."
} }
function configure_with_ansible() { function configure_with_ansible() {
@@ -290,7 +292,8 @@ function configure() {
done done
echo echo
greenly echo "> Configuration took $(date -u -d @$(($(date +%s) - begin_conf)) +"%T")." local end_conf=$(date +%s)
greenly echo "> Configuration took $(date -u -d @$((end_conf - begin_conf)) +"%T")."
fi fi
} }
@@ -303,13 +306,16 @@ function run_tests() {
"$DIR/run_all.sh" "$@" "$DIR/run_all.sh" "$@"
local status=$? local status=$?
echo echo
greenly echo "> Tests took $(date -u -d @$(($(date +%s) - begin_tests)) +"%T")." local end_tests=$(date +%s)
greenly echo "> Tests took $(date -u -d @$((end_tests - begin_tests)) +"%T")."
return $status return $status
} }
# shellcheck disable=SC2155
function end() { function end() {
echo echo
echo "> Build took $(date -u -d @$(($(date +%s) - begin)) +"%T")." local end_time=$(date +%s)
echo "> Build took $(date -u -d @$((end_time - begin)) +"%T")."
} }
function echo_export_hosts() { function echo_export_hosts() {
+1 -1
Submodule tools updated: 310f53dc10...cf87ca33a1.