ITISFoundation / osparc-ops-environments

osparc operations
MIT License
3 stars 6 forks source link

Ensure docker swarm cluster state from config #709

Closed YuryHrytsuk closed 1 month ago

YuryHrytsuk commented 4 months ago

Current behavior

We do not verify docker swarm configuration explicitly (exception: docker networks). So, we end up in situation when the dalco 04 node is commented out in inventory.ini but is actually an active node of a running Dalco docker swarm cluster.

Desired behavior

We verify docker swarm cluster configuration and check that it is in-sync with code (e.g. docker node labels, active nodes)

### Tasks
- [ ] https://github.com/ITISFoundation/osparc-ops-environments/issues/774
- [x] ~~Ensure Docker Stack state~~ WONT DO
- [x] ~~Ensure Docker Service state~~ WONT DO
- [x] Ensure Network
- [x] ~~Ensure Volumes~~ implicitly tested by having up and running services WONT DO
- [x] ~~Ensure Configs~~ implicitly tested by having up and running services WONT DO
YuryHrytsuk commented 2 months ago

Possible solution: use docker ansible roles

https://docs.ansible.com/ansible/latest/collections/community/docker/index.html

Check mode support:

After looking at docker ansible playbook, I concluded that it is not worth trying to try to start using them

YuryHrytsuk commented 2 months ago

Ideal solution

The same process deploying changes is used for monitoring stata (e.g. terraform plan and terraform apply)

--

Based on research I did, there is no easy-to-implement and out-of-the-box solution

YuryHrytsuk commented 1 month ago

The only left items are test docker stack and test docker service which is now done implicitly by testing that our services are accessible by URL and that the platform is up and running. This is why these 2 are WONT DO for time being