# System Data Setup

Before you run the Works application, you need to set up the basic system data such as boundaries of the geography and the master data. In this document, we will illustrate the steps to load the base data for the server.

1. Create a superuser by using the super\_user\_createion curl given in the collection.

{% file src="/files/dPZTG9Wy8EmXyL77Wdeo" %}

2. Add Master data by port-forwading the mdms-v2 service and creating the schema present in the collection. Once all the schema is created add the seed data according to requirements.

{% file src="/files/vEUHKrHPK1W05ZdbBm5E" %}

3. Once the master data is set up send the request to the workflow service to create the workflows for the services which require workflows as mentioned in the collection given below.

{% file src="/files/oXKVQcvxJMETxk4jdC5V" %}

#### 4. Enable File Store <a href="#to-enable-file-store" id="to-enable-file-store"></a>

* Encode Aws access key and secret key to base64 encoding

```
echo -n "<access key or secret key>" | base64
```

* Update the secrets in the cluster (\*do not put these in the git DevOps repo files and commit)

```
kubectl edit secrets egov-filestore -n egov
```

* If it is not editable by the VI editor, we can use vs code to edit the file, run the below command and run the above step again

```
export EDITOR='code --wait'
```

#### 5. Redeploy Services at once to read from new data <a href="#redeploy-all-the-services-at-once-to-read-from-new-data" id="redeploy-all-the-services-at-once-to-read-from-new-data"></a>

* Run the below command to delete and restart all the services

```
kubectl delete pods --all -n egov
```

* Run the command below to check if all pods/services are running. If not, wait for some time and check again:

```
kubectl get pods -n egov
```


---

# Agent Instructions: 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:

```
GET https://docs.digit.org/works/setup/install-works/system-data-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
