-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpost-deploy.sh
executable file
·24 lines (18 loc) · 2.22 KB
/
post-deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Post deployment script to initialize cloud
# By Rohit Yadav <[email protected]>
set -e
set -x
cli=cloudmonkey
webserver='http://192.168.1.12/'
$cli set profile bluebox
os_type=$($cli list ostypes description="Other Linux (64-bit)" | grep ^id\ = | awk '{print $3}')
$cli register template name="KVM Ubuntu 14.04" displaytext="KVM Ubuntu 14.04" zoneid=-1 format=QCOW2 isextractable=false passwordenabled=false isdynamicallyscalable=false ostypeid=$os_type hypervisor=KVM ispublic=true isfeatured=true isrouting=false url="$webserver/kvm-ubuntu-14.04.qcow2"
$cli register template name="Debian7" displaytext="Debian7" zoneid=-1 format=QCOW2 isextractable=true passwordenabled=true isdynamicallyscalable=false ostypeid=$os_type hypervisor=KVM ispublic=true isfeatured=true isrouting=false url="$webserver/debian7.qcow2.bz2"
os_type=$($cli list ostypes description="Other CentOS (64-bit)" | grep ^id\ = | awk '{print $3}')
$cli register template name="CentOS7" displaytext="CentOS7" zoneid=-1 format=QCOW2 isextractable=true passwordenabled=true isdynamicallyscalable=false ostypeid=$os_type hypervisor=KVM ispublic=true isfeatured=true isrouting=false url="$webserver/CentOS-7-x86_64-vanilla-kvm.qcow2.bz2"
$cli register template name="CentOS6" displaytext="CentOS6" zoneid=-1 format=QCOW2 isextractable=true passwordenabled=true isdynamicallyscalable=false ostypeid=$os_type hypervisor=KVM ispublic=true isfeatured=true isrouting=false url="$webserver/CentOS-6-x86_64-vanilla-kvm.qcow2.bz2"
os_type=$($cli list ostypes description="Windows 7 (64-bit)" | grep ^id\ = | awk '{print $3}')
$cli register template name="Windows7" displaytext="Window7 samsung" zoneid=-1 format=QCOW2 isextractable=false passwordenabled=false isdynamicallyscalable=false ostypeid=$os_type hypervisor=KVM ispublic=true isfeatured=true isrouting=false url="$webserver/Windows7.qcow2"
os_type=$($cli list ostypes description="Other Ubuntu (64-bit)" | grep ^id\ = | awk '{print $3}')
$cli register template name="Ubuntu 14.04" displaytext="Ubuntu 14.04" zoneid=-1 format=QCOW2 isextractable=true passwordenabled=true isdynamicallyscalable=false ostypeid=$os_type hypervisor=KVM ispublic=true isfeatured=true isrouting=false url="$webserver/ubuntu-14.04-amd64-vanilla-kvm.qcow2.bz2"