当前位置: 首页 > news >正文

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/hosts192.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-utilsbash

9.系统升级

yum -y updatereboot

10.安装OPenStack的yum仓库

yum install centos-release-openstack-train -y

11.修改OPenStack仓库Repo文件

cd /etc/yum.repos.dcp CentOS-OpenStack-train.repo{,.bak}vim CentOS-OpenStack-train.repobaseurl=http://mirrors.aliyun.com/$contentdir/$releasever/cloud/$basearch/openstack-train/#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=cloud-openstack-trainyum 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_adminglance image-listneutron agent-listnova service-listcinder 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
http://www.lryc.cn/news/329260.html

相关文章:

  • Java中的多线程和线程安全问题
  • java Web会议信息管理系统 用eclipse定制开发mysql数据库BS模式java编程jdbc
  • lock4j学习记录
  • 【C++庖丁解牛】自平衡二叉搜索树--AVL树
  • ES5和ES6的深拷贝问题
  • 阿里云发送短信配置
  • axios封装,请求取消和重试,请求头公共参数传递
  • 隐私计算实训营学习五:隐语PSI介绍及开发指南
  • ES的RestClient相关操作
  • linux通用命令 ssh命令连接慢问题排查
  • 7.卷积神经网络与计算机视觉
  • Linux|如何管理多个Git身份
  • 力扣---最长回文子串---二维动态规划
  • (一)kafka实战——kafka源码编译启动
  • Spring Boot 使用 Redis
  • 火车头通过关键词采集文章的原理
  • Kafka 面试题及参考答案
  • 【Qt 学习笔记】Day1 | Qt 背景介绍
  • springboot3.2.4+Mybatis-plus在graalvm21环境下打包exe
  • Kubernetes(K8S)学习(二):K8S常用组件
  • 如何使用群晖WebDAV实现固定公网地址同步Zotero文献管理器
  • 【JavaSE】初识线程,线程与进程的区别
  • 全国青少年软件编程(Python)等级考试三级考试真题2023年9月——持续更新.....
  • react-navigation:
  • nginx负载均衡模式
  • 手写简易操作系统(十七)--编写键盘驱动
  • springboot中基于RestTemplate 类 实现调用第三方API接口【POST版本】
  • 编程器固件修改教程
  • Python从原Excel表中抽出数据存入同一文件的新的Sheet(附源码)
  • 计算机网络实验六:路由信息协议RIP