Skip to content

Commit

Permalink
feat(h5p-mongos3): new mongo-s3 library storage class (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
sr258 committed Feb 22, 2021
1 parent b870492 commit 9fc3da7
Show file tree
Hide file tree
Showing 37 changed files with 25,636 additions and 123 deletions.
22 changes: 16 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ jobs:
steps:
- checkout
- restore_cache:
key: modules-cache-{{ checksum "package-lock.json" }}
key: root-modules-cache-{{ checksum "package-lock.json" }}
- restore_cache:
key: h5p-examples-modules-cache-{{ checksum "packages/h5p-examples/package-lock.json" }}
- restore_cache:
key: h5p-express-modules-cache-{{ checksum "packages/h5p-express/package-lock.json" }}
- restore_cache:
key: h5p-html-exporter-modules-cache-{{ checksum "packages/h5p-html-exporter/package-lock.json" }}
- restore_cache:
key: h5p-mongos3-modules-cache-{{ checksum "packages/h5p-mongos3/package-lock.json" }}
- restore_cache:
key: h5p-server-modules-cache-{{ checksum "packages/h5p-server/package-lock.json" }}
- restore_cache:
key: h5p-core-cache-{{ checksum "scripts/install.sh" }}
- run: npm install
Expand Down Expand Up @@ -51,7 +61,7 @@ jobs:
- save_cache:
key: h5p-core-cache-{{ checksum "scripts/install.sh" }}
paths:
- ./h5p
- ./packages/h5p-examples/h5p
- save_cache:
key: h5p-examples-cache-{{ checksum "test/data/content-type-cache/real-content-types.json" }}
paths:
Expand Down Expand Up @@ -202,12 +212,12 @@ workflows:
- integration-tests:
requires:
- install-build
- db-tests:
requires:
- install-build
- html-exporter-tests:
requires:
- install-build
# - db-tests:
# requires:
# - install-build
- release:
filters:
branches:
Expand All @@ -220,4 +230,4 @@ workflows:
- html-exporter-tests
# - e2e-tests
- integration-tests
# - db-tests
- db-tests
23 changes: 9 additions & 14 deletions docs/advanced/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,13 @@ docker-compose down -v
## How it works

The `docker-compose.yml` file configures a setup in which there are several
services that make @lumieducation/h5p-serv work in cluster mode:

* Minio (provides S3 storage backend for content and temporary files)
* MongoDB (provides database backend for content metadata)
* Redis (provides a key-value cache; used for caching the content type cache
and caching library metadata)
* a named Docker volume (added as a volume to all h5p containers to keep
library data consistent across instances)
* NGINX (load balancer that distributes incoming request between the H5P
services that make @lumieducation/h5p-server work in cluster mode:

- Minio (provides S3 storage backend for content, temporary and library files)
- MongoDB (provides database backend for content and library metadata)
- Redis (provides a key-value cache; used for caching the content type cache and
caching library metadata)
- a named Docker volume (added as a volume to all h5p containers to keep library
data consistent across instances)
- NGINX (load balancer that distributes incoming request between the H5P
containers)

If you want to build on this configuration to scale your application across
several machines, bear in mind that you must make sure that the library folder
is read **and** write accessible (multi-node RW) by all H5P containers. You
could use a NFS share for this or a persistent volume claim in Kubernetes.
Loading

0 comments on commit 9fc3da7

Please sign in to comment.