Skip to content

Commit 6442f4e

Browse files
authored
Merge branch 'master' into master
2 parents 9b68ec0 + e73b706 commit 6442f4e

File tree

96 files changed

+10170
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+10170
-23
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ airavata-local-agent/app
4646
airavata-local-agent/proxy/config.txt
4747
airavata-local-agent/proxy/websockify
4848
airavata-local-agent/renderer/.next
49-
airavata-local-agent/dist
49+
airavata-local-agent/dist
50+
51+
logs

airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java

+27
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121

2222
import org.apache.airavata.api.Airavata;
2323

24+
import org.apache.airavata.common.utils.Constants;
2425
import org.apache.airavata.model.error.AiravataClientException;
26+
import org.apache.airavata.model.security.AuthzToken;
27+
import org.apache.thrift.TException;
2528
import org.apache.thrift.protocol.TBinaryProtocol;
2629
import org.apache.thrift.protocol.TProtocol;
2730
import org.apache.thrift.transport.TSocket;
@@ -31,6 +34,11 @@
3134
import org.slf4j.Logger;
3235
import org.slf4j.LoggerFactory;
3336

37+
import java.util.ArrayList;
38+
import java.util.HashMap;
39+
import java.util.List;
40+
import java.util.Map;
41+
3442
public class AiravataClientFactory {
3543

3644
private final static Logger logger = LoggerFactory.getLogger(AiravataClientFactory.class);
@@ -77,4 +85,23 @@ public static Airavata.Client createAiravataSecureClient(String serverHost, int
7785
throw clientError;
7886
}
7987
}
88+
89+
public static void main(String a[]) throws TException {
90+
AuthzToken token = new AuthzToken();
91+
token.setAccessToken("eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBUGFKRUpERFc4ZEdzMExnc3ozYUdydERsZ2U0eWlQblFibUNsYnpJX2NVIn0.eyJqdGkiOiI1NmMwZDZmYy0yMGVhLTQ1Y2UtODUwNC1kMTY0MTZkYTdkYzEiLCJleHAiOjE2NDc0NTQyNjcsIm5iZiI6MCwiaWF0IjoxNjQ3NDUyNDY3LCJpc3MiOiJodHRwczovL2lhbWRldi5zY2lnYXAub3JnL2F1dGgvcmVhbG1zL3NlYWdyaWQiLCJhdWQiOiJwZ2EiLCJzdWIiOiI3ZGZkYjI4MS1lNWIzLTQ4MjQtOTcxZC00YzQ2ZmNkMzIwYTEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJwZ2EiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiI1NWVkODI5OS0xN2FiLTQwNTEtYTBjYy0zMjgzNWQ1MTVlNjUiLCJhY3IiOiIxIiwiY2xpZW50X3Nlc3Npb24iOiIwMjU2OTljNS1lY2I2LTQ2ZDYtYmYwNy01ZDczOTk1ZTI3YjMiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cHM6Ly9kZXYuc2VhZ3JpZC5vcmciXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsicGdhIjp7InJvbGVzIjpbImdhdGV3YXktdXNlciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsInZpZXctcHJvZmlsZSJdfX0sIm5hbWUiOiJFcm9tYSBBYmV5c2luZ2hlIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiMjAyMXRlc3QxIiwiZ2l2ZW5fbmFtZSI6IkVyb21hIiwiZmFtaWx5X25hbWUiOiJBYmV5c2luZ2hlIiwiZW1haWwiOiJlcm9tYS5hYmV5c2luZ2hlQGdtYWlsLmNvbSJ9.eMIrTzyc43CLkxCauiXIwPV99CmsBDbSbiIVEE9Qd3ASyJKXlzkrWsUVPE-g43i1iBKaHBcnLPkmzVz8Hb0B1wtDA5nKSgipGYjfJfaWdMzBrW1PkpeWMKDZHN3m4OS7YZnzQki0YJFvL1-IZsYf2UCnr_lsOi2M-dnj9xwEJ_VIdvvHl9I6ivhBUywYDU0uL9EoSL3kAes7FvooOhXnZiRxJpZK82VPZZiVAb-nv5xgCwQw0ipbm8b0kIta4cxhjKKDhyINRvGXJjqN3kRNsahYHLnwsRqRjabgvbSfe4vtS5iRoPO-qF-I-rSMf2jZPREMWxdLQ9uPXEk9mFxqbQ");
92+
Map<String, String> claimsMap = new HashMap<>();
93+
claimsMap.put(Constants.GATEWAY_ID, "seagrid");
94+
claimsMap.put(Constants.USER_NAME, "2021test1");
95+
token.setClaimsMap(claimsMap);
96+
Airavata.Client apiClient = createAiravataSecureClient("apidev.scigap.org", 9930,
97+
"/Users/eromaabeysinghe/development/local-airavata/airavata/dev-tools/ansible/inventories/scigap/production/files/client_truststore.jks", "airavata",
98+
10000);
99+
100+
101+
102+
List<String> outputNames = new ArrayList<>();
103+
outputNames.add("Gaussian-Application-Output");
104+
outputNames.add("Gaussian-Standar-Out");
105+
apiClient.fetchIntermediateOutputs(token,"Clone_of_Gaussian16_on_Mar_16,_2022_1:42_PM_1ad9e887-6ec4-4b1a-9ffb-e028ccb3c86c", outputNames);
106+
}
80107
}

dev-tools/ansible/inventories/scigap/production/host_vars/ai-confluence/vars.yml

+6
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,10 @@ admin_emails: "[('Sudhakar Pamidighantam', 'spamidig@gatech.edu'),('Eroma Abeysi
5454
portal_title: "AI Confluence Gateway"
5555

5656
#django_google_analytics_tracking_id: "UA-66348921-1"
57+
58+
django_extra_settings:
59+
GATEWAY_DATA_SHARED_DIRECTORIES:
60+
shared:
61+
path: /var/www/portals/gateway-user-data/ai-confluence/shared
62+
5763
...

dev-tools/ansible/inventories/scigap/production/host_vars/ampgateway/vars.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ experiment_data_dir: "{{ user_data_dir }}/amp"
5555
gateway_data_store_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCAfFAdLrGC/om63ipx9RhuzcGnMlVQkKsuy5NtUgK7I4OdTJ1Ck1H/ARBwiWNQy08GO2HETfM7StCROwW+tlZ6n+THBkbei4G8q6xV6UXlC3BJxuDlwkxnyOFSYEt8Qd2g8IC/X0qo9/m5Ea9Z5axzTk+n2OZlV87DrLheV+OVhgf+yYGVo9egTZ7Kg/TV/Hl1xeU5JgRcPPrLrWYn8vEQo7xT5boS3X9y2o7FgNTdUf5K10ZJ37RWcLQpzZ+7zEKs/P/I/QU+BUhxRRfnEf/4e4L3OFE36SQ4DSFmu3lKU4BcQQb3A6SfQGC1PwQdD5y9MUkpit4hMCSJLjVBTN3H"
5656
django_user_data_archive_max_age_days: 180
5757

58-
admin_emails: "[('Sudhakar Pamidighantam', 'spamidig@gatech.edu'), ('Barry Schneider', 'bis@nist.gov')]"
58+
admin_emails: "[('Sudhakar Pamidighantam', 'spamidig@gatech.edu'), ('Barry Schneider', 'bis@nist.gov'),('Kathryn Hamilton','kathryn.r.hamilton@ucdenver.edu')]"
5959
portal_title: "Atomic, Molecular, and Optical Science Gateway"
6060

6161
django_google_analytics_tracking_id: "UA-177950242-1"

dev-tools/ansible/inventories/scigap/production/host_vars/delta/vars.yml

+14-13
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@
2323
# NOTE: Delta gateway is deployed to a Jetstream VM
2424
real_user_data_dir: "/media/volume/sdb/data/gateway-user-data"
2525
user_data_dir: "/var/www/portals/gateway-user-data"
26-
gateway_data_store_hostname: "delta-topology.org"
26+
gateway_data_store_hostname: "delta.js2.scigap.org"
2727
gateway_data_store_resource_id: "delta-topology.jetstream-cloud.org_61fe21d4-07ea-41fc-9f2e-104bc3061318"
2828
# tus isn't setup yet
2929
tusd_vhost_servername:
30-
airavata_django_git_branch: "delta-topology-workshop"
30+
#airavata_django_git_branch: "delta-topology-workshop"
3131

3232
vhost_servername: "delta-topology.scigap.org"
3333
vhost_ssl: True
3434
ssl_certificate_file: "/etc/letsencrypt/live/{{ vhost_servername }}/cert.pem"
3535
ssl_certificate_chain_file: "/etc/letsencrypt/live/{{ vhost_servername }}/fullchain.pem"
3636
ssl_certificate_key_file: "/etc/letsencrypt/live/{{ vhost_servername }}/privkey.pem"
3737

38-
vhost_server_redirect: "delta-topology.org"
39-
vhost_server_redirect_ssl_certificate_file: "/etc/letsencrypt/live/{{ vhost_server_redirect }}/cert.pem"
40-
vhost_server_redirect_ssl_certificate_chain_file: "/etc/letsencrypt/live/{{ vhost_server_redirect }}/fullchain.pem"
41-
vhost_server_redirect_ssl_certificate_key_file: "/etc/letsencrypt/live/{{ vhost_server_redirect }}/privkey.pem"
38+
#vhost_server_redirect: "delta-topology.org"
39+
#vhost_server_redirect_ssl_certificate_file: "/etc/letsencrypt/live/{{ vhost_server_redirect }}/cert.pem"
40+
#vhost_server_redirect_ssl_certificate_chain_file: "/etc/letsencrypt/live/{{ vhost_server_redirect }}/fullchain.pem"
41+
#vhost_server_redirect_ssl_certificate_key_file: "/etc/letsencrypt/live/{{ vhost_server_redirect }}/privkey.pem"
4242

43-
django_file_upload_max_file_size_mb: 10000
43+
django_file_upload_max_file_size_mb: 3000
4444

4545
## Keycloak related variables
4646
tenant_domain: "delta"
@@ -59,14 +59,15 @@ auth_options:
5959

6060
gateway_id: "delta"
6161
experiment_data_dir: "{{ user_data_dir }}/delta"
62-
gateway_data_store_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCLjM9LkUfp7WEBCAOKn4+2JmOHqCNnOt8ZKa5LZYi6DerREMH1oaiDBwrOd8LEL6bC1Ac6X7aA7tz6Z3F8rM6czVKUVeGcfUglPFj7fNqetIY4R5hkidLBkXrOiR9fPFDyiBJnG+/WIlJm4HJN3dM2jzlcGcx5O0syXdgDY5lM2mgKCmhG/Q6qt3/GxZ/DtG2QV5tV3cLTaufncFoyNtBthnVzVagnJ+4tnWsEEv/S2RZDA09LHALH/51zrcLIyRRMD/qNSTf6hPMOAM2+90naVALy84qbTfdcEsATQU9eOyUZ/qb8kc78CM0tmz37e9xlH30W/E2a8lr+qRBxSLPD"
62+
#gateway_data_store_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCLjM9LkUfp7WEBCAOKn4+2JmOHqCNnOt8ZKa5LZYi6DerREMH1oaiDBwrOd8LEL6bC1Ac6X7aA7tz6Z3F8rM6czVKUVeGcfUglPFj7fNqetIY4R5hkidLBkXrOiR9fPFDyiBJnG+/WIlJm4HJN3dM2jzlcGcx5O0syXdgDY5lM2mgKCmhG/Q6qt3/GxZ/DtG2QV5tV3cLTaufncFoyNtBthnVzVagnJ+4tnWsEEv/S2RZDA09LHALH/51zrcLIyRRMD/qNSTf6hPMOAM2+90naVALy84qbTfdcEsATQU9eOyUZ/qb8kc78CM0tmz37e9xlH30W/E2a8lr+qRBxSLPD"
63+
gateway_data_store_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZPtb93iKEr3udILpDWrnIiaAaJdaguzCjJKrSEt2c6nvb8ODPorpJzzaMAtq9GRljFu5F0Oue+JkmLIv7P8y61Q8PPsjdNL9+ioKncNDbzF9YBQJbUIhwMtdBtu3hYWVR10kUgY+CQA9wQ9/KuCfr8G3cZ3PQIC2XaEmXuF4Zhn7Gu8JKs9cFTDa2xBFBBpCkzK8+zY+OCcLE+M0O8jhJ0c4gaqIMExrKS7nnvRuWhO8XHhFFExD7MxyHAiIrR5AGJ/aR49bgqpZAuqS8qZDnH5YHMkcBMr27PDqBxU9IQxGzSTppxjQX4CAC6lRZZ+MXrd6SXskiloXw2Kaaw/SB"
6364

64-
admin_emails: "[('SGRC', 'sgrc-iu-group@iu.edu'),('Aurora Clark','auclark@wsu.edu'),('Sudhakar Pamidighantam','pamidigs@iu.edu')]"
65+
admin_emails: "[('Sudhakar Pamidighantam','spamidig@gatech.edu')]"
6566
portal_title: "DELTA Gateway"
6667

67-
django_google_analytics_tracking_id: "UA-178024455-1"
68+
#django_google_analytics_tracking_id: "UA-178024455-1"
6869

69-
django_extra_settings:
70-
ACCESS_TOKEN_REDIRECT_ALLOWED_URIS:
71-
- URI: "https://jupyterhub.delta-topology.scigap.org/hub/login?next=/hub/spawn"
70+
#django_extra_settings:
71+
# ACCESS_TOKEN_REDIRECT_ALLOWED_URIS:
72+
# - URI: "https://jupyterhub.delta-topology.scigap.org/hub/login?next=/hub/spawn"
7273
...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$ANSIBLE_VAULT;1.1;AES256
2+
34326136363031343935356664383263663735323761336361613263346666616463333164326239
3+
6438336532333238643930306265653163633665343764330a616464303561326461663230356238
4+
66343464656366386237316365333039313733636130323332353234353939643337313838373536
5+
6331376462386533310a636532363364363238636437383636386565643565326236303632633430
6+
63643166353933383263303937373030396635623035393065363163663732333565653232623464
7+
36393431313335663865326534363532323636393130613261653261313230616232613361303237
8+
39643865363137333664353065623034333066333962613162356364356430613235313839313536
9+
32363266323765386335383865626634323639396166326537353031326464616564306533623135
10+
35623466323030343864376238356463353933376433326663353863616238336165613761626533
11+
63643336393661653062316130336237356562363630393532663033323664666464653330373666
12+
323131663134653231373533316466656666

dev-tools/ansible/inventories/scigap/production/host_vars/smiles/vars.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ gateway_id: "smiles"
6666
experiment_data_dir: "{{ user_data_dir }}/smiles"
6767
gateway_data_store_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCBya+UFROosd6bakQ9u44egbNI0n0aDgjNviif7c7HnUVT1NzmvTy4tqzWJOj5XFsZ0cvM8Csn/BazI93g9YvVxovPnH/gyu3gUZgV/XbV4ZRRmEFXV43K0CzSqRaAHMf7pLPsH4fyuWjKTuJDV3bUXdd75b0TetjzfKwT43moEmLG/G2Je3eMWZ37aHYaDcyCSPgOihZTiQebiqp4draZHvA/+DC4T7KUqRyty8XSW9Vdp8pW09NhY+J7fXg0jbN6W/mCD9OqG/jcPcPc7GpxnNNeUeCQ2yelzJ3UEgIIkO8vnTjotXGThPezRxGh537qCZRuOLpcwZBve+VrtVsT"
6868

69-
admin_emails: "[('Sudhakar Pamidighantam', 'spamidig@gatech.edu'), ('Eroma Abeysinghe', 'eroma@gatech.edu')]"
69+
admin_emails: "[('Sudhakar Pamidighantam', 'spamidig@gatech.edu'), ('Eroma Abeysinghe', 'eroma@gatech.edu'),('Amar Flood','aflood@indiana.edu')]"
7070
portal_title: "SMILES Gateway"
7171

7272
#django_google_analytics_tracking_id: "UA-66348921-1"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
21+
---
22+
23+
# TODO: tus not setup yet
24+
tusd_vhost_servername:
25+
26+
vhost_servername: "testdrive.cybershuttle.org"
27+
vhost_ssl: True
28+
ssl_certificate_file: "/etc/letsencrypt/live/{{ vhost_servername }}/cert.pem"
29+
ssl_certificate_chain_file: "/etc/letsencrypt/live/{{ vhost_servername }}/fullchain.pem"
30+
ssl_certificate_key_file: "/etc/letsencrypt/live/{{ vhost_servername }}/privkey.pem"
31+
32+
# Increase max upload size to 200MB
33+
#django_file_upload_max_file_size_mb: 200
34+
35+
## Keycloak related variables
36+
tenant_domain: "testdrive"
37+
oauth_client_key: "{{ vault_oauth_client_key }}"
38+
oauth_client_secret: "{{ vault_oauth_client_secret }}"
39+
40+
auth_options:
41+
password:
42+
name: "Cybershuttle Testdrive Gateway"
43+
external:
44+
- name: "Existing Institution Credentials"
45+
idp_alias: "cilogon"
46+
logo: "images/cilogon-logo-24x24-b.png"
47+
48+
49+
gateway_id: "testdrive"
50+
experiment_data_dir: "{{ user_data_dir }}/testdrive-cs"
51+
gateway_data_store_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC56m6qPepsDF1Pcimaj7olXPFgJB+fhEa9k9pXYBcNR/X2xUV6OPxvUvBf2TUjJiPJlZH0XX+or98XvyL3TCuR9C1fAygia9uDM7fEi2V85MTMCzPLLI2qOhw30/HH9EeXSjpJRCB3fxhAhtyUkiaXYuZIR4lmk+v5oHX0CrmqCBnkoUQiZKi5A+sYU9AhYvXtmwJgo87PUzDqJ8+aUnM9rXVTf6dvZWZCiS0gCgqXedcbzcQqIl3fJ6RVI/Nz/61IAMeNwu8aCDkgV98BTblNv+dPRb53LpwV5+Gw66cppOGZJVA+sBTjwZI/Zamkgh5g9pf09nsX51l4YUupLKcB"
52+
#django_user_data_archive_max_age_days: 180
53+
54+
admin_emails: "[('Sudhakar Pamidighantam','spamidig@gatech.edu'),('Eroma Abeysinghe','eroma@gatech.edu'),('Suresh Marru','smarru@gatech.edu'),('ARTISAN','ARTISAN@groups.gatech.edu')]"
55+
portal_title: "Cybershuttle Testdrive Gateway"
56+
57+
#django_google_analytics_tracking_id: "UA-66348921-1"
58+
...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$ANSIBLE_VAULT;1.1;AES256
2+
65316462313736623033333935393732373065386339633236646266303736326333306533306138
3+
3531393966666231363963386132633561396131643333640a643735383733623135313461353862
4+
61343265383031663066356530323431353135646165316563323164326262646338613235623436
5+
6638613765393937330a646666393332643262353764386335366239313438326132326539303164
6+
62646535623034663136393830613339396232353638636132326333626238343263366230336132
7+
63653338323139346361356530396134363762633865383465363934316332313034383334626531
8+
37666338626134656133636338393031646531383566616661363265343230623661353330616134
9+
34306137383465303731333237356539353231643638623733613831313631343538346432633164
10+
31643631656565363566616664613566323065666166326639373566333334663962616633643562
11+
62633335643961383865616464313235633730663032346166303437626434613866323138636435
12+
613530363963303461333833396633363337

dev-tools/ansible/inventories/scigap/production/hosts

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ molecular-dynamics ansible_host=156.56.104.84
8181
nasa-veda ansible_host=156.56.104.84
8282
enveomics ansible_host=156.56.104.84
8383
dt4h ansible_host=156.56.104.84
84+
testdrive-cs ansible_host=156.56.104.84
8485

8586
# smiles server
8687
smiles ansible_host=scigap13.sciencegateways.iu.edu ansible_user=root
@@ -102,6 +103,7 @@ futurewater ansible_host=149.165.154.212 ansible_user=exouser
102103

103104
# Delta Jetstream server
104105
# delta ansible_host=149.165.153.181 ansible_user=exouser
106+
delta ansible_host=149.165.173.140 ansible_user=exouser
105107

106108
# Container-Tutorial Jetstream server
107109
# This JS1 VM no longer exists

dev-tools/ansible/inventories/scigap/production/pga_config/scigap/vars.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ gateway_data_store_resource_id: "gf4.ucs.indiana.edu_61552681-96f0-462a-a36c-a62
5858

5959
## Portal related variables
6060
super_admin_portal: "true"
61-
admin_emails: "['ARTISAN@groups.gatech.edu']"
61+
admin_emails: "['ARTISAN@groups.gatech.edu','eroma.gatech.edu']"
6262
portal_email_username: "django.portal@scigap.org"
6363
portal_email_password: "{{ vault_portal_email_password }}"
6464
portal_theme: "scigap"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
airavata-agent
2+
go.sum
3+
jupyter/extension/airavata_jupyter_magic/dist
4+
jupyter/extension/airavata_jupyter_magic/lib
5+
*.egg-info
6+
*.ipynb_checkpoints
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM python:slim
2+
3+
RUN pip install flask jupyter jupyter-client
4+
RUN mkdir -p /opt/jupyter
5+
RUN python -m venv /opt/jupyter/venv
6+
ADD airavata-agent-linux /opt/airavata-agent
7+
ADD jupyter/kernel.py /opt/jupyter/kernel.py
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
## The Agent for orchestrating Airavata job workloads
2+
3+
## Set up the go environment
4+
```
5+
go mod tidy
6+
```
7+
8+
## Building proto files
9+
10+
```
11+
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
12+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
13+
export PATH=$PATH:$HOME/go/bin
14+
protoc --go_out=. --go-grpc_out=. agent-communication.proto
15+
```
16+
17+
## Running the agent
18+
```
19+
go install
20+
go run agent.go <connection_server_url> <agent_id>
21+
```
22+
23+
## Build the agent
24+
25+
### Build for the current platform
26+
```
27+
go build
28+
```
29+
30+
### Build for a specific platform
31+
```
32+
env GOOS=linux GOARCH=amd64 go build
33+
```
34+
35+
## Sample Requests
36+
37+
38+
```
39+
POST http://localhost:18880/api/v1/agent/executecommandrequest
40+
41+
{
42+
"agentId": "agent1",
43+
"workingDir": "",
44+
"arguments": ["docker", "ps", "-a"]
45+
}
46+
```
47+
48+
```
49+
http://localhost:18880/api/v1/agent/executejupyterrequest
50+
51+
{
52+
"sessionId": "session1",
53+
"keepAlive": true,
54+
"code": "print(4 + 5)",
55+
"agentId": "agent3"
56+
}
57+
58+
Response
59+
60+
{
61+
"executionId": "22f02087-87cc-4e90-bc3b-3b969179c31b",
62+
"error": null
63+
}
64+
```
65+
```
66+
http://localhost:18880/api/v1/agent/executejupyterresponse/22f02087-87cc-4e90-bc3b-3b969179c31b
67+
68+
Response
69+
70+
{
71+
"executionId": "93d82c06-31e5-477f-a73a-760908a7a482",
72+
"sessionId": null,
73+
"responseString": "{\"result\":\"9\\n\"}\n",
74+
"available": true
75+
}
76+
```
77+
78+
```
79+
POST http://localhost:18880/api/v1/agent/tunnel
80+
81+
{
82+
"destinationHost": "32.241.33.22",
83+
"destinationPort": "9999",
84+
"sshUserName": "sshuser",
85+
"sourcePort": "9001",
86+
"sshKeyPath": "/Users/dwannipu/.ssh/id_rsa_unencrypted",
87+
"processId": "process1"
88+
}
89+
```

0 commit comments

Comments
 (0)