##5.1 Nova控制节点--openstack

##5.1 Nova控制节点

##5.1 Nova控制节点
# controller 安装
#5.1.Nova-controller.sh

#创建Nova数据库、用户、认证,前面已设置
source ./admin-openstack.sh || { echo "加载前面设置的admin-openstack.sh环境变量脚本";exit; }

# keystone上服务注册 ,创建nova用户、服务、API
# nova用户前面已建
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1
#创建placement用户、服务、API
openstack user create --domain default --password=placement placement
openstack role add --project service --user placement admin
openstack service create --name placement --description "Placement API" placement
openstack endpoint create --region RegionOne placement public http://controller:8778
openstack endpoint create --region RegionOne placement internal http://controller:8778
openstack endpoint create --region RegionOne placement admin http://controller:8778
#openstack endpoint delete id?

## 安装nova控制节点
yum install -y openstack-nova-api openstack-nova-conductor   openstack-nova-console openstack-nova-novncproxy   openstack-nova-scheduler openstack-nova-placement-api
yum install -y openstack-utils

# #nova控制节点配置
echo ‘#
[DEFAULT]
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:[email protected]
my_ip = 10.2.1.20
use_neutron = True
firewall_driver = nova.virt.firewall.NoopFirewallDriver

[api_database]
connection = mysql+pymysql://nova:[email protected]/nova_api
[database]
connection = mysql+pymysql://nova:[email protected]/nova

[api]
auth_strategy = keystone
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova

[vnc]
enabled = true
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
[glance]
api_servers = http://controller:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = placement

[scheduler]
discover_hosts_in_cells_interval = 300
#‘>/etc/nova/nova.conf

echo "

#Placement API
<Directory /usr/bin>
   <IfVersion >= 2.4>
      Require all granted
   </IfVersion>
   <IfVersion < 2.4>
      Order allow,deny
      Allow from all
   </IfVersion>
</Directory>
">>/etc/httpd/conf.d/00-nova-placement-api.conf
systemctl restart httpd
sleep 2

#同步数据库
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
su -s /bin/sh -c "nova-manage db sync" nova

#检测数据
nova-manage cell_v2 list_cells
mysql -h controller -u nova -pnova -e "use nova_api;show tables;"
mysql -h controller -u nova -pnova -e "use nova;show tables;"
mysql -h controller -u nova -pnova -e "use nova_cell0;show tables;"

#开机自启动
 systemctl enable openstack-nova-api.service   openstack-nova-consoleauth.service openstack-nova-scheduler.service   openstack-nova-conductor.service openstack-nova-novncproxy.service
#启动服务
systemctl start openstack-nova-api.service   openstack-nova-consoleauth.service openstack-nova-scheduler.service   openstack-nova-conductor.service openstack-nova-novncproxy.service

#查看节点
#nova service-list
openstack catalog list
nova-status upgrade check
openstack compute service list

#nova-manage cell_v2 delete_cell --cell_uuid  b736f4f4-2a67-4e60-952a-14b5a68b0f79

# #发现计算节点,新增计算节点时执行
#su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
时间: 2024-10-10 06:53:12

##5.1 Nova控制节点--openstack的相关文章

CentOS 7部署OpenStack(4)—部署Nova控制节点

1.创建数据库 [[email protected] ~]# mysql -u root -p -e "CREATE DATABASEnova;" Enter password: [[email protected] ~]# mysql -u root -p -e "GRANT ALL PRIVILEGES ONnova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';" Enter password: [[email pr

##6.1 Neutron控制节点--openstack

##6.1 Neutron控制节点 ##6.1 Neutron控制节点 #6.1.Neutron.controller.sh #本实例网络配置方式是:公共网络 #官方参考 https://docs.openstack.org/neutron/pike/install/controller-install-rdo.html #创建Neutron数据库.用户认证,前面已设置 source ./admin-openstack.sh # 创建Neutron服务实体,API端点 openstack ser

##5.2 Nova计算节点--openstack

##5.2 Nova计算节点 ##5.2 Nova计算节点 # compute 安装 #5.2.Nova-compute.sh #基本配置: #关闭selinux.防火墙 #更换阿里源.升级.重启.时间同步 #hostname设置 #安装OpenStack库 #安装配置Nova yum install -y openstack-nova-compute yum install -y python-openstackclient openstack-selinux #设置Nova实例路径(磁盘镜像

openstack部署安装(Icehouse版本)-控制节点(Controller)-计算服务(nova)

nova为计算服务,能够启动虚拟机实例.可以将这些服务配置在单独的节点或同一节点上.大多数服务在控制器节点上运行,在一个专用的计算节点上运行虚拟机运行的服务.此次,我们将compute部署到控制节点上. 4.1 Install Compute controller services(安装计算服务) 4.1.1 安装compute所需要的包 # yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor  

OpenStack入门篇(九)之nova服务(控制节点)的部署与测试

1.Nova介绍 Nova是openstack最早的两块模块之一,另一个是对象存储swift.在openstack体系中一个叫做计算节点,一个叫做控制节点.这个主要和nova相关,我们把安装为计算节点成为:nova-compute,把除了nova-compute叫做控制节点.nova-compute是创建虚拟机的,只是创建虚拟机,所有的控制都在另一台上.OpenStack计算组件请求OpenStack Identity服务进行认证:请求OpenStack Image服务提供磁盘镜像:为OpenS

openstack icehouse系列之控制节点搭建

大家都知道openstack是目前最热门.最火的一个开源云计算软件.openstack是IaaS(基础设施即服务)组件,让任何人都可以自行建立和提供云端运算服务. 今天学习搭建下openstack icehouse版本的搭建.下面是环境介绍 网络节点:ml2.openvswitch.DHCP.l3.metadata 控制节点:mysql.keystone.glance.nova.neutron.dashboard.cinder 计算节点:nova-compute.qemu-kvm.openvsw

Openstack 单控制节点部署实例

一.前期准备 1.openstack集群设备列表 10.240.216.101 os-node1    控制节点(ceph mon mds节点) 10.240.216.102 os-node2    计算节点(ceph mon mds节点) 10.240.216.103 os-node3    计算节点(ceph mon mds节点) 10.240.216.104 os-node4    存储节点(ceph osd节点) 10.240.216.105 os-node5    存储节点(ceph

openstack 部署笔记--neutron控制节点

控制节点 配置neutron用户及服务 $ . 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" ne

openstack Juno系列之控制节点搭建

openstack Juno系列之控制节点搭建 controller控制节点搭建 安装keystone ------------- 所有主机hosts: 取消其中127.0.0.1 10.0.0.11  controller 10.0.0.21  neutron 10.0.0.31  compute to configure prerequisites: apt-get install python-software-properties add-apt-repository cloud-arc