2021-05-11 07:39:36 +00:00
|
|
|
# Offline deployment
|
|
|
|
|
|
|
|
## manage-offline-container-images.sh
|
|
|
|
|
|
|
|
Container image collecting script for offline deployment
|
2021-01-06 16:05:52 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
Then we will run step(2) for registering the images to local registry.
|
|
|
|
|
|
|
|
Step(1) can be operated with:
|
|
|
|
|
|
|
|
```shell
|
2021-01-07 07:45:45 +00:00
|
|
|
manage-offline-container-images.sh create
|
2021-01-06 16:05:52 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Step(2) can be operated with:
|
|
|
|
|
|
|
|
```shell
|
2021-01-07 07:45:45 +00:00
|
|
|
manage-offline-container-images.sh register
|
2021-01-06 16:05:52 +00:00
|
|
|
```
|
2021-05-11 07:39:36 +00:00
|
|
|
|
|
|
|
## generate_list.sh
|
|
|
|
|
|
|
|
This script generates the list of downloaded files and the list of container images by `roles/download/defaults/main.yml` file.
|
|
|
|
|
2022-03-07 13:32:55 +00:00
|
|
|
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.
|
2021-05-11 07:39:36 +00:00
|
|
|
|
|
|
|
```shell
|
2022-03-07 13:32:55 +00:00
|
|
|
./generate_list.sh
|
2021-05-11 07:39:36 +00:00
|
|
|
tree temp
|
|
|
|
temp
|
|
|
|
├── files.list
|
2022-03-07 13:32:55 +00:00
|
|
|
├── files.list.template
|
|
|
|
├── images.list
|
|
|
|
└── images.list.template
|
|
|
|
0 directories, 5 files
|
2021-05-11 07:39:36 +00:00
|
|
|
```
|
|
|
|
|
2022-03-07 13:32:55 +00:00
|
|
|
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.
|