OpenStack部署:Glance对接Cinder
Glance/Cinder-store-proposalGlance Cinder DriverThere is currently a Cinder store in Glance, however it does not support uploads and downloads. This is a proposal to allow Cinder to act as a data store for Glance images that supports upload and download by using Cinder volumes as containers for image data. There would be a 1-to-1 mapping of Glance images to Cinder volumes.
What are the benefits of this approach?This will allow Glance to store images on the large and diverse array of SAN and NAS ...
OpenStack部署:Trove
Building guest image1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950# 构建镜像踩的坑(基于Wallaby版源码做的修改):# 1. apt、pip源为国外源,下载慢,大概率失败,需要替换为国内源# 2. 编译ubuntu镜像时,宿主机为centos,导致pkg_map解析包名错误。需增加如下环境变量:export DISTRO_NAME=${guest_os}# 3. root密码没有,无法登陆。需下functions_qemu文件中,增加local root_password="inspur_trove@123"# 4. elements guest-agent中source-repository-guest-agent获取位置需要修改,调整为本地代码库及本地文件# 5. v版之后,guest-agent镜像切换为docker,docker image从docker源上下载。如果本地为htt ...
MongoDB使用:通用手册
安装参考:https://www.runoob.com/mongodb/mongodb-linux-install.html
下载:https://www.mongodb.com/try/download/community
管理命令远程连接1mongo 192.168.122.12:27017/admin -u admin -p inspur@123
用户管理1234# 创建admin用户> db.createUser({user:"admin",pwd:"inspur@123",roles:[{"role":"userAdminAnyDatabase","db":"admin"}]})# 查看所有用户
MySQL使用:通用手册
安装参考:https://www.runoob.com/mysql/mysql-install.html
下载:http://repo.mysql.com/
管理命令远程连接1mysql -uroot -pinspur@123 -h 111.111.19.236
用户管理123456789# 允许用户远程登录(mysql 8.x)UPDATE mysql.user SET host = '%' WHERE user = 'root';# PS:需退出重连ALTER USER 'root'@'%' IDENTIFIED BY 'inspur@123' PASSWORD EXPIRE NEVER;ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'inspur@123';# 允许用户远程登录(mysql 5.7)grant all privileges o ...
Kubernetes部署:Kube-VIP实现高可用
简介Kube vip为社区开源的一套Kubernetes HA解决方案,基于GO语言开发。轻量级,性能待验证。官方介绍如下:
Kubernetes Virtual IP and Load-Balancer for both control plane and Kubernetes services
The idea behind kube-vip is a small self-contained Highly-Available option for all environments, especially:
Bare-Metal
On-Prem
Edge (ARM / Raspberry PI)
Virtualisation
Pretty much anywhere else :)
Kubernetes 高可用As an alternative to the more “traditional” approach of keepalived and haproxy, kube-vip implements both management of a virtual IP and ...
Ceph使用:通用手册
常用命令Ceph管理12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576# 查看ceph状态[root@rook-ceph-tools-69f7b87b57-vwl67 /]# ceph -s cluster: id: e3f8d4d7-6888-4f67-b740-5a80da34b3dc health: HEALTH_WARN Degraded data redundancy: 988/11616 objects degraded (8.506%), 142 pgs degraded, 192 pgs undersized application not enabled on 2 pool(s) services: mon: 1 daemons, quorum a (age 7d ...
Linux配置:HAProxy
用法Backend 配置域名HAProxy 版本1.6开始支持域名解析功能
1234567891011121314151617181920212223242526resolvers mynameservers nameserver ns1 10.96.0.10:53 # 配置DNS服务器地址,ns1为服务器代号,可自定义 parse-resolv-conf # 加载主机/etc/resolve.conf文件内的DNS配置信息 resolve_retries 3 timeout resolve 1s timeout retry 1s hold other 10s hold refused 10s hold nx 10s hold timeout 10s hold val ...
Kubernetes部署:RabbitMQ
简述本文用来记录 Kubernetes 上部署的 RabbitMQ 集群遇到的一个问题。基础信息如下:
宿主机系统:Centos 7.8
Docker Server版本:18.09.6
Kubernetes版本:v1.19.0
RabbitMQ部署方式:stx-openstack 3.0
RabbitMQ镜像版本:3.7.13
问题描述3节点集群,由于非同时节点关机(如机房掉电),概率导致集群仲裁失败。故障现象是pod 为Running 状态,但是几分钟以后依然不能readay 1/1。pod日志显示” Waiting for Mnesia tables”
问题原因rabbitmq集群pod分0、1、2,共3节点。服务器掉电,最后退出的pod认为自己具有最新的数据,所以启动时应从最后退出的pod启动。但Kubernetes Statefulset维护的pod,启动方式为0 - 1 - 2顺序启动,只有0运行起来后才会运行后面的pod。如果0不是最后退出,则会启动卡住,等待最后退出的节点运行,形成死循环
解决办法pod 0 启动方式调整为强制启动,删除pod后自动重建,会强制拉起。命 ...
Linux使用:通用手册
常见场景内核默认启动版本管理12345678910111213141516171819202122232425262728293031323334## 方法1# 查看当前默认启动内核[root@k104 ~]# grub2-editenv listsaved_entry=CentOS Linux (3.10.0-1127.el7.x86_64) 7 (Core)# 查看所有可用内核[root@k104 ~]# cat /boot/grub2/grub.cfg | grep ^menuentrymenuentry 'CentOS Linux (5.4.134-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-5.4.134-1.el7.elrepo.x86_64-advanced-f7d63930-b583-4731-976f-29c94ff7b ...
Kubernetes研发:Helm
简述Helm是Kubernetes的包管理工具,类似于操作系统中的yum,apt-get。Helm提供应用的编排部署、升级、卸载等管理操作。
快速开始
在开始之前,我们简单理解一下Helm template的基本原理。其实也很简单,Helm使用gotemplate模板语言来编写代表Kubernetes资源(deployment,service, etc…)的模板文件,并提供让用户配置这些模板变量的能力。在部署时Helm通过模板引擎将模板渲染成真正的Kubernetes资源文件,并将它们部署到节点上。
对接Kubernetes/K3S12345# 对接Kubernetesexport KUBECONFIG=/root/.kube/config# 对接K3Sexport KUBECONFIG=/etc/rancher/k3s/k3s.yaml
创建Helm包1helm create myapp
目录结构自动生成的模板目录结构如下:
1234567891011121314myapp├── Chart.yaml├── charts├── templates│ ├── NOTES.tx ...