Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add environment version support. #773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hardyjohnson
Copy link
Contributor

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

@@ -3,7 +3,7 @@

WARDEN_USAGE=$(cat <<EOF
\033[33mUsage:\033[0m
env-init <project_name> <environment_type>
env-init <project_name> <environment_type> <environment_version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since <environment_version> is optional, it should be surrounded by square brackets: [<environment_version>]; otherwise, it appears to be a required argument.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of files that may be exact copies. I feel it would be better if we adjusted the environment files to use a fallback mechanism. If a file doesn't exist in the specific version, it loads from default. This would simplify the environment releases to potentially just init.env files.

@bap14
Copy link
Member

bap14 commented Aug 10, 2024

@hardyjohnson You'll want to resolve the conflicts that exist as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants