Closed gs0510 closed 2 years ago
@gs0510 Just writing some thoughts here from yesterday's work.
I think we don't have enough tests and stability, yet, to be comfortable deploying to production automatically on every merge. We could get there, but it would need some work.
We could instead have automatic deployments from main
to the packet/test machine, and have a script which one of the developers runs, when we are happy with what we see on the test
machine. So, ocurrent-deployer
could track two branches - main
and live
. Everything on main
gets deployed to the test
machine, and live
gets deployed to production
(autumn
). The script run by developers just updates live
to the current main
when we wish to upgrade the production deployment.
It would be nice if this workflow had a rollback mechanism too - we could start by keeping track of the exact commits that got deployed to production from the script, but the tricky part would be rolling back the database migrations. All our migrations come with reverse migrations, and potentially there should be a way to do this, but needs some thought.
Ah I think I didn't mention this, but this is for deployment on the packet machine, not automatic deployments of cb yet! (It'd be nice to get to that, but we have to many moving parts).
I think something to think of also would be (in case we do deployment of production) is that we need to move from docker-compose to docker-stack.
Ah I think I didn't mention this, but this is for deployment on the packet machine, not automatic deployments of cb yet! (It'd be nice to get to that, but we have to many moving parts).
Yes, I understood that we want to deploy to the "packet" machine. But, I think I don't understand what the purpose of the "packet" machine is. I assumed that the eventual goal was to have a staging environment that we can replicate for production deployments?
Add script for stack deploy
TODO: [ ] Make relative paths also work with docker-compose deploy