faaso/docs/deployments.md

46 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2024-07-03 13:19:58 +00:00
# Braindump on deployments
Problem: We have a funko, we want it deployed.
## Variant 1: Local deployment
Solution: Just start the funko's container locally. Done. It's mostly implemented.
## Variant 2: Deploy to the server
If the server doesn't have the image, we have "server build", so assume the image
is there.
Solution: start the funko on the server. Done. It's implemented.
## Variant 3: Deploy to the server and it's already running
2024-07-09 01:02:47 +00:00
1. If it's already running and it's running the latest image, then nothing
to be done.
2. It it's running and is not the latest, we can stop it and start with the
latest image.
2024-07-03 13:19:58 +00:00
* Action 2 causes downtime. Usually it will not be significant, but it's there.
* In the future it may be important to have zero downtime.
* We need to figure out what is implied by doing "zero downtime" to see if
not doing it now would make it impossible.
2024-07-09 01:02:47 +00:00
For zero downtime, we want to have two instances running, switch the proxy
to the new one, then stop the old one.
2024-07-03 13:19:58 +00:00
Currently it's impossible to run two instances because the container name is
faaso-funkoname, and we can't have 2 of those.
2024-07-09 01:02:47 +00:00
So: we could instead have faaso-funkoname-1, faaso-funkoname-2, etc.
with some sort of suffix
2024-07-03 13:19:58 +00:00
Changes implied in the faaso code:
2024-07-09 01:02:47 +00:00
* If we have two containers for one funko, we need to consider the "state" of
2024-07-03 13:19:58 +00:00
the funko differently.
* What does it mean to start/pause/stop a funko with two instances
* Do we want to enable two-instance funkos? With round-robin proxy?
* What happens if we have two instances with different images?
Answers coming up.