Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/slt 134 postupgrade split #17

Merged
merged 2 commits into from
Oct 11, 2018

Conversation

Jancis
Copy link
Member

@Jancis Jancis commented Sep 18, 2018

Story:
https://wunder.atlassian.net/browse/SLT-134

Description:
splits post-install resource into two - one that gets triggered after new helm deployment install and another that is run after deployment update.

  • Install checks for config files in sync folder. If they exist, installs site with a config_installer profile and imports said configuration. imports database dump from (shared) mounted location /var/backups/db. Shared NFS location must be deployed beforehand.
  • Update imports config files, updates entitity configs and runs database updates.

Shared persistent volume resource for project

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ .Release.Namespace }}-dbdump
  namespace: {{ .Release.Namespace }}
spec:
  storageClassName: nfs
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

@Jancis
Copy link
Member Author

Jancis commented Sep 18, 2018

@floretan where should I put the shared storage resource? Maybe I should take another approach to the shared dbdump storage? (see PR description above). I made a simple chart with just this resource and deployed it manually to cluster, but maybe there's some better way to check/create/update kubernetes resources when deployment is run.

@Jancis Jancis force-pushed the feature/SLT-134-postupgrade-split branch from 0c2c7ae to 3175af5 Compare September 19, 2018 07:29
@floretan
Copy link
Contributor

@Jancis I think we will need some kind of project-level chart, and as you pointed out it could consist of only a single volume. This chart could be provisioned from CircleCI, but limited to the master branch.

Since the volume doesn't need to be mounted multiple times, we should be able to use the "standard" volume provider. One possible alternative would be to use Cloud Storage (Google's S3) via a service broker. This type of block storage is perfect for storing backups, and it should be cheaper as well.

@Jancis
Copy link
Member Author

Jancis commented Sep 25, 2018

@floretan there is stll a (very) slim chance it would be mounted simultaneously on two containers - the regular backup+sanitization from "production" branch and postinstall import when a new branch is deployed (share is mounted, sql dump is imported).

@Jancis
Copy link
Member Author

Jancis commented Sep 28, 2018

I need to add private storage to container.

@Jancis
Copy link
Member Author

Jancis commented Oct 4, 2018

Next steps: moving commands into values.yaml file so the db import can be assessed later, when the storage is solved.

@Jancis Jancis force-pushed the feature/SLT-134-postupgrade-split branch from 390cd8c to 59f26e9 Compare October 9, 2018 18:50
@Jancis
Copy link
Member Author

Jancis commented Oct 9, 2018

Branch force-pushed with a clean branch because it has pretty deviated from master.

@floretan
Copy link
Contributor

@Jancis this looks good. I would move the configuration under drupal in the values.yaml file. It could be that in the future we also get cron jobs for other systems.

@floretan floretan merged commit 88234d0 into master Oct 11, 2018
@floretan floretan deleted the feature/SLT-134-postupgrade-split branch October 11, 2018 06:53
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.

2 participants