本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
 
0

CentOS7搭建配置CephFS

发表者:admin分类:云计算容器2020-06-18 09:15:46 阅读[214]
搭建ceph集群所有节点关闭firewall和selinuxsystemctl stop firewalld systemctl disable firewalld setenforce 0 vim /etc/selimux/config selinux=disabled添加国内ceph源cat >/etc/yum.repos.d/ceph.repo<<EOF [ceph] name=ceph baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/x86_64/ gpgcheck=0 priority=1 [ceph-noarch] name=cephnoarch baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/noarch/ gpgcheck=0 priority=1 [ceph-source] name=Ceph source packages baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/SRPMS enabled=0 gpgcheck=1 type=rpm-md gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc priority=1 EOF yum makecache在每一个node节点执行useradd ceph-admin echo 'ceph-admin' | passwd --stdin ceph-admin echo "ceph-admin ALL = (root) NOPASSWD:ALL" > /etc/sudoers.d/ceph-admin chmod 0440 /etc/sudoers.d/ceph-admin #配置sshd可以使用password登录 sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config...
Docker 部署ELK1、安装docker前安装pipsudo yum -y install epel-releasesudo yum install python-pip2、安装docker#安装依赖包yum install -y yum-utils device-mapper-persistent-data lvm2#添加docker yum源yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo#可选操作:允许拓展最新的不稳定的repositoryyum-config-manager --enable docker-ce-edge#安装Dockeryum -y install docker-ce#安装docker-composesudo pip install -U docker-compose#启动Dockersystemctl start docker安装ELK:1、下载镜像这里我们使用elk集成镜像,地址:https://hub.docker.com/r/sebp/elk/tags[root@centos-mq ~]# docker pull sebp/elk:660注:660为elk版本2、启动[root@centos-mq ~]# echo "vm.max_map_count=262144" > /etc/sysctl.conf[root@centos-mq ~]# sysctl -p[root@centos-mq ~]# docker run -dit --name elk \ -p 5601:5601 \ -p 9200:9200 \ -p 5044:5044 \ -v /opt/elk-data:/var/lib/elasticsearch \ -v /etc/localtime:/etc/localtime \ sebp/elk:660说明:-p 指定映射端口,5601kibana访...
 
0
Docker 安装 ELK安装#首先安装 Docker 与 Docker-Compose 相关的组件,我们这里直接使用准备好的 ELK 镜像,执行以下命令从 Dockerhub 上拉取指定版本的镜像,在本例当中我使用的是 7.40 版本。Copydocker pull sebp/elk:740 配置#为其编写 docker-compose.yaml 文件,内容如下:Copyversion: '3.7' services: nginx: image: nginx container_name: nginx ports: - 80:80 - 443:443 networks: - internal-network volumes: - /root/Volumes/Nginx/nginx.conf:/etc/nginx/nginx.conf - /root/Volumes/Nginx/Configs:/etc/nginx/conf.d restart: always elk: image: sebp/elk:740 container_name: elk ports: - 9200:9200 - 5044:5044 expose: - 5601 networks: - internal-network volumes: - /opt/elk-data:/var/lib/elasticsearch - /etc/localtime:/etc/localtime depends_on: - nginx ulimits: nproc: 262144 nofile: soft: 262144...
 
0
CentOS 7 安装 Docker-Compose一、安装步骤#添加企业版附加包。Copyyum -y install epel-release 安装 PIP。Copyyum -y install python-pip 更新 PIP。Copypip install --upgrade pip 安装 Docker ComposeCopypip install docker-compose 二、可能遇到的问题#在执行 pip install docker-compose 命令的时候可能会提示以下内容:CopyCannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. 这个时候,你需要执行以下命令强制重新安装 request。Copypip install -I requests==2.9 安装完成之后,Docker-Compose 安装成功。三、二进制安装#下载最新版的 docker-compose 二进制执行文件。Copysudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose 配置可执行权限。Copysudo chmod +x /usr/local/bin/docker-compose 测试是否安装成功。Copydocker-compose --version
 
0

docker容器学习笔记

发表者:admin分类:云计算容器2020-04-28 14:46:55 阅读[106]
1. Docker的安装1.1 yum源准备cd /etc/yum.repos.d/rm -rf ./*curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repocurl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repocurl http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repoyum makecache1.2安装依赖包及docker-ceyum install -y yum-utils device-mapper-persistent-data lvm2yum list docker-ce.x86_64 --showduplicates | sort –ryum install -y docker-ce  1.3启动dockersystemctl daemon-reload   #服务进程systemctl start docker      1.4测试docker run hello-worlddocker version2. Docker卸载yum remove docker-ce rm -rf /var/lib/docker3. 配置镜像加速mkdir -p /etc/dockertee /etc/docker/daemon.json <<-'EOF'{  "registry-mirrors": ["https://hqd19v6d.mirror.aliyuncs.com"]}EOFsystemctl daemon-reloadsystemctl restart docker4. Docker的镜像基础管理4.1获取镜像基础镜像获...
proxmox 6.1 配置集群与ceph存储注意事项。先将hostname加入各个主机,echo "192.168.0.181 pve1" > /etc/hostsecho "192.168.0.182 pve2" > /etc/hostsecho "192.168.0.183 pve3" > /etc/hosts注意需要NTP,用来同步时间。apt-get install ntp -y一定要取消订阅sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.serviceecho "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-enterprise.list添加ceph源信息wget -q -O- 'https://download.ceph.com/keys/release.asc' |  apt-key add -echo "deb http://mirrors.163.com/ceph/debian-nautilus/ stretch main" > /etc/apt/sources.list.d/ceph.list一,到webui界面中创建集群,然后将三个主机都添加到集群中。二,将存储网络使用单独网卡,三台主机配置好网卡信息 10.10.100.0/24 单独网段,使得 pveceph install --version nautilus 在各个主机上安装好ceph nautilus版本软件...
解决kubernetes默认证书1年有效期问题拉取源码cd /data && git clone https://github.com/kubernetes/kubernetes.git切换到指定版本以V1.12.3为例git checkout -b remotes/origin/release-1.12 v1.12.3安装go环境cd /data/soft && wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz tar zxvf go1.11.2.linux-amd64.tar.gz -C /usr/local 编辑/etc/profile文件添加如下: #go setting export GOROOT=/usr/local/go export GOPATH=/usr/local/gopath export PATH=$PATH:$GOROOT/bin source /etc/profile 生效 验证: go version go version go1.11.2 linux/amd64修改源码/data/kubernetes/staging/src/k8s.io/client-go/util/cert/cert.go112 NotAfter: time.Now().Add(duration365d * 10).UTC(), 187 NotAfter: validFrom.Add(maxAge *10), 215 NotAfter: validFrom.Add(maxAge * 10),原来1年 ; * 10 表示10年 编译cd /data/kubernetes/ && make WHAT=cmd/kubeadm查看编译之后文件ls -l /data/kubernetes/_output/bin/kubeadm替换kubeadmmv /usr/bin/kubeadm /usr/bin/kubeadm_backup ln -s /dat...
 
0
详细聊聊k8s deployment的滚动更新(二) 一、知识准备● 本文详细探索deployment在滚动更新时候的行为● 相关的参数介绍:  livenessProbe:存活性探测。判断pod是否已经停止  readinessProbe:就绪性探测。判断pod是否能够提供正常服务  maxSurge:在滚动更新过程中最多可以存在的pod数  maxUnavailable:在滚动更新过程中最多不可用的pod数二、环境准备组件版本OSUbuntu 18.04.1 LTSdocker18.06.0-ce三、准备镜像、yaml文件首先准备2个不同版本的镜像,用于测试(已经在阿里云上创建好2个不同版本的nginx镜像)docker pull registry.cn-beijing.aliyuncs.com/mrvolleyball/nginx:v1 docker pull registry.cn-beijing.aliyuncs.com/mrvolleyball/nginx:delay_v12个镜像都提供相同的服务,只不过nginx:delay_v1会延迟启动20才启动nginxroot@k8s-master:~# docker run -d --rm -p 10080:80 nginx:v1 e88097841c5feef92e4285a2448b943934ade5d86412946bc8d86e262f80a050 root@k8s-master:~# curl http://127.0.0.1:10080 ---------- version: v1 hostname: f5189a5d3ad3yaml文件:root...
    总共54页,当前第1页 | 页数:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11