OpenStack详解.docx
- 文档编号:29225076
- 上传时间:2023-07-21
- 格式:DOCX
- 页数:24
- 大小:290.16KB
OpenStack详解.docx
《OpenStack详解.docx》由会员分享,可在线阅读,更多相关《OpenStack详解.docx(24页珍藏版)》请在冰豆网上搜索。
OpenStack详解
一、OpenStack架构解析
Service
CodeName
描述
身份认证服务
Keystone
提供用户、人员、组管理
计算节点服务
Nova
虚拟机管理KVM
镜像管理
Glance
镜像管理,包括IMG、ISO镜像等
管理面包UI
Dashboard
WEB界面管理
对象存储
Swiff
分布式云存储
Block存储
Cinder
主要是虚拟机的存储
网络服务
Neutron
主要是虚拟机的网络
自动化部署交付
OrchestrationService
Heat自动交付,就是模板形式文件,客户先根据需求自定义一个需求单子,然后扔到引擎,由引擎处理该需求单
计量服务
MeteringService
把OpenStack内部发生的几乎所有的事件都收集起来,然后为计费和监控以及其它服务提供数据支撑
数据库即交付
Trove
将数据作为一种应用交付,作为一个交付服务
大数据服务
Sahara
在OpenStack平台上部署大数据服务
虚拟化层Hypervisor
Ironic
提供虚拟化层底层服务,主要是一个驱动层
消息服务
MessagingService
提供消息服务
共享文件系统
Zaqar
提供文件共享服务
DNS服务
Designate
提供DNS域名解析服务
KEY管理
Barbican
提供密钥管理
二、配置时间服务器
[root@huatech~]#yum-yinstallchrony
[root@huatech~]#vim/etc/chrony.conf
server192.168.88.203
allow192.168.88.0/24
[root@huatech~]#systemctlstartchronyd
[root@huatech~]#systemctlenablechronyd
[root@huatech~]#chronycsources
MSName/IPaddressStratumPollReachLastRxLastsample
===============================================================================
^?
huatech06010y+0ns[+0ns]+/-0ns
三、配置计算节点
[root@huatech~]#yum-yinstallqemu-kvmlibvirtvirt-installbridge-utils
[root@huatech~]#lsmod|grepkvm
kvm_intel1621530
kvm5252591kvm_intel
[root@huatech~]#systemctlstartlibvirtd
[root@huatech~]#systemctlenablelibvirtd
[root@huatech~]#nmcliconnectionaddtypebridgeautoconnectyescon-namebr0ifnamebr0
[root@huatech~]#nmcliconnectionmodifybr0ipv4.addresses192.168.88.203/24ipv4.methodmanual
[root@huatech~]#nmcliconnectionmodifybr0ipv4.gateway192.168.88.1
[root@huatech~]#nmcliconnectionmodifybr0ipv4.dns192.168.88.1
[root@huatech~]#nmcliconnectiondeleteeno16777728
[root@huatech~]#nmcliconnectionaddtypebridge-slaveautoconnectyescon-nameeno16777728ifnameeno16777728masterbr0
[root@huatech~]#systemctlstopNetworkManager;systemctlstartNetworkManager
四、安装mariadb数据库
[root@huatech~]#yum-yinstallmariadb-server
[root@huatech~]#vim/etc/f
character-set-server=utf8
[root@huatech~]#systemctlstartmariadb
[root@huatech~]#systemctlenablemariadb
[root@huatech~]#mysql_secure_installation
五、安装KVM虚拟化模块
[root@huatech~]#yum-yinstallqemu-kvmlibvirtvirt-installbridge-utils
[root@huatech~]#lsmod|grepkvm
kvm_intel1621534
kvm5252591kvm_intel
[root@huatech~]#systemctlstartlibvirtd
[root@huatech~]#systemctlenablelibvirtd
[root@huatech~]#virt-install\
>--namecentos7\
>--ram2048\
>--diskpath=/var/kvm/images/centos7.img,format=qcow2\
>--vcpus2\
>--os-typelinux\
>--os-variantrhel7\
>--graphicsnone\
>--consolepty,target_type=serial\
>--location'ftp:
//192.168.88.182/'\
>--extra-args'console=ttyS0,115200n8serial'
[root@huatech~]#virt-manager
[root@huatech~]#yum-yinstallspice-serverspice-protocol
[root@huatech~]#virsheditcentos7
下载地址:
https:
//fedorahosted.org/released/virt-viewer/virt-viewer-x64-3.0.msi
六、增加YUM仓库
[root@huatech~]#yum-yinstallcentos-release-openstack-liberty
[root@huatech~]#sed-i-e"s/enabled=1/enabled=0/g"/etc/yum.repos.d/CentOS-OpenStack-liberty.repo
[root@huatech~]#yum--enablerepo=epel-yinstallrabbitmq-servermemcached
[root@huatech~]#yum--enablerepo=epel-yinstallrabbitmq-servermemcached
[root@huatech~]#systemctlstartrabbitmq-servermemcached
[root@huatech~]#systemctlenablerabbitmq-servermemcached
[root@huatech~]#rabbitmqctlchange_passwordguestpassword
[root@huatech~]#rhel
[root@huatech~]#virt-install\
>--namecentos7\
>--ram2048\
>--diskpath=/var/kvm/images/centos7.img,format=qcow2\
>--vcpus2\
>--os-typelinux\
>--os-variantrhel7\
>--graphicsnone\
>--consolepty,target_type=serial\
>--location'http:
//ftp.iij.ad.jp/pub/linux/centos/7/os/x86_64/'\
>--extra-args'console=ttyS0,115200n8serial'
七、安装Keystone
[root@huatech~]#yum--enablerepo=centos-openstack-liberty,epel-yinstallopenstack-keystoneopenstack-utilspython-openstackclienthttpdmod_wsgi
[root@huatech~]#mysql-uroot–p
MariaDB[(none)]>createdatabasekeystone;
QueryOK,1rowaffected(0.09sec)
MariaDB[(none)]>grantallprivilegesonkeystone.*tokeystone@'localhost'identifiedby'password';
QueryOK,0rowsaffected(0.01sec)
MariaDB[(none)]>grantallprivilegesonkeystone.*tokeystone@'%'identifiedby'password';
QueryOK,0rowsaffected(0.00sec)
MariaDB[(none)]>flushprivileges;
QueryOK,0rowsaffected(0.01sec)
MariaDB[(none)]>exit
[root@huatech~]#vim/etc/keystone/keystone.conf
15admin_token=admintoken
496connection=mysql:
//keystone:
password@192.168.88.207/keystone
1299servers=192.168.88.207:
11211
1905provider=uuid
1919driver=memcache
[root@huatech~]#su-s/bin/bashkeystone-c"keystone-managedb_sync"
[root@huatech~]#vim/etc/httpd/conf/httpd.conf
96ServerName
[root@huatech~]#vim/etc/httpd/conf.d/wsgi-keystone.conf
#createnewlikefollows
Listen5000
Listen35357
5000> WSGIDaemonProcesskeystone-publicprocesses=5threads=1user=keystonegroup=keystonedisplay-name=%{GROUP} WSGIProcessGroupkeystone-public WSGIScriptAlias//usr/bin/keystone-wsgi-public WSGIApplicationGroup%{GLOBAL} WSGIPassAuthorizationOn ErrorLogFormat"%{cu}t%M" ErrorLog/var/log/httpd/keystone-error.log CustomLog/var/log/httpd/keystone-access.logcombined Requireallgranted Orderallow,deny Allowfromall
35357> WSGIDaemonProcesskeystone-adminprocesses=5threads=1user=keystonegroup=keystonedisplay-name=%{GROUP} WSGIProcessGroupkeystone-admin WSGIScriptAlias//usr/bin/keystone-wsgi-admin WSGIApplicationGroup%{GLOBAL} WSGIPassAuthorizationOn ErrorLogFormat"%{cu}t%M" ErrorLog/var/log/httpd/keystone-error.log CustomLog/var/log/httpd/keystone-access.logcombined Requireallgranted Orderallow,deny Allowfromall
[root@huatech~]#systemctlstarthttpd
[root@huatech~]#systemctlenablehttpd
[root@huatech~]#exportOS_TOKEN=admintoken
[root@huatech~]#exportOS_URL=http:
//192.168.88.207:
35357/v3
[root@huatech~]#exportOS_IDENTITY_API_VERSION=3
#addadminproject
[root@huatech~]#openstackprojectcreate--domaindefault--description"AdminProject"admin
+-------------+----------------------------------+
|Field|Value|
+-------------+----------------------------------+
|description|AdminProject|
|domain_id|default|
|enabled|True|
|id|f62d042e4a7d4b90bbe3c7b711a8d71e|
|is_domain|False|
|name|admin|
|parent_id|None|
+-------------+----------------------------------+
#addserviceproject
[root@huatech~]#openstackprojectcreate--domaindefault--description"ServiceProject"service
+-------------+----------------------------------+
|Field|Value|
+-------------+----------------------------------+
|description|ServiceProject|
|domain_id|default|
|enabled|True|
|id|238c765b718842c183fddbb584d05340|
|is_domain|False|
|name|service|
|parent_id|None|
+-------------+----------------------------------+
[root@huatech~]#openstackprojectlist
+----------------------------------+---------+
|ID|Name|
+----------------------------------+---------+
|238c765b718842c183fddbb584d05340|service|
|f62d042e4a7d4b90bbe3c7b711a8d71e|admin|
+----------------------------------+---------+
#addadminrole
[root@huatech~]#openstackrolecreateadmin
+-------+----------------------------------+
|Field|Value|
+-------+----------------------------------+
|id|32d0bbf0ba654695a5ddc6c37377d97b|
|name|admin|
+-------+----------------------------------+
#addMemberrole
[root@huatech~]#openstackrolecreateMember
+-------+----------------------------------+
|Field|Value|
+-------+----------------------------------+
|id|bea2a58df90e4520b3afe819af0cc824|
|name|Member|
+-------+----------------------------------+
#confirmsettings
[root@huatech~]#openstackrolelist
+----------------------------------+--------+
|ID|Name|
+----------------------------------+--------+
|32d0bbf0ba654695a5ddc6c37377d97b|admin|
|bea2a58df90e4520b3afe819af0cc824|Member|
+----------------------------------+--------+
#addadminuser(setinadminproject)
[root@huatech~]#openstackusercreate--domaindefault--projectadmin--passwordadminpasswordadmin
[root@huatech~]#openstackusercreate--domaindefault--projectadmin--passwordadminpasswordadmin
+--------------------+----------------------------------+
|Field|Value|
+--------------------+----------------------------------+
|default_project_id|f62d042e4a7d4b90bbe3c7b711a8d71e|
|domain_id|default|
|enabled|True|
|id|f47c1f30626e4cf394d4ad8e27edb1e6|
|name|admin|
+--------------------+----------------------------------+
#addadminuserinadminrole
[root@huatech~]#openstackroleadd--projectadmin--useradminadmin
[root@huatech~]#openstackuserlist
+----------------------------------+-------+
|ID|Name|
+----------------------------------+-------+
|f47c1f30626e4cf394d4ad8e27edb1e6|admin|
+----------------------------------+-------+
[root@huatech~]#openstackservicecreate--namekeystone--description"OpenStackIdentity"identity
+-------------+----------------------------------+
|Field|Value|
+-------------+----------------------------------+
|descrip
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- OpenStack 详解