Skip to content

04. Manage repositories environments

Ludovic edited this page Dec 21, 2023 · 3 revisions

Understand the concept of environment

Environments are an important part of Repomanager as they define how your repositories snapshots are being accessed by client hosts.

An example of a good practice is to create at least 2 environments in the following order:

  • preprod (will be marked as default)
  • prod

Tipically:

  • The preprod env will points to the most recent repositories snapshots and ensure that pre-production client hosts can update their packages from these snapshots. As pre-production hosts, they are the first in line to test the packages updates and ensure they are not breaking anything before updating on production hosts.
  • The prod env will point to the last stable repositories snapshots and ensure that production client hosts can not update their packages without them having been tested first by pre-production client hosts. Once the packages updates have been tested and validated, the prod env can point to the same repositories snapshots than the preprod env.

This is what the environments have been designed for. To test packages updates on testing environment before updating them on production environment hosts.

https://github.com/lbr38/repomanager/assets/54670129/64a648ac-e6b9-4075-867e-43595d8ffd16

Notes:

  • There is no limit in the number of environment you can define but you must define one at least. If you don't feel the need of using multiple environments, you can define only one called prod or latest for example.

Create an environment

From the SETTINGS tab:

  1. In the REPOSITORIES > ENVIRONMENTS section, create a new environment.
https://github.com/lbr38/repomanager/assets/54670129/1f70ca87-ef0d-4c9d-a0d7-484cd3161417

Notes:

  • The first created environment will be the default env for all operations. It will be displayed with a white label.
  • The last created environment will always be considered as a production environment. It will be displayed with a red label.
  • Environments between first and last envs will be displayed with a white label.

Delete an environment

From the SETTINGS tab:

  1. In the REPOSITORIES > ENVIRONMENTS section, use the Delete icon icon to delete an environment.
https://github.com/lbr38/repomanager/assets/54670129/fdf69aa1-53c3-426a-813c-eff5b2340f49

Notes:

  • Deleting an environment will not delete it from repositories snapshots it was pointing to (to avoid breaking client hosts access).