EDITD / kubetools

:nut_and_bolt: Kubetools is a tool and processes for developing and deploying microservices to Kubernetes.
MIT License
13 stars 2 forks source link

use docker compose v2 #163

Open fmcwalters-edited opened 7 months ago

fmcwalters-edited commented 7 months ago

docker compose v2 is part of Docker nowadays. Rather than calling a separate Python lib that calls docker-compose, call docker compose and use v2. Fix the - and _ difference between v1 and v2. This will need THOROUGH testing

PFM-827

Purpose of PR

Upgrade to use Docker Compose V2

Parts of the app this will impact

docker compose

Todos

Test on Linux machines, different CI builds with different packages

Additional information

This will require Docker with Compose v2

Related links

fmcwalters-edited commented 7 months ago

I doubt this is going to work as-is. It would be very lucky that all of the features of docker-compose that kubetools uses are fully backwards-compatible in docker compose.

This is why it's only in draft, it still needs a thorough test across all dev machine OSes, architectures and with as many packages/services as possible.

fmcwalters-edited commented 7 months ago

I'm also seeing

WARN[0000] network default: network.external.name is deprecated. Please set network.name with external: true 

from running ktd destroy - whilst this does not break anything yet, I feel like at this stage it is worth fixing.

fmcwalters-edited commented 7 months ago

force push because the previous code was weird - it was just to deal with the cases where there was more than one middle name

fmcwalters-edited commented 7 months ago

we can test this locally using something like echo -n "cython <3" > /tmp/constraint.txt && PIP_CONSTRAINT=/tmp/constraint.txt pip install -e ~/apps/kubetools to build and install from this branch. Then ensure you're using v14.0.0 when you run ktd.

fmcwalters-edited commented 6 months ago

I have put this up for a dev release - it has been tested to work (with caveats - see README) on Mac Intel i5 and Mac M3. However - we need to test this on Linux systems and in particular on build servers.

fmcwalters-edited commented 6 months ago

force push only to clean up some mistakes I made with linting and syntax 🤦‍♂️