warden icon indicating copy to clipboard operation
warden copied to clipboard

Add environment version support.

Open hardyjohnson opened this issue 8 months ago • 1 comments

This PR adds versioning of the prebuilt environment configurations as per discussion here: https://github.com/orgs/wardenenv/discussions/772#discussion-6782904

Environment versioning

In order to more accurately and effectively support the modeling of an application's services and their configurations, an "environment" within Warden, we should add a versioning methodology to each supported environment.

Adding an environment versioning constraint will allow us to support accurate representation of the necessary services and configuration necessary to run a particular application and support it over time. Current issues with the pre-built environments today:

  • It is difficult to tell what version of an application works with each pre-built environment included within wardenenv/warden.
  • No support for environment upgrades based on an application version e.g. upgrade current installation from Magento2 2.4.5 to 2.4.7 service stack.

Proposed solution:

Add a convention for environment service versioning
    ./environments/WARDEN_ENV_TYPE/{WARDEN_ENV_VERSION:-DEFAULT} - this path would contain the .init.env, base.yml and docker compose environment partials for a particular application version.
Add an application version variable to the .env when using env-init to represent the supported application's modelled service and configuration version.
    WARDEN_ENV_TYPE=magento2
    WARDEN_ENV_VERSION=2.4.7
Update the env-init and env commands to work with these changes, allow for application version to be passed in env-init.
Update documentation explaining application version usage.

Usage

Environment initialization: warden env-init newapp magento2 2.4.7

This PR includes environments Magento2 (2.45, 2.4.6, 2.4.7) as per https://experienceleague.adobe.com/en/docs/commerce-operations/release/versions on premise commerce versions table.

cc/ @bap14 @navarr

hardyjohnson avatar Jun 06 '24 17:06 hardyjohnson