rancher升级

停掉 rancher

先把之前的rancher-server停掉,然后在/etc/hosts上加上ip还有主机名的解析,否则升级完主机不识别

下载1.6.8镜像

1
2
3
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_server:1.6.8

在官网下载就有,我这个是自己的私有仓库

运行rancherserver

1
docker run -d -v /data/rancherdata:/var/lib/mysql --restart=always -p 48080:8080 privatecloud.docker.domain/privatecloud3.0/rancher_server:1.6.8

获取rancher的代理镜像

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
docker login privatecloud.docker.domain 

从镜像库拉取镜像
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_agent:v1.2.6
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_network-manager:v0.7.8
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_net:v0.11.9
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_dns:v0.15.3
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_metadata:v0.9.4
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_healthcheck:v0.3.3
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_scheduler:v0.8.2
docker pull privatecloud.docker.domain/privatecloud3.0/rancher_net:holder
重命名镜像:
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_agent:v1.2.6 rancher/agent:v1.2.6
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_network-manager:v0.7.8 rancher/network-manager:v0.7.8
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_net:v0.11.9 rancher/net:v0.11.9
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_dns:v0.15.3 rancher/dns:v0.15.3
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_metadata:v0.9.4 rancher/metadata:v0.9.4
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_healthcheck:v0.3.3 rancher/healthcheck:v0.3.3
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_scheduler:v0.8.2 rancher/scheduler:v0.8.2
docker tag privatecloud.docker.domain/privatecloud3.0/rancher_net:holder rancher/net:holder

升级

1
2
进入http://rancherserverip:48080/
然后点升级即可
Donate