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

Rename fleet binary to fleetd #807

Merged
merged 1 commit into from
Aug 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/architecture.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Architecture

There exist two primary roles within fleet: Engine and Agent. Each `fleet` daemon running in a cluster fulfills both roles. An Engine primarily makes scheduling decisions while an Agent executes jobs.
There exist two primary roles within fleet: Engine and Agent. Each `fleetd` daemon running in a cluster fulfills both roles. An Engine primarily makes scheduling decisions while an Agent executes jobs.

## Moving Parts

Expand Down
10 changes: 5 additions & 5 deletions Documentation/configuration.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Configuration

The `fleet` daemon uses two sources for configuration parameters:
The `fleetd` daemon uses two sources for configuration parameters:

1. an INI-formatted config file ([sample][config])
2. environment variables

[config]: https://github.com/coreos/fleet/blob/master/fleet.conf.sample

fleet will look at `/etc/fleet/fleet.conf` for this config file by default. The `--config` flag may be passed to the fleet binary to use a custom config file location. The options that may be set are defined below. Note that each of the options should be defined at the global level, outside of any INI sections.
fleet will look at `/etc/fleet/fleet.conf` for this config file by default. The `--config` flag may be passed to the `fleetd` binary to use a custom config file location. The options that may be set are defined below. Note that each of the options should be defined at the global level, outside of any INI sections.

Environment variables may also provide configuration options. Options provided in an environment variable will override the corresponding option provided in a config file. To use an environment variable, simply prefix the name of a given option with 'FLEET_', while uppercasing the rest of the name. For example, to set the `etcd_servers` option to 'http://192.0.2.12:4001' when running the fleet binary:
Environment variables may also provide configuration options. Options provided in an environment variable will override the corresponding option provided in a config file. To use an environment variable, simply prefix the name of a given option with 'FLEET_', while uppercasing the rest of the name. For example, to set the `etcd_servers` option to 'http://192.0.2.12:4001' when running the fleetd binary:

```
$ FLEET_ETCD_SERVERS=http://192.0.2.12:4001 /usr/bin/fleet
$ FLEET_ETCD_SERVERS=http://192.0.2.12:4001 /usr/bin/fleetd
```

## General Options
Expand Down Expand Up @@ -44,7 +44,7 @@ Default: ""
#### public_ip

IP address that should be published with the local Machine's state and any socket information.
If not set, fleet will attempt to detect the IP it should publish based on the machine's IP routing information.
If not set, fleetd will attempt to detect the IP it should publish based on the machine's IP routing information.

Default: ""

Expand Down
6 changes: 3 additions & 3 deletions Documentation/deployment.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Deploying fleet

Deploying `fleet` is as simple as dropping a binary on a machine with access to etcd and starting it.
Deploying `fleet` is as simple as dropping the `fleetd` binary on a machine with access to etcd and starting it.

Deploying `fleet` on CoreOS is even simpler: just run `systemctl start fleet`. The built-in configuration assumes each of your hosts is serving an etcd endpoint at the default location (http://127.0.0.1:4001). However, if your etcd cluster differs, you must make the corresponding configuration changes.

### etcd

Each `fleet` daemon must be configured to talk to the same [etcd cluster][etcd]. By default, the `fleet` daemon will connect to http://127.0.0.1:4001. Refer to the [configuration documentation][config] for customization help.
Each `fleetd` daemon must be configured to talk to the same [etcd cluster][etcd]. By default, the `fleetd` daemon will connect to http://127.0.0.1:4001. Refer to the [configuration documentation][config] for customization help.

`fleet` requires etcd be of version 0.3.0+.

Expand All @@ -15,7 +15,7 @@ Each `fleet` daemon must be configured to talk to the same [etcd cluster][etcd].

### systemd

The `fleet` daemon communicates with systemd (v207+) running locally on a given machine. It requires D-Bus (v1.6.12+) to do this.
The `fleetd` daemon communicates with systemd (v207+) running locally on a given machine. It requires D-Bus (v1.6.12+) to do this.

### SSH Keys

Expand Down
2 changes: 1 addition & 1 deletion Documentation/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ You should avoid public access to the registry (i.e etcd) and instead run fleet

## Other Notes

Since it interacts directly with systemd over D-Bus, the fleet daemon must be run with elevated privileges (i.e. as root) in order to perform operations like starting and stopping services. From the [systemd D-Bus documentation](http://www.freedesktop.org/wiki/Software/systemd/dbus/):
Since it interacts directly with systemd over D-Bus, the fleetd daemon must be run with elevated privileges (i.e. as root) in order to perform operations like starting and stopping services. From the [systemd D-Bus documentation](http://www.freedesktop.org/wiki/Software/systemd/dbus/):

> In contrast to most of the other services of the systemd suite PID 1 does not use PolicyKit for controlling access to privileged operations, but relies exclusively on the low-level D-Bus policy language. (This is done in order to avoid a cyclic dependency between PolicyKit and systemd/PID 1.) This means that sensitive operations exposed by PID 1 on the bus are generally not available to unprivileged processes directly.
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