Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPE-5764] Add basic functionality (#3)
This PR adds basic functionality to the etcd operator charm. It installs the snap, creates the configuration for the initial cluster consisting of the deployed units and starts the cluster. Additions: - basic source code structure in accordance with data-platform best practice - basic config manager - basic implementation of peer-relation app/unit data handling - basic state implementation for etcd-unit/server and etcd-cluster - basic event handling for charm- and peer-relation-events such as `on_install`, `on_start`, `on_peer_cluster_relation_created` - basic unit test coverage When deploying an etcd-cluster of n units, the charm sets up these units and their config, creates the initial etcd-cluster and brings the units into `active` status: ``` $ juju deploy ./charmed-etcd-operator_ubuntu-22.04-amd64.charm etcd -n 3 $ juju status Model Controller Cloud/Region Version SLA Timestamp etcd dev-controller localhost/localhost 3.5.4 unsupported 15:24:28Z App Version Status Scale Charm Channel Rev Exposed Message etcd active 3 charmed-etcd-operator 20 no Unit Workload Agent Machine Public address Ports Message etcd/27 active idle 33 10.54.237.57 etcd/28 active idle 34 10.54.237.109 etcd/29* active idle 35 10.54.237.30 $ juju ssh etcd/27 # etcd.etcdctl endpoint health --endpoints=10.54.237.57:2379 10.54.237.57:2379 is healthy: successfully committed proposal: took = 2.017893ms # etcd.etcdctl member list --endpoints=10.54.237.57:2379 7656a31b37f8b407, started, etcd29, http://10.54.237.30:2380, http://10.54.237.30:2379, false b8a5a96e3126f130, started, etcd28, http://10.54.237.109:2380, http://10.54.237.109:2379, false f7c51b64202cc9ca, started, etcd27, http://10.54.237.57:2380, http://10.54.237.57:2379, false ``` **Note:** The charm is currently still deploying the legacy-snap `etcd`.
- Loading branch information