> 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/setup/installation/install-ifix.md).

# Install iFIX

To install the iFIX application, follow these steps:

## **1. Infrastructure Setup**

iFIX is a microservices-based distributed cloud-native application, with each microservice containerized and deployed on Kubernetes infrastructure. Before deploying iFIX, set up a Kubernetes cluster suitable for your environment. For local development and testing, a lightweight Kubernetes cluster like k3d is recommended. For production environments, consider using cloud providers such as AWS or Azure.

## **2. Quickstart Setup**

For a quick local setup using k3d, follow these steps:

* **Hardware Requirements:**
  * Minimum 4 vCPUs (8 recommended)
  * Minimum 8 GiB RAM (16 GiB recommended)
  * Minimum 30 GiB HDD
* **Install Prerequisites:**
  * **Docker:** Install Docker appropriate for your operating system.
  * **kubectl:** Install kubectl to interact with the Kubernetes cluster.
  * **k3d:** Install k3d to create a lightweight Kubernetes cluster.
* **Create a Directory for Persistent Data:**
  * Create a directory `/kube` and set appropriate permissions:

```bash
mkdir /kube
chmod 777 /kube
```

**Create the Kubernetes Cluster:**

* Use k3d to create a cluster with one master node and two agent nodes, mounting the `/kube` directory for data persistence:

```bash
k3d cluster create --k3s-server-arg "--no-deploy=traefik" --agents 2 -v "/kube:/kube@agent[0,1]" -v "/kube:/kube@server[0]" --port "80:80@loadbalancer"
```

**Configure kubectl:**

* Retrieve the kubeconfig file and set the context:

```
k3d kubeconfig get k3s-default > k3dconfig
kubectl config use-context k3d-k3s-default --kubeconfig=k3dconfig
```

## **3. iFIX Service Setup**

After setting up the infrastructure, proceed with deploying the iFIX services:

* **Clone the DevOps Repository:**
  * Clone the repository and navigate to the deployment directory:

    ```
    git clone <DevOps_repo_URL>
    cd iFix-DevOps/deploy-as-code/egov-deployer

    ```
* **Prepare the Environment Configuration:**
  * Create an `env.yaml` file with configurations such as global and local environment variables, credentials (encrypted using sops), service replicas, master data, and external service configurations.
* **Run the Deployment Script:**
  * Execute the setup script and follow the prompts:

```
go run ifix_adapter_setup.go
```

* Be prepared to provide information such as the path to the kubeconfig file, the version of DIGIT to install, and the modules to include.

## **4. Post-Installation**

After deployment, verify that all iFIX services are running correctly within your Kubernetes cluster. Regularly monitor the services and logs to ensure smooth operation.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/public-finance/setup/installation/install-ifix.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
