rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.45k stars 657 forks source link

Produce OpenStack images #261

Closed deniseschannon closed 8 years ago

deniseschannon commented 9 years ago

@cloudnautique will help @imikushin with how to package issues.

janeczku commented 9 years ago

I am interested in this too. Just to clarify, this OpenStack image will have ec2 datasource enabled by default?

ibuildthecloud commented 9 years ago

Yes it will. Either ec2 or config drive support should be turned on in OpenStack, otherwise it won't boot.

dudymas commented 9 years ago

I agree we should add an image that takes user_data too. Perhaps we could get a custom build of cloudinit based on https://github.com/coreos/coreos-cloudinit and have the rancher system docker run the container... perhaps based on a phusion or alpine container, and it'd still be rather slim... could even tell it to clean up afterwards.

Just make it a special build. Still the same incredible size. And maybe just have it only run if the metadata service or config drive is available?

Thoughts?

janeczku commented 9 years ago

@dudymas RancherOS already supports querying ec2 meta- and user-data. It's just a question of whether ec2 or whatever other metadata service is enabled as a datasource in the prebuilt images. AFAIK this is only the case for the AMI images, whereas the ISO's and the initrd images default to config-drive as the only datasource.

SatWiz commented 9 years ago

I vote too for a general openstack image like coreos have which make automated host spawning easy. https://raymii.org/s/tutorials/Automating_Openstack_with_Cloud_init_run_a_script_on_VMs_first_boot.html

Also then we are free to choose the cloud provider with an openstack platform and not bound to Amazone only.

clemenko commented 9 years ago

A qcow2 that reads in user_data would be very helpful!

flavorplus commented 8 years ago

Hi guys,

How is progress on this?

deniseschannon commented 8 years ago

We've had some higher priority items that have required us to push this out.

hendrikhofstadt commented 8 years ago

@ibuildthecloud Is there a reason why this is still open and the links to the image aren't listed in the README since the image is being built and available on https://releases.rancher.com/os/latest/rancheros-openstack.img

Also do you consider enabling resize-fs by default in the OpenStack image ?

clemenko commented 8 years ago

resizefs would be awesome. Is it possible to include the version number. I am trying to automate imports and would like to see the version number to be better able to track when I need to run updates for my customers.

hendrikhofstadt commented 8 years ago

@clemenko If that's what you mean you can also use https://releases.rancher.com/os/*version*/rancheros-openstack.img Like: https://releases.rancher.com/os/v0.4.3/rancheros-openstack.img

clemenko commented 8 years ago

Ok cool. Do I need to index off of the github release list?

hendrikhofstadt commented 8 years ago

AFAIK you can use the version codes that are listed as releases (not RCs) on github starting from v0.4.3 as this seems to be the first release with OpenStack support.

clemenko commented 8 years ago

Do you know what the disk format and container format the img is? I am getting errors importing into glance.

flavorplus commented 8 years ago

I'm using QCOW2 as the format. I'm running it using a flavor with 1vcpu, 2GB ram and 10GB disk space for testing. It seems fine. There is no logging in to the container directly however. You need to use the Post-Creation script to supply SSH keys and config data.

clemenko commented 8 years ago

what container-format did you use when importing into glance?

flavorplus commented 8 years ago

"QCOW2 - QEMU Emulator"

clemenko commented 8 years ago

What was the glance command line you used? Similar to glance image-create --name centos63-image --disk-format qcow2 \ * --container-format bare* --is-public True --file ./centos63.qcow2

flavorplus commented 8 years ago

yep sorry that would be bare

flavorplus commented 8 years ago

I was using Horizon however to do the import.

clemenko commented 8 years ago

I can upload it into glance. but it fails building. Looks like it might be a scheduling thing on my openstack cluster.

hendrikhofstadt commented 8 years ago

Probably. It worked for me after I imported it with glance using qcow2 and bare. When launching from Horizon checking "Configuration Drive" was necessary since ROS doesn't seem to query the Openstack metadata service.

Specifying a Post Creation script wasn't necessary to add the SSH keys since ROS found the key specified when launching fron Horizon (from the OpenStack keystore) itself.

clemenko commented 8 years ago

I am doing all that. I appears to be an issue with openstack itself and not the image.

gschukin commented 8 years ago

What is the download link for 0.4.4 release?

https://releases.rancher.com/os/v0.4.3/rancheros-openstack.img this one doesn't work :(

joshwget commented 8 years ago

The image for v0.4.4 is now available (https://github.com/rancher/os/releases/download/v0.4.4/rancheros-openstack.img)