Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Loki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Loki
Commits
f3d37e33
Commit
f3d37e33
authored
6 years ago
by
Nicholas Nezis
Browse files
Options
Downloads
Patches
Plain Diff
More updates to make `dataRoot` more generic
parent
5d75b6ab
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
production/ksonnet/README.md
+4
-4
4 additions, 4 deletions
production/ksonnet/README.md
tools/promtail.sh
+5
-5
5 additions, 5 deletions
tools/promtail.sh
with
9 additions
and
9 deletions
production/ksonnet/README.md
+
4
−
4
View file @
f3d37e33
...
...
@@ -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.
This diff is collapsed.
Click to expand it.
tools/promtail.sh
+
5
−
5
View file @
f3d37e33
...
...
@@ -4,10 +4,10 @@ INSTANCEID="${1:-}"
APIKEY
=
"
${
2
:-}
"
INSTANCEURL
=
"
${
3
:-}
"
NAMESPACE
=
"
${
4
:-
default
}
"
DATA
ROOT
=
"
${
5
-/var/lib/docker
}
"
CONTAINER
ROOT
=
"
${
5
-/var/lib/docker
}
"
if
[
-z
"
$INSTANCEID
"
-o
-z
"
$APIKEY
"
-o
-z
"
$INSTANCEURL
"
-o
-z
"
$NAMESPACE
"
-o
-z
"
$
DATA
ROOT
"
]
;
then
echo
"usage:
$0
<instanceId> <apiKey> <url> <namespace> <
dataroot
>"
if
[
-z
"
$INSTANCEID
"
-o
-z
"
$APIKEY
"
-o
-z
"
$INSTANCEURL
"
-o
-z
"
$NAMESPACE
"
-o
-z
"
$
CONTAINER
ROOT
"
]
;
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>#
${
DATA
ROOT
}
#"
-e
"s#<
container_root_path>#
${
CONTAINER
ROOT
}
#"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment