diff --git a/docs/developer/build-redhat-bundles.fish b/docs/developer/build-redhat-bundles.fish new file mode 100644 index 000000000..dcd8078bb --- /dev/null +++ b/docs/developer/build-redhat-bundles.fish @@ -0,0 +1,22 @@ +set VERSIONS 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 +for VERSION in $VERSIONS + echo "Version: $VERSION" + echo "docker build -t bradfordcp/cass-operator-bundle:$VERSION -f bundle-$VERSION.Dockerfile ." + docker build -t harbor.sjc.dsinternal.org/cass-operator/cass-operator-bundle:$VERSION -f bundle-$VERSION.Dockerfile . + + echo "docker push harbor.sjc.dsinternal.org/cass-operator/cass-operator-bundle:$VERSION" + docker push harbor.sjc.dsinternal.org/cass-operator/cass-operator-bundle:$VERSION +end + + +set BUNDLELIST "" + +for VERSION in $VERSIONS + set BUNDLELIST $BUNDLELIST,harbor.sjc.dsinternal.org/cass-operator/cass-operator-bundle:$VERSION +end +# Remove ',' from start of bundlelist +set BUNDLELIST (string sub -s 2 $BUNDLELIST) + +echo "opm index add --bundles $BUNDLELIST --tag harbor.sjc.dsinternal.org/cass-operator/cass-operator-index:latest -u docker" +opm index add --bundles $BUNDLELIST --tag harbor.sjc.dsinternal.org/cass-operator/cass-operator-index:latest -u docker +docker push harbor.sjc.dsinternal.org/cass-operator/cass-operator-index:latest diff --git a/docs/developer/olm/catalogsource.yaml b/docs/developer/olm/catalogsource.yaml index 8fd02b6fb..e938056a0 100644 --- a/docs/developer/olm/catalogsource.yaml +++ b/docs/developer/olm/catalogsource.yaml @@ -7,4 +7,4 @@ spec: displayName: Local Catalog publisher: Developer sourceType: grpc - image: bradfordcp/catalog-index:latest + image: harbor.sjc.dsinternal.org/cass-operator/cass-operator-index:latest diff --git a/docs/developer/olm/persistentvolume.yaml b/docs/developer/olm/persistentvolume.yaml new file mode 100644 index 000000000..c4461f8a2 --- /dev/null +++ b/docs/developer/olm/persistentvolume.yaml @@ -0,0 +1,17 @@ +kind: PersistentVolume +apiVersion: v1 +metadata: + name: cass-operator-test-pv +spec: + capacity: + storage: 100Gi + hostPath: + path: /mnt/pv-data/cass-op-pv + type: '' + accessModes: + - ReadWriteOnce + - ReadWriteMany + - ReadOnlyMany + persistentVolumeReclaimPolicy: Recycle + volumeMode: Filesystem + storageClassName: no-provisioner diff --git a/docs/developer/olm/storageclass.yaml b/docs/developer/olm/storageclass.yaml new file mode 100644 index 000000000..40f8a0ed2 --- /dev/null +++ b/docs/developer/olm/storageclass.yaml @@ -0,0 +1,7 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: no-provisioner +provisioner: kubernetes.io/no-provisioner +reclaimPolicy: Delete +volumeBindingMode: WaitForFirstConsumer diff --git a/docs/developer/red-hat-packaging.md b/docs/developer/red-hat-packaging.md index c0fc44846..cbf0ae176 100644 --- a/docs/developer/red-hat-packaging.md +++ b/docs/developer/red-hat-packaging.md @@ -79,11 +79,8 @@ _Note see Red Hat's [Gitbook](https://redhat-connect.gitbook.io/partner-guide-fo 6. Build bundle container and push to staging repo ```console - docker build -t bradfordcp/cass-operator-bundle:$NEW_VERSION -f bundle-$NEW_VERSION.Dockerfile . - docker push bradfordcp/cass-operator-bundle:$NEW_VERSION - - docker tag bradfordcp/cass-operator-bundle:$NEW_VERSION bradfordcp/cass-operator-bundle:latest - docker push bradfordcp/cass-operator-bundle:latest + docker build -t harbor.sjc.dsinternal.org/cass-operator/cass-operator-bundle:$NEW_VERSION -f bundle-$NEW_VERSION.Dockerfile . + docker push harbor.sjc.dsinternal.org/cass-operator/cass-operator-bundle:$NEW_VERSION ``` 7. Build local catalog index for testing diff --git a/docs/developer/red-hat-validation.md b/docs/developer/red-hat-validation.md new file mode 100644 index 000000000..5d7475350 --- /dev/null +++ b/docs/developer/red-hat-validation.md @@ -0,0 +1,31 @@ +# How to test Red Hat + +1. Build all basic containers + - dse-server + - cassandra + - cass-operator + - cass-config-builder +2. Push all to red hat + - Wait for security scans + - Fix issues if any + - Publish, fixup tags +3. Build a bundle (referencing redhat registry for cass-operator) +4. Push the bundle to a _local_ registry +5. Build an index pointed at the _local_ registry + - All versions, not just latest +6. Run OpenShift locally +7. Create cass-operator prereqs +8. Install a `CatalogSource` that references the local index (step 5) +9. Install a `Subscription` that reference the `CatalogSource` (step 8) +10. Check to make sure operator is up +11. Provision a CassandraDatacenter +12. Validate cassdc comes up +13. Check CQLSH, nodetool status, whatever +14. Tear down local openshift +14. Push bundle to Red Hat (step 4) +15. Validate tests pass +16. Publish the bundle +17. Run OpenShift locally +18. Install a `Subscription` that references the _PUBLIC_ openshift catalog +19. Check steps 10-13 +20. Tear down local openshift