Browse Source

rename kolach to rudder

Eugene Yakubovich 10 years ago
parent
commit
9ac190644d
16 changed files with 57 additions and 54 deletions
  1. 3 0
      .gitignore
  2. 1 1
      Godeps/Godeps.json
  3. 13 13
      README.md
  4. 1 1
      backend/common.go
  5. 3 3
      build
  6. 9 9
      main.go
  7. 1 1
      pkg/iface.go
  8. 1 1
      pkg/tun.go
  9. 5 5
      subnet/config.go
  10. 3 3
      subnet/subnet.go
  11. BIN
      subnet/subnet.test
  12. 4 4
      subnet/subnet_test.go
  13. 1 1
      test
  14. 3 3
      udp/cproxy.go
  15. 3 3
      udp/proxy.go
  16. 6 6
      udp/run.go

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+rudder
+coverage
+bin

+ 1 - 1
Godeps/Godeps.json

@@ -1,5 +1,5 @@
 {
-	"ImportPath": "github.com/coreos-inc/kolach",
+	"ImportPath": "github.com/coreos-inc/rudder",
 	"GoVersion": "go1.2.2",
 	"Packages": [
 		"./..."

+ 13 - 13
README.md

@@ -1,6 +1,6 @@
-# kolach
+# Rudder
 
-kolach is an overlay network that gives a subnet to each machine for use with
+Rudder is an overlay network that gives a subnet to each machine for use with
 k8s.
 
 In k8s every machine in the cluster is assigned a full subnet. The machine A
@@ -12,13 +12,13 @@ disadvantage is that the only cloud provider that can do this is GCE.
 
 To emulate the Kubernetes model from GCE on other platforms we need to create
 an overlay network on top of the network that we are given from cloud
-providers. Kolach uses the Universal TUN/TAP device and creates an overlay network
+providers. Rudder uses the Universal TUN/TAP device and creates an overlay network
 using UDP to encapsulate IP packets. The subnet allocation is done with the help
 of etcd which maintains the overlay to actual IP mappings.
 
 ## Configuration
 
-Kolach reads its configuration from etcd. By default, it will read the configuration
+Rudder reads its configuration from etcd. By default, it will read the configuration
 from ```/coreos.com/network/config``` (can be overridden via --etcd-prefix).
 The value of the config should be a JSON dictionary with the following keys:
 
@@ -36,14 +36,14 @@ the last subnet of Network.
 
 ## Running
 
-Once you have pushed configuration JSON to etcd, you can start kolach. If you published your
-config at the default location, you can start kolach with no arguments. Kolach will acquire a
+Once you have pushed configuration JSON to etcd, you can start Rudder. If you published your
+config at the default location, you can start Rudder with no arguments. Rudder will acquire a
 subnet lease, configure its routes based on other leases in the overlay network and start
 routing packets. Additionally it will monitor etcd for new members of the network and adjust
 its routing table accordingly.
 
-After kolach has acquired the subnet and configured the TUN device, it will write out an
-environment variable file (```/run/kolach/subnet.env``` by default) with subnet address and
+After Rudder has acquired the subnet and configured the TUN device, it will write out an
+environment variable file (```/run/rudder/subnet.env``` by default) with subnet address and
 MTU that it supports.
 
 ## Key command line options
@@ -53,19 +53,19 @@ MTU that it supports.
 -etcd-prefix="/coreos.com/network": etcd prefix
 -iface="": interface to use (IP or name) for inter-host communication. Defaults to the interface for the default route on the machine.
 -port=8285: UDP port to use for inter-node communications
--subnet-file="/run/kolach/subnet.env": filename where env variables (subnet and MTU values) will be written to
+-subnet-file="/run/rudder/subnet.env": filename where env variables (subnet and MTU values) will be written to
 -v=0: log level for V logs. Set to 1 to see messages related to data path
 ```
 
 ## Docker integration
 
 Docker daemon accepts ```--bip``` argument to configure the subnet of the docker0 bridge. It also accepts ```--mtu``` to set the MTU
-for docker0 and veth devices that it will be creating. Since kolach writes out the acquired subnet and MTU values into
+for docker0 and veth devices that it will be creating. Since Rudder writes out the acquired subnet and MTU values into
 a file, the script starting Docker daemon can source in the values and pass them to Docker daemon:
 
 ```bash
-source /run/kolach/subnet.env
-docker -d --bip=${KOLACH_SUBNET} --mtu=${KOLACH_MTU}
+source /run/rudder/subnet.env
+docker -d --bip=${RUDDER_SUBNET} --mtu=${RUDDER_MTU}
 ```
 
-Systemd users can use ```EnvironmentFile``` directive in the .service file to pull in ```/run/kolach/subnet.env```
+Systemd users can use ```EnvironmentFile``` directive in the .service file to pull in ```/run/rudder/subnet.env```

+ 1 - 1
backend/common.go

@@ -1,7 +1,7 @@
 package backend
 
 import (
-	"github.com/coreos-inc/kolach/pkg"
+	"github.com/coreos-inc/rudder/pkg"
 )
 
 type ReadyFunc func(sn pkg.IP4Net, mtu int)

+ 3 - 3
build

@@ -1,7 +1,7 @@
 #!/bin/bash -e
 
 ORG_PATH="github.com/coreos-inc"
-REPO_PATH="${ORG_PATH}/kolach"
+REPO_PATH="${ORG_PATH}/rudder"
 
 if [ ! -h gopath/src/${REPO_PATH} ]; then
 	mkdir -p gopath/src/${ORG_PATH}
@@ -14,8 +14,8 @@ export GOPATH=${PWD}/gopath
 eval $(go env)
 
 if [ ${GOOS} = "linux" ]; then
-	echo "Building kolach..."
+	echo "Building rudder"
 	go install ${REPO_PATH}
 else
-	echo "Not on Linux - skipping kolach build"
+	echo "Not on Linux - skipping rudder build"
 fi

+ 9 - 9
main.go

@@ -8,13 +8,13 @@ import (
 	"path"
 	"time"
 
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd"
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/coreos/go-systemd/daemon"
-	log "github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/golang/glog"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/coreos/go-systemd/daemon"
+	log "github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/golang/glog"
 
-	"github.com/coreos-inc/kolach/pkg"
-	"github.com/coreos-inc/kolach/subnet"
-	"github.com/coreos-inc/kolach/udp"
+	"github.com/coreos-inc/rudder/pkg"
+	"github.com/coreos-inc/rudder/subnet"
+	"github.com/coreos-inc/rudder/udp"
 )
 
 const (
@@ -38,7 +38,7 @@ func init() {
 	flag.StringVar(&opts.etcdEndpoint, "etcd-endpoint", "http://127.0.0.1:4001", "etcd endpoint")
 	flag.StringVar(&opts.etcdPrefix, "etcd-prefix", "/coreos.com/network", "etcd prefix")
 	flag.IntVar(&opts.port, "port", defaultPort, "port to use for inter-node communications")
-	flag.StringVar(&opts.subnetFile, "subnet-file", "/run/kolach/subnet.env", "filename where env variables (subnet and MTU values) will be written to")
+	flag.StringVar(&opts.subnetFile, "subnet-file", "/run/rudder/subnet.env", "filename where env variables (subnet and MTU values) will be written to")
 	flag.StringVar(&opts.iface, "iface", "", "interface to use (IP or name) for inter-host communication")
 	flag.BoolVar(&opts.slowProxy, "no-fast-proxy", false, "disable accelerated proxy")
 	flag.BoolVar(&opts.help, "help", false, "print this message")
@@ -59,8 +59,8 @@ func writeSubnet(sn pkg.IP4Net, mtu int) error {
 	}
 	defer f.Close()
 
-	fmt.Fprintf(f, "KOLACH_SUBNET=%s\n", sn)
-	fmt.Fprintf(f, "KOLACH_MTU=%d\n", mtu)
+	fmt.Fprintf(f, "RUDDER_SUBNET=%s\n", sn)
+	fmt.Fprintf(f, "RUDDER_MTU=%d\n", mtu)
 	return nil
 }
 

+ 1 - 1
pkg/iface.go

@@ -4,7 +4,7 @@ import (
 	"errors"
 	"net"
 
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
 )
 
 func GetIfaceIP4Addr(iface *net.Interface) (net.IP, error) {

+ 1 - 1
pkg/tun.go

@@ -7,7 +7,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
 )
 
 const (

+ 5 - 5
subnet/config.go

@@ -4,14 +4,14 @@ import (
 	"encoding/json"
 	"errors"
 
-	"github.com/coreos-inc/kolach/pkg"
+	"github.com/coreos-inc/rudder/pkg"
 )
 
 type Config struct {
-	Network    pkg.IP4Net
-	SubnetMin  pkg.IP4
-	SubnetMax  pkg.IP4
-	SubnetLen  uint
+	Network   pkg.IP4Net
+	SubnetMin pkg.IP4
+	SubnetMax pkg.IP4
+	SubnetLen uint
 }
 
 func ParseConfig(s string) (*Config, error) {

+ 3 - 3
subnet/subnet.go

@@ -8,10 +8,10 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd"
-	log "github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/golang/glog"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd"
+	log "github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/golang/glog"
 
-	"github.com/coreos-inc/kolach/pkg"
+	"github.com/coreos-inc/rudder/pkg"
 )
 
 const (

BIN
subnet/subnet.test


+ 4 - 4
subnet/subnet_test.go

@@ -5,9 +5,9 @@ import (
 	"testing"
 	"time"
 
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/coreos/go-etcd/etcd"
 
-	"github.com/coreos-inc/kolach/pkg"
+	"github.com/coreos-inc/rudder/pkg"
 )
 
 type mockSubnetRegistry struct {
@@ -127,7 +127,7 @@ func (msr *mockSubnetRegistry) watchSubnets(since uint64, stop chan bool) (*etcd
 				msr.subnets.Nodes = msr.subnets.Nodes[:len(msr.subnets.Nodes)-2]
 				return &etcd.Response{
 					Action: "expire",
-					Node:    n,
+					Node:   n,
 				}, nil
 			}
 		}
@@ -264,7 +264,7 @@ func TestRenewLease(t *testing.T) {
 	sm.Start(events)
 
 	fmt.Println("Waiting for lease to pass original expiration")
-	time.Sleep(2*time.Second)
+	time.Sleep(2 * time.Second)
 
 	// check that it's still good
 	for _, n := range msr.subnets.Nodes {

+ 1 - 1
test

@@ -1,6 +1,6 @@
 #!/bin/bash -e
 #
-# Run all kolach tests (not including functional)
+# Run all rudder tests (not including functional)
 #   ./test
 #   ./test -v
 #

+ 3 - 3
udp/cproxy.go

@@ -11,10 +11,10 @@ import (
 	"syscall"
 	"unsafe"
 
-	log "github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/golang/glog"
+	log "github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/golang/glog"
 
-	"github.com/coreos-inc/kolach/pkg"
-	"github.com/coreos-inc/kolach/subnet"
+	"github.com/coreos-inc/rudder/pkg"
+	"github.com/coreos-inc/rudder/subnet"
 )
 
 func runCProxy(tun *os.File, conn *os.File, ctl *os.File, tunIP pkg.IP4, tunMTU uint) {

+ 3 - 3
udp/proxy.go

@@ -6,10 +6,10 @@ import (
 	"os"
 	"sync"
 
-	log "github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/golang/glog"
+	log "github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/golang/glog"
 
-	"github.com/coreos-inc/kolach/pkg"
-	"github.com/coreos-inc/kolach/subnet"
+	"github.com/coreos-inc/rudder/pkg"
+	"github.com/coreos-inc/rudder/subnet"
 )
 
 const (

+ 6 - 6
udp/run.go

@@ -5,12 +5,12 @@ import (
 	"net"
 	"time"
 
-	"github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
-	log "github.com/coreos-inc/kolach/Godeps/_workspace/src/github.com/golang/glog"
+	"github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/docker/libcontainer/netlink"
+	log "github.com/coreos-inc/rudder/Godeps/_workspace/src/github.com/golang/glog"
 
-	"github.com/coreos-inc/kolach/backend"
-	"github.com/coreos-inc/kolach/pkg"
-	"github.com/coreos-inc/kolach/subnet"
+	"github.com/coreos-inc/rudder/backend"
+	"github.com/coreos-inc/rudder/pkg"
+	"github.com/coreos-inc/rudder/subnet"
 )
 
 const (
@@ -76,7 +76,7 @@ func Run(sm *subnet.SubnetManager, iface *net.Interface, ip net.IP, port int, fa
 		return
 	}
 
-	tun, tunName, err := pkg.OpenTun("kolach%d")
+	tun, tunName, err := pkg.OpenTun("rudder%d")
 	if err != nil {
 		log.Error("Failed to open TUN device: ", err)
 		return