Multiple Engines
The other examples show installation of one sub-domain containing two engines and performing an upgrade with custom engine configuration. In those examples, the engine configuration change is at the subdomain-level which results in both engines in the sub-domain being upgraded.
If you need to upgrade more than one engine, the subdomain-operator ensures that only one engine is upgraded at a time. It triggers the standby engine to be upgraded first, and waits until the engine-operator has finished upgrading that engine before triggering the next engine to be upgraded.
By default, the subdomain-operator upgrades all required engines sequentially with no additional input. Sometimes, such as when performing a version upgrade, you may want to have more control over when the second engine is upgraded. For example, performing additional checks on the first engine after it has been restarted requires some additional steps.
Installation
The following is the distribution of Topology Operator components in this example:
- The masters and agents in cluster 1 namespace
matrixx-operators
. - Agents in cluster 2 namespace
matrixx-operators
. - Engine s1e1 in cluster 1 namespace
matrixx-engine-s1
. - Engine s1e2 in cluster 2 namespace
matrixx-engine-s1
.
Create the namespaces and install with the following commands:
kubectl --context context1 create ns matrixx-operators
kubectl --context context2 create ns matrixx-operators
kubectl --context context1 create ns matrixx-engine-s1
kubectl --context context2 create ns matrixx-engine-s1
helm --kube-context context1 install mtx-engine-s1 matrixx/matrixx -n matrixx-engine-s1 -f base.yaml -f topology-matrixx_version.yaml -f cluster1.yaml --version version
helm --kube-context context2 install mtx-engine-s1 matrixx/matrixx -n matrixx-engine-s1 -f base.yaml -f topology-matrixx_version.yaml -f cluster2.yaml --version version
helm --kube-context context2 install mtx-operators matrixx/matrixx -n matrixx-operators -f base.yaml -f topology-matrixx_version.yaml -f cluster2.yaml --version version
helm --kube-context context1 install mtx-operators matrixx/matrixx -n matrixx-operators -f base.yaml -f topology-matrixx_version.yaml -f cluster1.yaml --version version
Where topology-matrixx_version.yaml has the following contents:
engine:
enabled: true
global:
configurationSources:
pricing-config:
docker:
image: example-pricing-sideloader:matrixx_version
topology:
operators:
master:
context: context1
namespace: matrixx-operators
agents:
- context: context1
namespace: matrixx-operators
externalAddress: topology-agent-1 external address
- context: context2
namespace: matrixx-operators
externalAddress: topology-agent-2 external address
domains:
- subdomains:
- pricing:
configurationSource:
refName: pricing-config
fileName: mtx_pricing_matrixxOne.xml
engines:
- context: context1
namespace: matrixx-engine-s1
processing:
externalAddress: proc-cls-s1e1 external address
publishing:
externalAddress: publ-cls-s1e1 external address
- context: context2
namespace: matrixx-engine-s1
processing:
externalAddress: proc-cls-s1e2 external address
publishing:
externalAddress: publ-cls-s1e2 external address
pricing-controller:
enabled: true
Upgrade Configuration
When upgrading, topology-upgrade_version.yaml
file has the following contents:
engine:
enabled: true
global:
configurationSources:
pricing-config:
docker:
image: example-pricing-sideloader:upgrade_version
topology:
operators:
master:
context: context1
namespace: matrixx-operators
agents:
- context: context1
namespace: matrixx-operators
externalAddress: topology-agent-1 external address
- context: context2
namespace: matrixx-operators
externalAddress: topology-agent-2 external address
domains:
- subdomains:
- pricing:
configurationSource:
refName: pricing-config
fileName: mtx_pricing_matrixxOne.xml
engines:
- context: context1
namespace: matrixx-engine-s1
processing:
externalAddress: proc-cls-s1e1 external address
publishing:
externalAddress: publ-cls-s1e1 external address
- context: context2
namespace: matrixx-engine-s1
processing:
externalAddress: proc-cls-s1e2 external address
publishing:
externalAddress: publ-cls-s1e2 external address
pricing-controller:
enabled: true