From c20865bdfd23729ff5346b329fa7b20a42f582f7 Mon Sep 17 00:00:00 2001 From: Uwe Winter Date: Fri, 27 Oct 2023 09:25:37 +1100 Subject: [PATCH 1/2] added documentation to raise vm.max_map_count --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6eb475ed..5a63cef1 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,9 @@ NOTE: Gen3 helm charts are currently not used in production by CTDS, but we are For local development you must be connected to a kubernetes cluster. As referenced above in the section `Kubernetes cluster` we recommend using [Rancher Desktop](https://rancherdesktop.io/) as Kubernetes on your local machine, especially on M1 Mac's. You also get ingress and other benefits out of the box. +> **Warning** +> If you are using Rancher Desktop you need to increase the vm.max_map_count as outlined [here](https://docs.rancherdesktop.io/how-to-guides/increasing-open-file-limit/) + 1. Clone the repository 2. Navigate to the `gen3-helm/helm/gen3` directory and run `helm dependency update` 3. Navigate to the back to the `gen3-helm` directory and create your values.yaml file. See the `TL;DR` section for a minimal example. From eb96031db01416b643086a8a240f6ebed2b1559a Mon Sep 17 00:00:00 2001 From: Guerdon Mukama Date: Fri, 27 Oct 2023 16:13:13 +1100 Subject: [PATCH 2/2] Updated pre-built portal documenation --- docs/portal/prebuild-portal.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/portal/prebuild-portal.md b/docs/portal/prebuild-portal.md index b352c945..f6e71727 100644 --- a/docs/portal/prebuild-portal.md +++ b/docs/portal/prebuild-portal.md @@ -15,7 +15,7 @@ This documentation will provide instructions on how to set up a static Gen3 Port Setup the configuration locally on your machine. -The dockerfile expects your portal configuration under the configurations folder. See exapmle for `dev.planx-pla.net` +The dockerfile expects your portal configuration under the configurations folder. See example for `dev.planx-pla.net` ``` configurations @@ -36,7 +36,10 @@ https:///api/v0/submission/_dictionary/_all **Hint:** both of these are served via sheepdog service -Use the provided Dockerfile as a template for building your container. +Use the provided Dockerfile as a template for building your container. Update: +``` +ARG PORTAL_HOSTNAME= +``` Build your container using the following command inside the same folder as the Dockerfile: @@ -44,6 +47,10 @@ Build your container using the following command inside the same folder as the D docker build -t : . ``` +If you are using localhost, you will need to add the `--network="host"` option in the above command, e.g: +``` +docker build -t : . --network="host" +``` Push the container to your repository using the command: ``` @@ -54,6 +61,26 @@ Update the image and tag in the Gen3 Portal configuration to use the new contain Note: Make sure to replace the with the actual name you want to give to your image. +Update or create the `values.yaml`, for example: +``` +global: + dev: true + hostname: localhost + +portal: + image: + repository: + tag: + resources: + requests: + cpu: 0.2 + memory: 500Mi +``` + +Update helm charts +``` +helm upgrade --install dev gen3/gen3 -f values.yaml +``` # Conclusion: Using a static Gen3 Data Portal can significantly improve the performance of the Gen3 Portal by pre-running the WebPack build and creating static files, which are then served using nginx.