Hello, quick question regarding `recording deploym...
# general
t
Hello, quick question regarding
recording deployments and releases
on the provider side. When we deploy the provider to an environment (e.g.
staging
), it is deployed to multiple
staging
k8s clusters. Should something like
application instances
be considered for deployment of the provider app into each cluster when recording deployment in the pact broker? We were looking at doing the
record-deployment/release
command on provider side as a helm post-install job, but then the command I guess would be run for deployment to every cluster, but I imagine we maybe only need the command called once for the deployment to
staging
environment, rather than for each
staging
cluster ? Would really appreciate any tips on correct approach here. We were looking at this helm post-install hook approach as this better ensures that deployment (to a cluster etc) was actually successful before we run the
record-deployment
command
t
As I understand it, application instances is more appropriate for things like mobile app releases, where a new deployment doesn’t mean an undeployment of the previous release
It’s hard to know without more information about your setup, but you could consider each staging cluster as its own environment, or you might want to consider deploying to all of them as one deployment (if deployments to individual clusters never happen)
if you have staging-consumer-1 and staging-consumer-2, but they both can connect to staging-provider, then application instances is probably the best approach. But this design sounds like you’d have a bad time with deployment confidence, whether or not you use pact.
m
Is each k8s cluster serving a different logical environment, or are they all logically the same environment but topologically different (e.g. to support HA)?
If the latter, then
record-deployment
to
staging
is probably all you need. If they are separate environments, you should call
record-deployment
to each logically different environment
t
Thanks, they are logically the same environment, just different regions etc in case one goes down
👍 2
t
Can you treat deploying to all clusters as one atomic deploy?
☝️ 1
m
That's what I'd do. If they happen relatively quickly I wouldn't be concerned. If the roll out takes enough time that you could reasonably be worried another deployment attempt could happen during the rollout, then you could record releases to each cluster and then unrecord the previous version release after cutover to each cluster is complete.
t
thanks both, they happen pretty much at the same time and relatively quickly too, i'll look into treating it as one atomic deploy as that also matches our understanding of "environments" on consumer side too 👍
🙌 1
m
👍
OK looked at the logs - definitely a bug (or at least, currently unsupported). See https://github.com/pact-foundation/pact-reference/issues/220 If you can avoid a context path for now that would work around it, otherwise you’ll have to wait for a fix here until it’s supported
t
did u mean to send this to a different thread?
m
I absolutely did, very sorry! Not sure…how I did this 🤷‍♂️
t
no worries 😄
😆 1