Nov 302017
 

整理一下同事的笔记。

yum install epel-release
yum install axel vim git curl wget lrzsz gcc  python-devel yum* python-pip

设置docker官方repo,安装docker CE版本

yum-config-manager \
--add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
docker -v
配置docker
mkdir /etc/systemd/system/docker.service.d
tee /etc/systemd/system/docker.service.d/docker.conf << 'EOF'
[Service]
MountFlags=shared
EOF
编辑 /usr/lib/systemd/system/docker.service
# ExecStart=/usr/bin/dockerd
ExecStart=/usr/bin/dockerd --insecure-registry 192.168.10.139:4000

启动docker

systemctl daemon-reload
systemctl restart docker
systemctl enable docker
docker info

registry服务器

docker run -d -v /opt/registry:/var/lib/registry -p 5000:5000 \
--restart=always --name registry registry:2

监控系统

涉及很多软件,很有代表性:Prometheus,grafana,alertmanager,exporters

Prometheus

https://prometheus.io/docs/prometheus/latest/installation/

docker run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml \
       prom/prometheus

 Leave a Reply

(required)

(required)