-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from luissimas/docs/usage
Docs/usage
- Loading branch information
Showing
8 changed files
with
178 additions
and
6 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
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This is a sample compose file for deploying the zettelkasten-exporter | ||
# using an InfluxDB storage. | ||
version: '3.8' | ||
|
||
volumes: | ||
influxdb-data: {} | ||
influxdb-config: {} | ||
grafana-data: {} | ||
|
||
services: | ||
grafana: | ||
image: grafana/grafana | ||
depends_on: | ||
- influxdb | ||
restart: unless-stopped | ||
volumes: | ||
- grafana-data:/var/lib/grafan | ||
ports: | ||
- 3000:3000 | ||
|
||
influxdb: | ||
image: influxdb:2 | ||
environment: | ||
# We opt for an automated setup of InfluxDB for simplicity. It's | ||
# strongly recommended to change those credentials or doing a | ||
# manual InfluxDB setup | ||
DOCKER_INFLUXDB_INIT_MODE: setup | ||
DOCKER_INFLUXDB_INIT_USERNAME: admin | ||
DOCKER_INFLUXDB_INIT_PASSWORD: password | ||
DOCKER_INFLUXDB_INIT_ORG: default | ||
DOCKER_INFLUXDB_INIT_BUCKET: zettelkasten | ||
DOCKER_INFLUXDB_INIT_RETENTION: 1w | ||
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: demo-auth-token | ||
volumes: | ||
- influxdb-data:/var/lib/influxdb2 | ||
- influxdb-config:/etc/influxdb2 | ||
ports: | ||
- 8086:8086 | ||
|
||
zettelkasten-exporter: | ||
image: ghcr.io/luissimas/zettelkasten-exporter:latest | ||
depends_on: | ||
- influxdb | ||
environment: | ||
LOG_LEVEL: INFO | ||
# Here we use a local directory for simplicity, but check out the | ||
# README to see how to configure different sources such as git repositories. | ||
ZETTELKASTEN_DIRECTORY: /sample | ||
COLLECTION_INTERVAL: 10s | ||
INFLUXDB_TOKEN: demo-auth-token | ||
INFLUXDB_URL: http://influxdb:8086 | ||
INFLUXDB_ORG: default | ||
INFLUXDB_BUCKET: zettelkasten | ||
volumes: | ||
- ./sample:/sample |
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 @@ | ||
# Four | ||
|
||
Relative link to [[../three.md]]. And another link to [[one]]. |
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,7 @@ | ||
# Three | ||
|
||
Multiple links in this one. | ||
|
||
[[one]] | ||
[[two.md]] | ||
[[four]] |
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,5 @@ | ||
# One | ||
|
||
This is a markdown note. | ||
|
||
This is a [[link to a second|two.md]] note. |
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 @@ | ||
# Two | ||
|
||
This note links to the [[three.md]] note. |
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,66 @@ | ||
# This is a sample manifest for deploying the zettelkasten-exporter using an InfluxDB | ||
# storage. | ||
# To deploy InfluxDB, see: https://github.com/influxdata/helm-charts/tree/master/charts/influxdb2 | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: monitoring | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: zettelkasten-exporter-env | ||
namespace: monitoring | ||
type: Opaque | ||
data: | ||
# These are placeholder values. Replace them with the | ||
# appropriate values for your setup. | ||
github-token: YW55LXRva2Vu | ||
influxdb-token: YW55LXRva2Vu | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: zettelkasten-exporter | ||
namespace: monitoring | ||
labels: | ||
app.kubernetes.io/name: zettelkasten-exporter | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: zettelkasten-exporter | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: zettelkasten-exporter | ||
spec: | ||
containers: | ||
- name: zettelkasten-exporter | ||
image: "ghcr.io/luissimas/zettelkasten-exporter:latest" | ||
env: | ||
- name: LOG_LEVEL | ||
value: INFO | ||
- name: COLLECTION_INTERVAL | ||
value: 5m | ||
- name: ZETTELKASTEN_GIT_URL | ||
value: <YOUR_REPOSITORY_GIT_URL> | ||
- name: ZETTELKASTEN_GIT_BRANCH | ||
value: master | ||
- name: ZETTELKASTEN_GIT_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: zettelkasten-exporter-env | ||
key: github-token | ||
- name: INFLUXDB_URL | ||
value: http://influxdb-influxdb2 | ||
- name: INFLUXDB_ORG | ||
value: homelab | ||
- name: INFLUXDB_BUCKET | ||
value: zettelkasten | ||
- name: INFLUXDB_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: zettelkasten-exporter-env | ||
key: influxdb-token |