Skip to content

Commit

Permalink
GITBOOK-1072: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
pjoshi751 authored and gitbook-bot committed Sep 11, 2024
1 parent d93dd04 commit ef7848c
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 32 deletions.
43 changes: 22 additions & 21 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,31 +256,32 @@
* [Interoperability](social-registry/functionality/interoperability.md)
* [Monitoring and Reporting](social-registry/functionality/monitoring-and-reporting/README.md)
* [System Logs](social-registry/functionality/monitoring-and-reporting/system-logs.md)
* [Development](social-registry/development/README.md)
* [Install OpenG2P Package on Linux System](social-registry/development/install-openg2p-package-on-linux-system.md)
* [Odoo Modules](social-registry/development/odoo-modules/README.md)
* [ODK App User Mapping](social-registry/development/odoo-modules/odk-app-user-mapping.md)
* [Upcoming Features](social-registry/development/upcoming-features/README.md)
* [Fayda ID Integration](social-registry/development/upcoming-features/fayda-id-integration.md)
* [Verifiable Credentials Issuance](social-registry/development/upcoming-features/verifiable-credentials-issuance.md)
* [Benefit Targeting Methods](social-registry/development/upcoming-features/score-computation.md)
* [Record Revision History](social-registry/development/upcoming-features/record-revision-history.md)
* [Domain Specific Registries](social-registry/development/upcoming-features/domain-specific-registries.md)
* [Single Sign-On](social-registry/development/upcoming-features/single-sign-on.md)
* [Tokenisation](social-registry/development/upcoming-features/tokenisation.md)
* [Search - OpenSearch](social-registry/development/upcoming-features/search-opensearch.md)
* [Audit Log - Advanced](social-registry/development/upcoming-features/audit-log-advanced.md)
* [Attestation](social-registry/development/upcoming-features/attestation.md)
* [Consent](social-registry/development/upcoming-features/consent.md)
* [SPAR Update for offline enumerations](social-registry/development/upcoming-features/spar-update-for-offline-enumerations.md)
* [Self Service Registration Portal](social-registry/development/upcoming-features/self-service-registration-portal.md)
* [Unique Reference ID](social-registry/development/upcoming-features/unique-reference-id.md)
* [Fayda ID Integration](social-registry/functionality/fayda-id-integration.md)
* [Verifiable Credentials Issuance](social-registry/functionality/verifiable-credentials-issuance.md)
* [Benefit Targeting Methods](social-registry/functionality/score-computation.md)
* [Record Revision History](social-registry/functionality/record-revision-history.md)
* [Domain Specific Registries](social-registry/functionality/domain-specific-registries.md)
* [Single Sign-On](social-registry/functionality/single-sign-on.md)
* [Tokenisation](social-registry/functionality/tokenisation.md)
* [Search - OpenSearch](social-registry/functionality/search-opensearch.md)
* [Audit Log - Advanced](social-registry/functionality/audit-log-advanced.md)
* [Attestation](social-registry/functionality/attestation.md)
* [Consent](social-registry/functionality/consent.md)
* [SPAR Update for offline enumerations](social-registry/functionality/spar-update-for-offline-enumerations.md)
* [Self Service Registration Portal](social-registry/functionality/self-service-registration-portal.md)
* [Unique Reference ID](social-registry/functionality/unique-reference-id.md)
* [Versions](social-registry/versions.md)
* [Deployment](social-registry/deployment/README.md)
* [Domain names and Certificates](social-registry/deployment/domain-names-and-certificates.md)
* [Helm Charts](social-registry/deployment/helm-charts.md)
* [Install Odoo Modules](social-registry/deployment/install-odoo-modules.md)
* [Technology Stack](social-registry/technology-stack.md)
* [Versions](social-registry/versions.md)
* [Developer Zone](social-registry/development/README.md)
* [Technology Stack](social-registry/development/technology-stack.md)
* [📘 Developer Install of OpenG2P Package on Linux](social-registry/development/developer-install-of-openg2p-package-on-linux.md)
* [📘 Docker Packaging Guide](social-registry/development/docker-packaging-guide.md)
* [📘 Helm Packaging Guide](social-registry/development/helm-packaging-guide.md)
* [Odoo Modules](social-registry/development/odoo-modules/README.md)
* [ODK App User Mapping](social-registry/development/odoo-modules/odk-app-user-mapping.md)
* [SPAR](spar/README.md)
* [Features](spar/features/README.md)
* [SPAR Mapper](spar/features/spar-mapper.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: Installation of Social Registry on developer machine
---

# Install OpenG2P Package on Linux System
# 📘 Developer Install of OpenG2P Package on Linux

The guide provides steps to install the OpenG2P package on a laptop/desktop running on Linux system. Developers can run the entire OpenG2P package on their machines. 

Expand Down Expand Up @@ -255,5 +255,5 @@ db_password = your_database_password
cd /opt/odoo/custom-addons/<module_directory>
pip3 install -r requirements.txt
```
4. Add addons directory path to the _odoo.conf_ file in **addons\_path** parameter, mentioned in [point 7](install-openg2p-package-on-linux-system.md#id-7.-configure-odoo).
4. Add addons directory path to the _odoo.conf_ file in **addons\_path** parameter, mentioned in [point 7](developer-install-of-openg2p-package-on-linux.md#id-7.-configure-odoo).
5. For the Social Registry to function properly, your add-ons should include the packages listed below.[https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/17.0-develop.txt](https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/17.0-develop.txt)
35 changes: 35 additions & 0 deletions social-registry/development/docker-packaging-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
description: How to create SR Docker Package
---

# 📘 Docker Packaging Guide

## Concepts

### Package file and Github workflow

Dockers are created via Github workflows by triggering the same manually when required. Dockers may be created manually as well if required. The contents of the Docker are listed in a [package file](https://github.com/OpenG2P/openg2p-packaging/tree/main/packaging/packages/) available in the [openg2p-packaging ](https://github.com/OpenG2P/openg2p-packaging)repo. This package file is read by the [package\_docker.yml](https://github.com/OpenG2P/openg2p-packaging/blob/main/.github/workflows/package\_docker.yml) workflow. This workflow creates the Docker and pushes it to the Docker Hub. The name and tag of the Docker are specified as the first line in the package file followed by the base version of the Odoo that is used to create the Docker. See [example](https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/1.3.1.txt).&#x20;

The package may contain private repositories, in which case, the token to clone the repositories must be set in the respective repositories.

Versions of all repositories that are used to create the Docker are specified in the package file. For Dockers that are "frozen" it is assumed that all versions of repositories are frozen as well (i.e. tagged).&#x20;

### Creating tokens to clone private repositories

1. Create a new token for OpenG2P Bot user and add it to the private repo with the name `OPENG2P_BOT_GITHUB_PAT`. This token must have read permissions to the repository
2. To create this token you will have to log in to Github as OpenG2P Bot user.

### Tagging the repositories

1. For private repositories give Write permission to OpenG2P Bot user on Github (under Settings --> Collaborators and Teams).
2. Run the `tag.yml` workflow using Github Actions. The workflow checks if there are any changes w.r.t. to previous version specified. If there are no changes the workflow fails with a message and new tag is not created.

### Creating Docker package

1. Create a package file for the new version that you want to create. The name of the package file should reflect the new version. E.g. `1.3.1.txt`.
2. Update the first line in the package file for the new version.
3. Inspect the contents of the package file on which versions of repositories need to be packed in this Docker.
4. Make sure the repositories are tagged with the versions matching in the package file. See above section on tagging.
5. Add this version in the Github [workflow file ](https://github.com/OpenG2P/openg2p-packaging/blob/main/.github/workflows/package\_docker.yml)so that it appears as a drop-down while running the workflow.
6. Trigger Docker build and push using the Github Actions.
7. Verify that the new Docker has been pushed on Docker Hub.
2 changes: 2 additions & 0 deletions social-registry/development/helm-packaging-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 📘 Helm Packaging Guide

File renamed without changes.
2 changes: 0 additions & 2 deletions social-registry/development/upcoming-features/README.md

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: WORK IN PROGRESS
Any changes/updates to records in the Registry have to be captured by the system. Admins must be able to see the information associated with a registry record on previous dates. Admins must also be able to generate reports of aggregate data for an earlier period. For example, the total number of farmers with more than 10 acres of land as of Dec 2023.

{% hint style="info" %}
Revision History is not the same as [Audit Logs](../../features/audit-log.md) or [System Log](../../../monitoring-and-reporting/logging.md). &#x20;
Revision History is not the same as [Audit Logs](../features/audit-log.md) or [System Log](../../monitoring-and-reporting/logging.md). &#x20;
{% endhint %}

## Functionality
Expand All @@ -20,20 +20,20 @@ Revision History is not the same as [Audit Logs](../../features/audit-log.md) or

## Design

* The current design involves [Reporting Framework](../../../monitoring-and-reporting/reporting-framework/). Social Registry deployment is packaged with Reporting Framework installation, which is configured to capture all the changes to the registry records and send them to OpenSearch.
* The current design involves [Reporting Framework](../../monitoring-and-reporting/reporting-framework/). Social Registry deployment is packaged with Reporting Framework installation, which is configured to capture all the changes to the registry records and send them to OpenSearch.
* All changes to records get captured as separate documents under the OpenSearch Index including the timestamp of change.
* This makes it easy to query for records or data at a particular point in time, while the main Social Registry continues to maintain the latest data.
* Dashboards and Reports can be generated easily on OpenSearch Dashboards. A reference dashboard for revision history is available (TODO).
* By default, all the fields and their changes are captured, but the [reporting framework configuration](../../../monitoring-and-reporting/reporting-framework/) allows not to capture PII data.
* By default, all the fields and their changes are captured, but the [reporting framework configuration](../../monitoring-and-reporting/reporting-framework/) allows not to capture PII data.
* Social Registry can generate a unique Registry ID for each record. That registry ID can be used to query for changes related to a particular record.
* If you are using a customized social registry that involves multiple tables that store additional data, and are _related_ to the main _res\_partner_ table (via foreign key), then you are required to create separate OpenSearch connectors for all these tables.
* In the connector configuration of these adjunct tables, use the [DynamicNewField](../../../monitoring-and-reporting/reporting-framework/user-guides/connector-creation-guide.md) SMT to add the above-mentioned Registry ID field to these adjunct tables, so that changes to these adjunct tables can also be queried using the same registry ID.
* In the connector configuration of these adjunct tables, use the [DynamicNewField](../../monitoring-and-reporting/reporting-framework/user-guides/connector-creation-guide.md) SMT to add the above-mentioned Registry ID field to these adjunct tables, so that changes to these adjunct tables can also be queried using the same registry ID.
* When a record is deleted from the Social Registry DB, there will be no change in revision history on OpenSearch.
* Refer to [Reporting guides](../../../monitoring-and-reporting/reporting-framework/#creating-dashboards) for further configuration.
* Refer to [Reporting guides](../../monitoring-and-reporting/reporting-framework/#creating-dashboards) for further configuration.

## User stories

* Update a record in the Social Registry via any [update mechanism](../../features/registry-update-mechanisms.md), say through the UI (odoo-based), or the APIs, etc.
* Update a record in the Social Registry via any [update mechanism](../features/registry-update-mechanisms.md), say through the UI (odoo-based), or the APIs, etc.
* Check that the changes are reflected on OpenSearch with appropriate timestamp (TODO: elaborate.)

## Other Approaches
Expand Down
2 changes: 1 addition & 1 deletion social-registry/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ description: Social Registry versions

Repository on Docker Hub: [`social-registry-odoo-package`](https://hub.docker.com/repository/docker/openg2p/openg2p-social-registry-odoo-package/general)

<table><thead><tr><th width="116">Version</th><th width="128">Created on</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://hub.docker.com/layers/openg2p/openg2p-social-registry-odoo-package/1.2.0/images/sha256-707ff5cf9e3b365a6c751c84213e95dc190623238349dbdd196d0c9065b3112b?context=repo">1.2.0</a></td><td>21 Aug 2024</td><td>Pegging a version as of this date for country deployments</td></tr><tr><td><a href="https://hub.docker.com/layers/openg2p/openg2p-social-registry-odoo-package/1.2.1/images/sha256-9e710d5cb6708f2dc660e38eeac55dea6a080215bf51f3f9d6d7e22c5f9acf9c?context=repo">1.2.1</a></td><td>24 Aug 2024</td><td>Pegging a version as of this date for country deployments</td></tr><tr><td><a href="https://hub.docker.com/layers/openg2p/openg2p-social-registry-odoo-package/1.2.2/images/sha256-cb5f19c854bb718404ed62f03edc1f71164bf2991caff02cd59f671bd57e2361?context=explore">1.2.2</a></td><td>27 Aug 2024</td><td>Bug fixes on 1.2.1 and pegging the same as a patch version. </td></tr><tr><td>1.2.3</td><td>04 Sep 2024</td><td>Intermediate version - does not work. QA failed.</td></tr><tr><td>1.3.0</td><td>10 Sep 2024</td><td>Major changes w.r.t reorganisation of modules. Number of repos reduced. No change in functionality. See <a href="https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/1.3.0.txt">package file</a>.</td></tr><tr><td><a href="https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/1.3.1.txt">1.3.1</a></td><td>10 Sep 2024</td><td>Fixed few bugs in Community addons.</td></tr></tbody></table>
<table><thead><tr><th width="116">Tag</th><th width="128">Created on</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://hub.docker.com/layers/openg2p/openg2p-social-registry-odoo-package/1.2.0/images/sha256-707ff5cf9e3b365a6c751c84213e95dc190623238349dbdd196d0c9065b3112b?context=repo">1.2.0</a></td><td>21 Aug 2024</td><td>Pegging a version as of this date for country deployments</td></tr><tr><td><a href="https://hub.docker.com/layers/openg2p/openg2p-social-registry-odoo-package/1.2.1/images/sha256-9e710d5cb6708f2dc660e38eeac55dea6a080215bf51f3f9d6d7e22c5f9acf9c?context=repo">1.2.1</a></td><td>24 Aug 2024</td><td>Pegging a version as of this date for country deployments</td></tr><tr><td><a href="https://hub.docker.com/layers/openg2p/openg2p-social-registry-odoo-package/1.2.2/images/sha256-cb5f19c854bb718404ed62f03edc1f71164bf2991caff02cd59f671bd57e2361?context=explore">1.2.2</a></td><td>27 Aug 2024</td><td>Bug fixes on 1.2.1 and pegging the same as a patch version. </td></tr><tr><td>1.2.3</td><td>04 Sep 2024</td><td>Intermediate version - does not work. QA failed.</td></tr><tr><td>1.3.0</td><td>10 Sep 2024</td><td>Major changes w.r.t reorganisation of modules. Number of repos reduced. No change in functionality. See <a href="https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/1.3.0.txt">package file</a>.</td></tr><tr><td><a href="https://github.com/OpenG2P/openg2p-packaging/blob/main/packaging/packages/social-registry/1.3.1.txt">1.3.1</a></td><td>10 Sep 2024</td><td>Fixed few bugs in Community addons.</td></tr></tbody></table>

0 comments on commit ef7848c

Please sign in to comment.