This operator is the entrypoint for installing the Migration Toolkit for Red Hat OpenShift (crane).
-
The OpenShift UI Console plugin https://github.com/konveyor/crane-ui-plugin
-
A runtime image for the crane cli https://github.com/konveyor/crane-runner/
-
Proxy that allows the plugin to communicate with remote clusters https://github.com/konveyor/crane-reverse-proxy
-
Service for managing secrets related to remote clusters https://github.com/konveyor/crane-secret-service
Note:
- crane is compatible with OpenShift 4.10.11/4.10.11+ versions.
- Go 1.18 version needed to build operator
- Crane installs pipeline operator as dependency in
<installation>
namespace. (Note: This will not impact any existing installation of the pipeline operator. Uninstalling mtRHO later also will not impact the pipeline operator.) - Make sure
ClusterTask
,Pipeline
CRDs are available after the installation of Pipeline operator. It might take a minute or two before the CRDs appear.
Making the crane-operator available in your cluster is as simple as creating the CatalogSource:
oc apply -f https://raw.githubusercontent.com/konveyor/crane-operator/main/crane-catalogsource.yaml
Then, using the console UI, from operator hub install the crane Operator.
Note:
- For now crane and MTC are not compatible within a same namespace if installed using OLM and operator hub.
To build images from the latest code use the below instructions.
-
Set quay org, tag and image base
export ORG=your-quay-org export VERSION=99.0.0 export IMAGE_TAG_BASE=quay.io/$ORG/crane-operator
-
Run from the root of the crane-operator repo to build container image and push it.
docker build -f Dockerfile -t quay.io/$ORG/crane-operator-container:$VERSION . docker push quay.io/$ORG/crane-operator-container:$VERSION
-
Update
/config/manager/manager.yaml
to use your own custom image for container.[...] containers: - command: - /manager args: - --leader-elect image: quay.io/$ORG/crane-operator-container:$VERSION imagePullPolicy: Always name: manager
-
Run from the root of crane-operator repo to build operator bundle.
make bundle make bundle-build make bundle-push
-
Run from the root of crane-operator repo to build operator index.
opm index add --container-tool podman --bundles quay.io/$ORG/crane-operator-bundle:v$VERSION --tag quay.io/$ORG/crane-operator-index:v$VERSION podman push quay.io/$ORG/crane-operator-index:v$VERSION
Note: Make sure your quay repos are public
-
Create CatalogSource by running the following command.
cat << EOF > catalogsource.yaml apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: crane-operator namespace: openshift-marketplace spec: image: 'quay.io/$ORG/crane-operator-index:v$VERSION' sourceType: grpc EOF oc create -f catalogsource.yaml
-
Install crane operator from operator hub, choose to enable console plugin while installing operator
-
Create operatorConfig CR to initiate installation of proxy, crane-ui-plugin, and cluster tasks needed for migration
cat << EOF > openshift-migration.yaml apiVersion: crane.konveyor.io/v1alpha1 kind: OperatorConfig metadata: name: openshift-migration spec: {} EOF oc create -f openshift-migration.yaml
-
Remove All operatorConfig CR
oc delete operatorconfigs.crane.konveyor.io --all
-
Delete subscription or uninstall form operator hub.
-
Remove CRD
oc delete crd operatorconfigs.crane.konveyor.io