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 ...
随机推荐
- 【C语言】复杂类型声明
原文地址: http://blog.csdn.net/wangweixaut061/article/details/6549768 原文不让转载,但实在是有用,就拷贝了一小部分过来.全文请点开链接. ...
- [BZOJ1032][JSOI2007]祖码Zuma 区间dp
1032: [JSOI2007]祖码Zuma Time Limit: 10 Sec Memory Limit: 162 MB Submit: 1105 Solved: 576 [Submit][S ...
- 扩展欧拉定理【p4139】上帝与集合的正确用法
Description 根据一些书上的记载,上帝的一次失败的创世经历是这样的: 第一天, 上帝创造了一个世界的基本元素,称做"元". 第二天, 上帝创造了一个新的元素,称作&quo ...
- 洛谷——P1614 爱与愁的心痛
题目背景 (本道题目隐藏了两首歌名,找找看哪~~~) <爱与愁的故事第一弹·heartache>第一章 <我为歌狂>当中伍思凯神曲<舞月光>居然没赢给萨顶顶,爱与愁 ...
- 关于Android攻击面
先对android整个攻击面有一个体系化的认识,有助于理清思路, 对今后的学习有很大的帮助. 什么是攻击向量:从语言语法的角度来说,是一个动词,描述用来执行攻击的方法,描述了攻击者如何到达并接触任意给 ...
- Strobogrammatic Number -- LeetCode
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside ...
- POJ 2686 Traveling by Stagecoach(状压DP)
[题目链接] http://poj.org/problem?id=2686 [题目大意] 给出一张无向图,你有n张马车票每张车票可以租用ti匹马, 用一张马车票从一个城市到另一个城市所用的时间为这两个 ...
- 设置iframe高度自适应屏幕高度
写在前面: 最近在搭建项目前台页面框子的时候,把iframe设置成了固定的高度,导致不同的电脑尺寸访问的时候,高度差异较大,故查了下,将iframe设置成自动适应屏幕高度的方式,这里记录下. 还是直接 ...
- Linux Whois命令安装与使用
大家都知道查看域名的详细信息,都是跑去whois服务器去查询,如 http://whois.chinaz.com 其实在Linux下直接有一个whois的命令,不过需要安装jwhois才可以,以Cen ...
- C语言基础之运算符优先级
1.运算符的优先级表 运算符的优先级(从高到低) 优先级 描述 运算符 1 括号 ().[] 2 正负号 +.- 3 自增自减,非 ++.--.! 4 乘除,取余 *./.% 5 加减 +.- 6 移 ...