Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPE-2564] - Large deployments relations (#190)
## Issue This PR addresses [DPE-2564](https://warthogs.atlassian.net/browse/DPE-2564), namely, this PR addresses: - Implementation of Peer Cluster Relations - Orchestrators: - implementation of the `main` orchestrator logic - implementation of the `failover` orchestrator logic - implementation of the demotion / promotion of either - validation of relations - Management of `Main / Failover`-orchestrators vs regular clusters - propagation of errors from orchestrators to related clusters - various changes to make it work with the charm - changed the previous terminology from `main/failover-cluster-manager` to `main/failover-orchestrator` - fixes unit tests ## Implemented UX: ``` juju deploy tls-certificates-operator --channel stable --show-log --verbose juju config tls-certificates-operator generate-self-signed-certificates=true ca-common-name="CN_CA" # deploy main-orchestrator cluster juju deploy -n 3 ./opensearch.charm \ main \ --config cluster_name="log-app" --config init_hold=false --config roles="cluster_manager" # deploy failover-orchestrator cluster juju deploy -n 2 ./opensearch.charm \ failover \ --config cluster_name="log-app" --config init_hold=true --config roles="cluster_manager" # deploy data-hot cluster juju deploy -n 2 ./opensearch.charm \ data-hot \ --config cluster_name="log-app" --config init_hold=true --config roles="data.hot" # integrate TLS juju integrate tls-certificates-operator main juju integrate tls-certificates-operator failover juju integrate tls-certificates-operator data-hot # integrate the "main"-orchestrator with all clusters: juju integrate main:peer-cluster-orchestrator failover:peer-cluster juju integrate main:peer-cluster-orchestrator data-hot:peer-cluster # integrate the "failover"-orchestrator with rest of clusters: juju integrate failover:peer-cluster-orchestrator data-hot:peer-cluster # trigger the promotion of the "failover" to "main" orchestrator juju remove-relation main:peer-cluster-orchestrator failover:peer-cluster juju remove-relation main:peer-cluster-orchestrator data-hot:peer-cluster # have the "old" main orchestrator rejoins the relation and becomes a "failover" juju integrate failover:peer-cluster-orchestrator main:peer-cluster juju integrate main:peer-cluster-orchestrator data-hot:peer-cluster ``` ### Next steps: - Integ. tests + unit tests in other PR - Use secrets to pass credentials between the main orchestrator and the rest of the clusters - Externalize error messages in `constants-charm.py` - delay the initialization of the security index until the first data node joins the cluster [DPE-2564]: https://warthogs.atlassian.net/browse/DPE-2564?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information