From 645368d14df1f256d6eee2e1e1780439213b0883 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Fri, 22 Aug 2014 14:03:03 -0700 Subject: [PATCH] *: rename fleet to fleetd --- build | 6 +++--- fleet.go => fleetd/fleet.go | 0 functional/README.md | 6 +++--- functional/platform/nspawn.go | 22 +++++++++++----------- test | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) rename fleet.go => fleetd/fleet.go (100%) diff --git a/build b/build index 6fde8daa7..a2f144a53 100755 --- a/build +++ b/build @@ -14,10 +14,10 @@ export GOPATH=${PWD}/gopath eval $(go env) if [ ${GOOS} = "linux" ]; then - echo "Building fleet..." - go install ${REPO_PATH} + echo "Building fleetd..." + go install ${REPO_PATH}/fleetd else - echo "Not on Linux - skipping fleet build" + echo "Not on Linux - skipping fleetd build" fi echo "Building fleetctl..." diff --git a/fleet.go b/fleetd/fleet.go similarity index 100% rename from fleet.go rename to fleetd/fleet.go diff --git a/functional/README.md b/functional/README.md index 1cf5e7b1c..87f5be507 100644 --- a/functional/README.md +++ b/functional/README.md @@ -16,10 +16,10 @@ $ ssh-add fleet/functional/fixtures/id_rsa $ echo $SSH_AUTH_SOCK /tmp/ssh-kwmtTOsL7978/agent.7978 ``` -2. Ensure the `FLEET_BIN` and `FLEETCTL_BIN` environment variables point to the respective fleet and fleetctl binaries that should be used to drive the actual tests. +2. Ensure the `FLEETD_BIN` and `FLEETCTL_BIN` environment variables point to the respective fleetd and fleetctl binaries that should be used to drive the actual tests. ``` -$ export FLEET_BIN=/path/to/fleet +$ export FLEETD_BIN=/path/to/fleetd $ export FLEETCTL_BIN=/path/to/fleetctl ``` @@ -45,7 +45,7 @@ export PATH="${GOROOT}/bin:$PATH" cd fleet ssh-add functional/fixtures/id_rsa export GOPATH="$(pwd)/gopath" -export FLEET_BIN="$(pwd)/bin/fleet" +export FLEETD_BIN="$(pwd)/bin/fleet" export FLEETCTL_BIN="$(pwd)/bin/fleetctl" sudo -E env PATH=$PATH go test github.com/coreos/fleet/functional -v ``` diff --git a/functional/platform/nspawn.go b/functional/platform/nspawn.go index c62251cc6..77c72f947 100644 --- a/functional/platform/nspawn.go +++ b/functional/platform/nspawn.go @@ -19,14 +19,14 @@ import ( "github.com/coreos/fleet/functional/util" ) -var fleetBinPath string +var fleetdBinPath string func init() { - fleetBinPath = os.Getenv("FLEET_BIN") - if fleetBinPath == "" { - fmt.Println("FLEET_BIN environment variable must be set") + fleetdBinPath = os.Getenv("FLEETD_BIN") + if fleetdBinPath == "" { + fmt.Println("FLEETD_BIN environment variable must be set") os.Exit(1) - } else if _, err := os.Stat(fleetBinPath); err != nil { + } else if _, err := os.Stat(fleetdBinPath); err != nil { fmt.Printf("%v\n", err) os.Exit(1) } @@ -119,7 +119,7 @@ func (nc *nspawnCluster) prepCluster() (err error) { return nil } -func (nc *nspawnCluster) prepFleet(dir, ip, sshKeySrc, fleetBinSrc string, cfg MachineConfig) error { +func (nc *nspawnCluster) prepFleet(dir, ip, sshKeySrc, fleetdBinSrc string, cfg MachineConfig) error { cmd := fmt.Sprintf("mkdir -p %s/opt/fleet", dir) if _, _, err := run(cmd); err != nil { return err @@ -131,8 +131,8 @@ func (nc *nspawnCluster) prepFleet(dir, ip, sshKeySrc, fleetBinSrc string, cfg M return err } - fleetBinDst := path.Join(dir, "opt", "fleet", "fleet") - if err := copyFile(fleetBinSrc, fleetBinDst, 0755); err != nil { + fleetdBinDst := path.Join(dir, "opt", "fleet", "fleetd") + if err := copyFile(fleetdBinSrc, fleetdBinDst, 0755); err != nil { return err } @@ -149,7 +149,7 @@ authorized_keys_file=%s } unitContents := `[Service] -ExecStart=/opt/fleet/fleet -config /opt/fleet/fleet.conf +ExecStart=/opt/fleet/fleetd -config /opt/fleet/fleet.conf ` unitPath := path.Join(dir, "opt", "fleet", "fleet.service") if err := ioutil.WriteFile(unitPath, []byte(unitContents), 0644); err != nil { @@ -260,8 +260,8 @@ UseDNS no } sshKeySrc := path.Join("fixtures", "id_rsa.pub") - if err = nc.prepFleet(fsdir, ip, sshKeySrc, fleetBinPath, cfg); err != nil { - log.Printf("Failed preparing fleet in filesystem: %v", err) + if err = nc.prepFleet(fsdir, ip, sshKeySrc, fleetdBinPath, cfg); err != nil { + log.Printf("Failed preparing fleetd in filesystem: %v", err) return } diff --git a/test b/test index efeb8ed08..f30dbcbef 100755 --- a/test +++ b/test @@ -15,7 +15,7 @@ COVER=${COVER:-"-cover"} source ./build TESTABLE="agent api config engine etcd fleetctl job machine pkg registry ssh unit" -FORMATTABLE="$TESTABLE client functional heart server fleet.go" +FORMATTABLE="$TESTABLE client functional heart server fleetd" # user has not provided PKG override if [ -z "$PKG" ]; then