Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Go Modules, Driver Version, OCP version check #265

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.podman
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LABEL vendor="Dell Inc." \
name="csi-isilon" \
summary="CSI Driver for Dell EMC PowerScale" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerScale" \
version="2.8.0" \
version="2.11.0" \
license="Apache-2.0"

COPY ./licenses /licenses
36 changes: 20 additions & 16 deletions dell-csi-helm-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

This directory provides scripts to install, upgrade, uninstall the CSI drivers, and to verify the Kubernetes environment.
These same scripts are present in all Dell EMC Container Storage Interface ([CSI](https://github.com/container-storage-interface/spec)) drivers. This includes the drivers for:

* [PowerFlex](https://github.com/dell/csi-vxflexos)
* [PowerMax](https://github.com/dell/csi-powermax)
* [PowerScale](https://github.com/dell/csi-powerscale)
Expand All @@ -22,7 +23,6 @@ Installing any of the Dell EMC CSI Drivers requires a few utilities to be instal
| `helm` | Helm v3 is used as the deployment tool for Charts. See, [Install Helm 3](https://helm.sh/docs/intro/install/) for instructions to install Helm 3. |
| `sshpass` | sshpass is used to check certain pre-requisities in worker nodes (in chosen drivers). |


In order to use these tools, a valid `KUBECONFIG` is required. Ensure that either a valid configuration is in the default location or that the `KUBECONFIG` environment variable points to a valid confiugration before using these tools.

## Capabilities
Expand All @@ -32,37 +32,39 @@ This project provides the following capabilitites, each one is discussed in deta
* Install a driver. When installing a driver, options are provided to specify the target namespace as well as options to control the types of verifications to be performed on the target system.
* Upgrade a driver. Upgrading a driver is an effective way to either deploy a new version of the driver or to modify the parameters used in an initial deployment.
* Uninstall a driver. This removes the driver and any installed storage classes.
* Verify a Kubernetes system for suitability with a driver. These verification steps differ, slightly, from driver to driver but include verifiying version compatibility, namespace availability, existance of required secrets, and validating worker node compatibility with driver protocols such as iSCSI, Fibre Channel, NFS, etc

* Verify a Kubernetes system for suitability with a driver. These verification steps differ, slightly, from driver to driver but include verifiying version compatibility, namespace availability, existance of required secrets, and validating worker node compatibility with driver protocols such as iSCSI, Fibre Channel, NFS, etc

Most of these usages require the creation/specification of a values file. These files specify configuration settings that are passed into the driver and configure it for use. To create one of these files, the following steps should be followed:
1. Download a template file for the driver to a new location, naming this new file is at the users discretion. The template files are always found within the driver repo at `https://github.com/dell/helm-charts/raw/csi-isilon-2.8.0/charts/csi-isilon/values.yaml`

1. Download a template file for the driver to a new location, naming this new file is at the users discretion. The template files are always found within the driver repo at `https://github.com/dell/helm-charts/raw/csi-isilon-2.11.0/charts/csi-isilon/values.yaml`
2. Edit the file such that it contains the proper configuration settings for the specific environment. These files are yaml formatted so maintaining the file structure is important.

For example, to create a values file for the PowerScale driver the following steps can be executed
```

```sh
# cd to the installation script directory
cd dell-csi-helm-installer

# copy the template file
wget -O my-isilon-settings.yaml -b csi-isilon-2.8.0 https://raw.githubusercontent.com/dell/helm-charts/main/charts/csi-isilon/values.yaml
wget -O my-isilon-settings.yaml -b csi-isilon-2.11.0 https://raw.githubusercontent.com/dell/helm-charts/main/charts/csi-isilon/values.yaml

# edit the newly created values file
vi my-isilon-settings.yaml
```

These values files can then be archived for later reference or for usage when upgrading the driver.


### Install A Driver

Installing a driver is performed via the `csi-install.sh` script. This script requires a few arguments: the target namespace and the user created values file. By default, this will verify the Kubernetes environment and present a list of warnings and/or errors. Errors must be addressed before installing, warning should be examined for their applicability. For example, in order to install the PowerScale driver into a namespace called "isilon", the following command should be run:
```

```sh
./csi-install.sh --namespace isilon --values ./my-isilon-settings.yaml
```

For usage information:
```

```sh
[dell-csi-helm-installer]# ./csi-install.sh -h
Help for ./csi-install.sh

Expand All @@ -84,12 +86,13 @@ Options:

Upgrading a driver is very similar to installation. The `csi-install.sh` script is run, with the same required arguments, along with a `--upgrade` argument. For example, to upgrade the previously installed PowerScale driver, the following command can be supplied:

```
```sh
./csi-install.sh --namespace isilon --values ./my-isilon-settings.yaml --upgrade
```

For usage information:
```

```sh
[dell-csi-helm-installer]# ./csi-install.sh -h
Help for ./csi-install.sh

Expand All @@ -111,12 +114,13 @@ Options:

To uninstall a driver, the `csi-uninstall.sh` script provides a handy wrapper around the `helm` utility. The only required argument for uninstallation is the namespace name. To uninstall the PowerScale driver:

```
```sh
./csi-uninstall.sh --namespace isilon
```

For usage information:
```

```sh
[dell-csi-helm-installer]# ./csi-uninstall.sh -h
Help for ./csi-uninstall.sh

Expand All @@ -133,12 +137,13 @@ Options:

The `verify.sh` script is run, automatically, as part of the installation and upgrade procedures and can also be run by itself. This provides a handy means to validate a Kubernetes system without meaning to actually perform the installation. To verify an environment, run `verify.sh` with the namespace name and values file options.

```
```sh
./verify.sh --namespace isilon --values ./my-isilon-settings.yaml
```

For usage information:
```

```sh
[dell-csi-helm-installer]# ./verify.sh -h
Help for ./verify.sh

Expand All @@ -153,4 +158,3 @@ Options:
--node-verify-user[=]<username> Username to SSH to worker nodes as, used to validate node requirements. Default is root
-h Help Help
```

4 changes: 2 additions & 2 deletions dell-csi-helm-installer/csi-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

HELM_BRANCH="csi-isilon-2.8.0"
HELM_BRANCH="csi-isilon-2.11.0"
DRIVERDIR="${SCRIPTDIR}/../helm-charts/charts"
DRIVER="csi-isilon"
VERIFYSCRIPT="${SCRIPTDIR}/verify.sh"
PROG="${0}"
NODE_VERIFY=1
VERIFY=1
MODE="install"
DEFAULT_DRIVER_VERSION="v2.8.0"
DEFAULT_DRIVER_VERSION="v2.11.0"
WATCHLIST=""

# export the name of the debug log, so child processes will see it
Expand Down
44 changes: 29 additions & 15 deletions dell-csi-helm-installer/csi-offline-bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
The `csi-offline-bundle.sh` script can be used to create a package for the offline installation of Dell CSI storage providers for deployment via Helm.

This includes the following drivers:

* [PowerFlex](https://github.com/dell/csi-vxflexos)
* [PowerMax](https://github.com/dell/csi-powermax)
* [PowerScale](https://github.com/dell/csi-powerscale)
* [PowerStore](https://github.com/dell/csi-powerstore)
* [Unity](https://github.com/dell/csi-unity)

The `csm-offline-bundle.sh` script can be used to create a package for the offline installation of Dell CSI storage providers for deployment via the CSM Operator.

* [Dell CSM Operator](https://github.com/dell/csm-operator)

## Dependencies

Multiple linux based systems may be required to create and process an offline bundle for use.

* One linux based system, with internet access, will be used to create the bundle. This involved the user cloning a git repository hosted on github.com and then invoking a script that utilizes `docker` or `podman` to pull and save container images to file.
* One linux based system, with access to an image registry, to invoke a script that uses `docker` or `podman` to restore container images from file and push them to a registry

Expand All @@ -28,14 +31,15 @@ Preparing an offline bundle requires the following utilities:
| --------------------- | ----- |
| `docker` or `podman` | `docker` or `podman` will be used to pull images from public image registries, tag them, and push them to a private registry. |
| | One of these will be required on both the system building the offline bundle as well as the system preparing for installation. |
| | Tested version(s) are `docker` 19.03+ and `podman` 1.6.4+
| `git` | `git` will be used to manually clone one of the above repos in order to create and offline bundle.
| | This is only needed on the system preparing the offline bundle.
| | Tested version(s) are `git` 1.8+ but any version should work.
| | Tested version(s) are `docker` 19.03+ and `podman` 1.6.4+ |
| `git` | `git` will be used to manually clone one of the above repos in order to create and offline bundle. |
| | This is only needed on the system preparing the offline bundle. |
| | Tested version(s) are `git` 1.8+ but any version should work. |

## Workflow

To perform an offline installation of a driver or the Operator, the following steps should be performed:

1. Build an offline bundle
2. Unpacking an offline bundle and preparing for installation
3. Perform either a Helm installation or Operator installation
Expand All @@ -45,27 +49,33 @@ To perform an offline installation of a driver or the Operator, the following st
This needs to be performed on a linux system with access to the internet as a git repo will need to be cloned, and container images pulled from public registries.

The build an offline bundle, the following steps are needed:

1. Perform a `git clone` of the desired repository. For a Helm based install, the specific driver repo should be cloned. For an Operator based deployment, the Dell CSM Operator repo should be cloned
2. Run the offline bundle script with an argument of `-c` in order to create an offline bundle
- For Helm installs, the `csi-offline-bundle.sh` script will be found in the `dell-csi-helm-installer` directory
- For Operator installs, the `csm-offline-bundle.sh` script will be found in the `scripts` directory

* For Helm installs, the `csi-offline-bundle.sh` script will be found in the `dell-csi-helm-installer` directory
* For Operator installs, the `csm-offline-bundle.sh` script will be found in the `scripts` directory

The script will perform the following steps:
- Determine required images by parsing either the driver Helm charts (if run from a cloned CSI Driver git repository) or the Dell CSM Operator configuration files (if run from a clone of the Dell CSM Operator repository)
- Perform an image `pull` of each image required
- Save all required images to a file by running `docker save` or `podman save`
- Build a `tar.gz` file containing the images as well as files required to installer the driver and/or Operator

* Determine required images by parsing either the driver Helm charts (if run from a cloned CSI Driver git repository) or the Dell CSM Operator configuration files (if run from a clone of the Dell CSM Operator repository)
* Perform an image `pull` of each image required
* Save all required images to a file by running `docker save` or `podman save`
* Build a `tar.gz` file containing the images as well as files required to installer the driver and/or Operator

The resulting offline bundle file can be copied to another machine, if necessary, to gain access to the desired image registry.

For example, here is the output of a request to build an offline bundle for the Dell CSM Operator:

```
[user@anothersystem /home/user]# git clone https://github.com/dell/csm-operator.git
```

```
[user@anothersystem /home/user]# cd csm-operator
```

```
[user@system /home/user/csm-operator]# bash scripts/csm-offline-bundle.sh -c
Expand All @@ -78,7 +88,7 @@ For example, here is the output of a request to build an offline bundle for the
*
* Pulling and saving container images
dellemc/csi-isilon:v2.8.0
dellemc/csi-isilon:v2.11.0
dellemc/csi-metadata-retriever:v1.6.0
dellemc/csipowermax-reverseproxy:v2.6.0
dellemc/csi-powermax:v2.9.0
Expand Down Expand Up @@ -140,18 +150,20 @@ Offline bundle file is: /root/csm-operator/dell-csm-operator-bundle.tar.gz
This needs to be performed on a linux system with access to an image registry that will host container images. If the registry requires `login`, that should be done before proceeding.

To prepare for driver or Operator installation, the following steps need to be performed:

1. Copy the offline bundle file to a system with access to an image registry available to your Kubernetes/OpenShift cluster
2. Expand the bundle file by running `tar xvfz <filename>`
3. Run the `csm-offline-bundle.sh` script and supply the `-p` option as well as the path to the internal registry with the `-r` option

The script will then perform the following steps:
- Load the required container images into the local system
- Tag the images according to the user supplied registry information
- Push the newly tagged images to the registry
- Modify the Helm charts or Operator configuration to refer to the newly tagged/pushed images

* Load the required container images into the local system
* Tag the images according to the user supplied registry information
* Push the newly tagged images to the registry
* Modify the Helm charts or Operator configuration to refer to the newly tagged/pushed images

An example of preparing the bundle for installation:

```
[user@anothersystem /tmp]# tar xvfz dell-csm-operator-bundle.tar.gz
dell-csm-operator-bundle/
Expand All @@ -166,9 +178,11 @@ dell-csm-operator-bundle/deploy/olm/operator_community.yaml
dell-csm-operator-bundle/README.md
dell-csm-operator-bundle/LICENSE
```

```
[user@anothersystem /tmp]# cd dell-csm-operator-bundle
```

```
[user@anothersystem /tmp/dell-csm-operator-bundle]# bash scripts/csm-offline-bundle.sh -p -r localregistry:5000/dell-csm-operator/
Preparing a offline bundle for installation
Expand Down
2 changes: 1 addition & 1 deletion dell-csi-helm-installer/csi-offline-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ DRIVER="csi-isilon"
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
REPODIR="$( dirname "${SCRIPTDIR}" )"

DRIVERVERSION="csi-isilon-2.8.0"
DRIVERVERSION="csi-isilon-2.11.0"

while getopts "cpr:h" opt; do
case $opt in
Expand Down
2 changes: 1 addition & 1 deletion dell-csi-helm-installer/verify-csi-isilon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# verify-csi-isilon method
function verify-csi-isilon() {
verify_k8s_versions "1.21" "1.29"
verify_openshift_versions "4.13" "4.14"
verify_openshift_versions "4.14" "4.15"
verify_namespace "${NS}"
verify_required_secrets "${RELEASE}-creds"
verify_optional_secrets "${RELEASE}-certs"
Expand Down
58 changes: 30 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ require (
github.com/akutz/gournal v0.5.0
github.com/container-storage-interface/spec v1.6.0
github.com/cucumber/godog v0.10.0
github.com/dell/csi-metadata-retriever v1.7.2
github.com/dell/dell-csi-extensions/common v1.3.0
github.com/dell/dell-csi-extensions/podmon v1.3.0
github.com/dell/dell-csi-extensions/replication v1.6.0
github.com/dell/dell-csi-extensions/volumeGroupSnapshot v1.4.0
github.com/dell/gocsi v1.10.0
github.com/dell/csi-metadata-retriever v1.7.3
github.com/dell/dell-csi-extensions/common v1.4.1
github.com/dell/dell-csi-extensions/podmon v1.4.1
github.com/dell/dell-csi-extensions/replication v1.7.1
github.com/dell/dell-csi-extensions/volumeGroupSnapshot v1.5.1
github.com/dell/gocsi v1.10.1
github.com/dell/gofsutil v1.15.0
github.com/dell/goisilon v1.15.0
github.com/fsnotify/fsnotify v1.6.0
github.com/dell/goisilon v1.15.1
github.com/fsnotify/fsnotify v1.7.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/mux v1.8.1
github.com/kubernetes-csi/csi-lib-utils v0.11.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.23.0
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
golang.org/x/net v0.25.0
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
Expand All @@ -42,7 +42,7 @@ require (
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cucumber/gherkin-go/v11 v11.0.0 // indirect
github.com/cucumber/messages-go/v10 v10.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand Down Expand Up @@ -70,32 +70,34 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.12 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect
go.etcd.io/etcd/client/v3 v3.5.12 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading