You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Louis Tu 8f2390a120
Fix the path of download.yml (#10711)
11 months ago
..
README.md Fix the path of download.yml (#10711) 11 months ago
docker-daemon.json Add manage-offline-container-images.sh (#7024) 3 years ago
generate_list.sh Fix the path of download.yml (#10711) 11 months ago
generate_list.yml Resolve ansible-lint name errors (#10253) 1 year ago
manage-offline-container-images.sh [registry] Switch registry to use registry.k8s.io 2 years ago
manage-offline-files.sh fixed the bug in kubespray/contrib/offline/manage-offline-files.sh 1 year ago
nginx.conf add manage offline files script (#8956) 2 years ago
registries.conf Add manage-offline-container-images.sh (#7024) 3 years ago

README.md

Offline deployment

manage-offline-container-images.sh

Container image collecting script for offline deployment

This script has two features: (1) Get container images from an environment which is deployed online. (2) Deploy local container registry and register the container images to the registry.

Step(1) should be done online site as a preparation, then we bring the gotten images to the target offline environment. if images are from a private registry, you need to set PRIVATE_REGISTRY environment variable. Then we will run step(2) for registering the images to local registry.

Step(1) can be operated with:

manage-offline-container-images.sh   create

Step(2) can be operated with:

manage-offline-container-images.sh   register

generate_list.sh

This script generates the list of downloaded files and the list of container images by roles/kubespray-defaults/defaults/main/download.yml file.

Run this script will execute generate_list.yml playbook in kubespray root directory and generate four files, all downloaded files url in files.list, all container images in images.list, jinja2 templates in *.template.

./generate_list.sh
tree temp
temp
├── files.list
├── files.list.template
├── images.list
└── images.list.template
0 directories, 5 files

In some cases you may want to update some component version, you can declare version variables in ansible inventory file or group_vars, then run ./generate_list.sh -i [inventory_file] to update file.list and images.list.

manage-offline-files.sh

This script will download all files according to temp/files.list and run nginx container to provide offline file download.

Step(1) generate files.list

./generate_list.sh

Step(2) download files and run nginx container

./manage-offline-files.sh

when nginx container is running, it can be accessed through http://127.0.0.1:8080/.