This tutorial is the sixth part of the Fabric Tutorial series. It mainly records the details of the Fabric environment setup and adjustment on the domestic network. Because the actual operation is done on the foreign server, this article describes how to deal with the domestic network and the environment without external network connection.

The tutorial directory structure is as follows:

  1. Introduction to the
  2. Deploy minimal Fabric networks based on Docker
  3. Deploy multiple fabric networks based on Docker
  4. One-click DEPLOYMENT of the K8S cluster
  5. One-click Fabric network deployment based on helm
  6. Domestic network under the network set up adjustment details
  7. Summary on pit


1. The docker installation

Docker download acceleration

# Set the download source of Ali Cloud
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Copy the code

Docker image acceleration

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://6dzpl9c6.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
Copy the code

Please refer to aliyun official instructions for details


2. K8s installation

K8s download acceleration

# configure the K8S yum source
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg  http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
Copy the code


3. Setting up the environment on the offline network

The principle is to download the software or image from host A, which can be connected to the Internet, and then transfer it to host B, which can install the software or import the image

3.1 Processing Common Software Packages, for example, Java
Download the dependency package offline on host A
yum install --downloadonly --downloaddir=/home/java java

Then copy it to host B for installation
cd /home/java
rpm -ivh *.rpm
rpm -Uvh update/*.rpm
Copy the code
3.2 Image package processing, for example, nginx
Download and export the image on host A
docker pull nginx:latest
docker export -o nginx.tar nginx:latest

Then copy it to host B for import
docker import nginx.tar nginx:latest
Copy the code