diff --git a/.github/workflows/migrate-old-manifest-packages-to-bundles.yaml b/.github/workflows/migrate-old-manifest-packages-to-bundles.yaml deleted file mode 100644 index 7233b408c..000000000 --- a/.github/workflows/migrate-old-manifest-packages-to-bundles.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (c) 2012-2021 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation - -name: Migrate manifest format packages to the OLM bundles - -# on: [push] -on: - schedule: - - cron: '35 18 * * *' -jobs: - - build: - name: Bundle migration - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v1 - - - name: TIME - run: date +"%H:%M" - - - name: Install yq - run: sudo pip install yq - - - name: Docker login - uses: azure/docker-login@v1 - with: - login-server: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Migrate manifest format packages to the OLM bundles - run: "${GITHUB_WORKSPACE}/olm/buildOLMBundlesFromReleaseManifestFiles.sh" - env: - IMAGE_REGISTRY_HOST: quay.io - IMAGE_REGISTRY_USER_NAME: eclipse diff --git a/README.md b/README.md index 3a05f2552..3fcd6a590 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ spec: 5. Deploy Che operator: ```bash -$ chectl server:deploy --installer=olm --platform= --catalog-source-yaml --olm-channel=nightly --package-manifest-name=eclipse-che-preview- +$ chectl server:deploy --installer=olm --platform= --catalog-source-yaml --olm-channel=nightly --package-manifest-name=eclipse-che-preview- ``` ### Deploy Che operator using bash script diff --git a/olm/README.md b/olm/README.md index 96e42480d..a9dc600f0 100644 --- a/olm/README.md +++ b/olm/README.md @@ -127,3 +127,31 @@ $ export IMAGE_REGISTRY_HOST="127.0.0.1:5000" && \ ``` > Tips: If minikube was installed locally (driver 'none', local installation minikube), then registry is available on the host 0.0.0.0 without port forwarding but it requires `sudo`. + +# Install stable "preview" Eclipse Che using chectl + +Before publishing Eclipse Che in the community operator catalogs, we are testing new release using "stable" OLM channel +from "preview" catalog source image. +Stable "preview" Eclipse Che can be installed via chectl. + +1. Create a custom catalog source yaml and define platform(openshift or kubernetes): + +```yaml +apiVersion: operators.coreos.com/v1alpha1 +kind: CatalogSource +metadata: + name: eclipse-che-preview-custom + namespace: che-namespace +spec: + image: quay.io/eclipse/eclipse-che--opm-catalog:preview + sourceType: grpc + updateStrategy: + registryPoll: + interval: 5m +``` + +2. Deploy Che operator: + +```bash +$ chectl server:deploy --installer=olm --platform= --catalog-source-yaml --olm-channel=stable --package-manifest-name=eclipse-che-preview- +``` diff --git a/olm/buildOLMBundlesFromReleaseManifestFiles.sh b/olm/buildOLMBundlesFromReleaseManifestFiles.sh deleted file mode 100755 index 6fe3c8903..000000000 --- a/olm/buildOLMBundlesFromReleaseManifestFiles.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2012-2021 Red Hat, Inc. -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Red Hat, Inc. - initial API and implementation - -SCRIPT=$(readlink -f "$0") -OPERATOR_REPO=$(dirname "$(dirname "$SCRIPT")") -echo "${OPERATOR_REPO}" - -set -e -BASE_DIR="${OPERATOR_REPO}/olm" -source "${BASE_DIR}/olm.sh" -installOPM - -for platform in 'kubernetes' 'openshift' -do - manifestsFormatRootFolder="${OPERATOR_REPO}/olm/eclipse-che-preview-${platform}/deploy/olm-catalog/eclipse-che-preview-${platform}" - pushd "${manifestsFormatRootFolder}" || exit 1 - - stableBundleDir=$(getBundlePath "${platform}" "stable") - echo "${stableBundleDir}" - bundle_dir=$(mktemp -d -t che-releases-XXX) - echo "${bundle_dir}" - - readarray -t dirs < <(find . -maxdepth 1 -type d -printf '%P\n' | sort) - for versionDir in ${dirs[*]} ; do - if [[ "${versionDir}" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then - echo "Converting manifest format folder ${versionDir} to the bundle format..." - manifestFormatDir="${manifestsFormatRootFolder}/${versionDir}" - bundleDir="${bundle_dir}/${versionDir}" - mkdir -p "${bundleDir}/manifests" - cp -rf "${stableBundleDir}/bundle.Dockerfile" "${stableBundleDir}/metadata" "${bundleDir}" - packageName=$(getPackageName "${platform}") - - cp -rf "${manifestFormatDir}/${packageName}.v${versionDir}.clusterserviceversion.yaml" "${bundleDir}/manifests/che-operator.clusterserviceversion.yaml" - cp -rf "${manifestFormatDir}/${packageName}.crd.yaml" "${bundleDir}/manifests/org_v1_che_crd.yaml" - cp -rf "${manifestFormatDir}/${packageName}.v${versionDir}.clusterserviceversion.yaml.diff" "${bundleDir}/manifests/che-operator.clusterserviceversion.yaml.diff" - cp -rf "${manifestFormatDir}/${packageName}.crd.yaml.diff" "${bundleDir}/manifests/org_v1_che_crd.yaml.diff" - fi - done - - for versionDir in ${dirs[*]} ; do - if [[ "${versionDir}" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then - OPM_BUNDLE_DIR="${bundle_dir}/${versionDir}" - export OPM_BUNDLE_DIR - "${OPERATOR_REPO}/olm/buildAndPushBundleImages.sh" -c "stable" -p "${platform}" - fi - done - - popd || true -done diff --git a/olm/prepare-community-operators-update.sh b/olm/prepare-community-operators-update.sh index 58fc52e51..55701f612 100755 --- a/olm/prepare-community-operators-update.sh +++ b/olm/prepare-community-operators-update.sh @@ -62,7 +62,6 @@ do manifestPackagesDir=$(mktemp -d -t che-${platform}-manifest-packages-XXX) echo "[INFO] Folder with manifest packages: ${manifestPackagesDir}" - # Todo: check that github action really has installed docker... ${OPM_BINARY} index export --index="${INDEX_IMAGE}" --package="${packageName}" -c="docker" --download-folder "${manifestPackagesDir}" packageBaseFolderPath="${manifestPackagesDir}/${packageName}" cd "${packageBaseFolderPath}"