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

hello-base package using basic hello world package (from rumprun) #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

useidel
Copy link

@useidel useidel commented Aug 25, 2018

Integration of submitted hello world package to rumprun-packages. That one uses the "Hello World" example from the rumprun project as base for "package"

@useidel
Copy link
Author

useidel commented Aug 25, 2018

There is a dependency to a pull request to a related repository: http://github.com/nabla-containers/rumprun-packages/pull/2

@ricarkol
Copy link
Contributor

Thanks for the PR @useidel.

I suggest one change. A hello world app would fit better in the nabla-demo-apps repository. We designed the nabla-base-build to just create image base layers. In that case (if you move hello-world to demo-apps) you would need a base image for C programs that has all the tools needed to build a C app (i.e., x86_64-rumprun-netbsd-gcc, rumprun-bake, and some of the libs).

@useidel
Copy link
Author

useidel commented Aug 27, 2018

@ricarkol: thanks for the suggestion. I need a bit more time to think about that. If I got it right after a swift check than basic flow would be:

  1. create an entry in the demo-apps repo for building the "legacy" and the "nabla" container
  2. create an entry in the base-build to provide either an image for just the nabla part or maybe (if there is no upstream available) for the legacy part as well.
    Is that correct? If yes, then I need a bit more time to change my thinking here and how to provide the needed "infrastructure". If my understanding is wrong I would need more advice .. sorry.

@ricarkol
Copy link
Contributor

ricarkol commented Aug 27, 2018

  1. create an entry in the demo-apps repo for building the "legacy" and the "nabla" container

That's right. This would would just include the C code, a Makefile, and a Dockerfile. The Dockerfile would inherit from nabla-cc-base, then copy the C code and Makefile, and finally build the app using the rumprun tooling (from nabla-cc-base).

  1. create an entry in the base-build to provide either an image for just the nabla part or maybe (if there is no upstream available) for the legacy part as well.

This new nabla-cc-base would include the compiler, linker (or baker in rumprun terminology), and libraries. I can create this base. Will ping you once I do. The trick is that it should be as minimal as possible.

@useidel
Copy link
Author

useidel commented Aug 27, 2018

@ricarkol: Thanks again - fully understood now. I would say creating the "nabla-cc-base" is by far the tricky part. Thanks for helping out here. I will re-work this PR to be ready once we have the base image. Will post once this is done (and if any assumptions/prereqs need to be considered).
BTW, happy to share the work on "nabla-cc-base" but more reasonable input from my side I need to spend a few more thinking cycles on how this image should look like and especially how to build it as part of the given framework

@ricarkol
Copy link
Contributor

ricarkol commented Sep 18, 2018

Hi @useidel, sorry for the late reply. We are still trying to figure out how to organize the base images (like what should be a base image for nabla).

@useidel
Copy link
Author

useidel commented Sep 24, 2018

@ricarkol: No worries - I was not able to do some serious work here myself

@useidel
Copy link
Author

useidel commented Sep 26, 2018

I had some time to give this topic more thoughts. And now I think we need to change the direction a little bit. Our current Hello World approac is a bit different than the other examples (nodes, nginx, redis, ...). There the the basic binary is part of the base image and the demo-app part delivers "only" a configuration file or other ASCII data.
Our current plan is to deliver images with a normal gcc and one the corresponding rumprun-solo5 compiler. But for the demo-apps part we need to provide the C source code and perform the compilation and integration. Which is one more - and very different - step compared to just providing a file. It would mean to provide the rumprun toolchain as solo5 unikernel ....
Unless I am missing something, we need to organize the hello world differently.

@ricarkol
Copy link
Contributor

You are right @useidel. Let's start by cleaning up the go case which has the same problem as the one you are describing for C. Would like to start by working on that? There is already a go base and demo app.

In that case, you can take a look at #11

@useidel
Copy link
Author

useidel commented Sep 27, 2018

@ricarkol: Ah - ok I will take look at the go case.

@useidel
Copy link
Author

useidel commented Sep 28, 2018

@ricarkol : Ok, I think I got a handle on it - well actually the C case. The only not-working thing is the creation of the docker image/instance.
For now I have updated my forks: https://github.com/useidel/nabla-base-build and https://github.com/useidel/nabla-demo-apps
I will created the needed PRs once I got the above mentioned docker image solved.

I think there is no need to revert nabla-containers/rumprun-packages#2

@ricarkol
Copy link
Contributor

ricarkol commented Oct 2, 2018

Yeah, let's keep the rumprun-packages change. Let us know when you are ready.

@lumjjb
Copy link
Member

lumjjb commented Nov 8, 2018

Let's rebase this since it's been a while from the master branch.

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.

3 participants