1
0
mirror of https://github.com/rancher/os.git synced 2025-09-09 02:31:36 +00:00

add cloud-init support

This commit is contained in:
sidharthamani
2015-02-18 19:05:23 -08:00
parent 597a46c574
commit fb237dbebe
11 changed files with 433 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
FROM base
COPY scripts/dockerimages/scripts/cloud-config.sh /
CMD ["/cloud-config.sh"]

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -x -e
CLOUD_CONFIG_FLAGS=$(rancherctl config get cloud_config)
cloudinit --preinit "$CLOUD_CONFIG_FLAGS"

View File

@@ -3,6 +3,12 @@
#if [ -t 1 ]; then
#exec /bin/sh
#else
CLOUD_CONFIG_FILE=/var/lib/rancher/cloud-config
if [ -s $CLOUD_CONFIG_FILE ]; then
cloudinit --from-file $CLOUD_CONFIG_FILE
fi
exec respawn << EOF
/sbin/getty 115200 tty1
/sbin/getty 115200 tty2