The maestro addon is used to enable the maestro in the ACM
make build
make image
Run following command to install maestro-addon on ACM hub
helm install maestro-addon ./charts/maestro-addon-
To use customized images:
--set global.imageOverrides.maestroImage=<your customized image> --set global.imageOverrides.maestroAddOnImage=<your customized image> -
(Optional) To use AMQ Streams Kafka as the events broker
-
Follow this doc to install the AMQ Streams Operator from OpenShift OperatorHub
-
After the operator is installed, create a Kafka CR in one namespace to provision a Kafka cluster, the Kafka CR must enable the authorization with a super user
CN=maestro-kafka-adminand a route listener with mTLS, There is an example for Kafka CR. -
Specify the AMQ Streams Kafka cluster name and namespace:
--set maestro.broker=kafka --set messageQueue.amqStreams.name=<your AMQ Streams Kafka CR name, by default is kafka> --set messageQueue.amqStreams.namespace=<your AMQ Streams Kafka CR namespace, by default is amq-streams>
-
More available config values can be found from here.
Using helm uninstall maestro-addon to uninstall the maestro-addon.
Create a ManagedClusterAddOn CR in one managed cluster namespace on an ACM hub to install the maestro-addon agent on that managed cluster.
cat << EOF | oc -n <cluster-name> apply -f -
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: ManagedClusterAddOn
metadata:
name: maestro-addon
spec:
installNamespace: open-cluster-management-agent
EOFUsing oc -n <cluster-name> delete ManagedClusterAddOn maestro-addon to uninstall the maestro-addon agent from a managed cluster.
- Prepare the config for ManifestWorkReplicaSet controller
cat << EOF | oc -n multicluster-engine create -f -
apiVersion: v1
kind: Secret
metadata:
name: work-driver-config
type: Opaque
stringData:
config.yaml: |
url: maestro-grpc.maestro:8090
EOF- Enable the ManifestWorkReplicaSet controller
oc patch clustermanager cluster-manager --type=merge -p='{"spec":{"workConfiguration":{"workDriver":"grpc","featureGates":[{"feature":"CloudEventsDrivers","mode":"Enable"},{"feature":"ManifestWorkReplicaSet","mode":"Enable"}]}}}'Using the following command to disable the ManifestWorkReplicaSet controller:
oc patch clustermanager cluster-manager --type=merge -p='{"spec":{"workConfiguration":{"featureGates":[{"feature":"CloudEventsDrivers","mode":"Disable"},{"feature":"ManifestWorkReplicaSet","mode":"Disable"}]}}}'Using the following example to deploy a busybox in the namespace mwrs-test on your managed clusters
- Prepare the Placement for ManifestWorkReplicaSet in the hub
defaultnamespace
oc apply -f contrib/examples/placement- Apply the ManifestWorkReplicaSet CR example in the hub
defaultnamespace
oc apply -f contrib/examples/manifestworkreplicaset.yaml- Check the status of the ManifestWorkReplicaSet
oc -n default get manifestworkreplicasets busybox
NAME PLACEMENT FOUND MANIFESTWORKS APPLIED
busybox AsExpected True AsExpected TrueUsing oc delete -f contrib/examples/manifestworkreplicaset.yaml to delete the ManifestWorkReplicaSet