-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure-compute.sh
executable file
·83 lines (63 loc) · 2.1 KB
/
configure-compute.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
source ./openrc
#-------------------------------------------------------------------------------
cat << EOF > /etc/nova/api-paste.ini.changes
[filter:authtoken]
admin_tenant_name = service
admin_user = nova
admin_password = swordfish
EOF
#-------------------------------------------------------------------------------
cat << EOF > /etc/nova/nova.conf.changes
[DEFAULT]
sql_connection = mysql://nova:swordfish@localhost/nova
my_ip = $HOST_IP
rabbit_password = guest
auth_strategy = keystone
# Networking
network_api_class = nova.network.neutronv2.api.API
neutron_url = http://127.0.0.1:9696
neutron_auth_strategy = keystone
neutron_admin_tenant_name = service
neutron_admin_username = quantum
neutron_admin_password = swordfish
neutron_admin_auth_url = http://127.0.0.1:35357/v2.0
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
# Security Groups
firewall_driver = nova.virt.firewall.NoopFirewallDriver
security_group_api = neutron
# Metadata
neutron_metadata_proxy_shared_secret = swordfish
service_neutron_metadata_proxy = True
metadata_listen = 127.0.0.1
metadata_listen_port = 8775
metadata_host = 127.0.0.1
# Cinder
volume_api_class = nova.volume.cinder.API
# Glance
glance_api_servers = 127.0.0.1:9292
image_service = nova.image.glance.GlanceImageService
# novnc
novnc_enabled = True
novncproxy_port = 6080
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $HOST_IP
novncproxy_base_url = http://$HOST_IP:6080/vnc_auto.html
EOF
#-------------------------------------------------------------------------------
kvm-ok
if [ $? -eq 0 ] ; then
libvirt_type='kvm'
else
libvirt_type='qemu'
fi
cat << EOF > /etc/nova/nova-compute.conf.changes
[DEFAULT]
libvirt_type = $libvirt_type
EOF
#-------------------------------------------------------------------------------
./merge-config.sh /etc/nova/api-paste.ini /etc/nova/api-paste.ini.changes
./merge-config.sh /etc/nova/nova.conf /etc/nova/nova.conf.changes
./merge-config.sh /etc/nova/nova-compute.conf /etc/nova/nova-compute.conf.changes
nova-manage db sync