common.log('Starting installation')
print ''

#Configuring Kernel Networking Parameters
common.set_sysctl('net.ipv4.ip_forward', '1')
common.set_sysctl('net.ipv4.conf.all.rp_filter', '0')
common.set_sysctl('net.ipv4.conf.default.rp_filter', '0')

#Installing vlan and bridge-utils
kilo.install_vlan()
kilo.install_bridgeutils()

#OpenStack Kilo Configuration File
kilo_conf = os.path.join(os.path.dirname(__file__), 'kilo.conf')

network_mgmt_ntw_interface = common.get_file_option(kilo_conf, 'network', 'management_network_interface')
network_mgmt_ntw_interface_addr = common.get_network_address(network_mgmt_ntw_interface)
network_vm_traffic_ntw_interface = common.get_file_option(kilo_conf, 'network', 'vm_traffic_network_interface')
network_vm_traffic_ntw_interface_addr = common.get_network_address(network_vm_traffic_ntw_interface)
external_network_interface = common.get_file_option(kilo_conf, 'network', 'external_network_interface')

controller_server_name = common.get_file_option(kilo_conf, 'controller', 'controller_server_name')

print ''
common.log('Using network addresses:')
print '    Network Node VM Traffic Network IP Address: ' + str(network_vm_traffic_ntw_interface_addr)


#Installing NTP Server in Network Node
kilo.install_ntp(controller_server_name, False)
#Checking the script is run as the root user
if not os.getuid() == 0:
    sys.exit('This script must be run as root')

print '#######################################################################'
print '# OpenStack Kilo Controller Node Installation'
print '#######################################################################'
common.log('Starting installation')
print ''

#OpenStack Kilo Configuration File
kilo_conf = os.path.join(os.path.dirname(__file__), 'kilo.conf')

#Getting and updating Controller Node's Interface connected to Management Network/VLAN
ctrl_mgmt_ntw_interface = common.get_file_option(kilo_conf, 'controller', 'management_network_interface')
ctrl_mgmt_ntw_interface_addr = common.get_network_address(ctrl_mgmt_ntw_interface)
common.set_file_option(kilo_conf, 'controller', 'management_network_ip', ctrl_mgmt_ntw_interface_addr)

print ''
common.log('Using network addresses:')
print "    Controller Node's Interface at Management Network has IP Address: " + str(ctrl_mgmt_ntw_interface_addr)

#Installing NTP Server in Controller Node
time_server = common.get_file_option(kilo_conf, 'controller', 'time_server')
kilo.install_ntp(time_server, True)

#Installing MySQL
mysql_root_password = common.get_file_option(kilo_conf, 'mysql', 'root_password')
kilo.install_mysql(mysql_root_password)
sys.path.append(os.path.dirname(__file__))

from utils import common_tools as common
from utils import kilo_services as kilo

#Checking the script is run as the root user
if not os.getuid() == 0:
    sys.exit('This script must be run as root')

print '#######################################################################'
print '# OpenStack Kilo Block Storage Node Installation'
print '#######################################################################'
common.log('Starting installation')
print ''

#OpenStack Kilo Configuration File
kilo_conf = os.path.join(os.path.dirname(__file__), 'kilo.conf')

controller_server_name = common.get_file_option(kilo_conf, 'controller', 'controller_server_name')

cinder_db_password = common.get_file_option(kilo_conf, 'cinder', 'cinder_db_password')
cinder_usr_password = common.get_file_option(kilo_conf, 'cinder', 'cinder_usr_password')

openstack_rabbitmq_password = common.get_file_option(kilo_conf, 'rabbitmq', 'openstack_rabbitmq_password')

bs_mgmt_ntw_interface = common.get_file_option(kilo_conf, 'block_storage', 'management_network_interface')
bs_mgmt_ntw_interface_addr = common.get_network_address(bs_mgmt_ntw_interface)

kilo.install_cinder_block_storage_node(cinder_db_password, controller_server_name, cinder_usr_password, openstack_rabbitmq_password, bs_mgmt_ntw_interface_addr)
Example #4
0
#Checking the script is run as the root user
if not os.getuid() == 0:
    sys.exit('This script must be run as root')

print '#######################################################################'
print '# OpenStack Kilo Controller Node Installation'
print '#######################################################################'
common.log('Starting installation')
print ''

#OpenStack Kilo Configuration File
kilo_conf = os.path.join(os.path.dirname(__file__), 'kilo.conf')

#Getting and updating Controller Node's Interface connected to Management Network/VLAN
ctrl_mgmt_ntw_interface = common.get_file_option(
    kilo_conf, 'controller', 'management_network_interface')
ctrl_mgmt_ntw_interface_addr = common.get_network_address(
    ctrl_mgmt_ntw_interface)
common.set_file_option(kilo_conf, 'controller', 'management_network_ip',
                       ctrl_mgmt_ntw_interface_addr)

print ''
common.log('Using network addresses:')
print "    Controller Node's Interface at Management Network has IP Address: " + str(
    ctrl_mgmt_ntw_interface_addr)

#Installing NTP Server in Controller Node
time_server = common.get_file_option(kilo_conf, 'controller', 'time_server')
kilo.install_ntp(time_server, True)

#Installing MySQL
common.log('Starting installation')
print ''

#Configuring Kernel Networking Parameters
common.set_sysctl('net.ipv4.ip_forward', '1')
common.set_sysctl('net.ipv4.conf.all.rp_filter', '0')
common.set_sysctl('net.ipv4.conf.default.rp_filter', '0')

#Installing vlan and bridge-utils
kilo.install_vlan()
kilo.install_bridgeutils()

#OpenStack Kilo Configuration File
kilo_conf = os.path.join(os.path.dirname(__file__), 'kilo.conf')

network_mgmt_ntw_interface = common.get_file_option(
    kilo_conf, 'network', 'management_network_interface')
network_mgmt_ntw_interface_addr = common.get_network_address(
    network_mgmt_ntw_interface)
network_vm_traffic_ntw_interface = common.get_file_option(
    kilo_conf, 'network', 'vm_traffic_network_interface')
network_vm_traffic_ntw_interface_addr = common.get_network_address(
    network_vm_traffic_ntw_interface)
external_network_interface = common.get_file_option(
    kilo_conf, 'network', 'external_network_interface')

controller_server_name = common.get_file_option(kilo_conf, 'controller',
                                                'controller_server_name')

print ''
common.log('Using network addresses:')
print '    Network Node VM Traffic Network IP Address: ' + str(
#Configuring Kernel Networking Parameters
common.set_sysctl('net.ipv4.ip_forward', '1')
common.set_sysctl('net.ipv4.conf.all.rp_filter', '0')
common.set_sysctl('net.ipv4.conf.default.rp_filter', '0')
#common.set_sysctl('net.bridge.bridge-nf-call-iptables', '1')
#common.set_sysctl('net.bridge.bridge-nf-call-ip6tables', '1')

#Installing vlan and bridge-utils
kilo.install_vlan()
kilo.install_bridgeutils()

#OpenStack Kilo Configuration File
kilo_conf = os.path.join(os.path.dirname(__file__), 'kilo.conf')

comp_mgmt_ntw_interface = common.get_file_option(kilo_conf, 'compute', 'management_network_interface')
comp_mgmt_ntw_interface_addr = common.get_network_address(comp_mgmt_ntw_interface)
comp_vm_traffic_ntw_interface = common.get_file_option(kilo_conf, 'compute', 'vm_traffic_network_interface')
comp_vm_traffic_ntw_interface_addr = common.get_network_address(comp_vm_traffic_ntw_interface)

ctrl_mgmt_ntw_interface_addr = common.get_file_option(kilo_conf, 'controller', 'management_network_ip')
controller_server_name = common.get_file_option(kilo_conf, 'controller', 'controller_server_name')

print ''
common.log('Using network addresses:')
print '    Compute Node Management Network IP Address: ' + str(comp_mgmt_ntw_interface_addr)
print '    Compute Node VM Traffic Network IP Address: ' + str(comp_vm_traffic_ntw_interface_addr)

#Installing NTP Server in Compute Node
kilo.install_ntp(controller_server_name, False)