Skip to content

Commit

Permalink
Updating offline install changes (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
boyamurthy authored Jul 18, 2023
1 parent 4bfc911 commit 4a1ade1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dell-csi-helm-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ This project provides the following capabilitites, each one is discussed in deta


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. Copy 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 `helm/csi-<drivername>/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 at `https://github.com/dell/helm-charts/raw/csi-powermax-2.8.0/charts/csi-powerstore/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 PowerMax driver the following steps can be executed
```
# cd to the installation script directory
cd dell-csi-helm-installer
# copy the template file
cp ../helm/csi-powermax/values.yaml ./my-powermax-settings.yaml
# Download the template file
wget -O my-powerstore-settings.yaml https://github.com/dell/helm-charts/raw/csi-powermax-2.8.0/charts/csi-powerstore/values.yaml
# edit the newly created values file
vi my-powermax-settings.yaml
Expand Down
25 changes: 22 additions & 3 deletions dell-csi-helm-installer/csi-offline-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ copy_files() {
status "Copying necessary files"
for f in ${REQUIRED_FILES[@]}; do
echo " ${f}"
cp -R "${f}" "${DISTDIR}"
if [[ ${f} == *$DRIVER ]]; then
mkdir -p ${DISTDIR}/helm-charts/charts
cp -R "${f}" "${DISTDIR}/helm-charts/charts"
else
cp -R "${f}" "${DISTDIR}"
fi

if [ $? -ne 0 ]; then
echo "Unable to copy ${f} to the distribution directory"
exit 1
Expand Down Expand Up @@ -198,7 +204,7 @@ copy_helm_dir() {
fi

mkdir -p "${HELMBACKUPDIR}"
cp -R "${HELMDIR}"/* "${HELMBACKUPDIR}"
cp -R "${HELMDIR}/../.."/* "${HELMBACKUPDIR}"
}

# set_mode
Expand All @@ -223,11 +229,24 @@ set_mode() {
CREATE="false"
PREPARE="false"
REGISTRY=""
DRIVER="csi-powermax"

# some directories
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
REPODIR="$( dirname "${SCRIPTDIR}" )"
HELMDIR="${REPODIR}/helm"
if [ ! -d "$REPODIR/helm-charts" ]; then

if [ ! -d "$SCRIPTDIR/helm-charts" ]; then
git clone --quiet -c advice.detachedHead=false https://github.com/dell/helm-charts
fi
mv helm-charts $REPODIR
else
if [ -d "$SCRIPTDIR/helm-charts" ]; then
rm -rf $SCRIPTDIR/helm-charts
fi
fi

HELMDIR="${REPODIR}/helm-charts/charts/$DRIVER"
HELMBACKUPDIR="${REPODIR}/helm-original"

# mode we are using for install, "helm" or "operator"
Expand Down

0 comments on commit 4a1ade1

Please sign in to comment.