Changing registry deployment mode

🌐 This document is available in both English and Ukrainian. Use the language toggle in the top right corner to switch between versions.

1. General description

Deployment mode is a parameter that indicates the environment in which the registry regulations are deployed. It allows distinguishing between the production environment and the development environment, as well as configuring the settings according to the needs of each. The registry Platform supports two deployment modes: development and production. The development mode

The development mode involves deployment with settings for convenience in development and debugging.

The production mode involves optimized deployment for maximum productivity, stability, and security. It excludes additional debugging tools, provides optimal configuration and settings for real-world operation on target clusters.

In the production mode, the following components involved in the registry development processes are not deployed:

  • Components involved in the processes of registry regulations development;

  • Public endpoints of the components involved in the processes of registry regulations development.

Table 1. Components and endpoints used by registry regulations developers
Component for regulations development Production use Public endpoint

admin-portal

Not required

None

registry-regulation-management

Not required

None

kafka-ui

Not required

None

redash-admin

Not required

None

redash-admin-adhocworker

Not required

None

redash-admin-scheduledworker

Not required

None

redash-admin-exporter

Not required

None

form-management-modeler (legacy)

Not required

None

pgAdmin

Not required

None

registry-vault

Required

None

external-integration-mocks

Not required

None

registry-rest-api

Required

None

2. Changing registry deployment mode

To change the registry deployment mode — deploymentMode — from production to development, follow these steps:

  1. Open the OpenShift console, find the Control Plane project, and navigate to the gerrit component.

  2. Find the repository with your registry and open the deploy-templates/values.yaml file.

  3. Locate the deploymentMode: production variable and change its value to deploymentMode: development.

    The deployment mode settings appear as follows:

    deploy-templates/values.yaml
    global:
      deploymentMode: development
  4. (Optional) If you need to deploy the registry without a specific portal (for example, Citizen portal), exclude it from the settings as follows:

    deploy-templates/values.yaml
    global:
      excludePortals: ['citizen']

    By default, the excludePortals variable is absent, which indicates the deploying of all portals:

    deploy-templates/values.yaml
    global:
      excludePortals: ['']

    When excluding the Citizen portal from the deployment process, the following services are also not deployed:

    • citizen-portal

    • ddm-notification-service

    • user-service-api

    • user-service-persistence

  5. Commit the changes with git commit, apply the changes to the master branch, and initiate the registry deployment.

The configuration of Redash admin and PgAdmin is optional and only necessary as additional steps if issues arise when changing the deployment mode. We recommend reviewing them, but note that they are not mandatory for changing the deploymentMode.
  • Redash admin

  • pgAdmin

The redash-admin component is available exclusively in the development mode and will not be deployed during the initial installation in the production mode. When updating the registry with a mode changed to development, the redash-admin component becomes available, but the post-install script admin-hook-install-job.yaml, which creates initial Redash admin database configurations including tables, is not executed. This behavior is expected because it performs an update of the registry, not its installation.

  1. Manually run the following script from the redash-admin pod:

    bash /config/install-upgrade.sh install
  2. After successfully configuring the redash-admin database, restart the registry deployment pipeline if the previous attempt failed due to redash-chart deploy.

  1. Check the latest available version of PgAdmin in control-plane-gerrit.

    image

  2. Add the following chart to deploy-templates/helmfile.yaml in the releases section with the version of the component from the previous step:

    - name: pgadmin-chart
      namespace: '{{ env "NAMESPACE" }}'
      labels:
        type: remote
        update_scc: true
        repoURL: ssh://jenkins@gerrit.mdtu-ddm-edp-cicd:32114/mdtu-ddm/data-architecture/devops-application/pgadmin-chart.git
        path: components/registry/
        branch: 0.0.1-SNAPSHOT.69
      chart: /opt/repositories/pgadmin-chart/deploy-templates
      version: 0.0.1-SNAPSHOT.69
      values:
        - values.yaml
        - values.gotmpl
      missingFileHandler: Warn
      needs:
        - '{{ env "NAMESPACE"}}/istio-configuration'
        - '{{ env "NAMESPACE"}}/network-management'
        - '{{ env "NAMESPACE"}}/citus'