Skip to content

Commit 36b2147

Browse files
committed
Use secrets and variables
1 parent ea05d24 commit 36b2147

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dls_api_url: "${DLS_API_URL}"
2+
target_host: "${TARGET_HOST}"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DLS_API_URL: "https://eflows4hpc.bsc.es/datalogistics/api/v1"
2+
TARGET_HOST: "amdlogin.bsc.es"

minimal_workflow/tosca/types.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ imports:
1717

1818
topology_template:
1919
inputs:
20-
dls_api_username:
21-
type: string
22-
required: true
23-
dls_api_password:
24-
type: string
25-
required: true
2620
dls_api_url:
2721
type: string
2822
required: true
@@ -100,8 +94,8 @@ topology_template:
10094
properties:
10195
target_host: { get_input: target_host }
10296
dls_api_url: { get_input: dls_api_url }
103-
dls_api_username: { get_input: dls_api_username }
104-
dls_api_password: { get_input: dls_api_username }
97+
dls_api_username: { get_secret: [/secret/data/services_secrets/dls, data=username] }
98+
dls_api_password: { get_secret: [/secret/data/services_secrets/dls, data=password] }
10599
dag_id: "taskflow_example"
106100
debug: { get_input: debug }
107101
user_id: ""
@@ -116,8 +110,8 @@ topology_template:
116110
target_host: { get_input: target_host }
117111
register: { get_input: register_result_in_datacat }
118112
dls_api_url: { get_input: dls_api_url }
119-
dls_api_username: { get_input: dls_api_username }
120-
dls_api_password: { get_input: dls_api_password }
113+
dls_api_username: { get_secret: [/secret/data/services_secrets/dls, data=username] }
114+
dls_api_password: { get_secret: [/secret/data/services_secrets/dls, data=password] }
121115
dag_id: "upload_example"
122116
debug: { get_input: debug }
123117
user_id: ""
@@ -136,8 +130,8 @@ topology_template:
136130
properties:
137131
service_url: "https://bscgrid20.bsc.es/image_creation"
138132
insecure_tls: true
139-
username: test
140-
password: T3st22
133+
username: { get_secret: [/secret/data/services_secrets/image_creation, data=user] }
134+
password: { get_secret: [/secret/data/services_secrets/image_creation, data=password] }
141135
machine:
142136
container_engine: singularity
143137
platform: "linux/amd64"
@@ -156,8 +150,8 @@ topology_template:
156150
target_host: { get_input: target_host }
157151
target_path: { get_input: container_image_transfer_directory }
158152
dls_api_url: { get_input: dls_api_url }
159-
dls_api_username: { get_input: dls_api_username }
160-
dls_api_password: { get_input: dls_api_password }
153+
dls_api_username: { get_secret: [/secret/data/services_secrets/dls, data=username] }
154+
dls_api_password: { get_secret: [/secret/data/services_secrets/dls, data=password] }
161155
dag_id: "transfer_image"
162156
debug: { get_input: debug }
163157
user_id: { get_input: user_id }

0 commit comments

Comments
 (0)