部署dashboard
1、首先安装dashboard软件包
yum -y install openstack-dashboard
2、修改配置文件 /etc/openstack-dashboard/local_settings
ALLOWED_HOSTS = ['*', 'localhost']
OPENSTACK_API_VERSIONS = {
# "data-processing": 1.1,
"identity": 3,
"volume": 2,
"compute": 2,
}
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'Default'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '192.168.148.47:11211',
},
}
OPENSTACK_HOST = "192.168.148.200"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
把配置文件copy到其他节点,注意修改locationIP
3、重新启动服务
systemctl restart httpd memcached
4、登录web界面
http://192.168.148.200/dashboard
user:admin
password:123456
domain:default
######################################################################################
添加一个计算节点
1、在计算节点安装软件包
yum install openstack-nova-compute -y
2、修改配置文件/etc/nova/nova.conf
[DEFAULT]
enabled_apis = osapi_compute,metadata
firewall_driver = nova.virt.firewall.NoopFirewallDriver
my_ip = 192.168.148.36
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver
vif_plugging_is_fatal = True
vif_plugging_timeout = 300
[api]
auth_strategy = keystone
[cinder]
os_region_name = RegionOne
[glance]
api_servers = http://192.168.148.200:9292
[keystone_authtoken]
auth_uri = http://192.168.148.200:5000
auth_url = http://192.168.148.200:36357
memcached_servers = controller1:11211,controller2:11211,controller3:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = 123456
[libvirt]
virt_type = qemu
[neutron]
url = http://192.168.148.200:9696
auth_url = http://192.168.148.200:36357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = 123456
service_metadata_proxy = True
metadata_proxy_shared_secret = 123456
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
[oslo_messaging_rabbit]
rabbit_hosts = controller1:5672,controller2:5672,controller3:5672
rabbit_userid = openstack
rabbit_password = 123456
rabbit_ha_queues = True
rabbit_retry_interval = 1
rabbit_retry_backoff = 2
rabbit_max_retries = 0
[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://192.168.148.200:36357/v3
username = placement
password = 123456
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://192.168.148.200:6080/vnc_auto.html
3、测试是否支持虚拟化
egrep -c '(vmx|svm)' /proc/cpuinfo
返回值0使用qemu,有其他显示值用
[libvirt]
virt_type = qemu
4、启动服务并设置开机启动
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl start libvirtd.service openstack-nova-compute.service
验证
openstack compute service list --service nova-compute
5、在任一controller节点执行,发现计算节点
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
6、验证服务
openstack compute service list
7、在Identity Service中列出API的endpoint
openstack catalog list
8、neutron软件包安装
yum -y install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch
9、修改配置文件/etc/neutron/neutron.conf
vi /etc/neutron/neutron.conf
[DEFAULT]
core_plugin = ml2
service_plugins = router
auth_strategy = keystone
state_path = /var/lib/neutron
allow_overlapping_ips = True
transport_url =
rabbit://openstack:123456@192.168.148.200
[keystone_authtoken]
auth_uri = http://192.168.148.200:5000
auth_url = http://192.168.148.200:35357
memcached_servers = controller1:11211,controller2:11211,controller3:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = 123456
[oslo_concurrency]
lock_path = $state_path/lock
10、修改权限
chmod 640 /etc/neutron/neutron.conf
chown neutron /etc/neutron/neutron.conf
11、修改配置文件/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types = vxlan
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
enable_ipset = True
12、启动服务并且设置开机自启动
systemctl start openvswitch
systemctl enable openvswitch
13、创建网桥
ovs-vsctl add-br br-int
14、启动openvswitch-agent服务
systemctl start neutron-openvswitch-agent
systemctl enable neutron-openvswitch-agent