diff --git a/production/ksonnet/README.md b/production/ksonnet/README.md index 9b3c6f66dc1aadb7c2bb35547041feb69f5436da..a2f74ec645b0cca2d24f9bf53d3be6eca5c5c206 100644 --- a/production/ksonnet/README.md +++ b/production/ksonnet/README.md @@ -45,12 +45,12 @@ promtail + { hostname: 'logs-us-west1.grafana.net', username: 'user-id', password: 'password', - dataroot: '/var/lib/docker', + container_root_path: '/var/lib/docker', }, }, } ``` -Notice that `dataroot` is your own data root for docker daemon, use `docker info | grep "Root Dir"` to get it. +Notice that `container_root_path` is your own data root for docker daemon, use `docker info | grep "Root Dir"` to get it. Then do `ks show loki` to see the manifests that'll be deployed to your cluster. Apply them using `ks apply loki`. @@ -82,14 +82,14 @@ loki + promtail + gateway { hostname: 'gateway.%(namespace)s.svc' % $._config, username: 'loki', password: 'password', - dataroot: '/var/lib/docker', + container_root_path: '/var/lib/docker', }, replication_factor: 3, consul_replicas: 1, }, } ``` -Notice that `dataroot` is your own data root for docker daemon, use `docker info | grep "Root Dir"` to get it. +Notice that `container_root_path` is your own data root for docker daemon, use `docker info | grep "Root Dir"` to get it. Do `ks show loki` to see the manifests being deployed to the cluster. Finally `ks apply loki` to deploy the server components to your cluster. diff --git a/tools/promtail.sh b/tools/promtail.sh index f51f981b5928cac2483b0e149de536509c44e21f..0a72fa9a4305c404d53043b04bc4aa08f683ea03 100644 --- a/tools/promtail.sh +++ b/tools/promtail.sh @@ -4,10 +4,10 @@ INSTANCEID="${1:-}" APIKEY="${2:-}" INSTANCEURL="${3:-}" NAMESPACE="${4:-default}" -DATAROOT="${5-/var/lib/docker}" +CONTAINERROOT="${5-/var/lib/docker}" -if [ -z "$INSTANCEID" -o -z "$APIKEY" -o -z "$INSTANCEURL" -o -z "$NAMESPACE" -o -z "$DATAROOT" ]; then - echo "usage: $0 <instanceId> <apiKey> <url> <namespace> <dataroot>" +if [ -z "$INSTANCEID" -o -z "$APIKEY" -o -z "$INSTANCEURL" -o -z "$NAMESPACE" -o -z "$CONTAINERROOT" ]; then + echo "usage: $0 <instanceId> <apiKey> <url> <namespace> <container_root_path>" exit 1 fi @@ -149,7 +149,7 @@ spec: path: /var/log name: varlog - hostPath: - path: <dataroot>/containers + path: <container_root_path>/containers name: varlibdockercontainers updateStrategy: type: RollingUpdate @@ -197,4 +197,4 @@ echo "$TEMPLATE" | sed \ -e "s#<apiKey>#${APIKEY}#" \ -e "s#<instanceUrl>#${INSTANCEURL}#" \ -e "s#<namespace>#${NAMESPACE}#" \ - -e "s#<dataroot>#${DATAROOT}#" + -e "s#<container_root_path>#${CONTAINERROOT}#"