Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
*: rename fleet to fleetd
Browse files Browse the repository at this point in the history
  • Loading branch information
jonboulle committed Aug 22, 2014
1 parent d281fab commit 645368d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions functional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```
Expand Down
22 changes: 11 additions & 11 deletions functional/platform/nspawn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand All @@ -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
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 645368d

Please sign in to comment.