diff --git a/image-definitions/README.md b/image-definitions/README.md index 3bdd1822..b4e1f508 100644 --- a/image-definitions/README.md +++ b/image-definitions/README.md @@ -2,7 +2,7 @@ This directory contains image definitions for containers that are used in deployment of Notebook Operators. Only selected container images are maintained. The list of images and/or repositories can change. In addition, tools required to maintain container images are included in this repository: -- `setup.sh` - Used to setup initial image definitions and in maintanance of image definitions. +- `setup.sh` - Used to setup initial image definitions and in maintenance of image definitions. - `install-tools.sh` - Install all required tools for building, scanning, and publishing container images. - `build.sh` - Build container images. - `publish.sh` - Publish container images. @@ -12,7 +12,7 @@ See [#Usage] for more details on each tool. ## Image Definitions -Image definitions contain patches for selected sources from upstream. These differ from one repository to the next. Scripts should be updated accordingly. In addtion, it is a good practice to update this README file with what repositories are tracked. +Image definitions contain patches for selected sources from upstream. These differ from one repository to the next. Scripts should be updated accordingly. In addition, it is a good practice to update this README file with what repositories are tracked. ### Kubeflow @@ -22,7 +22,7 @@ Kubeflow repository `https://github.com/kubeflow/kubeflow.git`. For detailed resources that these images require refer to `setup.sh` script. -There were modification done to `Makefile`, `Dockerfile`, and `requirements.*` files to ensure bulding only required images. +There were modification done to `Makefile`, `Dockerfile`, and `requirements.*` files to ensure building only required images. When repository is setup a version of Kubeflow is retrieved and stored in `./kubeflow/version.txt` and a current commit is stored in `./kubeflow-patch-commit.txt`. The latter file is used in tagging images with specific commit ID. In addition, it can be used to the exact version of the tree the patch was created with. @@ -30,7 +30,7 @@ When repository is setup a version of Kubeflow is retrieved and stored in `./kub This repository contains tools - a collection of `bash` scripts - that help in maintenance of image definitions. All these tools are specific to image definitions for the repository they are in. Different repositories can be included and scripts are adjusted accordingly. -Required tools include Docker which might cause some conflicts on development machines. If required, image definiton work can be done in isolation on a VM. Using `multipass` create a VM and log into it: +Required tools include Docker which might cause some conflicts on development machines. If required, image definition work can be done in isolation on a VM. Using `multipass` create a VM and log into it: ``` multipass launch 20.04 --cpus 2 --mem 8G --disk 100G --name docker-vm @@ -57,7 +57,7 @@ setup.sh . This will perform a sparse checkout of all required repositories in current (`.`) directory. Refer to `setup.sh` script for more detail on what directories are created. Those are also described in [Image Definitions](#image-definitions) section of this README. -Refere to [Maintenance](#maintenance) section for more details on how to use and create patches. +Refer to [Maintenance](#maintenance) section for more details on how to use and create patches. ### Build @@ -136,7 +136,7 @@ git diff > ../kubeflow.patch git rev-parse --short HEAD > ../kubeflow-patch-commit.txt ``` -Commit this patch to this repository. Commit `./kubeflow-patch-commit.txt` to this repository as well. This will ensure that it is possible to retrieve exact copy of the tree which `./kubeflow.patch` was based on. If required to work on particular version/commit of Kubeflow tree, after cloning this repo make a note of the commig stored in `./kubeflow-patch-commit.txt`, setup Kubeflow tree and checkout the noted commit ID. Then do the required work. Also note that scripts depend on `kubeflow-patch-commit.txt` file for tagging images. +Commit this patch to this repository. Commit `./kubeflow-patch-commit.txt` to this repository as well. This will ensure that it is possible to retrieve exact copy of the tree which `./kubeflow.patch` was based on. If required to work on particular version/commit of Kubeflow tree, after cloning this repo make a note of the commit stored in `./kubeflow-patch-commit.txt`, setup Kubeflow tree and checkout the noted commit ID. Then do the required work. Also note that scripts depend on `kubeflow-patch-commit.txt` file for tagging images. From time to time an update in upstream source, an addition of new container image, or a new vulnerability fix will require re-evaluation of image definitions. To perform difference analysis between upstream, set up a clean copy of upstream source, apply existing patch and diff the contents with current image definitions. @@ -151,11 +151,11 @@ git diff Analyze differences and act accordingly, i.e. change `Makefiles` and/or `Dockerfile(s)`, add, remove, or modify image definitions in this repository. -In many cases difference in `Makefile(s)`, `Dockerfile(s)`, and `requirements.*` files should be carefully reviewed. Other files could be copied directrly. +In many cases difference in `Makefile(s)`, `Dockerfile(s)`, and `requirements.*` files should be carefully reviewed. Other files could be copied directly. This is a manual merge process. No automation can be done at this point. -Whenever making changes to image definitions include meaninful commit message that explains why changes were made. +Whenever making changes to image definitions include meaningful commit message that explains why changes were made. If patch fails, examine which lines cause the problem and analyze the differences. In some cases upstream change could be integrated into patch. In other cases changes should be made to override that change. diff --git a/image-definitions/setup.sh b/image-definitions/setup.sh index e15701aa..57e2f50a 100755 --- a/image-definitions/setup.sh +++ b/image-definitions/setup.sh @@ -7,9 +7,9 @@ # Create directory and checkout specified components from upstream repositories. # The directory specified below should not exist in . # Updated upstream version of component is checked out from specified branch and then all git -# information is deleted, leaving only the resouces required for image definitions. +# information is deleted, leaving only the resources required for image definitions. # Use this script in setting up new image definitions or creating a copy to check for -# differences between existing image definitions and upstream vesions. +# differences between existing image definitions and upstream versions. # This script should be specific for the charm repository. # # Usage: diff --git a/tox.ini b/tox.ini index a6e5d380..59e93eb1 100644 --- a/tox.ini +++ b/tox.ini @@ -69,7 +69,7 @@ deps = -r requirements-integration.txt commands = pytest -vvs --tb native --show-capture=no --log-cli-level=INFO --asyncio-mode=auto {posargs} {toxinidir}/tests/ -# image defintions maintenance: container image patch, build, scan, and publish +# image definitions maintenance: container image patch, build, scan, and publish # See ./image-definitions/README.md for more details. [testenv:images-setup] whitelist_externals = bash