title | description | lead | date | lastmod | draft | images | menu | weight | toc | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bundle |
Bundle ArtemisCloud.io |
Bundle ArtemisCloud.io |
2020-10-06 08:49:31 +0000 |
2020-10-06 08:49:31 +0000 |
false |
|
630 |
true |
The Operator Lifecycle Manager can help users to install and manage operators. The ArtemisCloud operator can be built into a bundle image and installed into OLM.
Before you build the bundle image generate the manifests and metadata:
make IMAGE_TAG_BASE=<bundle image registry> OPERATOR_IMAGE_REPO=<operator image registry> OPERATOR_VERSION=<operator tag> bundle
make IMAGE_TAG_BASE=<bundle image registry> bundle-build
The result image tag takes the form like
${IMAGE_TAG_BASE}-bundle:v0.0.1
Note: the version v0.0.1 is defined by VERSION variable in the Makefile
To push the built bundle image
make IMAGE_TAG_BASE=<bundle image registry> bundle-push
Now with the bundle image in place, build the catalog(index) iamge:
make IMAGE_TAG_BASE=<bundle image registry> catalog-build
The result image tag takes the form like
${IMAGE_TAG_BASE}-index:v0.0.1
To push the catalog image to repo:
make IMAGE_TAG_BASE=<bundle image registry> catalog-push
Make sure the Minikube is up and running.
Use the operator-sdk tool:
operator-sdk olm install
It will deploy the latest olm into Minikube.
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: artemis-index
namespace: operators
spec:
sourceType: grpc
image: quay.io/hgao/operator-catalog:v0.0.1
displayName: ArtemisCloud Index
publisher: ArtemisCloud
updateStrategy:
registryPoll:
interval: 10m
and deploy it:
$ kubectl create -f catalog-source.yaml
In a moment you will see the index image is up and running in namespace operators:
[a]$ kubectl get pod -n operators
NAME READY STATUS RESTARTS AGE
artemis-index-bzh75 1/1 Running 0 42s
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: my-subscription
namespace: operators
spec:
channel: upstream
name: activemq-artemis-operator
source: artemis-index
sourceNamespace: operators
installPlanApproval: Automatic
and deploy it:
$ kubectl create -f subscription.yaml
An operator will be installed into operators namespace.
$ kubectl get pod -n operators
NAME READY STATUS RESTARTS AGE
9365c56f188be1738a1fabddb5a408a693d8c1f2d7275514556644e52ejpdpj 0/1 Completed 0 2m20s
activemq-artemis-controller-manager-84d58db649-tkt89 1/1 Running 0 117s
artemis-index-frpn4 1/1 Running 0 3m35s