Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added mount to docker-driver config #1555

Closed
wants to merge 1 commit into from
Closed

Conversation

tonycox
Copy link

@tonycox tonycox commented Jan 21, 2020

related to:
#694
#700

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

@claassistantio
Copy link

claassistantio commented Jan 21, 2020

CLA assistant check
All committers have signed the CLA.

@tonycox
Copy link
Author

tonycox commented Jan 21, 2020

As I'm not sufficient good in Go - I ve just proposed this change

@cyriltovena
Copy link
Contributor

Can you explain how to use this ? I think I have an idea but I would like to see what was your plan.

@tonycox
Copy link
Author

tonycox commented Jan 24, 2020

currently I need to do this trick while deploying my app with docker

LOKI_ID=$(sudo docker plugin inspect -f '{{.Id}}' loki)
sudo rm -rf /var/lib/docker/plugins/$LOKI_ID/rootfs/opt/tool; mkdir -p /var/lib/docker/plugins/$LOKI_ID/rootfs/opt/tool
cp docker/loki-pipeline.yml /var/lib/docker/plugins/$LOKI_ID/rootfs/opt/tool/loki-pipeline.yml

It would be better to specify visible folders for plugin in env configuration scripts. for example workspace folder path of an app.

/var/log is just a placeholder - it can be empty or more general.

@cyriltovena
Copy link
Contributor

how can it be empty ? where will you put your file after ? I think this need a bit of documentation.

@tonycox
Copy link
Author

tonycox commented Jan 24, 2020

for file on my local env /folder/sub/pipeline.yml
I'll set to the source param by

docker plugin set loki mount.source=/folder/sub

and then I'll set

docker run --log-driver=loki \
    ...
    --log-opt loki-pipeline-stage-file=pipeline.yml

@cyriltovena
Copy link
Contributor

Yeah I think this is good, I would like a bit of documentation on the usage in the PR if you don't mind.

@tonycox
Copy link
Author

tonycox commented Jan 24, 2020

Ok, I'll take time to generate details in the PR

@cyriltovena
Copy link
Contributor

cyriltovena commented Jan 24, 2020

That would be great to do a step by step on how to mount the config.

  • disable the plugin.
  • set the mount.
  • enable it again.

a new chapter here https://github.com/grafana/loki/blob/master/docs/clients/docker-driver/configuration.md

@stale
Copy link

stale bot commented Mar 28, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Mar 28, 2020
@stale stale bot closed this Apr 4, 2020
@m0rtalis
Copy link
Contributor

Can this be added? I think @mfut did basically all the work in his PR maytech#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants