# Running an OpenCRVS deployment

### Preparation steps

Before you can deploy, you need to make sure that your country configuration Docker image has compiled and has been pushed to your container registry (E.G. Dockerhub). This was explained previously in [Building, pushing & releasing your countryconfig code](broken://pages/HLISVCYPnFSFC0Iaf2Wd)

Copy the tag associated with your **countryconfig** Docker container image because you will use it in the next step.

<figure><img src="/files/04rzylYRnQYgmJVMNZHf" alt=""><figcaption></figcaption></figure>

### Run OpenCRVS Deployment

You can deploy to your server using the automated **"Deploy OpenCRVS"** Github Action for any environment created at [Create a GitHub Environment](https://github.com/opencrvs/documentation/blob/master/v2.0.0/setup/3.-installation/3.3-set-up-a-server-hosted-environment/4.3.4-create-a-github-environment) step.

1. Navigate to **GitHub Actions** within **`infrastructure`** repository
2. Select **"Deploy OpenCRVS"** workflow
3. Enter the **Tag of the core image**. This usually corresponds to the OpenCRVS release tag, e.g. `v2.0.0`.
4. Enter the **Tag of the country config image**. Use the tag of the image built from your fork of the country config repository.
5. For the initial deployment, enable the **“Data seeding during deployment”** option. Note: You can also seed the environment later.
6. Select **"Target environment"** from dropdown menu.
7. Click "**Run workflow"** button, and monitor the run logs to ensure that the deployment completes successfully.

<figure><img src="/files/OVf3jBcqAJVgAeo0Tlat" alt=""><figcaption><p>Deploy OpenCRVS GitHub Actions Workflow options</p></figcaption></figure>

### Verification steps

* Verify workflow was completed successfully
* Verify resources are up and running after deployment: `kubectl get pods -n opencrvs-<env>`
* Make sure all helm pre-/post-deploy hooks completed successfully:<br>

  ```
  kubectl get jobs
  ```
* Access opencrvs in browser: `https://<your domain>` , see [Login to an OpenCRVS server](broken://pages/ztqRF48zpvzwtCgJDpSY)


---

# 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://documentation.opencrvs.org/v2.0/technical/guides/installation/deploy-set-up-a-server-hosted-environment/deploy/running-a-opencrvs-deployment.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.
