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

How to set up a development environment? #78

Open
nikovirtala opened this issue May 1, 2018 · 3 comments
Open

How to set up a development environment? #78

nikovirtala opened this issue May 1, 2018 · 3 comments

Comments

@nikovirtala
Copy link

How should I set up my development environment (which tools, CI etc.) to be able to build functional "local" versions of the pkgs like kubelet used in this project? - If I simply build the kubelet pkg using 'docker build .' , put its id into yml/kube.yml and build new image it seems that the files and folders like '/var/lib/kubeadm' which are created by other service containers are not visible.

I'd be happy to help on fixing issues like #71 and #72 but first I need to get a working development environment. :)

@ijc
Copy link
Contributor

ijc commented May 1, 2018

You should use linuxkit pkg build «path» not docker build «path», that will incorporate the settings from build.yml and produce a working package. You can install the tool from the linuxkit/linuxkit repo, or brew, I think.

You might like to use the --dev flag which will build a $USER/$pkg:dev instead of linuxkit/$pkg:$HASH. Otherwise you might find linuxkit pkg show-tag handy for extracting the right tag to use.

For CI you can use rtf (installed by linuxkit/linuxkit repo, or perhaps brew too?) then cd tests && rtf run will do a smoke test of the 4 combinations or runtime and network, or you can give the name of a specific test to run to speed things up (or just build and boot manually for debug).

HTH, thanks in advance fr your help on #71 and #72!

@nikovirtala
Copy link
Author

linuxkit pkg build «path» was the missing trick. Thanks for advise! This took me at least one step further.

It seems that doing such a simple step as adding a file in to this system is not as straight forward as I first thought; thanks to binds, mounts and files - What would be the best way to get understanding how and which files and folders are linked together and in which order that happens (what overwrites what) ?

@ijc
Copy link
Contributor

ijc commented May 1, 2018

What would be the best way to get understanding how and which files and folders are linked together and in which order that happens (what overwrites what) ?

I'm afraid there's no magic bullet for this (or any docs, sorry!). Your best bet is probably to boot a system and have a poke around using ctr to enter the various container environments and looking at /proc/xxx/mountinfo and friends.

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

No branches or pull requests

2 participants