Skip to content

Commit 5a498ce

Browse files
committed
20210826 TICK - master branch - PR 1 of 3
1. Adds Chronograf and Kapacitor service definitions to complement Telegraf and InfluxDB, and complete the TICK stack. Assumes Chronograf may be added without Kapacitor (uncommenting relevant lines in Chronograf service definition is required to enable full integration). 2. Adds minimal documentation for both containers.
1 parent 65fe9d9 commit 5a498ce

File tree

4 files changed

+166
-0
lines changed

4 files changed

+166
-0
lines changed

.templates/chronograf/service.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
chronograf:
2+
container_name: chronograf
3+
image: chronograf:latest
4+
restart: unless-stopped
5+
environment:
6+
- TZ=Etc/UTC
7+
# see https://docs.influxdata.com/chronograf/v1.9/administration/config-options/
8+
- INFLUXDB_URL=http://influxdb:8086
9+
# - INFLUXDB_USERNAME=
10+
# - INFLUXDB_PASSWORD=
11+
# - INFLUXDB_ORG=
12+
# - KAPACITOR_URL=http://kapacitor:9092
13+
ports:
14+
- "8888:8888"
15+
volumes:
16+
- ./volumes/chronograf:/var/lib/chronograf
17+
depends_on:
18+
- influxdb
19+
# - kapacitor
20+
networks:
21+
- iotstack_nw

.templates/kapacitor/service.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
kapacitor:
2+
container_name: kapacitor
3+
image: kapacitor:1.5
4+
restart: unless-stopped
5+
environment:
6+
- TZ=Etc/UTC
7+
# see https://docs.influxdata.com/kapacitor/v1.6/administration/configuration/#kapacitor-environment-variables
8+
- KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086
9+
# - KAPACITOR_INFLUXDB_USERNAME=
10+
# - KAPACITOR_INFLUXDB_PASSWORD=
11+
# - KAPACITOR_HOSTNAME=kapacitor
12+
# - KAPACITOR_LOGGING_LEVEL=INFO
13+
# - KAPACITOR_REPORTING_ENABLED=false
14+
ports:
15+
- "9092:9092"
16+
volumes:
17+
- ./volumes/kapacitor:/var/lib/kapacitor
18+
depends_on:
19+
- influxdb
20+
networks:
21+
- iotstack_nw

docs/Containers/Chronograf.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Chronograf
2+
3+
## <a name="references"> References </a>
4+
5+
- [*influxdata Chronograf* documentation](https://docs.influxdata.com/chronograf/)
6+
- [*GitHub*: influxdata/influxdata-docker/chronograf](https://github.com/influxdata/influxdata-docker/tree/master/chronograf)
7+
- [*DockerHub*: influxdata Chronograf](https://hub.docker.com/_/chronograf)
8+
9+
## <a name="kapacitorIntegration"> Kapacitor integration </a>
10+
11+
If you selected Kapacitor in the menu and want Chronograf to be able to interact with it, you need to edit `docker-compose.yml` to un-comment the lines which are commented-out in the following:
12+
13+
```yaml
14+
chronograf:
15+
16+
environment:
17+
18+
# - KAPACITOR_URL=http://kapacitor:9092
19+
depends_on:
20+
21+
# - kapacitor
22+
```
23+
24+
If the Chronograf container is already running when you make this change, run:
25+
26+
```bash
27+
$ cd ~IOTstack
28+
$ docker-compose up -d chronograf
29+
```
30+
31+
## <a name="upgradingChronograf"> Upgrading Chronograf </a>
32+
33+
You can update the container via:
34+
35+
```bash
36+
$ cd ~/IOTstack
37+
$ docker-compose pull
38+
$ docker-compose up -d
39+
$ docker system prune
40+
```
41+
42+
In words:
43+
44+
* `docker-compose pull` downloads any newer images;
45+
* `docker-compose up -d` causes any newly-downloaded images to be instantiated as containers (replacing the old containers); and
46+
* the `prune` gets rid of the outdated images.
47+
48+
### <a name="versionPinning"> Chronograf version pinning </a>
49+
50+
If you need to pin to a particular version:
51+
52+
1. Use your favourite text editor to open `docker-compose.yml`.
53+
2. Find the line:
54+
55+
```
56+
image: chronograf:latest
57+
```
58+
59+
3. Replace `latest` with the version you wish to pin to. For example, to pin to version 1.9.0:
60+
61+
```
62+
image: chronograf:1.9.0
63+
```
64+
65+
4. Save the file and tell `docker-compose` to bring up the container:
66+
67+
```bash
68+
$ cd ~/IOTstack
69+
$ docker-compose up -d chronograf
70+
$ docker system prune
71+
```

docs/Containers/Kapacitor.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Kapacitor
2+
3+
## <a name="references"> References </a>
4+
5+
- [*influxdata Kapacitor* documentation](https://docs.influxdata.com/kapacitor/)
6+
- [*GitHub*: influxdata/influxdata-docker/kapacitor](https://github.com/influxdata/influxdata-docker/tree/master/kapacitor)
7+
- [*DockerHub*: influxdata Kapacitor](https://hub.docker.com/_/kapacitor)
8+
9+
## <a name="upgradingKapacitor"> Upgrading Kapacitor </a>
10+
11+
You can update the container via:
12+
13+
```bash
14+
$ cd ~/IOTstack
15+
$ docker-compose pull
16+
$ docker-compose up -d
17+
$ docker system prune
18+
```
19+
20+
In words:
21+
22+
* `docker-compose pull` downloads any newer images;
23+
* `docker-compose up -d` causes any newly-downloaded images to be instantiated as containers (replacing the old containers); and
24+
* the `prune` gets rid of the outdated images.
25+
26+
### <a name="versionPinning"> Kapacitor version pinning </a>
27+
28+
If you need to pin to a particular version:
29+
30+
1. Use your favourite text editor to open `docker-compose.yml`.
31+
2. Find the line:
32+
33+
```
34+
image: kapacitor:1.5
35+
```
36+
37+
3. Replace `1.5` with the version you wish to pin to. For example, to pin to version 1.5.9:
38+
39+
```
40+
image: kapacitor:1.5.9
41+
```
42+
43+
Note:
44+
45+
* Be cautious about using the `latest` tag. At the time of writing, there was no `linux/arm/v7` architecture support.
46+
47+
4. Save the file and tell `docker-compose` to bring up the container:
48+
49+
```bash
50+
$ cd ~/IOTstack
51+
$ docker-compose up -d kapacitor
52+
$ docker system prune
53+
```

0 commit comments

Comments
 (0)