TurnKey Linux Virtual Appliance Library

Announcing TurnKey OpenStack optimized builds

OpenStack Logo

As we mentioned before, making TurnKey easy to deploy on as many public and private clouds is an important goal for us. Unfortunately there are too many players in the cloud software space for us to support every single one. It's much easier to put effort into making TurnKey work well with the winning horses.

TurnKey has been supported on the leading public cloud platform Amazon EC2 from early on, not to mention simplifying management and deployment via the Hub.

OpenStack is particularly interesting, because as it is most likely the future of open source clouds.

I originally got intrigued when I heard about NASA planning to open source Nebula in 2009, which has become the basis for Nova, the compute component in OpenStack. Since then, I've been following OpenStack development from a far and have been itching to develop support for TurnKey on the platform.

The time has finally arrived, and I'm pleased to announce TurnKey optimized builds are hot out of our build farm, and available for immediate download and deployment.

You can get them from the "Download -> More Builds" link on the appliance pages.

TurnKey OpenStack optimized builds

  • EBS auto-mounting support: we've updated our custom EBSmount mechanism for OpenStack, which automatically mounts EBS devices when attached.
  • Support for automating instance setup: via the user-data scripts mechanism.
  • Automatic APT configuration on boot: saves bandwidth costs by using the closest package archive for maximum performance.
  • SSH key support: instances that are launched with a key-pair will be configured accordingly.
  • SSH host key fingerprints displayed in system log: verification of server to prevent man-in-the-middle (mitm) attacks.
  • Randomly generated root password: is set on first boot, and displayed in the system log **.
  • Randomly generated mysql/postgres passwords: the MySQL root and/or PostgreSQL postgres passwords are set to to the same random password as root **.
  • Instance metadata python library and CLI: used internally, but useful for advanced users. (learn more).

** Because OpenStack builds are used in headless deployments (without a console), they include an inithook which preseeds default values, and random passwords:


MASTERPASS=$(mcookie | cut --bytes 1-8)

export APP_PASS=turnkey
export APP_EMAIL=admin@example.com

Depending on your use case, you can utilize user-data (note the security implications) to preseed during boot, or once the system has booted by executing turnkey-init.

Exemplary import of TurnKey Core on OpenStack

There are several ways of uploading an image into an OpenStack deployment, below is one way to get you started.

# cd /tmp
# tar -zxf turnkey-core-11.3-lucid-x86-openstack.tar.gz
# ls turnkey-core-11.3-lucid-x86

# IMG=turnkey-core-11.3-lucid-x86

# glance add -A $GLANCE_TOKEN \
    is_public=true \
    container_format=aki \
    disk_format=aki \
    name="$IMG-kernel" \
    < /tmp/$IMG/$IMG-kernel

Added new image with ID: 5


# glance add -A $GLANCE_TOKEN \
    is_public=true \
    container_format=ami \
    disk_format=ami \
    kernel_id=$KERNEL_ID \
    name="$IMG" \
    < /tmp/$IMG/$IMG.img

Added new image with ID: 6

# glance -A $GLANCE_TOKEN index

ID  Name                                Disk Format  Container Format  Size
--  ----------------------------------  -----------  ----------------  ---------
6   turnkey-core-11.3-lucid-x86         ami          ami               688498688
5   turnkey-core-11.3-lucid-x86-kernel  aki          aki               4179712

# euca-describe-images

IMAGE   ami-00000006    turnkey-core-11.3-lucid-x86         available  public                  machine aki-00000005
IMAGE   aki-00000005    turnkey-core-11.3-lucid-x86-kernel  available  public                  kernel

You can get future posts delivered by email or good old-fashioned RSS.
TurnKey also has a presence on Google+, Twitter and Facebook.


Great guys!

I'll be downloading/testing some of the appliances by the weekend and come back with some feedback. It's very nice to have the TKL arsenal at my disposal in openstack. 

Jeremy's picture

Nice one Alon

I have heard a bit about this tech. And although I'm very happy with my PVE server (especially now it has the TKL library in OVZ at my fingertips!) I might have to set up a testing OpenStack server perhaps to have a look at what all the fuss is about!

Looking forward to hearing about your experience Adrian.

Keep up the great work guys! :)

flexbean's picture


Going to spin up an instance at Rackspace and give it a try :-)

You guys rock!

Did it work?

Hi flexbean, did you ever get this to work with Rackspace? Wanna share your experience?

Alon Swartz's picture

TurnKey Core 12.0rc available for OpenStack

Following the announcement of TurnKey Core 12.0rc (ISO, Amazon EC2, OpenVZ), we've released an OpenStack optimized build (download).

Please note that TKL 12.0 (based on Debian Squeeze) requires the initrd for deployment in OpenStack, for example:

# cd /tmp
# tar -zxf turnkey-core-12.0rc2-squeeze-x86-openstack.tar.gz
# ls turnkey-core-12.0rc2-squeeze-x86

# IMG=turnkey-core-12.0rc2-squeeze-x86

# glance add -A $GLANCE_TOKEN \
    is_public=true \
    container_format=ari \
    disk_format=ari \
    name="$IMG-initrd" \
    < /tmp/$IMG/$IMG-initrd

Added new image with ID: 16


# glance add -A $GLANCE_TOKEN \
    is_public=true \
    container_format=aki \
    disk_format=aki \
    name="$IMG-kernel" \
    < /tmp/$IMG/$IMG-kernel

Added new image with ID: 17


# glance add -A $GLANCE_TOKEN \
    is_public=true \
    container_format=ami \
    disk_format=ami \
    ramdisk_id=$RAMDISK_ID \
    kernel_id=$KERNEL_ID \
    name="$IMG" \
    < /tmp/$IMG/$IMG.img

Added new image with ID: 18


If you come across any issues, or have ideas on improving the optimized build, please post a comment.

Thanks Alon!

I was missing the initrd part. I'll try that and see how it goes...

unable to register openstack core at folsom

I made a test env on my ubuntu 12.10 with using devstack script.

The command:

glance add -A $GLANCE_TOKEN is_public=true container_format=ari disk_format=ari name="$IMG-initrd" < /tmp/$IMG/$IMG-initrd

gaves me: glance: error: unrecognized arguments: -A 

Without -A gaves me:

You must provide a username via either --os-username or env[OS_USERNAME]

Any clue?

failed to add an image.


I am sutiing devstack and tried to add an icescrum appliance turnkey-icescrum-12.0, but i got

gpg: requesting key A16EB94D from hkp server keyserver.ubuntu.com
gpg: key A16EB94D: "Turnkey Linux Release Key <release@turnkeylinux.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
gpg: no valid OpenPGP data found.
gpg: the signature could not be verified.
Please remember that the signature file (.sig or .asc)
should be the first file given on the command line.

I used the script turnke2glance.sh

Redirecting output to /var/log/inithook.log


I'm setting up Turnkey Linux on Openstack.  I manage to upload the image and it does boot.  However, I can't get past this prompt

Redirecting output to /var/log/inithook.log

Do you know why the console is not going beyond this point?



Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)