Openstack安装额外的计算节点

案例:安装额外计算节点
主机聚合
可用域名称 主机 可用
internal
openstack.tedu.cn (服务已运行)
True
nova
openstack.tedu.cn (服务已运行)
True
问题
本案例要求安装额外的计算节点:
添加两块网卡,均能与第一个节点通信
能够准确地进行DNS解析
配置yum仓库
安装计算节点
步骤

实现此案例需要按照如下步骤进行。
步骤一:安装计算节点

备注:day02的案例里面在安装openstack时,nova.tedu.cn已经配置过网卡,DNS解析,yum源,这里不再赘述,不会的可以看day02的案例
1)更改answer.ini文件
[[email protected]nstack ~]# vi answer.ini //在openstack.tedu.cn上面操作
CONFIG_COMPUTE_HOSTS=192.168.1.1,192.168.1.2
CONFIG_NETWORK_HOSTS=192.168.1.1,192.168.1.2
[[email protected] ~]# packstack –answer-file answer.ini
**** Installation completed successfully ******
2)这时浏览器访问时不出现页面,15-horizon_vhost.conf文件被还原,需要重新修改这个文件
[[email protected] ~]# cd /etc/httpd/conf.d/
[[email protected] conf.d]# vi 15-horizon_vhost.conf
35 WSGIProcessGroup apache
36 WSGIApplicationGroup %{GLOBAL} //添加这一行
[[email protected] conf.d]# apachectl graceful //重新载入配置文件
3)浏览器访问,出现页面
[[email protected] conf.d]# firefox 192.168.1.1
[[email protected] conf.d]# cd
[[email protected] ~]# ls
answer.ini keystonerc_admin
[[email protected] ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=1bb4c987345c45ba
安装后的节点状态

代码如下
1)首先改一下应答文件
97 # List the servers on which to install the Compute service.
98 CONFIG_COMPUTE_HOSTS=192.168.1.1,192.168.1.2
99
100 # List of servers on which to install the network service such as
101 # Compute networking (nova network) or OpenStack Networking (neutron).
102 CONFIG_NETWORK_HOSTS=192.168.1.1,192.168.1.2

2)开始一键安装
[[email protected] ~(keystone_admin)]# packstack –answer-file answer.ini
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20181016-095916-_OcJbv/openstack-setup.log

Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts’ details [ DONE ]
Preparing pre-install entries [ DONE ]
Installing time synchronization via NTP [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron LBaaS Agent entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Gnocchi entries [ DONE ]
Preparing MongoDB entries [ DONE ]
Preparing Redis entries [ DONE ]
Preparing Ceilometer entries [ DONE ]
Preparing Aodh entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.1.1_controller.pp
192.168.1.1_controller.pp: [ DONE ]
Applying 192.168.1.2_network.pp
Applying 192.168.1.1_network.pp
192.168.1.1_network.pp: [ DONE ]
192.168.1.2_network.pp: [ DONE ]
Applying 192.168.1.2_compute.pp
Applying 192.168.1.1_compute.pp
192.168.1.1_compute.pp: [ DONE ]
192.168.1.2_compute.pp: [ DONE ]
Applying Puppet manifests [ DONE ]
Finalizing [ DONE ]

**** Installation completed successfully ******

Additional information:
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.1.1. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.1.1/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20181016-095916-_OcJbv/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20181016-095916-_OcJbv/manifests

3)网页肯定是打不开的,老规矩改httpd软件
WSGIProcessGroup apache
WSGIApplicationGroup %{GLOBAL}
[[email protected] conf.d(keystone_admin)]# apachectl graceful

4)再访问一次就可以了
[[email protected] conf.d(keystone_admin)]# cd
[[email protected] ~(keystone_admin)]# ls
answer.ini keystonerc_admin RPM-GPG-KEY-CentOS-7
[[email protected] ~(keystone_admin)]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=2e0f052c918943e3
export OS_AUTH_URL=http://192.168.1.1:5000/v2.0
export PS1='[\[email protected]\h \W(keystone_admin)]\$ ‘

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

5)看一下管理员-主机聚合,可以看到两个虚拟机都加进去了

可用域
筛选
可用域名称 主机 可用
internal
openstack.tedu.cn (服务已运行)
True
nova
nova.tedu.cn (服务已运行)
openstack.tedu.cn (服务已运行)
True

此条目发表在OpenStack分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注