Skip to content
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# ArangoDB Starter Changelog

## Changes from version 0.13.9 to master
## Changes from 0.13.10 to master


## Changes from version 0.13.9 to 0.13.10

- Implement that in Docker mode the ArangoDB license key is passed on
to sub-containers.

## Changes from version 0.13.8 to 0.13.9

- Fix finding the storage engine if the master does not run a dbserver.
Expand Down
17 changes: 17 additions & 0 deletions docs/Manual/Deployment/ActiveFailover/UsingTheStarter.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,20 @@ The _Starter_ will decide on which 2 machines to run a single server instance.
To override this decision (only valid while bootstrapping), add a
`--cluster.start-single=false` to the machine where the single server
instance should _not_ be started.

If you use an ArangoDB version of 3.4 or above and use the Enterprise
Edition Docker image, you have to set the license key in an environment
variable by adding this option to the above `docker` command:

```
-e ARANGO_LICENSE_KEY=<thekey>
```

You can get a free evaluation license key by visiting

https://www.arangodb.com/download-arangodb-enterprise/

Then replace `<thekey>` above with the actual license key. The start
will then hand on the license key to the Docker containers it launches
for ArangoDB.

16 changes: 16 additions & 0 deletions docs/Manual/Deployment/Cluster/UsingTheStarter.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ docker run -it --name=adb --rm -p 8528:8528 \

Run the above command on machine A, B & C.

If you use an ArangoDB version of 3.4 or above and use the Enterprise
Edition Docker image, you have to set the license key in an environment
variable by adding this option to the above `docker` command:

```
-e ARANGO_LICENSE_KEY=<thekey>
```

You can get a free evaluation license key by visiting

https://www.arangodb.com/download-arangodb-enterprise/

Then replace `<thekey>` above with the actual license key. The start
will then hand on the license key to the Docker containers it launches
for ArangoDB.

Under the Hood
--------------
The first `arangodb` you ran will become the _master_ of your _Starter_
Expand Down
16 changes: 16 additions & 0 deletions docs/Manual/Deployment/SingleInstance/UsingTheStarter.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,19 @@ docker run -it --name=adb --rm -p 8528:8528 \
--starter.address=$IP \
--starter.mode=single
```

If you use an ArangoDB version of 3.4 or above and use the Enterprise
Edition Docker image, you have to set the license key in an environment
variable by adding this option to the above `docker` command:

```
-e ARANGO_LICENSE_KEY=<thekey>
```

You can get a free evaluation license key by visiting

https://www.arangodb.com/download-arangodb-enterprise/

Then replace `<thekey>` above with the actual license key. The start
will then hand on the license key to the Docker container it launches
for ArangoDB.
6 changes: 6 additions & 0 deletions service/runner_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,18 @@ func (r *dockerRunner) startGC() {

// Try to start a command with given arguments
func (r *dockerRunner) start(image string, command string, args []string, volumes []Volume, ports []int, containerName, serverDir string, output io.Writer) (Process, error) {
env := make([]string, 0, 1)
licenseKey := os.Getenv("ARANGO_LICENSE_KEY")
if licenseKey != "" {
env = append(env, "ARANGO_LICENSE_KEY="+licenseKey)
}
opts := docker.CreateContainerOptions{
Name: containerName,
Config: &docker.Config{
Image: image,
Entrypoint: []string{command},
Cmd: args,
Env: env,
Tty: r.tty,
AttachStdout: output != nil,
AttachStderr: output != nil,
Expand Down
6 changes: 6 additions & 0 deletions test/docker_activefailover_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func TestDockerActiveFailoverDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -90,6 +91,7 @@ func TestDockerActiveFailoverDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -109,6 +111,7 @@ func TestDockerActiveFailoverDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down Expand Up @@ -179,6 +182,7 @@ func TestDockerActiveFailover2Instance(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -197,6 +201,7 @@ func TestDockerActiveFailover2Instance(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -216,6 +221,7 @@ func TestDockerActiveFailover2Instance(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
2 changes: 2 additions & 0 deletions test/docker_activefailover_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func TestDockerActiveFailoverLocal(t *testing.T) {
"--label starter-test=true",
"--name=" + cID,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down Expand Up @@ -123,6 +124,7 @@ func TestDockerResilientActiveFailoverSecure(t *testing.T) {
"--label starter-test=true",
"--name=" + cID,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
6 changes: 6 additions & 0 deletions test/docker_cluster_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func TestDockerClusterDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -87,6 +88,7 @@ func TestDockerClusterDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -105,6 +107,7 @@ func TestDockerClusterDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down Expand Up @@ -172,6 +175,7 @@ func TestOldDockerClusterDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -189,6 +193,7 @@ func TestOldDockerClusterDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -207,6 +212,7 @@ func TestOldDockerClusterDefault(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
6 changes: 6 additions & 0 deletions test/docker_cluster_diff_logdir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func TestDockerClusterDifferentLogDir(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
fmt.Sprintf("-v %s:%s", masterLogDir, masterLogDir),
Expand All @@ -100,6 +101,7 @@ func TestDockerClusterDifferentLogDir(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
fmt.Sprintf("-v %s:%s", slave1LogDir, slave1LogDir),
Expand All @@ -121,6 +123,7 @@ func TestDockerClusterDifferentLogDir(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
fmt.Sprintf("-v %s:%s", slave2LogDir, slave2LogDir),
Expand Down Expand Up @@ -211,6 +214,7 @@ func TestDockerClusterDifferentLogDirNoLog2File(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
fmt.Sprintf("-v %s:%s", masterLogDir, masterLogDir),
Expand All @@ -232,6 +236,7 @@ func TestDockerClusterDifferentLogDirNoLog2File(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
fmt.Sprintf("-v %s:%s", slave1LogDir, slave1LogDir),
Expand All @@ -254,6 +259,7 @@ func TestDockerClusterDifferentLogDirNoLog2File(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
fmt.Sprintf("-v %s:%s", slave2LogDir, slave2LogDir),
Expand Down
3 changes: 3 additions & 0 deletions test/docker_cluster_diff_ports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestDockerClusterDifferentPorts(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
"-p 6000:6000",
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -89,6 +90,7 @@ func TestDockerClusterDifferentPorts(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
"-p 7000:7000",
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -108,6 +110,7 @@ func TestDockerClusterDifferentPorts(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
"-p 8000:8000",
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
3 changes: 3 additions & 0 deletions test/docker_cluster_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestDockerClusterLocal(t *testing.T) {
"--label starter-test=true",
"--name=" + cID,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down Expand Up @@ -121,6 +122,7 @@ func TestDockerClusterLocalAgencySize1(t *testing.T) {
"--label starter-test=true",
"--name=" + cID,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down Expand Up @@ -177,6 +179,7 @@ func TestOldDockerClusterLocal(t *testing.T) {
"--label starter-test=true",
"--name=" + cID,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
3 changes: 3 additions & 0 deletions test/docker_cluster_multi_join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func TestDockerClusterMultipleJoins(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
//"--rm",
createLicenseKeyOption(),
"-p 6000:6000",
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -92,6 +93,7 @@ func TestDockerClusterMultipleJoins(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
"-p 7000:7000",
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -111,6 +113,7 @@ func TestDockerClusterMultipleJoins(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
"-p 8000:8000",
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
4 changes: 4 additions & 0 deletions test/docker_cluster_recovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func TestDockerClusterRecovery(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -90,6 +91,7 @@ func TestDockerClusterRecovery(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+100, basePort+100),
fmt.Sprintf("-v %s:/data", volID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand All @@ -109,6 +111,7 @@ func TestDockerClusterRecovery(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+200, basePort+200),
fmt.Sprintf("-v %s:/data", volID3),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down Expand Up @@ -182,6 +185,7 @@ func TestDockerClusterRecovery(t *testing.T) {
"--label starter-test=true",
"--name=" + recCID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+100, basePort+100),
fmt.Sprintf("-v %s:/data", recVolID2),
"-v /var/run/docker.sock:/var/run/docker.sock",
Expand Down
3 changes: 3 additions & 0 deletions test/docker_cluster_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func TestDockerClusterSync(t *testing.T) {
"--label starter-test=true",
"--name=" + cID1,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort, basePort),
fmt.Sprintf("-v %s:/data", volID1),
fmt.Sprintf("-v %s:/certs", certs.Dir),
Expand All @@ -93,6 +94,7 @@ func TestDockerClusterSync(t *testing.T) {
"--label starter-test=true",
"--name=" + cID2,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(1*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID2),
fmt.Sprintf("-v %s:/certs", certs.Dir),
Expand All @@ -119,6 +121,7 @@ func TestDockerClusterSync(t *testing.T) {
"--label starter-test=true",
"--name=" + cID3,
"--rm",
createLicenseKeyOption(),
fmt.Sprintf("-p %d:%d", basePort+(2*portIncrement), basePort),
fmt.Sprintf("-v %s:/data", volID3),
fmt.Sprintf("-v %s:/certs", certs.Dir),
Expand Down
Loading