Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy offline

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to deploy offline, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

For users who are unable to access the Internet in the corporate intranet environment, offline installation and deployment of Rancher is the key to solve the problem.

Version description

OS:Centos7.3 Docker version: 1.12.6 Rancher version: 1.6.10

Host role description

Prepare docker rpmwget https://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-1.12.6-1.el7.centos.x86_64.rpmwget https://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-selinux-1.12.6-1.el7.centos.noarch.rpmharbor offlinewget https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-offline-installer-v1.2 in advance .0.tgzcurl-L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname-s`-`tgzcurl-o. / docker-compose package Rancher Server and each component image:rancher/server:v1.6.10rancher/agent:v1.2.6rancher/network-manager:v0.7.8rancher/net:v0.11.9rancher/dns:v0.15.3rancher/metadata:v0.9.4rancher/healthcheck:v0.3.3rancher/lb-service- Haproxy:v0.7.9rancher/scheduler:v0.8.2rancher/net:holder

Such as:

Docker pull rancher/agent:v1.2.6docker save rancher/agent:v1.2.6 > agent126.tar deployment environment installation configuration docker (all hosts) yum localinstall-y docker-engine-1.12.6-1.el7.centos.x86_64.rpm docker-engine-selinux-1.12.6-1.el7.centos.noarch.rpm Note: if there is a dependency, use ISO as the yum source

Point to docker Private Mirror Library IP

Vi / usr/lib/systemd/system/docker.service if modified to: ExecStart=/usr/bin/dockerd-- insecure-registry=192.168.100.1:80 (private library address: Port) installation configuration Harbor1. Decompress: tar-zxvf harbor-offline-installer-v1.2.0.tgz configuration harbor2. Edit harbor.cfg vi harbor.cfg to modify hostname = IPharbor_admin_password = Rancher1233. Run install.shcp docker-compose / usr/local/bin/chmod + x / usr/local/bin/docker-compose./install.sh4. Add project a) by browsing? Visit harbor http://IP admin/Rancher123 login b) add a project named 'rancher' and set it to Public 5. Import images to log in to docker login private repository IP: Port a) docker load-I agent126.tarb) docker tag rancher/agent:v1.2.6 192.168.100.1:80/rancher/agent:v1.2.6c) docker push 192.168.100.1:80/rancher/agent:v1.2.6 imports all Rancher image into private image repository configuration Rancher environment a) docker run-d-restart=unless-stopped-p 8080 IP 8080 192.168 .100.1: 80/rancher/server:v1.6.10b) Log in to Rancher Server UI "Admin"-- > "Settings"-- > "Advanced Settings" edit "registry.default=192.168.100.1:80" c) add Environments "Manage Environments"-- > "Add Environment". Set it to the default after creation and switch to the environment. D) modify the add host command to docker run-- rm-- privileged-v/var/run/docker.sock:/var/run/docker.sock-v/var/lib/rancher:/var/lib/rancher 192.168.100.1:80/rancher/agent:v1.2.6 http://192.168.100.1:8080/ v1/scripts/8EBE0FB0C3DE0AA32047:1483142400000:7Md3cXHoSIYYwHADyBpGQNZavTEe) modify agent image tagdocker tag 192.168.100.1 on the host node So much for rancher/agent:v1.2.6 rancher/agent:v1.2.6 on how to deploy offline. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report