pymysql安装_openstack stein 安装nova

40f01d9e131262869bff0d0023794899.png

openstack stein install nova

安装组件:

  • nova

注:安装服务均遵循以下步骤:

  • mariadb创库授权
  • keystone创建角色并关联
  • keystone创建服务注册API
  • 安装相应服务软件包
  • 修改配置文件
  • 同步数据库
  • 启动服务
  • 验证

安装nova

  • 创库授权:

mysql <

CREATE DATABASE nova_api;

CREATE DATABASE nova;

CREATE DATABASE nova_cell0;

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost'

IDENTIFIED BY 'NOVA_DBPASS';

GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%'

IDENTIFIED BY 'NOVA_DBPASS';

GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost'

IDENTIFIED BY 'NOVA_DBPASS';

GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%'

IDENTIFIED BY 'NOVA_DBPASS';

GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost'

IDENTIFIED BY 'NOVA_DBPASS';

GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%'

IDENTIFIED BY 'NOVA_DBPASS';

E0F

  • keystone创建角色并关联
  • keystone创建服务注册API

openstack user create --domain default --password NOVA_PASS nova

openstack role add --project service --user nova admin

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

  • 安装相应服务软件包:

yum install openstack-nova-api openstack-nova-conductor

openstack-nova-novncproxy openstack-nova-scheduler -y

  • 修改配置文件:

cp /etc/nova/nova.conf{,.bak}

grep '^[a-Z[]' /etc/nova/nova.conf.bak >/etc/nova/nova.conf

openstack-config --set /etc/nova/nova.conf DEFAULT enabled_apis osapi_compute,metadata

openstack-config --set /etc/nova/nova.conf DEFAULT transport_url rabbit://openstack:RABBIT_PASS@controller

openstack-config --set /etc/nova/nova.conf api auth_strategy keystone

openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 10.0.0.11

openstack-config --set /etc/nova/nova.conf DEFAULT use_neutron True

openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver

openstack-config --set /etc/nova/nova.conf api_database connection mysql+pymysql://nova:NOVA_DBPASS@controller/nova_api

openstack-config --set /etc/nova/nova.conf database connection mysql+pymysql://nova:NOVA_DBPASS@controller/nova

openstack-config --set /etc/nova/nova.conf glance api_servers http://controller:9292

openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_url http://controller:5000

openstack-config --set /etc/nova/nova.conf keystone_authtoken memcached_servers controller:11211

openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_type password

openstack-config --set /etc/nova/nova.conf keystone_authtoken project_domain_name Default

openstack-config --set /etc/nova/nova.conf keystone_authtoken user_domain_name Default

openstack-config --set /etc/nova/nova.conf keystone_authtoken project_name service

openstack-config --set /etc/nova/nova.conf keystone_authtoken username nova

openstack-config --set /etc/nova/nova.conf keystone_authtoken password NOVA_PASS

openstack-config --set /etc/nova/nova.conf oslo_concurrency lock_path /var/lib/nova/tmp

openstack-config --set /etc/nova/nova.conf vnc enable true

openstack-config --set /etc/nova/nova.conf vnc vncserver_listen $my_ip

openstack-config --set /etc/nova/nova.conf vnc vncserver_proxyclient_address $my_ip

openstack-config --set /etc/nova/nova.conf placement region_name RegionOne

openstack-config --set /etc/nova/nova.conf placement project_domain_name Default

openstack-config --set /etc/nova/nova.conf placement project_name service

openstack-config --set /etc/nova/nova.conf placement auth_type password

openstack-config --set /etc/nova/nova.conf placement user_domain_name Default

openstack-config --set /etc/nova/nova.conf placement auth_url http://controller:5000/v3

openstack-config --set /etc/nova/nova.conf placement username placement

openstack-config --set /etc/nova/nova.conf placement password PLACEMENT_PASS

openstack-config --set /etc/nova/nova.conf scheduler discover_hosts_in_cells_interval 300

  • 同步数据库:

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

su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova

  • 启动服务

systemctl enable openstack-nova-api.service

openstack-nova-scheduler.service

openstack-nova-conductor.service openstack-nova-novncproxy.service

systemctl start openstack-nova-api.service

openstack-nova-scheduler.service

openstack-nova-conductor.service openstack-nova-novncproxy.service

  • 验证:

openstack compute service list

nova-status upgrade check

3f4299242072c50ff42abca8f3f776ca.png

现有图片^_^

4397a22fa7451308a74eec99c855a8e9.png

现有图片^_^

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值