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

WIP: deps: Add lorax #113

Closed
wants to merge 1 commit into from
Closed

WIP: deps: Add lorax #113

wants to merge 1 commit into from

Conversation

cgwalters
Copy link
Member

We aren't using it today, but we might use it in the future - or
we may at least share code.

Since this container is enormous anyways, there's no real downside
to adding the dep now.

For more information, see discussion in:
#91

We aren't using it today, but we might use it in the future - or
we may at least share code.

Since this container is enormous anyways, there's no real downside
to adding the dep now.

For more information, see discussion in:
coreos#91
@jlebon
Copy link
Member

jlebon commented Sep 19, 2018

Hmm, we won't actually start using/sharing code with it anytime super soon though, right? Let's just leave this open until that changes?

@cgwalters
Copy link
Member Author

(Also I got confused, lorax-composer is a separate package)

So...one angle we could take would be to replace our existing virt-install wrapper with this. I'm not sure if it's really worth doing though.

@cgwalters cgwalters changed the title deps: Add lorax WIP: deps: Add lorax Sep 19, 2018
@jlebon jlebon added the WIP PR still being worked on label Sep 19, 2018
@Promaethius
Copy link

Promaethius commented Sep 19, 2018

Using lorax in builds requires either a lorax PR to enable local repos through a local mount or a migration away from how virt-install.py disables the network interface to pull a local ostree repo.
#91 (comment)

Looking at the class lorax uses to launch the VM (https://github.com/weldr/lorax/blob/master/src/pylorax/installer.py#L134) it shouldn't be too hard to pass in extra opts.

Something on this line might work:

cat >>local.ks <<EOF
%include ${kickstart_input}
%pre
mkdir -p /mnt/ostree-repo
mount -t 9p -o ro,trans=virtio,version=9p2000.L /mnt/ostree-repo /mnt/ostree-repo
%end
ostreesetup --nogpg --osname=coreos --remote=coreos --url=file:///mnt/ostree-repo --ref="${ref}"
%post --erroronfail
touch /boot/coreos-firstboot
%end
EOF

ksflatten -c $(pwd)/local.ks -o $(pwd)/flattened.sk

livemedia-creator --resultdir=$(pwd)/ \ 
  --image-type=qcow2 --image-name=${imageprefix}-base.qcow2 \
  --ks=$(pwd)/flattened.ks \
  --iso=${workdir}/installer/*.iso \
  --logfile=$(pwd)/install.log

I'm not super familiar with virt mounts but the mount -t 9p -o ro,trans=virtio,version=9p2000.L /mnt/ostree-repo /mnt/ostree-repo indicates a mount from guest os into root os correct?

@cgwalters
Copy link
Member Author

I'm not super familiar with virt mounts but the mount -t 9p -o ro,trans=virtio,version=9p2000.L /mnt/ostree-repo /mnt/ostree-repo indicates a mount from guest os into root os correct?

Yep! The only downside to this is that 9p isn't in the RHEL kernel. An alternative might be something like HTTP-over-virtio.

@Promaethius
Copy link

I'm not super familiar with virt mounts but the mount -t 9p -o ro,trans=virtio,version=9p2000.L /mnt/ostree-repo /mnt/ostree-repo indicates a mount from guest os into root os correct?

Yep! The only downside to this is that 9p isn't in the RHEL kernel. An alternative might be something like HTTP-over-virtio.

That would be more universal... if the container already ships with python, just throw up a simpleHTTPServer on 127.0.0.1 before virt-install and change the script to allow networking. Atomic style.

@cgwalters
Copy link
Member Author

Doesn't seem like we're going to do this.

@cgwalters cgwalters closed this Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP PR still being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants