> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/public-finance/v2.3/platform/configuration/promotion-docs/master-data-service-promotion-doc.md).

# Master Data Service Promotion Doc

## Adapter Master Data Service v1.0 And iFIX Master Data Service v2.0 <a href="#adapter-master-data-service-v1.0-and-ifix-master-data-service-v2.0" id="adapter-master-data-service-v1.0-and-ifix-master-data-service-v2.0"></a>

This page provides step-wise details on how to migrate Department, Project and Expenditure from iFix Master Data Service to Adapter Master Data Service.

### Steps To Migrate To The Master Data Service

1. Yaml configurations
   * Update "*mongo-db-username*", "*mongo-db-password*" and "*mongo-db-authenticated-uri*" in secrets db config in respective environment secret yaml file ([<img src="https://github.com/fluidicon.png" alt="" data-size="line">iFix-DevOps/mgramseva-qa-secrets.yaml at mgramseva · misdwss/iFix-DevOps](https://github.com/misdwss/iFix-DevOps/blob/mgramseva/deploy-as-code/helm/environments/mgramseva-qa-secrets.yaml) ).
   * Update "*mongo-db-name*", "*mongo-db-host*" and "*mongo-db-url*" in egov-config of configmaps in respective environment yaml file ([<img src="https://github.com/fluidicon.png" alt="" data-size="line">iFix-DevOps/mgramseva-qa.yaml at mgramseva · misdwss/iFix-DevOps](https://github.com/misdwss/iFix-DevOps/blob/mgramseva/deploy-as-code/helm/environments/mgramseva-qa.yaml) ).
   * Update "*adapter-master-data-service*" and "*ifix-department-entity-service*" in egov-service-host in respective environment yaml file ([<img src="https://github.com/fluidicon.png" alt="" data-size="line">iFix-DevOps/mgramseva-qa.yaml at mgramseva · misdwss/iFix-DevOps](https://github.com/misdwss/iFix-DevOps/blob/mgramseva/deploy-as-code/helm/environments/mgramseva-qa.yaml) ).
2. Create a new DB in the MongoDB instance for these new services.
3. Next, create the same master data again in the new (mgramseva) database using the adapter-master-data-service's /\_create APIs.
4. After restoring DB collections, drop the unused collections from the iFIX MongoDB.

   &#x20; Follow the steps below to drop the unused collections.

   1. Connect to ifix namespace playground pod&#x20;

      `kubectl exec -it <playground-pod> -n ifix -- /bin/bash`
   2. Connect to the particular mongo db\
      `mongo --host <hostname>:27017 -u <username> -p <password>`
   3. Use db

      `use  <db_name>`
   4. Check the above-mentioned collection name using the below commands

      `db.getCollectionNames();`
   5. If collections are there then drop them off using the below commands

      *e.g.*

      `db.department.drop();`

      `db.expenditure.drop();`

      `db.project.drop();`

### Steps To Use Adapter Master Data Service

Port-forward the Adapter master data service in localhost from a specific environment (like QA/UAT/Prod).

Below is the command to port-forward :

*e.g.*

`kubectl port-forward <pod-name> 8030:8080 -n mgramseva`

### Steps To Use iFix Master Data Service

We need the access token from keycloak server and pass it as a bearer token while requesting the ifix-master-data-service create APIs.

### &#x20;Technical Docs

[Adapter Master Data Service v1.0](/public-finance/v2.3/exemplar/ifix-adapter/adapter-service-documents/ifix-adapter-master-data-service.md)

[IFIX Core Master Data Service v2.0](/public-finance/v2.3/platform/configuration/services/master-data-setup/domain-services/ifix-core-master-data-service.md)

> [![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)*​*](http://creativecommons.org/licenses/by/4.0/)*All content on this page by* [*eGov Foundation*](https://egov.org.in/) *is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/public-finance/v2.3/platform/configuration/promotion-docs/master-data-service-promotion-doc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
