收藏 分享(赏)

Openstack实验手册.doc

上传人:精品资料 文档编号:11174783 上传时间:2020-02-11 格式:DOC 页数:45 大小:5.24MB
下载 相关 举报
Openstack实验手册.doc_第1页
第1页 / 共45页
Openstack实验手册.doc_第2页
第2页 / 共45页
Openstack实验手册.doc_第3页
第3页 / 共45页
Openstack实验手册.doc_第4页
第4页 / 共45页
Openstack实验手册.doc_第5页
第5页 / 共45页
点击查看更多>>
资源描述

1、计算机新技术综合实践计算机新技术综合实践研究生实验手册课程名称: 计算机新技术综合实践 实验名称: 安装部署 OpenStack 实验地点: 专 业: 班 级: 指导教师: 吴含前 实验时间: 年 月 日计算机新技术综合实践实验一 64位 Linux下手动安装 OpenStack Icehouse版本【实验内容】学习 VMware workstation 虚拟机的使用,在 CentOS 64 位环境下安装搭建 OpenStack 环境,熟悉 Linux 基本操作,锻炼同学学习能力、动手能力和分析问题能力。【实验目的】1、熟悉 VMware workstation 虚拟机使用2、了解 OpenS

2、tack 整体架构3、了解 OpenStack 各组件功能4、能够在 Linux 下手动搭建 OpenStack 云计算环境【实验环境】计算机实验室VMware workstation 虚拟机【实验步骤】一、VMware workstation 下安装 CentOS 6.5 x64 操作系统1、 首先安装 VMware Workstation2、 创建 OpenStack 控制节点,文件 新建虚拟机计算机新技术综合实践3、 选择 典型(推荐) 下一步4、 稍后安装操作系统计算机新技术综合实践5、 选择操作系统和版本6、 输入虚拟机名称和安装路径计算机新技术综合实践7、 设置磁盘大小8、 自定义

3、硬件计算机新技术综合实践9、 选择 CentOS 安装镜像文件10、 点击完成计算机新技术综合实践11、 启动虚拟机12、 选择第一项,安装全新操作系统或升级现有操作系统计算机新技术综合实践13、 Tab 键进行选择,选择 Skip,退出检测14、 点击 Next计算机新技术综合实践15、 选择语言,这里选择的是中文简体16、 选择键盘样式计算机新技术综合实践17、 选择存储设备18、 输入主机名计算机新技术综合实践19、 配置网络20、 设置时区,勾选使用 UTC 时间计算机新技术综合实践21、 输入根用户(root)的密码22、 根据此 Linux 具体功能,选择不同的方式计算机新技术综合

4、实践23、 选择现在自定义,自定义安装需要的软件,如桌面配置24、 点击下一步,开始安装计算机新技术综合实践25、 安装完成后,点击重新导引26、 点击前进按钮计算机新技术综合实践27、 点击是,同意许可,再点击前进按钮28、 创建用户计算机新技术综合实践29、 设置日期和时间,如果可以上网,勾选在网上同步日期和时间二、OpenStack 环境预配置1、 设置 OpenStack 网络,一块 NAT 网卡,一块仅主机网卡2、 同理创建另外两台虚拟机,一台计算节点,一台网络节点计算机新技术综合实践3、 配置虚拟机网络环境,如下表服务器 网卡配置 主机名管理节点(ControllerNode) e

5、th0:10.6.12.130eth1:192.168.1.130 controller计算节点(ComputeNode) eth0:10.6.12.131eth1:192.168.1.131 compute1网络节点(NetworkNode)eth0:10.6.12.132eth1:192.168.1.132eth2:(onboot=”yes”, bootproto=”none”)network三、OpenStack 环境搭建1、 安装部署控制节点(1) 首先配置 Linux 能上网,可以 ping 通 (2) 安装 MySQL 数据库如下执行命令# yum install ntp# ser

6、vice ntpd start# chkconfig ntpd on# yum install mysql mysql-server MySQL-python编辑 /etc/f 文件:# vi /etc/fmysqld.bind-address = 10.6.12.130 #添加这句mysqld.default-storage-engine = innodb #添加这句innodb_file_per_table #添加这句collation-server = utf8_general_ci #添加这句init-connect = SET NAMES utf8 #添加这句character-se

7、t-server = utf8 #添加这句保存退出# service mysqld start# chkconfig mysqld on# mysql_install_db# mysql_secure_installation计算机新技术综合实践(3) 安装 OpenStack 软件源包# yum install yum-plugin-priorities# yum install http:/repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-3.noarch.rpm# yum inst

8、all http:/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm# yum install openstack-utils# yum install openstack-selinux# yum upgrade# reboot(4) 安装 qpid# yum install qpid-cpp-server编辑/etc/qpidd.conf 文件# vi /etc/qpidd.confauth=no #修改为 no保存退出# service qpidd start# chkconfig qpidd on(5)

9、 安装 keystone 组件# yum install openstack-keystone python-keystoneclient# openstack-config -set /etc/keystone/keystone.conf database connection mysql:/keystone:keystonecontroller/keystone$ mysql -u root -pmysql CREATE DATABASE keystone;mysql GRANT ALL PRIVILEGES ON keystone.* TO keystonelocalhost IDENT

10、IFIED BY keystone;mysql GRANT ALL PRIVILEGES ON keystone.* TO keystone% IDENTIFIED BY keystone;mysql exit# su -s /bin/sh -c “keystone-manage db_sync“ keystone# ADMIN_TOKEN=$(openssl rand -hex 10)# echo $ADMIN_TOKEN# openstack-config -set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN#

11、keystone-manage pki_setup -keystone-user keystone -keystone-group keystone# chown -R keystone:keystone /etc/keystone/ssl计算机新技术综合实践# chmod -R o-rwx /etc/keystone/ssl# service openstack-keystone start# chkconfig openstack-keystone on# (crontab -l -u keystone 2mysql GRANT ALL PRIVILEGES ON glance.* TO

12、glancelocalhost IDENTIFIED BY glance;mysql GRANT ALL PRIVILEGES ON glance.* TO glance% IDENTIFIED BY glance;mysql exit;# openstack-db -init -service glance # keystone user-create -name=glance -pass=glance -email=# keystone user-role-add -user=glance -tenant=service -role=admin# openstack-config -set

13、 /etc/glance/glance-api.conf keystone_authtoken auth_uri http:/controller:5000# openstack-config -set /etc/glance/glance-api.conf keystone_authtoken auth_host controller# openstack-config -set /etc/glance/glance-api.conf keystone_authtoken auth_port 35357# openstack-config -set /etc/glance/glance-ap

14、i.conf keystone_authtoken auth_protocol http# openstack-config -set /etc/glance/glance-api.conf keystone_authtoken admin_tenant_name service# openstack-config -set /etc/glance/glance-api.conf keystone_authtoken admin_user glance# openstack-config -set /etc/glance/glance-api.conf keystone_authtoken a

15、dmin_password glance# openstack-config -set /etc/glance/glance-api.conf paste_deploy flavor keystone# openstack-config -set /etc/glance/glance-registry.conf keystone_authtoken auth_uri http:/controller:5000# openstack-config -set /etc/glance/glance-registry.conf keystone_authtoken auth_host controll

16、er# openstack-config -set /etc/glance/glance-registry.conf keystone_authtoken auth_port 35357# openstack-config -set /etc/glance/glance-registry.conf keystone_authtoken auth_protocol http# openstack-config -set /etc/glance/glance-registry.conf keystone_authtoken admin_tenant_name service# openstack-

17、config -set /etc/glance/glance-registry.conf keystone_authtoken admin_user glance计算机新技术综合实践# openstack-config -set /etc/glance/glance-registry.conf keystone_authtoken admin_password glance# openstack-config -set /etc/glance/glance-registry.conf paste_deploy flavor keystone# keystone service-create -

18、name=glance -type=image -description=“OpenStack Image Service“# keystone endpoint-create -service-id=$(keystone service-list | awk / image / print $2) -publicurl=http:/controller:9292 -internalurl=http:/controller:9292 -adminurl=http:/controller:9292# service openstack-glance-api restart# service op

19、enstack-glance-registry restart# chkconfig openstack-glance-api on# chkconfig openstack-glance-registry on(7) 安装 Nova 组件# yum install openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient# openstack

20、-config -set /etc/nova/nova.conf database connection mysql:/nova:novacontroller/nova# openstack-config -set /etc/nova/nova.conf DEFAULT rpc_backend qpid# openstack-config -set /etc/nova/nova.conf DEFAULT qpid_hostname controller# openstack-config -set /etc/nova/nova.conf DEFAULT my_ip 10.6.12.130# o

21、penstack-config -set /etc/nova/nova.conf DEFAULT vncserver_listen 10.6.12.130# openstack-config -set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 10.6.12.130(控制节点 Controller IP 地址)$ mysql -u root -pmysql CREATE DATABASE nova;mysql GRANT ALL PRIVILEGES ON nova.* TO novalocalhost IDENTIFI

22、ED BY nova;mysql GRANT ALL PRIVILEGES ON nova.* TO nova% IDENTIFIED BY nova;mysql exit;# su -s /bin/sh -c “nova-manage db sync“ nova# keystone user-create -name=nova -pass=nova -email=# keystone user-role-add -user=nova -tenant=service -role=admin# openstack-config -set /etc/nova/nova.conf DEFAULT a

23、uth_strategy keystone# openstack-config -set /etc/nova/nova.conf keystone_authtoken auth_uri 计算机新技术综合实践http:/controller:5000# openstack-config -set /etc/nova/nova.conf keystone_authtoken auth_host controller# openstack-config -set /etc/nova/nova.conf keystone_authtoken auth_protocol http# openstack-

24、config -set /etc/nova/nova.conf keystone_authtoken auth_port 35357# openstack-config -set /etc/nova/nova.conf keystone_authtoken admin_user nova# openstack-config -set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service# openstack-config -set /etc/nova/nova.conf keystone_authtoken admin

25、_password nova# keystone service-create -name=nova -type=compute -description=“OpenStack Compute“# keystone endpoint-create -service-id=$(keystone service-list | awk / compute / print $2) -publicurl=http:/controller:8774/v2/%(tenant_id)s -internalurl=http:/controller:8774/v2/%(tenant_id)s -adminurl=

26、http:/controller:8774/v2/%(tenant_id)s# service openstack-nova-api restart# service openstack-nova-cert restart# service openstack-nova-consoleauth restart# service openstack-nova-scheduler restart# service openstack-nova-conductor restart# service openstack-nova-novncproxy restart# chkconfig openst

27、ack-nova-api on# chkconfig openstack-nova-cert on# chkconfig openstack-nova-consoleauth on# chkconfig openstack-nova-scheduler on# chkconfig openstack-nova-conductor on# chkconfig openstack-nova-novncproxy on(8) 安装 Neutron 组件# yum install openstack-neutron openstack-neutron-ml2 python-neutronclient$

28、 mysql -u root -pmysql CREATE DATABASE neutron;mysql GRANT ALL PRIVILEGES ON neutron.* TO neutronlocalhost IDENTIFIED BY neutron;mysql GRANT ALL PRIVILEGES ON neutron.* TO neutron% IDENTIFIED BY neutron;mysql exit;计算机新技术综合实践$ keystone user-create -name neutron -pass neutron -email $ keystone user-ro

29、le-add -user neutron -tenant service -role admin$ keystone service-create -name=neutron -type=network -description=“OpenStack Networking“$ keystone endpoint-create -service-id $(keystone service-list | awk / network / print $2) -publicurl http:/controller:9696 -adminurl http:/controller:9696 -intern

30、alurl http:/controller:9696# openstack-config -set /etc/neutron/neutron.conf database connection mysql:/neutron:neutroncontroller/neutron# openstack-config -set /etc/neutron/neutron.conf DEFAULT auth_strategy keystone# openstack-config -set /etc/neutron/neutron.conf keystone_authtoken auth_uri http:

31、/controller:5000# openstack-config -set /etc/neutron/neutron.conf keystone_authtoken auth_host controller# openstack-config -set /etc/neutron/neutron.conf keystone_authtoken auth_protocol http# openstack-config -set /etc/neutron/neutron.conf keystone_authtoken auth_port 35357# openstack-config -set

32、/etc/neutron/neutron.conf keystone_authtoken admin_tenant_name service# openstack-config -set /etc/neutron/neutron.conf keystone_authtoken admin_user neutron# openstack-config -set /etc/neutron/neutron.conf keystone_authtoken admin_password neutron# openstack-config -set /etc/neutron/neutron.conf DE

33、FAULT rpc_backend mon.rpc.impl_qpid# openstack-config -set /etc/neutron/neutron.conf DEFAULT qpid_hostname controller# openstack-config -set /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_status_changes True# openstack-config -set /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_data_cha

34、nges True# openstack-config -set /etc/neutron/neutron.conf DEFAULT nova_url http:/controller:8774/v2# openstack-config -set /etc/neutron/neutron.conf DEFAULT nova_admin_username nova# openstack-config -set /etc/neutron/neutron.conf DEFAULT nova_admin_tenant_id $(keystone tenant-list | awk / service

35、/ print $2 )计算机新技术综合实践# openstack-config -set /etc/neutron/neutron.conf DEFAULT nova_admin_password nova# openstack-config -set /etc/neutron/neutron.conf DEFAULT nova_admin_auth_url http:/controller:35357/v2.0# openstack-config -set /etc/neutron/neutron.conf DEFAULT core_plugin ml2# openstack-config

36、 -set /etc/neutron/neutron.conf DEFAULT service_plugins router# openstack-config -set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers gre# openstack-config -set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types gre# openstack-config -set /etc/neutron/plugins/ml2/ml2_conf.ini ml2

37、mechanism_drivers openvswitch# openstack-config -set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_gre tunnel_id_ranges 1:1000# openstack-config -set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver# openstack-

38、config -set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup enable_security_group True# openstack-config -set /etc/nova/nova.conf DEFAULT network_api_class work.neutronv2.api.API# openstack-config -set /etc/nova/nova.conf DEFAULT neutron_url http:/controller:9696# openstack-config -set /etc/nova

39、/nova.conf DEFAULT neutron_auth_strategy keystone# openstack-config -set /etc/nova/nova.conf DEFAULT neutron_admin_tenant_name service# openstack-config -set /etc/nova/nova.conf DEFAULT neutron_admin_username neutron# openstack-config -set /etc/nova/nova.conf DEFAULT neutron_admin_password neutron#

40、openstack-config -set /etc/nova/nova.conf DEFAULT neutron_admin_auth_url http:/controller:35357/v2.0# openstack-config -set /etc/nova/nova.conf DEFAULT linuxnet_interface_driver work.linux_net.LinuxOVSInterfaceDriver# openstack-config -set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewa

41、ll.NoopFirewallDriver# openstack-config -set /etc/nova/nova.conf DEFAULT security_group_api neutron security_group_api neutron计算机新技术综合实践# ln -s plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini# service openstack-nova-api restart# service openstack-nova-scheduler restart# service openstack-nova-condu

42、ctor restart# service neutron-server restart# chkconfig neutron-server on2、 安装部署计算节点(1)首先配置 Linux 能上网,可以 ping 通 (2)安装 OpenStack 软件包源# yum install yum-plugin-priorities# yum install http:/repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-3.noarch.rpm# yum install http:/dl

43、.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm# yum install openstack-utils# yum install openstack-selinux# yum upgrade# reboot(3)安装 Nova 组件# yum install openstack-nova-compute# openstack-config -set /etc/nova/nova.conf database connection mysql:/nova:novacontroller/nova# openstack

44、-config -set /etc/nova/nova.conf DEFAULT auth_strategy keystone# openstack-config -set /etc/nova/nova.conf keystone_authtoken auth_uri http:/controller:5000# openstack-config -set /etc/nova/nova.conf keystone_authtoken auth_host controller# openstack-config -set /etc/nova/nova.conf keystone_authtoke

45、n auth_protocol http计算机新技术综合实践# openstack-config -set /etc/nova/nova.conf keystone_authtoken auth_port 35357# openstack-config -set /etc/nova/nova.conf keystone_authtoken admin_user nova# openstack-config -set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service# openstack-config -set /e

46、tc/nova/nova.conf keystone_authtoken admin_password nova# openstack-config -set /etc/nova/nova.conf DEFAULT rpc_backend qpid# openstack-config -set /etc/nova/nova.conf DEFAULT qpid_hostname controller# openstack-config -set /etc/nova/nova.conf DEFAULT my_ip 10.6.12.131# openstack-config -set /etc/no

47、va/nova.conf DEFAULT vnc_enabled True# openstack-config -set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0# openstack-config -set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 10.6.12.131# openstack-config -set /etc/nova/nova.conf DEFAULT novncproxy_base_url http:/controller:6080/

48、vnc_auto.html# openstack-config -set /etc/nova/nova.conf DEFAULT glance_host controller# egrep -c (vmx|svm) /proc/cpuinfo(如果返回 0,执行下面这句,否则不执行)# openstack-config -set /etc/nova/nova.conf libvirt virt_type qemu# service libvirtd start# service messagebus start# service openstack-nova-compute start# chkconfig libvirtd on# chkconfig messagebus on计算机新技术综合实践# chkconfig openstack-nova-compute on(4)安装 Neutron 组件编辑 /etc/sysc

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报