该脚本需要在每个节点上执行,ceph版本对应了上一篇文章ceph的版本,如果有需要自行变更yum的版本配置。默认使用pool为docker1,需要自行创建。 /etc/ceph/ceph.client.admin.keyring及/etc/ceph/ceph.conf的内容需要从ceph集群的master节点上拷贝到该配置脚本里面,更新对应内容。 # create ceph config dire…
Leave a Comment分类: 计算机
机器情况大概说明下: 3台CentOS Linux release 7.5.1804 (Core),最小安装。 IP分别为 10.255.255.141(ceph-1),10.255.255.142(ceph-1), 10.255.255.143(ceph-1)。 10.255.255.141机器为主部署节点。 部署之前,先把三台机器主机名 手动改好: ceph-1#hostnamectl set…
Leave a Comment背景 由于docker的Ceph插件rexray对Ceph版本有一定的要求,当Ceph版本为hammer (0.94.10)时,rexray无法成功创建rbd设备。CentOS 7及以上版本,默认安装的就是hammer版本,因此,我们需要安装更高的jewel版本。Ceph的版本可参见。 安装 为了安装速度,我们可以选用国内源。通常大家使用的国内源包括: 网易 http://mirrors.…
Leave a Comment在前面文章(基于docker部署ceph)的基础之上,我们可以搭建一个可以让swarm集群来使用ceph存储了。 本文配置在你已经有一个swarm集群的基础上进行 大概需要的步骤如下: – 安装Ceph相关组件(The ceph and rbd binary executables must be installed on the host) – 安装rex-ray htt…
Leave a Comment说明:分布式应用部署到服务上,由于服务器可能存在多张网卡,造成IP地址不准的问题。 解决方法: 1、直接添加忽略某张网卡的配置: spring.cloud.inetutils.ignored-interfaces[0]=eth0 # 忽略eth0, 支持正则表达式 正则: spring.cloud.inetutils.ignored-interfaces=eth.* 2、指定默认IP: sprin…
Leave a Comment先运行一个swarm集群。 创建一个网络ceph_network docker network create -d overlay ceph_network 部署 etcd ,用于存储ceph配置。 version: ‘3.5’ services: etcd0: build: etcd image: quay.io/coreos/etcd ports: – 2379:2379 – 2380:238…
Leave a Comment/ip firewall layer7-protocol add name=testdns regexp=xiaocaicai.com /ip firewall nat add action=dst-nat chain=dstnat disabled=no dst-port=53 layer7-protocol=testdns protocol=udp to-addresses=8.8.8.8 t…
Leave a Comment对于url路由的服务来说,可以修改context的queryParam来达到修改请求参数的目的。 package com.efivestar.springcloud.gateway.filters.demo; import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.context.RequestContext; import org.…
Leave a Comment线上java程序出现异常,需要打印内存信息进行debug,发现没有 jmap,jstack等工具。 发现容器基础镜像选择的是FROM java:8-jre,jre环境是不包含这类工具的,遂将换成FROM java:8,这类工具便包含在内了。 使用时发现还是不能使用,出现错误 “Can’t attach to the process: ptrace(PTRACE_ATTACH, ..) …
Leave a Comment我们在配置watcher的时候,有时候期望将事件触发给自己写的服务来进行进一步的处理,这时候就需要写一些webhook了。 这里写个配置的例子。 { “actions”: { “test_webhook”: { “webhook”: { “scheme”: “http”, “host”: “10.255.255.101”, “port”: 3000, “method”: “post”, “path…
Leave a Comment