OpenStack部署

目录

一、安装环境

1.无网络使用该命令

2.修改主机名

3.配置hosts解析

4.配置本机免密

5.关闭防火墙和SElinux策略

6.关闭NewworkManager

7.修改yum源

7.1下载阿里源

7.2清空并加载缓存yum源

8.安装基本工具

9.系统升级

10.安装OPenStack的yum仓库

11.修改OPenStack仓库Repo文件

12.安装PackStack工具

13.安装OpenStack-allinone

二、安装完成后步骤

三、基本操作命令

1.数据库

2.HAproxy

3.Pacemker

4.Chrony

5.Ceph

6.http、Keystone

7.Rabbitmq

8.Memcache

9.OpenStack查看命令

10.Glance

11.Nova-Controller

12.Nova-Computer

13.Neutron-Controller

14.Neutron-Computer

15.Dashboard


Openstack是一个云平台管理的项目,它不是一个软件。这个项目由几个主要的组件组合起来完成一些具体的工作。Openstack是一个旨在为公共及私有云的建设与管理提供软件的开源项目。

一、安装环境

1.无网络使用该命令

nmcli c reload; sleep 3; nmcli c up ens33

2.修改主机名

hostnamectl set-hostname openstack.alione.loca

3.配置hosts解析

vim /etc/hosts

192.168.241.11 openstack openstack.alione.local

4.配置本机免密

生成密钥

ssh-keygen

对本机进行免密

ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.241.11

5.关闭防火墙和SElinux策略

sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config; setenforce 0; systemctl stop firewalld; systemctl disable firewalld

6.关闭NewworkManager

Centos7中有两种网络模式,避免冲突,在安装完OpenStack后开启

systemctl stop NetworkManager; systemctl disable NetworkManager

7.修改yum源

7.1下载阿里源

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

7.2清空并加载缓存yum源

yum clean all; yum makecache

8.安装基本工具

yum install -y bash-completion vim telnet bridge-utils yum-utils

bash

9.系统升级

yum -y update

reboot

10.安装OPenStack的yum仓库

yum install centos-release-openstack-train -y

11.修改OPenStack仓库Repo文件

cd /etc/yum.repos.d

cp CentOS-OpenStack-train.repo{,.bak}

vim CentOS-OpenStack-train.repo

baseurl=http://mirrors.aliyun.com/$contentdir/$releasever/cloud/$basearch/openstack-train/

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=cloud-openstack-train

yum clean all; yum makecache

12.安装PackStack工具

yum install -y openstack-packstack

13.安装OpenStack-allinone

packstack --allinone

二、安装完成后步骤

如下图:安装完成后会显示web登陆地址,http://192.168.241.11/dashboard

账号密码在:keystonerc_admin这个文件夹中

三、基本操作命令

source keystonerc_admin

 glance image-list

neutron agent-list

 nova service-list

 cinder service-list

1.数据库

# systemctl start mysqld

# systemctl enable mysqld

# systemctl status mysqld

#mysql> show status like 'wsrep_%'; # 查看集群状态

2.HAproxy

# systemctl start haproxy.service

# systemctl stop haproxy.service

# systemctl restart haproxy.service

# systemctl enable haproxy.service

3.Pacemker

# systemctl start pcsd.service

# systemctl enable pcsd.service

# systemctl status pcsd.service

# pcs status

# pcs cluster standby node

# pcs cluster unstandby node

# pcs resource restart haproxy #重启haproxy 资源

# pcs resource cleanup #清除错误日志后重启所有资源

4.Chrony

# systemctl restart chronyd.service

# chronyc sources #同步时间

5.Ceph

# ceph -s

# ceph health detail

# ceph osd pool create pool_name gp_num pgp_num #创建池

6.http、Keystone

# systemctl start httpd

# systemctl enable httpd

# systemctl status httpd

7.Rabbitmq

# systemctl enable rabbitmq-server.service

# systemctl start rabbitmq-server.service

# systemctl status rabbitmq-server.service -l

# rabbitmqctl cluster_status

# http://rabbitmq-server-IP:15672 #web访问

8.Memcache

# systemctl enable memcached.service

# systemctl start memcached.service

9.OpenStack查看命令

# openstack catalog list

# openstack endpoint list

# openstack service list

# openstack domain list

# openstack image list

# openstack host list

10.Glance

# systemctl enable openstack-glance-api.service openstack-glance-registry.service

# systemctl start openstack-glance-api.service openstack-glance-registry.service

# openstack image delete image-ID #删除镜像

11.Nova-Controller

# systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

# systemctl start openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

# systemctl status openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

12.Nova-Computer

# systemctl enable libvirtd.service openstack-nova-compute.service

# systemctl start libvirtd.service openstack-nova-compute.service

13.Neutron-Controller

# systemctl enable neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service

# systemctl start neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service

# systemctl status neutron-server.service neutron-linuxbridge-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service

14.Neutron-Computer

# systemctl enable neutron-linuxbridge-agent.service

# systemctl start neutron-linuxbridge-agent.service

15.Dashboard

# systemctl restart httpd.service memcached.service
  • 11
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值