openstack--newton安装过程(官方文档)compute
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack--newton安装过程(官方文档)compute相关的知识,希望对你有一定的参考价值。
Install and configure a compute node
yum install -y openstack-nova-compute
vim /etc/nova/nova.conf
[DEFAULT]...enabled_apis = osapi_compute,metadata
[DEFAULT]...transport_url = rabbit://openstack:[email protected]
[DEFAULT]...auth_strategy = keystone[keystone_authtoken]...auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = Defaultuser_domain_name = Defaultproject_name = serviceusername = novapassword = 123456
[DEFAULT]...my_ip = 192.168.1.201
[DEFAULT]...use_neutron = Truefirewall_driver = nova.virt.firewall.NoopFirewallDriver
[vnc]...enabled = Truevncserver_listen = 0.0.0.0vncserver_proxyclient_address = $my_ipnovncproxy_base_url = http://controller:6080/vnc_auto.html
[glance]...api_servers = http://controller:9292
[oslo_concurrency]...lock_path = /var/lib/nova/tmp
Finalize installation
egrep -c ‘(vmx|svm)‘ /proc/cpuinfo
If this command returns a value of one or greater, your compute node supports hardware acceleration which typically requires no additional configuration.
If this command returns a value of zero, your compute node does not support hardware acceleration and you must configure libvirt to use QEMU instead of KVM.
vim /etc/nova/nova.conf
[libvirt]...virt_type = qemu
# systemctl enable libvirtd.service openstack-nova-compute.service# systemctl start libvirtd.service openstack-nova-compute.service
Perform these commands on the controller node.
. admin-openrc
openstack compute service list
Networking service
Install and configure controller node
$ mysql -u root -p
mysql> CREATE DATABASE neutron;
mysql> GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘localhost‘ \ IDENTIFIED BY ‘123456‘;mysql> GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@‘%‘ \ IDENTIFIED BY ‘123456‘;
. admin-openrc
openstack user create --domain default --password-prompt neutron
openstack role add --project service --user neutron admin
openstack service create --name neutron \ --description "OpenStack Networking" network
openstack endpoint create --region RegionOne \ network public http://controller:9696
openstack endpoint create --region RegionOne \ network internal http://controller:9696
openstack endpoint create --region RegionOne \ network admin http://controller:9696
Networking Option 2: Self-service networks
yum install -y openstack-neutron openstack-neutron-ml2 \ openstack-neutron-linuxbridge ebtables
vim /etc/neutron/neutron.conf
[database]...
connection = mysql+pymysql://neutron:[email protected]/neutron
[DEFAULT]...core_plugin = ml2service_plugins = routerallow_overlapping_ips = True
[DEFAULT]...transport_url = rabbit://openstack:123456@controller
[DEFAULT]...auth_strategy = keystone[keystone_authtoken]...auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = Defaultuser_domain_name = Defaultproject_name = serviceusername = neutronpassword = 123456
[DEFAULT]...notify_nova_on_port_status_changes = Truenotify_nova_on_port_data_changes = True[nova]...auth_url = http://controller:35357auth_type = passwordproject_domain_name = Defaultuser_domain_name = Defaultregion_name = RegionOneproject_name = serviceusername = novapassword = 123456
[oslo_concurrency]...lock_path = /var/lib/neutron/tmp
vim /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]...type_drivers = flat,vlan,vxlan
[ml2]...tenant_network_types = vxlan
[ml2]...mechanism_drivers = linuxbridge,l2population
[ml2]...extension_drivers = port_security
[ml2_type_flat]...flat_networks = provider
[ml2_type_vxlan]...vni_ranges = 1:1000
[securitygroup]...enable_ipset = True
vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]physical_interface_mappings = provider:ens37
[vxlan]enable_vxlan = Truelocal_ip = 192.168.115.128l2_population = True
[securitygroup]...enable_security_group = Truefirewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
vim /etc/neutron/l3_agent.ini
[DEFAULT]...interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
vim /etc/neutron/dhcp_agent.ini
[DEFAULT]...interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriverdhcp_driver = neutron.agent.linux.dhcp.Dnsmasqenable_isolated_metadata = True
Configure the metadata agent
vim /etc/neutron/metadata_agent.ini
[DEFAULT]...nova_metadata_ip = controllermetadata_proxy_shared_secret = 123456
Configure the Compute service to use the Networking service
vim /etc/nova/nova.conf
[neutron]...url = http://controller:9696auth_url = http://controller:35357auth_type = passwordproject_domain_name = Defaultuser_domain_name = Defaultregion_name = RegionOneproject_name = serviceusername = neutronpassword = 123456service_metadata_proxy = Truemetadata_proxy_shared_secret = 123456
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \ --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
systemctl restart openstack-nova-api.service
systemctl enable neutron-server.service \ neutron-linuxbridge-agent.service neutron-dhcp-agent.service \ neutron-metadata-agent.service
systemctl start neutron-server.service \ neutron-linuxbridge-agent.service neutron-dhcp-agent.service \ neutron-metadata-agent.service
systemctl enable neutron-l3-agent.service
systemctl start neutron-l3-agent.service
Install and configure compute node
yum install -y openstack-neutron-linuxbridge ebtables ipset
vim /etc/neutron/neutron.conf
[DEFAULT]...transport_url = rabbit://openstack:[email protected]
[DEFAULT]...auth_strategy = keystone[keystone_authtoken]...auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = Defaultuser_domain_name = Defaultproject_name = serviceusername = neutronpassword = 123456
[oslo_concurrency]...lock_path = /var/lib/neutron/tmp
compute Networking Option 2: Self-service networks
vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]physical_interface_mappings = provider:ens37
[vxlan]enable_vxlan = Truelocal_ip = 192.168.115.129l2_population = True
[securitygroup]...enable_security_group = Truefirewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
vim /etc/nova/nova.conf
[neutron]...url = http://controller:9696auth_url = http://controller:35357auth_type = passwordproject_domain_name = Defaultuser_domain_name = Defaultregion_name = RegionOneproject_name = serviceusername = neutronpassword = 123456
systemctl restart openstack-nova-compute.service
systemctl enable neutron-linuxbridge-agent.service systemctl start neutron-linuxbridge-agent.service
Networking service Verify operation
Note
Perform these commands on the controller node.
. admin-openrc
neutron ext-list
openstack network agent list
Dashboard
Install and configure
This section describes how to install and configure the dashboard on the controller node.
yum install -y openstack-dashboard
vim /etc/openstack-dashboard/local_settings
OPENSTACK_HOST = "controller"
ALLOWED_HOSTS = [‘*‘, ]
Configure the memcached session storage service:
SESSION_ENGINE = ‘django.contrib.sessions.backends.cache‘CACHES = { ‘default‘: { ‘BACKEND‘: ‘django.core.cache.backends.memcached.MemcachedCache‘, ‘LOCATION‘: ‘controller:11211‘, }}
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = { "identity": 3, "image": 2, "volume": 2,}
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
TIME_ZONE = "PRC"
systemctl restart httpd.service memcached.service
Access the dashboard using a web browser at http://controller/dashboard.
Authenticate using admin or demo user and default domain credentials.
本文出自 “share,open source” 博客,请务必保留此出处http://liqilong2010.blog.51cto.com/3029053/1898525
以上是关于openstack--newton安装过程(官方文档)compute的主要内容,如果未能解决你的问题,请参考以下文章
openstack--newton安装过程(官方文档)问题解决