openstack-计算节点安装(Node)
感谢朋友支持本博客,欢迎共同探讨交流。因为能力和时间有限。错误之处在所难免,欢迎指正。
假设转载,请保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167
原博文地址:http://blog.csdn.net/qq_21398167/article/details/46389799
1.基础配置
操作系统使用CentOS-7.0-x86_64-*.iso,安装过程省略,本文採用yum源安装。
(1).导入第三方安装源
[root@node ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
[root@node ~]# rpm -Uvhhttp://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
[root@node ~]# yum installhttp://repos.fedorapeople.org/repos/openstack/openstack-havana/rdo-release-havana-9.noarch.rpm
(2).配置/etc/hosts文件
[root@node ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6localhost6.localdomain6
192.168.1.2 openstack
192.168.1.3 node
(3).配置网络
[root@node ~]# vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="E4:1F:13:45:AB:C1"
ONBOOT="yes"
IPADDR=192.168.1.3
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE="Ethernet"
[root@openstack~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="none"
HWADDR="E4:1F:13:45:AB:C3"
ONBOOT="yes"
TYPE="Ethernet"
(4).关闭selinux:
[root@node ~]# more/etc/selinux/config
#This file controls the state of SELinux on the system.
#SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
#SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
[root@node~]# setenforce 0
(5).改动/etc/sysctl.conf參数:
[root@node ~]# vi/etc/sysctl.conf
……………………
net.ipv4.ip_forward= 1
……………………
[root@node ~]#sysctl -p #使sysctl.conf配置生效
2.安装配置NTPclient
(1).安装NTPclient服务:
[root@node ~]# yum -y installntpdate
(2).设置时间同步:
[root@node ~]#ntpdate192.168.1.2
31 Mar 16:17:03ntpdate[5848]: the NTP socket is in use, exiting
(3).设置计划任务:
[root@node ~]# crontab-e
插入下行内容:
*/5 * * * * ntpdate 192.168.1.2>> /var/log/ntpdate.log
3.环境变量设置
改动.bash_profile文件,加入下面參数:
[root@node ~]# vi.bash_profile
………………
exportOS_USERNAME=admin
exportOS_TENANT_NAME=admin
exportOS_PASSWORD=password
exportOS_AUTH_URL=http://192.168.1.2:5000/v2.0
exportSERVICE_ENDPOINT=http://192.168.1.2:35357/v2.0
exportSERVICE_TOKEN=12dd70ede7c9d9d3ed3c
………………
运行以下的命令使变量即时生效:
[root@node ~]# source.bash_profile
4.安装配置libvirt服务
(1).安装libvirt服务:
[root@node ~]#yum -y install qemu-kvm libvirt
(2)启动libvirt服务:
[root@node ~]# servicelibvirtd start
(3)查看net-list,发现default:
[root@node ~]# virshnet-list
Name State Autostart Persistent
--------------------------------------------------
default active yes yes
(4)删除default。即virbr0:
[root@node ~]# virshnet-destroy default
Networkdefault destroyed
[root@node ~]# virshnet-undefine default
Networkdefault has been undefined
(5)重新启动libvirtd服务,设置开机自启动:
[root@node ~]# servicelibvirtd restart
[root@node ~]# chkconfiglibvirtd on
5.安装MySQLclient
(1).安装mysqlclient
[root@node ~]#yum -y install maridb
(2).检查mysql数据库连通性
[root@node ~]# mysql -h192.168.1.2 -unova -pnova
Welcome to the MySQLmonitor. ………………
mysql> quit;
Bye
6.安装配置Nova服务
(1)安装nova-compute、nova-network、nova-scheduler
[root@node ~]#yum -y install openstack-nova-computeopenstack-nova-network openstack-nova-scheduler
(2).改动nova配置文件
[root@node ~]#vi /etc/nova/nova.conf
[DEFAULT]
my_ip = 192.168.1.3
auth_strategy = keystone
state_path =/letv/openstack/lib/nova
verbose=True
allow_resize_to_same_host= true
rpc_backend =nova.openstack.common.rpc.impl_qpid
qpid_hostname = 192.168.1.2
libvirt_type = kvm
glance_api_servers = 192.168.1.2:9292
novncproxy_base_url =http://192.168.1.2:6080/vnc_auto.html
vncserver_listen = 192.168.1.3
vncserver_proxyclient_address= 192.168.1.3
vnc_enabled = true
vnc_keymap = en-us
network_manager =nova.network.manager.FlatDHCPManager
firewall_driver =nova.virt.firewall.NoopFirewallDriver
multi_host = True
flat_interface = eth1
flat_network_bridge = br1
public_interface = eth0
instance_usage_audit =True
instance_usage_audit_period= hour
notify_on_state_change =vm_and_task_state
notification_driver =nova.openstack.common.notifier.rpc_notifier
compute_scheduler_driver=nova.scheduler.simple.SimpleScheduler
[hyperv]
[zookeeper]
[osapi_v3]
[conductor]
[keymgr]
[cells]
[database]
sql_connection=mysql://nova:nova@192.168.1.2/nova
[image_file_url]
[baremetal]
[rpc_notifier2]
[matchmaker_redis]
[ssl]
[trusted_computing]
[upgrade_levels]
[matchmaker_ring]
[vmware]
[spice]
[keystone_authtoken]
auth_host = 192.168.1.2
auth_port = 35357
auth_protocol = http
admin_user = nova
admin_tenant_name =service
admin_password = service
因上管理节点nova.conf配置文件里改动了instances实例存放的位置。还须要作一下操作:
改动路径,设置文件夹权限:
[root@node ~]# cp-r /var/lib/nova/ /openstack/lib/
[root@node ~]# chown-R nova:nova /openstack/lib/nova/
(3).启动nova相关服务。设置开机自启动
[root@node ~]# servicemessagebus start
[root@node ~]# chkconfigmessagebus on
[root@node ~]# serviceopenstack-nova-compute start
[root@node ~]# serviceopenstack-nova-network start
[root@node ~]# chkconfigopenstack-nova-compute on
[root@node ~]# chkconfigopenstack-nova-network on
*******************************************************************************************
OpenStack其它经常使用命令:
1.listnova服务,包括管理节点和计算节点
[root@openstack~]# nova service-list
+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone |Status | State | Updated_at | Disabled Reason |
+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
| nova-cert | openstack | internal | enabled | up |2014-03-31T08:59:50.000000 | - |
| nova-consoleauth |openstack | internal | enabled | up | 2014-03-31T08:59:54.000000| - |
| nova-scheduler | openstack | internal | enabled | up |2014-03-31T08:59:48.000000 | - |
| nova-conductor | openstack | internal | enabled | up |2014-03-31T08:59:52.000000 | - |
| nova-compute | openstack | nova | enabled | up |2014-03-31T08:59:56.000000 | - |
| nova-compute | node | nova | enabled | up | 2014-03-31T08:59:53.000000 | - |
| nova-network | openstack | internal | enabled | up |2014-03-31T08:59:50.000000 | - |
| nova-network | node | internal | enabled | up |2014-03-31T08:59:56.000000 | - |
| nova-scheduler | node | internal | enabled | up | 2014-03-31T08:59:52.000000| - |
2.查看计算节点:
[root@node ~]# novahypervisor-list
+----+---------------------+
| ID | Hypervisorhostname |
+----+---------------------+
| 1 | openstack |
| 2 |node |
+----+---------------------+
3.查看虚拟机模板配置:
[root@node ~]# novaflavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium |4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge |16384 | 160 | 0 | | 8 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
vim /etc/nova/api-paste.ini
admin_tenant_name=admin
admin_user=admin
admin_password=password
openstack-计算节点安装(Node)的更多相关文章
- Nova计算节点安装配置
Nova计算节点安装配置 openstack pike 安装 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html ## Nova计算节点安装配置 #基本配置 ...
- openstack--6--控制节点和计算节点安装配置neutron
Neutron相关介绍 早期的时候是没有neutron,早期所使用的网络的nova-network,经过版本改变才有个neutron. quantum是因为商标和别的公司重名了,又改成的Neutron ...
- openstack--5--控制节点和计算节点安装配置nova
Nova相关介绍 目前的Nova主要由API,Compute,Conductor,Scheduler组成 Compute:用来交互并管理虚拟机的生命周期: Scheduler:从可用池中根据各种策略选 ...
- 020-VMware虚拟机作为OpenStack计算节点,上面的虚拟机无法启动问题解决
问题描述: VMware虚拟机作为OpenStack计算节点,如果安装的操作系统是CentOS7.3,则在此计算节点放置的虚拟机无法正常启动,报如下错误: 在创建计算节点时,为了能让 KVM 能创 ...
- openstack ocata版(脚本)计算节点安装
一.初始化环境: 1.安装软件包: yum -y install centos-release-openstack-ocata yum -y upgrade yum -y install python ...
- Openstak(M版)计算节点安装
#############修改hosts文件 10.0.0.11 controller10.0.0.31 compute110.0.0.32 compute210.0.0.41 block110.0. ...
- OpenStack运维(二):OpenStack计算节点的故障和维护
1.计划中的维护 举例:需要升级某一个计算节点的硬件配置,需要将计算节点上的虚拟机迁移后在对其进行操作,分为两种情况. 1.1 云系统使用了共享存储 a. 获取虚拟机列表:nova list --ho ...
- openstack swift节点安装手册3-最后的安装配置及验证
以下步骤都在controller节点上执行 1.远程获取/etc/swift/swift.conf文件: curl -o /etc/swift/swift.conf https://git.opens ...
- openstack swift节点安装手册1-节点配置
本文参照官方教程:http://docs.openstack.org/project-install-guide/object-storage/draft/environment-networking ...
随机推荐
- HTML5 canvas上画文字出现乱码
不是这个的问题, <html> <head> <meta charset="utf-8"/> </head> 是因为从网上复制粘贴下 ...
- Appium+python自动化6-Remote远程控制【转载】
前言 在第三篇启动app的时候有这样一行代码driver = webdriver.Remote('http://192.168.1.1:4723/wd/hub', desired_caps),很多小伙 ...
- centos6.x一键15项系统优化(转自努力哥)
#!/bin/sh ################################################ #Author:nulige # qqinfo: # Date: -- #vers ...
- 【转载】无需图片,使用CSS3实现圆角按钮
原文地址:http://www.open-open.com/home/space-37924-do-blog-id-5789.html 首先来看看效果: 事例HTML代码: <a href=&q ...
- [BZOJ1191][HNOI2006]超级英雄Hero 类似二分图的最大匹配
1191: [HNOI2006]超级英雄Hero Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 4740 Solved: 2162[Submit][ ...
- react setState里的作用域
从接触racet开始,我们就认识了setState,它是对全局变量进去更新的一个重要方法, 不仅可以更新数据,还能在更新后执行方法时直接调用刚刚更新的数据 今天碰到的问题就在于它的作用域的先后问题 先 ...
- 天梯L2-003-测试点
测试点3无法过,题目说是正整数用了int,结果得用double输入才能AC.
- Doki Doki Literature Club
Doki Doki Literature Club! is a visual novel developed by Team Salvato. The protagonist is invited b ...
- A/B Testing with Practice in Python (Part Two)
This is the second part of A/B testing notes, which contains the practical issues and alternatives o ...
- Codevs1026 SEARCH(逃跑的拉尔夫 )(BFS)
SEARCH 时间限制: 1 Sec 内存限制: 128 MB提交: 11 解决: 4[提交][状态][讨论版] 题目描述 年轻的拉尔夫开玩笑地从一个小镇上偷走了一辆车,但他没想到的是那辆车属于警 ...