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

Review/extend DEVELOPMENT documentation #454

Closed
Tracked by #133
dholbach opened this issue Oct 18, 2021 · 6 comments · Fixed by #505 or #555
Closed
Tracked by #133

Review/extend DEVELOPMENT documentation #454

dholbach opened this issue Oct 18, 2021 · 6 comments · Fixed by #505 or #555
Labels
area/docs Documentation related issues and pull requests good first issue Good for newcomers

Comments

@dholbach
Copy link
Member

Each of the controllers should have clear guidelines on how to build and run the
projects. This includes the sections:
○ How to install dependencies
○ How to install the controller
○ How to run the test suite locally
○ How to run the controller locally

Some of the information might already be there - let's double-check it's up to date and accurate.

@dholbach
Copy link
Member Author

Please note: the file has moved to to https:/fluxcd/source-controller/blob/main/DEVELOPMENT.md now

@dholbach
Copy link
Member Author

This issue might be well-suited for new contributors. Basically the ask is: if you have a fairly clean installation of whatever your OS is: let us know if the instructions in the file above were everything that's needed to get you going on the individual tasks. Please report back if you ran into issues and the docs should be clearer (or make a PR!). Thanks a lot in advance!

@makkes makkes added area/docs Documentation related issues and pull requests good first issue Good for newcomers labels Oct 29, 2021
@dholbach dholbach changed the title Review/extend CONTRIBUTING documentation Review/extend DEVELOPMENT documentation Nov 10, 2021
@kingdonb
Copy link
Member

kingdonb commented Jan 13, 2022

There seem to be a few things missing from the developer docs still, I'm planning to fix them in a separate PR, not sure if it's necessary to re-open this issue, or if I should just proceed with the PR... just writing it down here as I'm compiling, so I don't forget anything I found

I built source-controller on a Debian Sid system just now (linux/amd64), I was able to figure out that I needed to add (and so we should mention in the doc as well):

brew install gcc@5

I installed my golang via brew, I don't know if that's important or not, but something was trying to invoke gcc-5 which was not available from my apt system package manager as far as I could tell. DEVELOPMENT.md doesn't actually mention that you need golang installed, that's maybe an obvious oversight and could be inferred from go.mod, but if you need any specific compiler versions other than Go matching the version in go.mod it should probably be mentioned as well.

I also needed to run a step from the guide at https:/tonistiigi/binfmt#installing-emulators, running this to get the emulators working in Docker build:

docker run --privileged --rm tonistiigi/binfmt --install arm64,arm

I also had to set up a default builder for buildx, both of these steps are related to the multi-arch image format:

docker buildx create --use

With all of this information I was able to make use of the heading "Building the container image" – I'm not sure if you need all of this to develop, but to build an image to deploy in-situ and use it to confirm a fix was effective, I needed all of this.

Edit: It was brought to my attention that some of these might be new requirements since #523 (which was just merged in yesterday.)

@kingdonb kingdonb reopened this Jan 13, 2022
@dholbach
Copy link
Member Author

@hiddeco @chanwit IIRC you both looked into the mechanics of build bits - can you comment on the above? ^

@yiannistri
Copy link
Contributor

@kingdonb fyi I've updated DEVELOPMENT.md to address some of your comments that I've also encountered.

@kingdonb
Copy link
Member

@yiannistri I found another source for the cross-platform emulation stuff for building multi-arch that looks a bit more trustworthy, (that seems to be the only part of my feedback not addressed by your #555) -- here:

 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

I don't know if there is a canonical source for this information, but I wouldn't trust the commands I provided in my earlier comment without a source to back it up, as it will undoubtedly change in the future.

Thank you for taking care of that @yiannistri ! It's OK with me, to merge and close this without getting everything. The multiarch setup is at least documented in the form of the GitHub Action, which calls out to docker/build-push-action@v2 for the functionality, so if folks really need to build multiarch images locally for some reason, they can research it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Documentation related issues and pull requests good first issue Good for newcomers
Projects
None yet
4 participants