-
Notifications
You must be signed in to change notification settings - Fork 224
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
Document how to set the Buildbarn PATH #584
Document how to set the Buildbarn PATH #584
Conversation
Add the environment variables to the worker config you want | ||
`docker-compose/config/worker-fuse-ubuntu22-04.jsonnet` or | ||
`docker-compose/config/worker-hardlinking-ubuntu22-04.jsonnet` | ||
`.buildDirectories[].runners[]`, after the `workerId:` dictionary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having some trouble parsing this sentence, did a part of it get cut out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks! I will revise it.
What I try to say (concisely) is: update whichever of the two paths you use, as you can choose either hardlinking or FUSE. Which for the sake of the example is problably bad. Hardlinking is the simplest but a little slower, we could clarify the example by dropping FUSE. Next, to update the proto file, which is a simple insertion but in a big structure, so here is a jq
-style path for where to add it. Unfortunately this cannot be done with yq
or jq
.
And then, there is the big diff listing because it is still annoying to describe what to do :S.
I hope this is better:
Add the environment variables to the worker configs: worker-fuse-ubuntu22-04.jsonnet
and worker-hardlinking-ubuntu22-04.jsonnet
. The proto configuration specifies a buildDirectories
list, with a runner
list inside. There is only one runner in each config file. That runner should be modified to have the environment variables values:
environment_variables: {
PATH: '/bin:/usr/bin:/usr/local/bin',
},
They can be put anywhere in the runner
. The example diff below adds them at the end, after workerId
.
It is also possible to make a crude insertion with sed
:
sed -i \
'/workerId/i \ environment_variables: { PATH: \'/bin:/usr/bin:/usr/local/bin\'},' \
docker-compose/config/worker-*-ubuntu22-04.jsonnet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your original explanation was fine in principle, I just didn't quite understand the grammatical structure. Something like this would clear it up for me if it's accurate
Add the environment variables to the worker config you want - normally either
path1
orpath2
- after theworkerId
field like this:
But the more detailed one is just as good, completely up to you
Following the discussion in facebook#532 .
ecf54ef
to
7e3bb16
Compare
Thanks! |
@JakobDegen has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Following the discussion in #532 .