bootstrap-script.sh
author Paul Tonelli <paul.tonelli@logilab.fr>
Tue, 05 Mar 2013 18:57:42 +0100
changeset 25 18936b962551
parent 14 6c75dfac2047
permissions -rw-r--r--
corrected errors in sizes, still need cleanup with same units

#!/bin/bash

### download image ###
image_name=raring-server-cloudimg-amd64.tar.gz 
image_address=http://cloud-images.ubuntu.com/raring/current/$image_name
wget $image_address 
mv $image_name /mnt

#### install and configure salt-minion ####
wget http://ftp.fr.debian.org/debian/pool/main/s/salt/salt-minion_0.12.1-1_all.deb
wget http://ftp.fr.debian.org/debian/pool/main/s/salt/salt-common_0.12.1-1_all.deb
dpkg -i salt-minion_0.12.1-1_all.deb salt-common_0.12.1-1_all.deb
apt-get update
apt-get -f --force-yes --yes install
aptitude install salt-minion
patch /etc/salt/minion minion.patch
mkdir /etc/salt/srv
cp -r _modules _states ami-creator.sls top.sls /etc/salt/srv 
salt-call state.highstate
salt-call vm_create.create_flavor $image_name gna