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

+kafka.apache.org #7361

Merged
merged 6 commits into from
Sep 20, 2024
Merged

+kafka.apache.org #7361

merged 6 commits into from
Sep 20, 2024

Conversation

sebst
Copy link
Contributor

@sebst sebst commented Sep 20, 2024

No description provided.

@sebst sebst changed the title +kafka.apache.org (wip) +kafka.apache.org Sep 20, 2024
@sebst
Copy link
Contributor Author

sebst commented Sep 20, 2024

Comment on lines 64 to 68
- sed -i 's|log.dirs=/tmp/kafka-logs|log.dirs={{prefix}}/kafka-logs|' config/server.properties
- sed -i 's|log.dirs=/tmp/kraft-combined-logs|log.dirs={{prefix}}/kraft-combined-logs|' config/server.properties
- sed -i 's|log.dirs=/tmp/kraft-controller-logs|log.dirs={{prefix}}/kraft-controller-logs|' config/controller.properties || true
- sed -i 's|log.dirs=/tmp/kraft-broker-logs|log.dirs={{prefix}}/kraft-broker-logs|' config/broker.properties || true
- sed -i 's|dataDir=/tmp/zookeeper|log.dirs={{prefix}}/zookeper|' config/zookeeper.properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this probably needs some work to be relocatable. {{prefix}} on the build machine won't exist on install machines. if this can be controlled by runtime.env vars (unlikely) we should do that, otherwise, we'll need to replace the scripts with a shim that fixes paths before launching. see https://github.com/pkgxdev/brewkit/blob/main/share/brewkit/python-venv-stub.py for the most complicated version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be easier to have variable {{installed_prefix}}? That would need some changes in brewkit, but could be worth the effort? Or do I miss a conceptual point here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there's no way to know the installed prefix, since it depends on where the user installs pkgx. Ideally, programs are runnable directly without pkgx once installed (not always true, but often true). Hence using a shim, so you can correct at runtime. Other tricks abound, such as using $(dirname $(dirname $0)) in shell scripts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, looking at what you're changing, it's probably fine to just remove the sed commands. using /tmp is probably optimal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, makes sense. Will have a look later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll try it as /tmp for now, unless that breaks anything.

@jhheider jhheider linked an issue Sep 20, 2024 that may be closed by this pull request
@jhheider jhheider merged commit 82eb7d4 into pkgxdev:main Sep 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

+kafka (387/548)
2 participants