forked from reanahub/reana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(helm): harmonize REANA_HOST confugirations (reanahub#867)
This PR is part of harmonizing the treatment of REANA_HOSTNAME accross all REANA components and introduces REANA_HOSTPORT Helm value. You can refer to other PRs below. reenahub/reana-server#717 reanahub/reana-workflow-controller#630 Closes reanahub#865
- Loading branch information
Showing
10 changed files
with
95 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,6 +207,12 @@ def run_commands(): | |
help="Which directories from the Kubernetes nodes to mount inside the job pods? " | ||
"cluster_node_path:job_pod_mountpath, e.g /var/reana/mydata:/mydata", | ||
) | ||
@click.option( | ||
"--port", | ||
default=30443, | ||
type=int, | ||
help="Port number to use for cluster creation. Defaults to 30443.", | ||
) | ||
@click.option("--no-cache", is_flag=True, help="Do not use Docker image layer cache.") | ||
@click.option( | ||
"--component", | ||
|
@@ -241,7 +247,6 @@ def run_commands(): | |
) | ||
@click.option( | ||
"--parallel", | ||
"-p", | ||
default=1, | ||
type=click.IntRange(min=1), | ||
help="Number of docker images to build in parallel.", | ||
|
@@ -256,6 +261,7 @@ def run_ci( | |
exclude_components, | ||
mounts, | ||
job_mounts, | ||
port, | ||
no_cache, | ||
component, | ||
admin_email, | ||
|
@@ -288,6 +294,7 @@ def run_ci( | |
-c r-d-helloworld | ||
--exclude-components=r-ui,r-a-krb5,r-a-rucio,r-a-vomsproxy | ||
--mode debug | ||
--port 30500 | ||
--namespace myreana | ||
--admin-email [email protected] | ||
--admin-password mysecretpassword | ||
|
@@ -296,7 +303,7 @@ def run_ci( | |
components = select_components(component) | ||
# create cluster if needed | ||
if not is_cluster_created(): | ||
cmd = "reana-dev cluster-create --mode {}".format(mode) | ||
cmd = f"reana-dev cluster-create --mode {mode} --extra-ports {port}" | ||
for mount in mounts: | ||
cmd += " -m {}".format(mount) | ||
if disable_default_cni: | ||
|
@@ -329,7 +336,7 @@ def run_ci( | |
run_command(cmd, "reana") | ||
# deploy cluster | ||
cmd = ( | ||
f"reana-dev cluster-deploy --mode {mode} --namespace {namespace}" | ||
f"reana-dev cluster-deploy --mode {mode} --port {port} --namespace {namespace}" | ||
f" --admin-email {admin_email} --admin-password {admin_password}" | ||
) | ||
if exclude_components: | ||
|
@@ -338,7 +345,7 @@ def run_ci( | |
cmd += " -j {}".format(job_mount) | ||
run_command(cmd, "reana") | ||
# run demo examples | ||
cmd = f"eval $(reana-dev client-setup-environment -n {namespace}) && reana-dev run-example" | ||
cmd = f"eval $(reana-dev client-setup-environment --server-hostname https://localhost:{port} -n {namespace}) && reana-dev run-example" | ||
for component in components: | ||
cmd += " -c {}".format(component) | ||
for a_workflow_engine in workflow_engine: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
#!/bin/bash | ||
# | ||
# This file is part of REANA. | ||
# Copyright (C) 2020, 2024 CERN. | ||
# Copyright (C) 2020, 2024, 2025 CERN. | ||
# | ||
# REANA is free software; you can redistribute it and/or modify it | ||
# under the terms of the MIT License; see LICENSE file for more details. | ||
|
||
# Read inputs: kubernetes namespace, instance name, admin user email, admin user password | ||
if [ "$#" -ne 4 ]; then | ||
if [ "$#" -ne 5 ]; then | ||
echo "Error: Invalid number of parameters." | ||
echo "Usage: $0 <kubernetes_namespace> <instance_name> <admin_email> <admin_password>" | ||
echo "Example: $0 reana reana [email protected] mysecretpassword" | ||
echo "Example: $0 reana reana [email protected] mysecretpassword 30443" | ||
exit 1 | ||
fi | ||
kubernetes_namespace=$1 | ||
instance_name=$2 | ||
admin_email=$3 | ||
admin_password=$4 | ||
reana_hostport=$5 | ||
|
||
# Wait for database to be ready | ||
while [ "0" -ne "$(kubectl -n "${kubernetes_namespace}" exec "deployment/${instance_name}-db" -- pg_isready -U reana -h 127.0.0.1 -p 5432 &>/dev/null && echo $? || echo 1)" ]; do | ||
|
@@ -42,7 +43,7 @@ kubectl -n "${kubernetes_namespace}" create secret generic "${instance_name}"-ad | |
# Success! | ||
echo "Success! You may now set the following environment variables:" | ||
echo "" | ||
echo " $ export REANA_SERVER_URL=https://localhost:30443 # or use your URL" | ||
echo " $ export REANA_SERVER_URL=https://localhost:${reana_hostport} # or use your URL" | ||
echo " $ export REANA_ACCESS_TOKEN=${admin_access_token}" | ||
echo "" | ||
echo "Please see http://docs.reana.io/getting-started/ on how to run your first REANA example." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# This file is part of REANA | ||
# Copyright (C) 2024 CERN. | ||
# Copyright (C) 2024, 2025 CERN. | ||
# | ||
# REANA is free software; you can redistribute it and/or modify it | ||
# under the terms of the MIT License; see LICENSE file for more details. | ||
|
@@ -52,7 +52,7 @@ | |
"kubectl config set-context --current --namespace=default", "reana" | ||
), | ||
call( | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin", | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin 30443", | ||
"reana", | ||
), | ||
], | ||
|
@@ -78,7 +78,7 @@ | |
"kubectl config set-context --current --namespace=default", "reana" | ||
), | ||
call( | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin", | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin 30443", | ||
"reana", | ||
), | ||
], | ||
|
@@ -106,7 +106,7 @@ | |
"kubectl config set-context --current --namespace=default", "reana" | ||
), | ||
call( | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin", | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin 30443", | ||
"reana", | ||
), | ||
], | ||
|
@@ -132,7 +132,7 @@ | |
"kubectl config set-context --current --namespace=default", "reana" | ||
), | ||
call( | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin", | ||
"/code/src/reana/scripts/create-admin-user.sh default reana [email protected] admin 30443", | ||
"reana", | ||
), | ||
], | ||
|