-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use flags instead of env variables + docs
- Loading branch information
Johannes Scheuermann
committed
Jul 13, 2016
1 parent
0bd6f23
commit 0eccaf7
Showing
10 changed files
with
157 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker-quobyte-plugin | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Documentation | ||
|
||
- [Setup at CoreOS](coreos.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Setup on CoreOS | ||
|
||
Set the mount flags to `shared` this step shouldn't be needed with docker 1.12+. | ||
|
||
``` | ||
$ sudo mkdir /etc/systemd/system/docker.service.d/ | ||
$ sudo sh -c 'echo -e "[Service] | ||
MountFlags=shared | ||
" > /etc/systemd/system/docker.service.d/slave-mount-flags.conf' | ||
# Restart Docker | ||
$ sudo systemctl daemon-reload | ||
$ sudo systemctl restart docker | ||
``` | ||
|
||
Create a directory to mount quobyte. | ||
|
||
``` | ||
$ sudo mkdir /mnt/quobyte | ||
``` | ||
|
||
Now mount Quobyte with Docker. If the command below fails use `-h $(hostname)` instead of `-h $(hostname -f)`. | ||
|
||
``` | ||
$ docker run -d --name quobyte-client --privileged \ | ||
-e QUOBYTE_REGISTRY=localhost:7861 \ | ||
-p 55000:55000 \ | ||
-v /mnt/quobyte:/quobyte:shared \ | ||
-h $(hostname -f) \ | ||
quay.io/quobyte/quobyte-client:1.2.12 | ||
# Validate mount | ||
$ mount | grep quobyte | ||
``` | ||
|
||
Create the config file for the plugin: | ||
|
||
``` | ||
$ sudo mkdir /etc/quobyte | ||
$ sudo cat /etc/quobyte/docker-quobyte.env | ||
QUOBYTE_API_USER=admin | ||
QUOBYTE_API_PASSWORD=quobyte | ||
QUOBYTE_API_URL=http://quobyte:7860 | ||
QUOBYTE_REGISTRY=quobyte:7861 | ||
``` | ||
|
||
Create the systemd service | ||
|
||
``` | ||
$ sudo cat /etc/systemd/system/docker-quobyte-plugin.service | ||
[Unit] | ||
Description=Docker Quobyte Plugin | ||
Documentation=https://github.com/johscheuer/go-quobyte-docker | ||
Before=docker.service | ||
After=network.target docker.service | ||
Requires=docker.service | ||
[Service] | ||
EnvironmentFile=/etc/quobyte/docker-quobyte.env | ||
ExecStart=/opt/bin/docker-quobyte-plugin --user ${QUOBYTE_API_USER} --password ${QUOBYTE_API_PASSWORD} --api ${QUOBYTE_API_URL} --registry ${QUOBYTE_REGISTRY} --path /mnt/quobyte --group docker | ||
[Install] | ||
WantedBy=multi-user.target | ||
``` | ||
|
||
Start the Plugin | ||
|
||
``` | ||
$ sudo systemctl daemon-reload | ||
$ sudo systemctl start docker-quobyte-plugin | ||
$ sudo systemctl enable docker-quobyte-plugin | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
QUOBYTE_API_USER=docker | ||
QUOBYTE_API_PASSWORD=... | ||
QUOBYTE_API_URL=http://<host>:7860/ | ||
QUOBYTE_REGISTRY=quobyte.corp | ||
QUOBYTE_API_USER=admin | ||
QUOBYTE_API_PASSWORD=quobyte | ||
QUOBYTE_API_URL=http://localhost:7860 | ||
QUOBYTE_REGISTRY=localhost:7861 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters