> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/registry/crop-sown-registry/deployment.md).

# Deployment

Deploying the Crop Sown Registry: install order and the Jobs that run on install and upgrade.

This page lists the order and what runs on install. What the Crop Sown Registry is and how it is packaged: [Crop Sown Registry](https://docs.openg2p.org/products/registry/crop-sown-registry.md#how-it-is-packaged). The install steps and choices: [Deploying on Rancher](https://docs.openg2p.org/products/registry/crop-sown-registry/deployment/rancher.md).

## Order

1. [Infrastructure setup](https://docs.openg2p.org/operations/deployment/infrastructure-setup.md) and [environment creation](https://docs.openg2p.org/operations/deployment/infrastructure-setup/environment-setup-multi-node.md).
2. **commons-base**, then **commons-services**, in the namespace ([Commons Helm Chart](https://docs.openg2p.org/operations/deployment/infrastructure-setup/environment-setup-multi-node/openg2p-commons-helm-chart.md)). Which commons-services settings it needs: [Prerequisites](https://docs.openg2p.org/products/registry/crop-sown-registry/deployment/rancher.md#prerequisites).
3. The Crop Sown Registry: [Deploying on Rancher](https://docs.openg2p.org/products/registry/crop-sown-registry/deployment/rancher.md).

The Farmer Registry is not needed ([why](https://docs.openg2p.org/products/registry/crop-sown-registry.md#how-it-relates-to-the-farmer-registry)).

## What happens on install

| Order           | Job                          | Does                                                                                                                                                                                                                            |
| --------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Regular Job     | the `iam-register` Job       | Registers the staff portal's roles and permissions in IAM. A failure here does not fail the release                                                                                                                             |
| Hook, weight 10 | `<release>-db-seed`          | Waits for the APIs and for AWE. Loads the registers, activity types, indicators, ODK mapping, Cluster screens, reporting views, DCI templates and Cluster approval policies. With **Load Sample Data**, the two sample clusters |
| Hook, weight 20 | `<release>-activity-samples` | Only with **Load sample crop seasons**. Records the sample crop seasons. **Fails the release** if any cannot be loaded                                                                                                          |
| Hook, weight 25 | `<release>-sanity`           | The platform's smoke tests: the partner API is up and serves DCI search                                                                                                                                                         |

Helm stops at the first failed hook, so a missing Job means an earlier one failed.

The seed is idempotent. On upgrade, activity types, indicators and the ODK mapping are updated in place. Cluster screens are inserted once; changes to them need an upgrade script (see [Customisation](https://docs.openg2p.org/products/registry/crop-sown-registry/customisation.md#clusters)).

{% hint style="warning" %}
db-seed waits for AWE. If AWE in commons-services is down, db-seed blocks, the install times out, and the later Jobs are never created. If you see no sanity Job, check db-seed and commons-services first.
{% endhint %}

## Next

* [Deploying on Rancher](https://docs.openg2p.org/products/registry/crop-sown-registry/deployment/rancher.md): prerequisites, choices, sample data, ODK, checks after install
* [Customisation](https://docs.openg2p.org/products/registry/crop-sown-registry/customisation.md): what a country changes


---

# 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.openg2p.org/products/registry/crop-sown-registry/deployment.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.
