-
Notifications
You must be signed in to change notification settings - Fork 7
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
Specifying base image #97
Comments
Hi @yieldone, currently, base image name is hard-coded to be However, the "original" base image is somewhat special and I think you would be better off using the original. It's special in a sense that OSv is booted in a memory (with ramfs) and thus allows specifying custom unikernel size upon first build. In other words, why don't you simply use it like this: First build (may take some time because all the packages are being uploaded):
Any next build (should last only few seconds):
Notice the Please let me know if this all makes sense. |
Hi @miha-plesko awesome that works a treat, thanks! |
Hi @miha-plesko , OK, so I've done the following to make a Capstan package, it's based on the Python script found in capstan-packages:
I uploading the result to S3 /packages/, which allows Capstan to find it and download for use in the packages.yaml of my project. Building an app image works fine and boots initially, but then I get the following error under Qemu on my local dev machine:
|
Did you perhaps forget to post the question? ;) |
haha, I've been too busy trying to get all the info in the right place: So the question is, I've obviously done something wrong, but not sure what! |
Here's the package_export_dir used to create the package:
|
Searching further suggests there's something stale with libstdsc: @miha-plesko Do you think I also need to build my own version of osv-loader to match my OSv repo version? I'm currently using OSv master branch. |
Ahhh, so the capstan-packages build script says that the OSv build process creates a loader.img, and this is becomes osv-loader.qemu.gz. I'll try this first! |
@yieldone in short: problem is that you must compile your package on Ubuntu 14.04 system or it won't play nicely with the "official" base image, which was compiled on 14.04. I don't know what OS you are currently using to run the Possible solutions: a) install Ubuntu 14.04 in a VM and compile there (probably not the best option) gzip ./build/last/loader.img > $HOME/.capstan/repository/mike/osv-loader/osv-loader.qemu.gz Using solution However, solution |
ok, I tried option c) just now. Copying my ./build/last/loader.img gives me the following error: `OSv v0.24-534-g54e6c42 [backtrace] I'll keep digging as to why this .so is missing |
Can you please try this (with the original base image, not yours)? mkdir mypackage
cd mypackage
capstan package init --name "jdk-172-1gb" \
--title "OpenJDK 1.8.0 172" \
--author "YOL" \
--version 0.1 \
--require osv.cloud-init \
--require osv.cli \
--require openjdk8-zulu-full
capstan package compose demo
capstan run demo --boot cli The commands above ^ will create a unikernel named "demo" for you which will contain cloud-init, openjdk8 and cli. From what I know, this is what you're after, right? Then if you want to include your own java application files (has to be already compiled, not
These two commands ^ will first update the unikernel and then run it into CLI. You can verify that your appliaction files were copied. Please let me know if this works for you. Once you can see the application files, you'll need to provide the |
Hi @miha-plesko ok cool, I see where you're coming from - the main reason for rebuilding the main OSv image is to get the latest bug fixes, update Java (openjdk8-zulu-full is currently 118 I think), and a custom dynamic library we use. The old capstan would then just copy any files needed into the image (but you had to specify them). So an alternative question is: how can I update Java? |
oh, running compose gives me an odd symlink error:
|
I'm going to also try the docker route from scratch |
Hi,
I am on of the OSv guys. We fairly recently changed OSv kernel to support Golang and that required adding small libvdso library.
To make long story short when you use new loader you also need to create new osv.boostrap package.
Waldek
…Sent from my iPhone
On May 4, 2018, at 05:06, yieldone ***@***.***> wrote:
I'm going to also try the docker route from scratch
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @wkozaczuk Ahhh, interesting, ok - so I assume I then need to include the osv.bootstrap in my app's meta/package.yaml, correct? |
As I understand osv.bootstrap is a package that is implicitly includes when composing images. Because you are using newest OSv kernel (loader) you also need to build you own matching OSv.bootstrap mpm. Hopefully Miha can better explain this tham me. I know this is not ideal at this point. I am actually trying to release OSv that would include newest kernel and other capstan packages like OSv.bootstrap to make it play nicely with other existing packages from mikelangelo. |
@wkozaczuk @miha-plesko No worries, I have little clue the amount effort it takes to maintain a specialised OS, and appreciate all the help and hints you guys have provided me! I'm currently building osv.bootstrap, but it seems to need some C++11 flags, so modifying the Makefile (something about nullptr in showenc.c is a keyword). |
Whatever way you built new OSv kernel (loader.img) it implicitly should have created all files that go into OSv.bootstrap.
If you are willing to try one more tool there is something’s called capstan-packages that can help you with that.
Waldek
…Sent from my iPhone
On May 4, 2018, at 06:36, yieldone ***@***.***> wrote:
@wkozaczuk @miha-plesko No worries, I have little clue the amount effort it takes to maintain a specialised OS, and appreciate all the help and hints you guys have provided me!
I'm currently building osv.bootstrap, but it seems to need some C++11 flags, so modifying the Makefile (something about nullptr in showenc.c is a keyword).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok, in any case, my own capstan repo now has osv.bootstrap and my latest OSv master + JDK 8 172, which now executes as expected! Indeed, I built osv.bootstrap based on what I found in capstan-packages :) |
Hi folks,
So I've created a repo on S3 with a custom image (replacing osv-loader) with the following features:
I've done
capstan pull mike/osv-loader
with my custom URL repo endpoint, but it's not clear how to tell capstan to use this image as the base for everything. In the old Capstan I could explicitly specify the base image. Unfortunately, the existing Java runtimes all have 10Gb image sizes which takes forever to snapshot on AWS. Any hints would be appreciated!Cheers,
Rowland
The text was updated successfully, but these errors were encountered: