mirror of
https://github.com/rancher/os.git
synced 2025-08-31 22:32:14 +00:00
make qcow images customizable, and build one for Digital Ocean
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
@@ -12,3 +12,4 @@ CMD ["/source/scripts/build.sh"]
|
||||
|
||||
ENV DAPPER_RUN_ARGS --device /dev/kvm
|
||||
ENV DAPPER_OUTPUT dist
|
||||
ENV DAPPER_ENV APPEND NAME
|
||||
|
@@ -1,10 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
mkdir -p {dist,build/openstack/latest}
|
||||
|
||||
if [ "$APPEND" != "" ]; then
|
||||
echo "--append ${APPEND}"
|
||||
APPEND_PARAM="--append \"${APPEND}\""
|
||||
fi
|
||||
|
||||
cat > build/openstack/latest/user_data << EOF
|
||||
#!/bin/bash
|
||||
set -e
|
||||
@@ -16,7 +21,11 @@ mount -t 9p -o trans=virtio,version=9p2000.L config-2 /mnt
|
||||
touch log
|
||||
sleep 5
|
||||
openvt -s -- tail -f log &
|
||||
ros install -d /dev/vda -f --no-reboot >log 2>&1
|
||||
ros install \
|
||||
-d /dev/vda \
|
||||
${APPEND_PARAM} \
|
||||
-f \
|
||||
--no-reboot >log 2>&1
|
||||
|
||||
touch /mnt/success
|
||||
EOF
|
||||
@@ -32,5 +41,5 @@ kvm -curses \
|
||||
|
||||
[ -f build/success ]
|
||||
|
||||
echo Converting dist/rancheros-openstack.img
|
||||
qemu-img convert -c -O qcow2 build/hd.img dist/rancheros-openstack.img
|
||||
echo Converting dist/rancheros-${NAME}.img
|
||||
qemu-img convert -c -O qcow2 build/hd.img dist/rancheros-${NAME}.img
|
||||
|
Reference in New Issue
Block a user