-
Notifications
You must be signed in to change notification settings - Fork 2
Development
: Add helios configuration
#146
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis update introduces Helios-related configuration to the Artemis Ansible role. It adds new default variables, environment variable template entries, a variable validation task, and a dynamic Helios configuration block in the production YAML template. The changes enable conditional Helios integration based on environment and secret key presence. Changes
Sequence Diagram(s)sequenceDiagram
participant Inventory
participant AnsibleRole
participant Template
participant ArtemisApp
Inventory->>AnsibleRole: Provide helios_* variables
AnsibleRole->>AnsibleRole: Check if Helios env is set and secrets are present
AnsibleRole->>Template: Render artremis.env.j2 with Helios variables
AnsibleRole->>Template: Render application-prod.yml.j2 with Helios config
Template->>ArtemisApp: Supply environment variables and config file
ArtemisApp->>ArtemisApp: Enable/disable Helios integration based on config
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
roles/artemis/templates/application-prod.yml.j2 (1)
373-392
: Consider making Helios URLs configurable.The dynamic endpoint construction logic is excellent, but the URLs are hardcoded. Consider adding default variables for the Helios URLs to improve flexibility for different environments.
Add these variables to
defaults/main.yml
:+helios_prod_url: "https://helios.aet.cit.tum.de/api/environments/status" +helios_staging_url: "https://helios-staging.aet.cit.tum.de/api/environments/status"Then update the template:
- {'url':'https://helios.aet.cit.tum.de/api/environments/status', + {'url':'{{ helios_prod_url }}', - {'url':'https://helios-staging.aet.cit.tum.de/api/environments/status', + {'url':'{{ helios_staging_url }}',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
roles/artemis/defaults/main.yml
(1 hunks)roles/artemis/tasks/variable_checks.yml
(1 hunks)roles/artemis/templates/application-prod.yml.j2
(1 hunks)roles/artemis/templates/artemis.env.j2
(1 hunks)
🔇 Additional comments (5)
roles/artemis/defaults/main.yml (1)
278-281
: LGTM! Well-structured default variable definitions.The Helios default variables are properly defined with empty string defaults, following Ansible best practices. The naming convention is consistent and the section comment clearly indicates these must be overridden.
roles/artemis/tasks/variable_checks.yml (1)
48-69
: Excellent validation logic for Helios configuration.The task correctly validates that core nodes (non-build agents) with Helios environments configured have at least one secret key defined. The conditional logic properly skips build agents and provides a clear, actionable error message.
roles/artemis/templates/artemis.env.j2 (2)
244-248
: Good defensive programming for build agent detection.The conditional assignment safely handles cases where the nested configuration objects might not exist, defaulting to
false
when undefined.
250-262
: Clean conditional environment variable exports.The logic correctly exports Helios-related environment variables only when they are defined and non-empty, preventing empty variables from being set. The
IS_BUILD_AGENT
flag export is a smart approach for coordination with the application config.roles/artemis/templates/application-prod.yml.j2 (1)
364-370
: Smart environment-based configuration.The build agent detection using the environment variable and the conditional enabling/disabling of Helios based on node type is well-implemented.
Development
: Add helios configuration
This PR adds configuration changes added in open PR ls1intum/Artemis#10873
Summary by CodeRabbit