|  | 
| 1 | 1 | # Environment Installation | 
| 2 | 2 | 
 | 
| 3 |  | -## Common resources | 
|  | 3 | +The instructions here pertain to the deployment of commons  on the Kubernetes cluster using OpenG2P-Commons.  All the components are installed in the same namespace. | 
| 4 | 4 | 
 | 
| 5 |  | -Install common components as below: | 
|  | 5 | +## Prerequisites | 
| 6 | 6 | 
 | 
| 7 |  | -* Create namespace for your environment using Rancher UI or command line  | 
| 8 |  | -* For **production environment** install PostgreSQL server separately on the same virtual machine using command line | 
| 9 |  | -* Install openg2p-commons Helm Chart.  For **production environment** do not install Docker based Postgres (see step above) | 
| 10 |  | -* The **latest `openg2p-commons` Helm chart** is available directly in the **Rancher UI**. | 
| 11 |  | -* To deploy it: | 
| 12 |  | -  1. Open the **Rancher UI** and go to the **Apps & Marketplace** section. | 
| 13 |  | -  2. In the search bar, type **`openg2p-commons`**. | 
| 14 |  | -  3. Select the chart, **configure the required values** (e.g., domains, Keycloak Clients). | 
| 15 |  | -  4. Click **Install** to deploy the Commons Helmchart. | 
|  | 7 | +Before you deploy, make sure the following are in place: | 
|  | 8 | + | 
|  | 9 | +* ✅ [Infrastruction setup](infrastructure-setup.md) is completed  | 
|  | 10 | +* ✅ [Environment](environment-installation.md) has been setup with common resources installed. | 
|  | 11 | +* ✅ Domain name `esignet.<your environment>.<your domain name>` (e.g. `esignet.qa.openg2p.org`) is available along with SSL certificate for the domain (_the wild certificate should have already been loaded during Infrastructure setup_) | 
|  | 12 | +* ✅ **Project Owner access** on the OpenG2P namespace | 
|  | 13 | + | 
|  | 14 | +## Installation using Rancher UI | 
|  | 15 | + | 
|  | 16 | +1. Log in to Rancher admin console. | 
|  | 17 | +2. Select your cluster. | 
|  | 18 | +3. Under **Apps -> Repositories** click on Create to add a repository. | 
|  | 19 | +4.  Provide Name as `openg2p` and target HTTPS Index URL as [https://openg2p.github.io/openg2p-helm/rancher](https://openg2p.github.io/openg2p-helm/rancher) and click Create.\ | 
|  | 20 | + | 
|  | 21 | + | 
|  | 22 | +    <figure><img src="../../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure> | 
|  | 23 | +5.  To display prerelease versions of OpenG2P apps, click on your user avatar in the upper right corner of the Rancher dashboard. Then click on `Include Prerelease Versions` under Preferences under Helm Charts.\ | 
|  | 24 | + | 
|  | 25 | + | 
|  | 26 | +    <figure><img src="../../.gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure> | 
|  | 27 | +6. Select the namespace in which you would like to install Registry, from the namespace filter on the top-right. | 
|  | 28 | +7.  Navigate to **Apps->Charts** page on Rancher. You should see `OpenG2P  commons` Helm charts listed. | 
|  | 29 | + | 
|  | 30 | +    <figure><img src="../../.gitbook/assets/image (84).png" alt=""><figcaption></figcaption></figure> | 
|  | 31 | +8. Proceed to Install `OpenG2P  Commons` chart select the latest version to be installed, and click Install. | 
|  | 32 | +9. On the next screen, choose a name for installation, like `Commons`. Select the checkbox `Customise Helm options` before install, and click Next. | 
|  | 33 | +10. Go through each app's configuration page, and configure the following: | 
|  | 34 | +    1. Configure a hostname for each app in the following way. `<appname>.<base-hostname>` , where base hostname is the wildcard hostname chosen during [Istio namespace setup](../scaling/base-infrastructure/openg2p-cluster/cluster-setup/istio.md#namespace-setup).  Example: `esignet.dev.openg2p.org` and `odk.dev.openg2p.org` , etc. `<appname>` is arbitrary - default names have been provided. | 
|  | 35 | +    2. **Keycloak Base Url** is your organization-wide Keycloak URL. (Ex: keycloak.\<your domain>.org) | 
|  | 36 | +    3. OIDC Client details are asked. **Create Keycloak Client**, refer to [Keycloak Client Creation](../deployment-guide/keycloak-client-creation.md) guide. | 
|  | 37 | +11. Click Next to reach Helm Options page. Disable `wait` flag. Click on Install. | 
|  | 38 | +12. Wait for all the pods to get into **Running state**. This may take several minutes. | 
|  | 39 | + | 
|  | 40 | +    <div align="left"><figure><img src="../../.gitbook/assets/image (5).png" alt=""><figcaption></figcaption></figure></div> | 
| 16 | 41 | 
 | 
| 17 | 42 | Once deployed, the OpenG2P Commons services such as PostgreSQL, MinIO, Keymanager, OpenSearch, and others will be automatically set up and available for dependent applications. | 
| 18 | 43 | 
 | 
|  | 44 | +## Post Installation | 
|  | 45 | + | 
|  | 46 | +### Keycloak | 
|  | 47 | + | 
|  | 48 | +#### Assigning roles to users | 
|  | 49 | + | 
|  | 50 | +Create[ Keycloak client roles](https://www.keycloak.org/docs/latest/server_admin/#con-client-roles_server_administration_guide) for the following components and assign them to users: | 
|  | 51 | + | 
|  | 52 | +<table><thead><tr><th width="336">Component</th><th>Role name</th></tr></thead><tbody><tr><td>OpenSearch Dashboards for logging</td><td><code>admin</code></td></tr><tr><td>OpenSearch Dashboards for <a href="../../monitoring-and-reporting/reporting-framework/">Reporting</a> </td><td><code>admin</code></td></tr><tr><td>Kafka UI for <a href="../../monitoring-and-reporting/reporting-framework/">Reporting</a></td><td><code>Admin</code></td></tr><tr><td>Apache Superset</td><td><code>Admin</code></td></tr><tr><td>Minio Console</td><td><code>consoleAdmin</code></td></tr></tbody></table> | 
|  | 53 | + | 
|  | 54 | +#### Assigning roles to clients | 
|  | 55 | + | 
|  | 56 | +* For Social Registry to be able to access Keymanager APIs, create a realm role in Keycloak with the name "KEYMANAGER\_ADMIN" and assign this as a service account role to the Social Registry Keycloak client. | 
|  | 57 | + | 
| 19 | 58 | ## Modules | 
| 20 | 59 | 
 | 
| 21 | 60 | Install the modules and other utility apps individually using their respective instructions: | 
|  | 
0 commit comments