8000 builder: documentation and naming adjustments by rafaeldtinoco · Pull Request #1351 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

builder: documentation and naming adjustments #1351

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

Merged
merged 9 commits into from
Jan 20, 2022
Merged

builder: documentation and naming adjustments #1351

merged 9 commits into from
Jan 20, 2022

Conversation

rafaeldtinoco
Copy link
Contributor
@rafaeldtinoco rafaeldtinoco commented Jan 18, 2022

This PR addresses some concerns brought from @yanivagman after the PR #1273 was merged. It changes building documentation to docs/ directory and updates related documentation accordingly.

@rafaeldtinoco
Copy link
Contributor Author
rafaeldtinoco commented Jan 18, 2022

@yanivagman and @danielpacak

I'm still missing to go through the former building docs and adjust them to be present in docs/building directory (and fix links).

I'm also missing an update to non CO-RE ebpf building (regarding comment #1273 (comment))

Files responsible for building tracee container images:

- builder/Makefile.tracee-container
- builder/Dockerfile.alpine-tracee-container
- builder/entrypoint.sh

Files responsible for local building environment:

- Makefile.tracee-make
- Dockerfile.alpine-tracee-make
- Dockerfile.ubuntu-tracee-make
@rafaeldtinoco rafaeldtinoco marked this pull request as ready for review January 18, 2022 17:13
Copy link
Contributor
@grantseltzer grantseltzer left a comment

Choose a reason for hiding this comment

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

This is fantastic Rafael, well written and verbose! Just a few comments, feel free to handle them if you agree with them.

Copy link
Contributor
@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

👋 @rafaeldtinoco I left a few technical remarks about mkdocs before I dive into the actual build instructions.

Also, do you happen to know why the mkdocs target is failing on macOS?

$ make -f builder/Makefile.mkdocs
make -f ./builder/Makefile.mkdocs mkdocs-build
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [.check_tree] Error 2
make: *** [all] Error 2

@rafaeldtinoco
Copy link
Contributor Author

👋 @rafaeldtinoco I left a few technical remarks about mkdocs before I dive into the actual build instructions.

Also, do you happen to know why the mkdocs target is failing on macOS?

$ make -f builder/Makefile.mkdocs
make -f ./builder/Makefile.mkdocs mkdocs-build
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [.check_tree] Error 2
make: *** [all] Error 2

I think I've addressed all of them. About the Makefile.mkdocs in OSX, I don't think default OSX make tool supports the ONESHELL directive I'm using.

You may brew install make and then it will work:

$ export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"

$ make -f builder/Makefile.mkdocs

make -f ./builder/Makefile.mkdocs mkdocs-build
make -f ./builder/Makefile.mkdocs mkdocs-serve
missing required tool docker
make[1]: *** [builder/Makefile.mkdocs:22: .check_docker] Error 1
missing required tool docker
make[1]: *** [builder/Makefile.mkdocs:22: .check_docker] Error 1
make: *** [builder/Makefile.mkdocs:3: all] Error 2

Co-authored-by: Daniel Pacak <pacak.daniel@gmail.com>
@rafaeldtinoco rafaeldtinoco merged commit e1d9c6b into aquasecurity:main Jan 20, 2022
@rafaeldtinoco rafaeldtinoco deleted the builder-renamings branch January 20, 2022 12:15
In this case system libraries libelf and zlib are required as well.
* Tracee's eBPF probe pre-compiled (see [eBPF Compilation](./ebpf-compilation.md) section for more info).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why removing this line? We still support TRACEE_BPF_FILE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thats not the only change needed I'm afraid. We need a full review to pre-requisites (which I plan to do after Makefile.one is set to default). Not only preqrequisites to be honest, all documentation (and how to run containers).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we probably should do it.
Anyway, we should keep this line

@@ -355,7 +355,7 @@ func prepareBpfObject(config *tracee.Config, kConfig *helpers.KernelConfig, OSIn
kVersion = OSInfo.GetOSReleaseFieldValue(helpers.OS_KERNEL_RELEASE)
kVersion = strings.ReplaceAll(kVersion, ".", "_")

bpfFilePath = fmt.Sprintf("/tmp/tracee/tracee.bpf.%s.%s.o", kVersion, tVersion)
bpfFilePath = fmt.Sprintf("%s/tracee.bpf.%s.%s.o", traceeInstallPath, kVersion, tVersion)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we want to support looking for the bpf object in the same directory of the executable like we did in the past? I use it many times when I check on non-core environments (so I don't have to install the bpff object)

Copy link
Contributor Author
@rafaeldtinoco rafaeldtinoco Jan 20, 2022

Choose a reason for hiding this comment

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

Why don't you use sudo TRACEE_BPF_FILE=./file ./dist/tracee-ebpf ... instead ? You can point anywhere you want. WDYT ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because I'm too lazy and don't want to write TRACEE_BPF_FILE=./file :-)

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'll check that (and see if Makefile.one is ready for that as well).

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's too much of a hassle, we can give it up

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.

To Document Makefile.one building schema in official documentation
4 participants
0