Skip to content

Commit 20cd107

Browse files
committed
Merge branch 'master' into v3.0
In support of the "Aloe" update to the jobs service APIs.
2 parents dddac14 + d05600b commit 20cd107

File tree

18 files changed

+148
-60
lines changed

18 files changed

+148
-60
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
# test data
55
tests/*.log
6-
tests/agave_mock_server/*.egg-info
6+
tests/agave_mock_server/*.egg-info
7+
._DS_Store

CHANGELOG.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 3.0.1 - 2019-04-23
5+
### ADDED
6+
- Updated documentation to reflect transition to api.tacc.utexas.edu
7+
8+
### CHANGED
9+
- Revised references to agaveapi.co domains
10+
11+
### REMOVED
12+
- Support for requestbin and json-mirror
13+
414
## 3.0.0 - 2018-12-13
515
### ADDED
6-
- Documentationi.
7-
- TACC/agavepy as dependency.
16+
- Updated documentation.
17+
- TACC/agavepy as dependency
818

919
### CHANGED
1020
- Rewrite authentication-related scripts.
@@ -63,7 +73,7 @@ All notable changes to this project will be documented in this file.
6373

6474
## 2.1.8.1 - 2016-07-13
6575
### ADDED
66-
- `Dockerfile` to build a minimal image with embedded webhook server written in Golang and `ngrok.com` reverse tunnel for local webhook inspection behind a proxy.
76+
- `Dockerfile` to build a minimal image with embedded webhook server written in Golang and `ngrok.com` reverse tunnel for local webhook inspection behind a proxy.
6777

6878
### FIXED
6979
- Fixed a bug in `systems-roles-addupdate` where the curl statement was misprinting.
@@ -77,7 +87,7 @@ All notable changes to this project will be documented in this file.
7787
- `jobs-kick` command to roll a job back to its previous status and retry processing from there.
7888
- Added search support to the `monitors-checks-list` command.
7989
- Added support for specify custom notification delivery retry policy in the `notifications-addupdate` script.
80-
- Adding support for strict validation of inputs and paramters in the `jobs-resubmit` script. You can now use the `-I` and `--strictinputs` to enforce strict reproducibility on the submissi on syntax and `-P` and `--strictparams` to enforce strict reproducibility on the input syntax. Thes allow you to shield yourself against changes to the app descriptions that would otherwise silently go through.
90+
- Adding support for strict validation of inputs and paramters in the `jobs-resubmit` script. You can now use the `-I` and `--strictinputs` to enforce strict reproducibility on the submissi on syntax and `-P` and `--strictparams` to enforce strict reproducibility on the input syntax. Thes allow you to shield yourself against changes to the app descriptions that would otherwise silently go through.
8191

8292
### FIXED
8393
- Fixed a bug in `monitors-addupdate` preventing json descriptions from being read from stdin.
@@ -116,7 +126,6 @@ All notable changes to this project will be documented in this file.
116126
## 2.1.0 - 2015-02-23
117127
### ADDED
118128
- `*-addupdate` Adding support for reading from stdin to all the scripts that previously accepted only files by replacing the file name with `-`
119-
- `jobs-template` adding webhook url with [Agave RequestBin](http://requestbin.agaveapi.co/) valid for 24 hours created on each request.
120129
- `jobs-template` added support for parsing most enum values, properly creating arrays vs primary types based on min and max cardinality, and the ability to populate with random default values, including inputs
121130

122131
### FIXED

Dockerfile.public

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
FROM ubuntu:cosmic
2+
3+
LABEL org.label-schema.vendor = "Texas Advanced Computing Center"
4+
LABEL org.label-schema.name = "TACC Tapis API CLI"
5+
LABEL org.label-schema.vcs-url = "https://github.com/TACC-Cloud/home"
6+
LABEL org.label-schema.vcs-ref = "master"
7+
LABEL org.label-schema.version = "3.0.1"
8+
LABEL org.label-schema.organization=tacc.cloud
9+
LABEL cloud.tacc.project="Tapis API CLI"
10+
11+
ARG AGAVEPY_BRANCH=v0.8.0
12+
ARG PYTHON_PIP_VERSION=9.0.3
13+
14+
#### This is a temporary fix for an issue with OverlayFS on TACC systems ###
15+
RUN mkdir -p /work && chown root:root /work
16+
RUN mkdir -p /gpfs && chown root:root /gpfs
17+
RUN mkdir -p /data && chown root:root /data
18+
RUN mkdir -p /scratch && chown root:root /scratch
19+
20+
# In-container volume mounts
21+
# (For containers launched using TACC.cloud SSO identity)
22+
ARG CORRAL=/corral
23+
ARG STOCKYARD=/work/projects
24+
25+
# Basics
26+
RUN apt-get -y update && \
27+
apt-get -y install --no-install-recommends \
28+
apt-utils bash curl dialog git vim rsync && \
29+
apt-get clean && \
30+
rm -rf /var/lib/apt/lists/*
31+
32+
# jq for parsing JSON
33+
RUN curl -L -sk -o /usr/local/bin/jq "https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64" \
34+
&& chmod a+x /usr/local/bin/jq
35+
36+
RUN apt-get -y update && \
37+
apt-get -y install --no-install-recommends \
38+
python3 \
39+
python3-pip \
40+
python3-setuptools && \
41+
apt-get clean && \
42+
rm -rf /var/lib/apt/lists/*
43+
44+
# Make python3 the default user python
45+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
46+
RUN pip3 install --upgrade pip==${PYTHON_PIP_VERSION}
47+
RUN pip3 install --upgrade virtualenv==16.0.0
48+
49+
# Make pip behave
50+
RUN curl -skL -o /etc/pip.conf \
51+
https://raw.githubusercontent.com/SD2E/base-images/master/languages/python3/files/pip.conf
52+
53+
# AgavePy
54+
WORKDIR /tmp
55+
RUN git clone https://github.com/TACC/agavepy \
56+
&& cd agavepy \
57+
&& git fetch --all && \
58+
git checkout ${AGAVEPY_BRANCH} && \
59+
python setup.py install --quiet
60+
61+
RUN mkdir -p /home
62+
WORKDIR /home
63+
64+
COPY bin /home/bin
65+
COPY completion/agave-cli /etc/bash_completion.d/agave-cli
66+
COPY etc /home/etc
67+
ENV PATH $PATH:/home/bin
68+
ENV HOME /home
69+
ENV AGAVE_CACHE_DIR=/home/.agave
70+
71+
# Set command prompt
72+
RUN echo 'source /home/etc/.dockerprompt' >> /home/.bashrc
73+
74+
CMD ["/bin/bash"]

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ shell: build
4040

4141
clean:
4242
make -C docs clean
43+
44+
public-image:
45+
docker build $(DOCKER_BUILD_ARGS) -f Dockerfile.public -t tacc/tapis-cli:latest .

README.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Agave is an open platform-as-a-service built by TACC designed for scalable and
66
reproducible research that integrates HPC resources which can be managed
77
through a single API.
88
Agave forms part of a thriving community that empowers users to run code in a
9-
reproducible manner, manage data efficiently, collaborate meaningfully, and
10-
integrate easily with third-party applications.
11-
TACC operates a professionally managed and supported instance of Agave as part
9+
reproducible manner, manage data efficiently, collaborate meaningfully, and
10+
integrate easily with third-party applications.
11+
TACC operates a professionally managed and supported instance of Agave as part
1212
of its TACC.cloud Platform.
1313

1414

1515
## What is the Agave CLI?
1616

1717
The Agave command line interface (CLI) is a client for interacting with the
18-
Agave platform.
19-
The CLI empowers you to streamline common interactions with the API and
20-
automating repetitive and/or background tasks. Many developers and analysts
21-
use it as their primary interface to TACC and other computing environments.
22-
By default, this distribution of the CLI is configured to work with
23-
TACC-hosted instances of Agave, but it can easily be adapted to support
24-
on-premises or other hosted Agave installations.
18+
Agave platform.
19+
The CLI empowers you to streamline common interactions with the API and
20+
automating repetitive and/or background tasks. Many developers and analysts
21+
use it as their primary interface to TACC and other computing environments.
22+
By default, this distribution of the CLI is configured to work with
23+
TACC-hosted instances of Agave, but it can easily be adapted to support
24+
on-premises or other hosted Agave installations.
2525

2626

2727
## Installation
@@ -30,7 +30,7 @@ on-premises or other hosted Agave installations.
3030
tooling,bug fixes, and rewrites are done in Python 3. The Python scripts make
3131
use of [TACC/agavepy](https://github.com/TACC/agavepy).
3232

33-
To use `TACC/agave-cli` you'll need the following dependencies.
33+
To use `TACC/agave-cli` you'll need the following dependencies.
3434

3535
* Bash 3.2.50+
3636
* curl 7.2+ with TLS support
@@ -71,29 +71,28 @@ echo "export PATH=$PATH:$PWD/agave-cli/bin" >> ~/.bash_profile
7171

7272
## Getting started
7373

74-
To get more details
74+
To get more details
7575
[see the documentation for the latest changes](docs/docsite).
76-
For more oficial documentation see
76+
For more official documentation see
7777
[Agave](https://tacc-cloud.readthedocs.io/projects/agave/en/latest/).
7878

7979
The first time you use the CLI, you will need to create a session.
8080
You will need to create credentials to interact with a tenant.
8181
The credentials will, by default, be store in `~/.agave/`.
8282

8383
```
84-
$ auth-session-init
85-
ID NAME URL
86-
3dem 3dem Tenant https://api.3dem.org/
87-
agave.prod Agave Public Tenant https://public.agaveapi.co/
88-
araport.org Araport https://api.araport.org/
89-
designsafe DesignSafe https://agave.designsafe-ci.org/
90-
iplantc.org CyVerse Science APIs https://agave.iplantc.org/
91-
irec iReceptor https://irec.tenants.prod.tacc.cloud/
92-
portals Portals Tenant https://portals-api.tacc.utexas.edu/
93-
sd2e SD2E Tenant https://api.sd2e.org/
94-
sgci Science Gateways Community Institute https://sgci.tacc.cloud/
95-
tacc.prod TACC https://api.tacc.utexas.edu/
96-
vdjserver.org VDJ Server https://vdj-agave-api.tacc.utexas.edu/
84+
$ auth-session-init
85+
ID NAME URL
86+
3dem 3dem Tenant https://api.3dem.org/
87+
araport.org Araport https://api.araport.org/
88+
designsafe DesignSafe https://agave.designsafe-ci.org/
89+
iplantc.org CyVerse Science APIs https://agave.iplantc.org/
90+
irec iReceptor https://irec.tenants.prod.tacc.cloud/
91+
portals Portals Tenant https://portals-api.tacc.utexas.edu/
92+
sd2e SD2E Tenant https://api.sd2e.org/
93+
sgci Science Gateways Community Institute https://sgci.tacc.cloud/
94+
tacc.prod TACC https://api.tacc.utexas.edu/
95+
vdjserver.org VDJ Server https://vdj-agave-api.tacc.utexas.edu/
9796
9897
Please specify the ID for the tenant you wish to interact with:
9998
```

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.0
1+
3.0.1

bin/auth-session-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
auth-session-init [OPTION]
44
5-
Creates a new API client application and generates a set of API keys for the user.
5+
Creates a new API client application and generates a set of API keys.
66
77
Options:
88
-c, --cachedir Directory to save confiurations in.

bin/jobs-stop

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ main() {
5454
if [ -z "$args" ]; then
5555
err "Please specify a job id to stop"
5656
else
57-
cmd="curl -sk -H \"${authheader}\" -X POST -d \"action=stop\" '$hosturl$args?pretty=true'"
57+
cmd="curl -sk -H \"${authheader}\" -X POST -H \"Content-Type: application/json\" --data '{\"action\":\"stop\"}' '$hosturl$args?pretty=true'"
58+
5859

5960
if ((veryverbose)); then
6061
[ "$piped" -eq 0 ] && log "Calling $cmd"
6162
fi
6263

63-
response=`curl -sk -H "${authheader}" -X POST -d "action=stop" "$hosturl$args?pretty=true"`
64+
response=`curl -sk -H "${authheader}" -X POST -H "Content-Type: application/json" --data '{"action":"stop"}' "$hosturl$args?pretty=true"`
6465

6566
if [[ $(jsonquery "$response" "status") = 'success' ]]; then
6667
result=$(format_api_json "$response")

bin/jobs-submit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ main() {
8787
# standard file upload
8888
else
8989

90-
cmd="curl -sk -H \"${authheader}\" -X POST -d \"fileToUpload=@$filetoupload\" '$hosturl?pretty=true'"
90+
cmd="curl -sk -H \"${authheader}\" -H \"Content-Type: application/json\" -X POST -d \"@$filetoupload\" '$hosturl?pretty=true'"
9191

9292
if ((veryverbose)); then
9393
[ "$piped" -eq 0 ] && log "Calling $cmd"
9494
fi
9595

96-
response=`curl -sk -H "${authheader}" -X POST -F "fileToUpload=@$filetoupload" "$hosturl?pretty=true"`
96+
response=`curl -sk -H "${authheader}" -H "Content-Type: application/json" -X POST -d "@$filetoupload" "$hosturl?pretty=true"`
9797

9898
fi
9999

bin/jobs-template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ main() {
465465
if ((verbose)); then
466466
[ "$piped" -eq 0 ] && log "Creating a new webhook url for your job..."
467467
fi
468-
requestbin=$(requestbin-create -v)
468+
equestbin=$(requestbin-create -v)
469469
requestbin_id=$(jsonquery "$requestbin" "name")
470470
webhookurl="https://requestbin.agaveapi.co/${requestbin_id}?job_id=\${JOB_ID}&status=\${JOB_STATUS}"
471471

@@ -494,7 +494,7 @@ main() {
494494
if ((allfields)); then
495495
printf "{\n \"name\":\"%s\",\n \"appId\": \"%s\",\n \"batchQueue\": \"%s\",\n \"executionSystem\": \"%s\",\n \"maxRunTime\": \"%s\",\n \"memoryPerNode\": \"%sGB\",\n \"nodeCount\": %s,\n \"processorsPerNode\": %s,\n \"archive\": %s,\n \"archiveSystem\": \"%s\",\n \"archivePath\": %s,\n \"inputs\": {%s\n },\n \"parameters\": {%s\n },\n \"notifications\": [\n%s\n ]\n}\n" "$job_name" "$args" "$queue" "$execution_system_id" "$maxRunTime" "$memoryPerNode" "$nodeCount" "$processorsPerNode" "$archive" "$archiveSystem" "$archivePath" "$inputs" "$parameters" "$notifications"
496496
else
497-
printf "{\n \"name\": \"%s\",\n \"appId\": \"%s\",\n \"archive\": %s,\n \"inputs\": {%s\n },\n \"parameter\": {%s\n }\n}\n" "$job_name" "$args" "$archive" "$inputs" "$parameters"
497+
printf "{\n \"name\": \"%s\",\n \"appId\": \"%s\",\n \"archive\": %s,\n \"inputs\": {%s\n },\n \"parameters\": {%s\n }\n}\n" "$job_name" "$args" "$archive" "$inputs" "$parameters"
498498
fi
499499

500500
if ((verbose)); then

0 commit comments

Comments
 (0)