Skip to content

Conversation

@glaubinix
Copy link
Member

This is still missing a generic Redis import solution

@glaubinix glaubinix self-assigned this Jun 7, 2024
@glaubinix glaubinix requested review from naderman and pscheit June 7, 2024 10:22
Comment on lines 101 to 104
kubectl scale statefulset postgres --replicas 0 -n default
kubectl delete pvc postgres-data-postgres-0 -n default
kubectl scale statefulset postgres --replicas 1 -n default
cat packagist_db.sql | kubectl exec -it -n default statefulsets/postgres -- psql -U postgres -d packagist_db
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty tricky to review this now. Cause based on the conversation we had yesterday, we need to explain a lot about kubectl and/or how to verify that the commands worked?
Doesnt this need a bit time to scale up and down? in practice?

@pscheit
Copy link
Contributor

pscheit commented Jun 7, 2024

So for the generic redis import, I would suggest following:

a) lets see how many will use their external redis?
b) if so do they know how to copy files to the pvc of redis?
c) if they don't then would really create pod with the same volume claim. start a container that mounts the pvc, copy the files. Remove the pod + container.
https://medium.com/@smathew.35/copying-data-between-persistent-volumes-in-kubernetes-a-simple-guide-acc8f79c2d40

maybe this doesnt need to go fully into the guide, just a note to contact us, when they need that?

@glaubinix glaubinix marked this pull request as ready for review June 7, 2024 15:44
## Backing up the data

Private Packagist Self-Hosted uses three different storages. A PostgreSQL database used as primary storage,
a Redis database used as secondary storage, cache, and job queue, and a file/blob storage for uploaded artifacts and dist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secondary storage? That suggests like it's only used as a cache?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so? Secondary storage doesn't mean cache?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Secondary to me suggests it stands behind the first. I don't really know what that means at all, backups? Would prefer that term would be replaced with something more concrete.

glaubinix and others added 2 commits July 3, 2024 14:03
Co-authored-by: Nils Adermann <n.adermann@packagist.com>
@glaubinix glaubinix requested review from naderman and pscheit July 3, 2024 14:31
glaubinix and others added 2 commits July 5, 2024 10:25
Co-authored-by: Philipp Scheit <p.scheit@packagist.com>
Co-authored-by: Nils Adermann <n.adermann@packagist.com>
@glaubinix glaubinix requested review from naderman and pscheit July 5, 2024 10:07
@pscheit pscheit merged commit e67e043 into main Jul 10, 2024
@pscheit pscheit deleted the kubernetes-migration-guide branch July 10, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants