Paste #39512

Welcome On LodgeIt

Welcome to the LodgeIt pastebin. In order to use the notification feature a 31 day cookie with an unique ID was created for you. The lodgeit database does not store any information about you, it's just used for an advanced pastebin experience :-). Read more on the about lodgeit page. Have fun :-)

hide this notification

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh


apt-get install -y python-software-properties
add-apt-repository ppa:nova-core/ppa
apt-get update
apt-get install -y nova-common nova-doc python-greenlet python-nova nova-api nova-network nova-objectstore nova-scheduler nova-compute unzip vim euca2ools

sed -i.bak 's\sqlite:////var/lib/nova/nova.sqlite\mysql://root:supersecurepassword@10.100.0.120/nova\g' *.conf

for filename in /etc/nova/*.conf
do
cat >>$filename << NOVA_CONF_EOF
--s3_host=10.100.0.120
--rabbit_host=10.100.0.120
--cc_host=10.100.0.120
--verbose
--ec2_url=http://10.100.0.120:8773/services/Cloud
--network_manager=nova.network.manager.FlatManager
NOVA_CONF_EOF
done;


cat >>/etc/nova/nova-manage.conf << NOVA_MNG_CONF_EOF
--FAKE_subdomain=ec2
--fixed_range=xxx.xxx.xxx.xxx/24
--network_size=230
NOVA_MNG_CONF_EOF

cat >>/etc/nova/nova-network.conf << NOVA_NET_CONF_EOF
--fixed_range=xxx.xxx.xxx.xxx/24
--network_size=230
NOVA_NET_CONF_EOF

mysql -uroot -pnova -e 'update nova.networks set  cidr="xxx.xxx.xxx.xxx/24" where gateway="xxx.xxx.xxx.1";'
mysql -uroot -pnova -e 'update nova.networks set  netmask="255.255.255.0" where gateway="xxx.xxx.xxx.1";'
mysql -uroot -pnova -e 'update nova.networks set  broadcast="xxx.xxx.xxx.xxx" where gateway="xxx.xxx.xxx.1";'
mysql -uroot -pnova -e 'update nova.networks set  dhcp_start="xxx.xxx.xxx.xxx" where gateway="xxx.xxx.xxx.1";'
mysql -uroot -pnova -e 'update nova.networks set  bridge="br100" where gateway="xxx.xxx.xxx.1";'
mysql -uroot -pnova -e 'update nova.networks set  injected="1" where gateway="xxx.xxx.xxx.1";'