|  | 
|  | 1 | +--- | 
|  | 2 | +description: >- | 
|  | 3 | +  The instructions here pertain to the deployment of PBMS 3.0 and associated | 
|  | 4 | +  components on the Kubernetes cluster using OpenG2P PBMS Helm chart.  All the | 
|  | 5 | +  components are installed in the same namespace. | 
|  | 6 | +--- | 
|  | 7 | + | 
|  | 8 | +# PBMS 3.0 | 
|  | 9 | + | 
|  | 10 | +## Prerequisites | 
|  | 11 | + | 
|  | 12 | +Before you deploy, make sure the following are in place: | 
|  | 13 | + | 
|  | 14 | +* [ ] Kubernetes cluster is up and running | 
|  | 15 | +* [ ] Nginx server is configured (skip this for OpenG2P-in-a-box) | 
|  | 16 | +* [ ] Namespace is created (via Rancher under a Project) | 
|  | 17 | +* [ ] Project Owner access on the OpenG2P namespace | 
|  | 18 | +* [ ] Istio gateway is set up in the namespace | 
|  | 19 | + | 
|  | 20 | +## Installation using Rancher UI | 
|  | 21 | + | 
|  | 22 | +1. **Log in** to the **Rancher Admin Console** and select your **target cluster**. | 
|  | 23 | +2.  Navigate to **Apps → Repositories** and click **Create** to add a new repository: | 
|  | 24 | + | 
|  | 25 | +    * **Name:** `openg2p` | 
|  | 26 | +    * **Target HTTPS Index URL:** `https://openg2p.github.io/openg2p-helm/rancher` | 
|  | 27 | +    * Click **Create** | 
|  | 28 | + | 
|  | 29 | +    <figure><img src="../../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure> | 
|  | 30 | +3. On the top-right, select the **namespace** where you want to install PBMS. | 
|  | 31 | +4.  To view prerelease charts (if required), click your **user avatar → Preferences → Include Prerelease Versions**. | 
|  | 32 | + | 
|  | 33 | +    <figure><img src="../../.gitbook/assets/image (81).png" alt=""><figcaption></figcaption></figure> | 
|  | 34 | +5.  Navigate to **Apps → Charts** and locate the chart: | 
|  | 35 | + | 
|  | 36 | +    * **Name:** _OpenG2P PBMS (3.0.0)_ | 
|  | 37 | +    * **Description:** Installs PBMS Odoo + Postgres, Background Tasks, and Minio | 
|  | 38 | + | 
|  | 39 | +    <figure><img src="../../.gitbook/assets/image (80).png" alt=""><figcaption></figcaption></figure> | 
|  | 40 | +6. Click the chart, choose **version 3.0.0**, and click **Install**. | 
|  | 41 | +7. On the next screen: | 
|  | 42 | +   * **Installation Name:** `openg2p-pbms` (or any preferred name) | 
|  | 43 | +   * Enable **Customise Helmbox before installation** → click **Next** | 
|  | 44 | +8. In the **General Settings** section, configure the following: | 
|  | 45 | +   * **Hostname:** Set the PBMS URL (e.g., `pbms.dev.openg2p.org`) | 
|  | 46 | +   * **PostgreSQL Host:** Provide the hostname of the PostgreSQL instance (or use the internal one if enabled) | 
|  | 47 | +   * **Keycloak Base URL:** Enter your Keycloak URL (e.g., `https://keycloak.openg2p.sandbox.net`) | 
|  | 48 | +   * **Email Service Name:** Provide the email service name used in PBMS | 
|  | 49 | +   * **OIDC Client ID:** Provide the OIDC client ID for PBMS (Odoo) | 
|  | 50 | +   * **OIDC Client Secret:** Provide the OIDC client secret for PBMS (Odoo) | 
|  | 51 | +9. In the **Registry Settings** section: | 
|  | 52 | +   * **Registry DB:** Provide the PostgreSQL database name for Registry | 
|  | 53 | +   * **Registry DB User:** Enter the DB username | 
|  | 54 | +   * **Registry DB Secret:** Specify the Kubernetes secret name containing the DB password | 
|  | 55 | +   * **Registry DB Secret Key:** Enter the key name within the secret containing the user password | 
|  | 56 | +10. In the **Background Task Settings** section (only visible if enabled): | 
|  | 57 | +    * **Celery Beat Producer Frequency:** Set frequency in seconds (e.g., `60`) | 
|  | 58 | +    * **Celery Beat Producer Batch Size:** Set the number of tasks per batch | 
|  | 59 | +    * **Celery Beat Producer Number of Tasks to Process:** Set total tasks per run | 
|  | 60 | +    * **Celery Workers G2P Bridge Base URL:** Provide the Bridge API URL used by Celery Workers | 
|  | 61 | +    * **Celery Workers Batch Size:** Set worker batch size | 
|  | 62 | +11. Configure **Minio Settings** (if applicable): | 
|  | 63 | +    * **Hostname:** e.g., `minio-pbms.dev.openg2p.org` | 
|  | 64 | +    * Enable **Install Minio** and **Enable Minio Persistence** | 
|  | 65 | +12. Click **Next** → go to **Helm Options**. | 
|  | 66 | +    * **Disable the Wait flag** | 
|  | 67 | +13. Click **Install**. | 
|  | 68 | +14. Monitor pods in your namespace until they reach the **Running** state. | 
|  | 69 | + | 
|  | 70 | +    <div align="left"><figure><img src="../../.gitbook/assets/image (5).png" alt=""><figcaption></figcaption></figure></div> | 
|  | 71 | + | 
|  | 72 | +## Installation using CLI | 
|  | 73 | + | 
|  | 74 | +1.  Clone the [OpenG2P PBMS Deployment Repository](pbms-helm-charts.md) | 
|  | 75 | + | 
|  | 76 | +    ``` | 
|  | 77 | +    git clone https://github.com/OpenG2P/openg2p-pbms-gen2-deployment.git | 
|  | 78 | +    cd openg2p-pbms-gen2-deployment/charts | 
|  | 79 | +    ``` | 
|  | 80 | +
 | 
|  | 81 | +
 | 
|  | 82 | +2.  Update Helm Dependencies | 
|  | 83 | +
 | 
|  | 84 | +    ``` | 
|  | 85 | +    helm dependency update openg2p-pbms | 
|  | 86 | +    ``` | 
|  | 87 | +
 | 
|  | 88 | +
 | 
|  | 89 | +3.  Review and update `values.yaml` as needed: | 
|  | 90 | +
 | 
|  | 91 | +    * `global.hostname`: Public hostname for PBMS (e.g., `pbms.dev.openg2p.org`) | 
|  | 92 | +    * `global.keycloakBaseUrl`: Base URL for Keycloak authentication | 
|  | 93 | +    * `global.postgresqlHost`: PostgreSQL host (e.g., `openg2p-commons-postgresql`) | 
|  | 94 | +    * `global.registryDB*` and `global.pbmsDB*`: Registry and PBMS database credentials | 
|  | 95 | +    * `global.minioInstallationName`: Minio instance for file storage | 
|  | 96 | +    * `odoo.image.tag`: PBMS version or custom image tag | 
|  | 97 | +    * `openg2p-pbms-bg-task-celery-*`: Celery environment variables (frequency, batch size, etc.) | 
|  | 98 | +    * `istio.virtualservice.host`: Hostname when Istio is enabled | 
|  | 99 | +
 | 
|  | 100 | +    {% hint style="info" %} | 
|  | 101 | +    You can override values inline using `--set` or pass a custom file with `-f`. | 
|  | 102 | +    {% endhint %} | 
|  | 103 | +
 | 
|  | 104 | +
 | 
|  | 105 | +4.  Install the Helm chart | 
|  | 106 | +
 | 
|  | 107 | +    ``` | 
|  | 108 | +    helm install <release-name> openg2p-pbms \ | 
|  | 109 | +      -f ./values.yaml \ | 
|  | 110 | +      -n <namespace> | 
|  | 111 | +    ``` | 
|  | 112 | +
 | 
|  | 113 | +    Replace `<release-name>` with a unique name (e.g., `pbms-dev`) and `<namespace>` with the target Kubernetes namespace. | 
|  | 114 | +5.  Verify deployment | 
|  | 115 | +
 | 
|  | 116 | +    ``` | 
|  | 117 | +    helm status <release-name> -n <namespace> | 
|  | 118 | +    kubectl get pods,svc -n <namespace> | 
|  | 119 | +    ``` | 
|  | 120 | +
 | 
|  | 121 | +
 | 
|  | 122 | +6.  Upgrade the deployment when changing configuration | 
|  | 123 | +
 | 
|  | 124 | +    ``` | 
|  | 125 | +    helm upgrade <release-name> openg2p-pbms \ | 
|  | 126 | +      -f ./values.yaml \ | 
|  | 127 | +      -n <namespace> | 
|  | 128 | +    ``` | 
|  | 129 | +
 | 
|  | 130 | +    \ | 
|  | 131 | +    You can view current values using: | 
|  | 132 | +
 | 
|  | 133 | +    ``` | 
|  | 134 | +    helm get values <release-name> -n <namespace> | 
|  | 135 | +    ``` | 
|  | 136 | +
 | 
|  | 137 | +{% hint style="info" %} | 
|  | 138 | +To uninstall PBMS from command line: | 
|  | 139 | +
 | 
|  | 140 | +``` | 
|  | 141 | +helm uninstall <release-name> -n <namespace> | 
|  | 142 | +``` | 
|  | 143 | +{% endhint %} | 
|  | 144 | +
 | 
|  | 145 | +## Post-Installation Configuration | 
|  | 146 | +
 | 
|  | 147 | +1.  Get the Odoo service URL (usually from ingress or Istio VirtualService): | 
|  | 148 | +
 | 
|  | 149 | +    ``` | 
|  | 150 | +    kubectl get svc,ingress -n <namespace> | 
|  | 151 | +    ``` | 
|  | 152 | +
 | 
|  | 153 | +
 | 
|  | 154 | +2. Log in to Odoo using admin credentials (configured in Keycloak or Odoo setup). | 
|  | 155 | +3. Activate the PBMS modules under **Apps**: | 
|  | 156 | +   * Ensure “OpenG2P PBMS Core”, “OpenG2P PBMS Background Tasks”, and other required extensions are installed. | 
|  | 157 | +   *   Update module list if they aren’t visible: | 
|  | 158 | +
 | 
|  | 159 | +       ``` | 
|  | 160 | +       kubectl exec -it <odoo-pod-name> -n <namespace> -- \ | 
|  | 161 | +         odoo -d <database-name> -u all --stop-after-init | 
|  | 162 | +       ``` | 
|  | 163 | +
 | 
|  | 164 | +
 | 
|  | 165 | +4. Verify background workers: | 
|  | 166 | +   *   Check Celery workers and beat scheduler pods: | 
|  | 167 | +
 | 
|  | 168 | +       ``` | 
|  | 169 | +       kubectl get pods -n <namespace> | grep celery | 
|  | 170 | +       ``` | 
|  | 171 | +   * Confirm task queues are registered correctly.\ | 
|  | 172 | +
 | 
|  | 173 | +5. Validate Redis and Minio connectivity: | 
|  | 174 | +   * Ensure Redis pod is running and reachable by the Celery worker. | 
|  | 175 | +   * Verify Minio access credentials match the Helm values and Odoo configuration. | 
|  | 176 | +6. Confirm database migrations: | 
|  | 177 | +   *   Review logs of Odoo pod for any migration errors: | 
|  | 178 | +
 | 
|  | 179 | +       ``` | 
|  | 180 | +       kubectl logs <odoo-pod-name> -n <namespace> | 
|  | 181 | +       ``` | 
|  | 182 | +
 | 
|  | 183 | +
 | 
|  | 184 | +7.  (Optional) Apply PBMS demo or seed data: | 
|  | 185 | +
 | 
|  | 186 | +    ``` | 
|  | 187 | +    kubectl exec -it <odoo-pod-name> -n <namespace> -- \ | 
|  | 188 | +      odoo -d <database-name> -i g2p_pbms_demo | 
|  | 189 | +    ``` | 
0 commit comments