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:
|
Component for regulations development | Production use | Public endpoint |
---|---|---|
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Not required |
None |
|
Required |
None |
|
Not required |
None |
|
Required |
None |
2. Changing registry deployment mode
To change the registry deployment mode — deploymentMode
— from production
to development
, follow these steps:
-
Open the OpenShift console, find the Control Plane project, and navigate to the
gerrit
component.Central Gerrit link:https://gerrit-control-plane.<dns-wildcard>
-
Find the repository with your registry and open the deploy-templates/values.yaml file.
-
Locate the
deploymentMode: production
variable and change its value todeploymentMode: development
.The deployment mode settings appear as follows:
deploy-templates/values.yamlglobal: deploymentMode: development
-
(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.yamlglobal: excludePortals: ['citizen']
By default, the
excludePortals
variable is absent, which indicates the deploying of all portals:deploy-templates/values.yamlglobal: 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
-
-
Commit the changes with
git commit
, apply the changes to themaster
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.
-
Manually run the following script from the
redash-admin
pod:bash /config/install-upgrade.sh install
-
After successfully configuring the
redash-admin
database, restart the registry deployment pipeline if the previous attempt failed due to redash-chart deploy.
-
Check the latest available version of PgAdmin in
control-plane-gerrit
. -
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'