1、设置本地实验ip
1.1、管理节点更改hosts
vi /etc/hosts
x.x.x.x controller
1.2、编辑chrony.conf配置文件
修改下面3、4、5、6、7以及最后一行,内容如下:
# Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst server 0.asia.pool.ntp.org iburst # Ignore stratum in source selection. stratumweight 0 # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift # Enable kernel RTC synchronization. rtcsync # In first three updates step the system clock instead of slew # if the adjustment is larger than 10 seconds. makestep 10 3 # Allow NTP client access from local network. #allow 192.168/16 allow 0.0.0.0/0 |
1.3、编辑openstack.cnf配置文件
vi /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 0.0.0.0
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
2、Mariadb启动
2.1、Mariadb启动
启动数据库服务
systemctl enable mariadb.service
systemctl start mariadb.service
3、仪表盘安装与配置
3.1、安装仪表盘
已使用yun install openstack-dashboard安装仪表盘。
检查是否已经安装dashboard
yum list openstack-dashboard
3.2、更改local_settings配置文件
编辑local_settings
vi /etc/openstack-dashboard/local_settings
修改如下内容:
OPENSTACK_HOST = "controller"
ALLOWED_HOSTS = ['*' ]
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"
OPENSTACK_NEUTRON_NETWORK = {
...
'enable_router': False,
'enable_quotas': False,
'enable_distributed_router': False,
'enable_ha_router': False,
'enable_lb': False,
'enable_firewall': False,
'enable_vpn': False,
'enable_fip_topology_check': False,
}
TIME_ZONE = "Asia/Shanghai"
3.3、启动相关服务
启动web服务器以及会话存储服务:
systemctl start httpd.service memcached.service
4、测试验证
4.1、在浏览器中进行验证
访问浏览器``http://$local_ip/dashboard``,如下所示: