Add docs how to use 'stable' OLM channel, remove migration manifests job. (#711)
* Add docs how to use 'stable' OLM channel, remove migration manifests job. Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>pull/712/head
parent
d2e4ba9813
commit
92c76f3223
|
|
@ -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
|
||||
|
|
@ -115,7 +115,7 @@ spec:
|
|||
5. Deploy Che operator:
|
||||
|
||||
```bash
|
||||
$ chectl server:deploy --installer=olm --platform=<PLATFORM> --catalog-source-yaml <PATH_TO_CUSTOM_CATALOG_SOURCE_YAML> --olm-channel=nightly --package-manifest-name=eclipse-che-preview-<openshift|kubernetes>
|
||||
$ chectl server:deploy --installer=olm --platform=<CHECTL_SUPPORTED_PLATFORM> --catalog-source-yaml <PATH_TO_CUSTOM_CATALOG_SOURCE_YAML> --olm-channel=nightly --package-manifest-name=eclipse-che-preview-<openshift|kubernetes>
|
||||
```
|
||||
|
||||
### Deploy Che operator using bash script
|
||||
|
|
|
|||
|
|
@ -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-<openshift|kubernetes>-opm-catalog:preview
|
||||
sourceType: grpc
|
||||
updateStrategy:
|
||||
registryPoll:
|
||||
interval: 5m
|
||||
```
|
||||
|
||||
2. Deploy Che operator:
|
||||
|
||||
```bash
|
||||
$ chectl server:deploy --installer=olm --platform=<CHECTL_SUPPORTED_PLATFORM> --catalog-source-yaml <PATH_TO_CUSTOM_CATALOG_SOURCE_YAML> --olm-channel=stable --package-manifest-name=eclipse-che-preview-<openshift|kubernetes>
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue