CC00011.CloudOpenStack——|OpenStack&组件.V02|——|OpenStack-nova|controller节点下部署nova计算服

一、构建实验:(yuanjian)openstack-compute(nova)(实验专题)
### --- openstack-compute(nova)(实验专题)

~~~     安装和配置controller节点scheduler服务上,scheduler服务会分机,
~~~     如果指定了对应的主机,直接发起请求。
~~~     若果没有指定对应的主机,会进行一个权重的计算,
~~~     怎么样会合理的调用对应的节点上,数据库的资源会合理的调用到每台主机之中,
~~~     scheduler会获取到当前的使用状态。
~~~     怎样保证当前消耗的资源不会太大,又会合理的去调度当前的数据呢,
~~~     定时每一分钟或每五分钟去更新一下数据库。
~~~     如有人在我们compute中写入数据的话,我们快速同步到当前的数据库
~~~     确认环境条件是否配置正常:在openstack-controller节点配置部署
二、在openstack-controller节点确定基础环境
### --- 在openstack-controller节点确定基础环境
~~~     确认环境条件是否配置正常:在openstack-controller节点配置部署

[root@controller ~]# systemctl status NetworkManager.service 
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
   Active: inactive (dead)
[root@controller ~]# systemctl status firewall.service
firewall.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
[root@controller ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

[root@controller ~]# getenforce
Disabled
~~~     配置时间同步服务器

[root@compute ~]# yum install -y ntp        
[root@compute ~]# vim /etc/ntp.conf
restrict 192.168.222.0 mask 255.255.255.0 nomodify notrap
#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 127.127.1.0
fudge  127.127.1.0 stratum 10
[root@controller ~]# systemctl start ntpd.service 
[root@controller ~]# systemctl enable ntpd.service 
ln -s '/usr/lib/systemd/system/ntpd.service' '/etc/systemd/system/multi-user.target.wants/ntpd.service'

[root@controller ~]# systemctl status ntpd.service 
ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: active (running) since Mon 2021-01-11 02:40:20 CST; 4min 42s ago
 Main PID: 11854 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─11854 /usr/sbin/ntpd -u ntp:ntp -g
[root@controller ~]# systemctl status mariadb.service
三、在openstack-compute节点确认基础环境
### --- 在openstack-compute节点确认基础环境

[root@compute ~]# systemctl status firewall.service
firewall.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
[root@compute ~]# systemctl status NetworkManager.service 
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
   Active: inactive (dead)
[root@compute ~]# getenforce 
Disabled
~~~		更改它的主机名为:compute1.nice.com

[root@compute ~]# hostnamectl set-hostname compute1.nice.com    
[root@compute ~]# cat /etc/hostname 
compute1.nice.com
~~~		在controller节点把hosts文件发送到compute1节点下

[root@controller ~]# scp /etc/hosts root@192.168.222.10:/etc/host 
192.168.222.5   controller.nice.com
192.168.222.6   network.nice.com
192.168.222.10  compute1.nice.com
192.168.222.20  block1.nice.com
~~~		ping一下我们的域名是否配置正确

[root@compute ~]# ping controller.nice.com                      
64 bytes from controller.nice.com (192.168.222.5): icmp_seq=1 ttl=64 time=0.401 ms
### --- 配置时间同步服务器的相关配置:
~~~     更新过yum源,删除centos的官方yum源文件

[root@compute yum.repos.d]# ls                                  
back  CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Sources.repo  CentOS-Vault.repo  ftp.repo
[root@compute yum.repos.d]# rm -rf CentOS-*
[root@compute yum.repos.d]# ls
back  ftp.repo
[root@compute ~]# yum clean all
~~~     安装ntpdate工具;时间同步服务器的客户端
~~~     配置客户端同步时间服务的地址

[root@compute ~]# yum install -y ntpdate           
[root@compute ~]# /sbin/ntpdate -u controller.nice.com
11 Jan 03:00:32 ntpdate[11182]: step time server 192.168.222.5 offset -70457.883365 sec
~~~     每一分钟去同步时间,/dev/null是垃圾箱,可以无限制的丢进数据,而不被保存

[root@compute ~]# crontab -e
*/1 * * * * /sbin/ntpdate -u controller.nice.com &> /dev/null   
[root@compute ~]# systemctl restart crond.service 
[root@compute ~]# systemctl enable crond.service 
[root@compute ~]# hostname
compute1.nice.com
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yanqi_vip

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值