Skip to content

Commit

Permalink
Merge branch 'SOFTWARE-4946.clean-up-contact-fields' of https://githu…
Browse files Browse the repository at this point in the history
…b.com/RyanEweSeng/topology into SOFTWARE-4946.clean-up-contact-fields
  • Loading branch information
RyanEweSeng committed Jan 11, 2022
2 parents 87e5143 + 424982b commit 1bf00e2
Show file tree
Hide file tree
Showing 112 changed files with 3,759 additions and 367 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build-client-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build and Push Client EL8 Docker image

on:
push:
branches: [ master ]
paths:
- 'Dockerfile.client'
- 'bin/osg-notify'
- 'src/net_name_addr_utils.py'
- 'src/topology_utils.py'
workflow_dispatch:

jobs:
make-date-tag:
runs-on: ubuntu-latest
if: startsWith(github.repository, 'opensciencegrid/')
outputs:
dtag: ${{ steps.mkdatetag.outputs.dtag }}
steps:
- name: make date tag
id: mkdatetag
run: echo "::set-output name=dtag::$(date +%Y%m%d-%H%M)"

build:
runs-on: ubuntu-latest
needs: [make-date-tag]
if: startsWith(github.repository, 'opensciencegrid/')
strategy:
fail-fast: False

steps:
- uses: actions/checkout@v2

- name: Generate tag list
id: generate-tag-list
env:
TIMESTAMP: ${{ needs.make-date-tag.outputs.dtag }}
run: |
docker_repo=opensciencegrid/topology-notify
tag_list=()
for registry in hub.opensciencegrid.org docker.io; do
tag_list+=($registry/$docker_repo:release)
tag_list+=($registry/$docker_repo:release-$TIMESTAMP)
done
IFS=,
echo "::set-output name=taglist::${tag_list[*]}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to OSG Harbor
uses: docker/login-action@v1
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.OSG_HARBOR_ROBOT_USER }}
password: ${{ secrets.OSG_HARBOR_ROBOT_PASSWORD }}

- name: Build and push Client Docker images
uses: docker/[email protected]
with:
push: true
tags: "${{ steps.generate-tag-list.outputs.taglist }}"
file: ./Dockerfile.client
18 changes: 18 additions & 0 deletions Dockerfile.client
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM centos:centos8

LABEL maintainer="OSG Software <[email protected]>"
LABEL name="OSG 3.5 OSG-Notify client"

RUN yum -y install https://repo.opensciencegrid.org/osg/3.5/osg-3.5-el8-release-latest.rpm \
epel-release \
yum-utils

RUN yum -y install python3 \
python3-requests \
python3-gnupg

COPY bin/osg-notify /usr/local/bin
COPY src/net_name_addr_utils.py /usr/lib/python3.6/site-packages
COPY src/topology_utils.py /usr/lib/python3.6/site-packages

ENTRYPOINT [ "/usr/local/bin/osg-notify" ]
25 changes: 18 additions & 7 deletions bin/get-scitokens-mapfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,30 @@ def main(argv):
for vo_name, vo_data in all_vos_data.vos.items():
if is_null(vo_data, "Credentials", "TokenIssuers"):
continue
mapfile += f"# {vo_name}\n"
mapfile += f"## {vo_name} ##\n"
for token_issuer in vo_data["Credentials"]["TokenIssuers"]:
url = token_issuer.get("URL")
subject = token_issuer.get("Subject", "")
description = token_issuer.get("Description", "")
pattern = ""
if url:
if args.regex:
url = f'/^{re.escape(url)},/'
if subject:
if args.regex:
pattern = f'/^{re.escape(url)},{re.escape(subject)}$/'
else:
pattern = f'"{url},{subject}"'
else:
url = f'"{url}"'
if args.regex:
pattern = f'/^{re.escape(url)},/'
else:
pattern = f'"{url}"'
unix_user = token_issuer.get("DefaultUnixUser")
if url and unix_user:
mapfile += f"SCITOKENS {url} {unix_user}\n"
if description:
mapfile += f"# {description}:\n"
if pattern and unix_user:
mapfile += f"SCITOKENS {pattern} {unix_user}\n"
else:
mapfile += f"# invalid SCITOKENS: {url or '<NO URL>'} {unix_user or '<NO UNIX USER>'}\n"
mapfile += f"# invalid SCITOKENS: {pattern or '<NO URL>'} {unix_user or '<NO UNIX USER>'}\n"
if args.strict:
print(mapfile, file=sys.stderr)
sys.exit("Invalid scitoken found in strict mode")
Expand Down
34 changes: 29 additions & 5 deletions bin/osg-notify
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,20 @@ def main():

recipients = set(args.recipients.split())
if args.oim_recipients and 'vos' in args.oim_recipients:
results = topology_utils.get_vo_contacts(args)
attempts = 3
while attempts > 0:
try:
results = topology_utils.get_vo_contacts(args)
except topology_utils.InvalidPathError as exc:
print(exc)
exit(1)
except topology_utils.IncorrectPasswordError as exc:
attempts -= 1
if attempts == 0:
print("Too many incorrect password attempts, exiting")
exit(1)
else:
print(exc)
results = topology_utils.filter_contacts(args, results)
emails = set()
for name in results.keys():
Expand All @@ -185,10 +198,21 @@ def main():
emails.add(contact['Email'])
recipients.update(emails)
if args.oim_recipients and 'resources' in args.oim_recipients:
if args.fqdn_filter:
results = topology_utils.get_resource_contacts_by_fqdn(args)
else:
results = topology_utils.get_resource_contacts(args)
attempts = 3
while attempts > 0:
try:
if args.fqdn_filter:
results = topology_utils.get_resource_contacts_by_fqdn(args)
else:
results = topology_utils.get_resource_contacts(args)
except topology_utils.InvalidPathError as exc:
exit(str(exc))
except topology_utils.IncorrectPasswordError as exc:
attempts -= 1
if attempts == 0:
exit("Too many incorrect password attempts, exiting")
else:
print(exc)
results = topology_utils.filter_contacts(args, results)
emails = set()
for name in results.keys():
Expand Down
6 changes: 6 additions & 0 deletions mappings/project_institution.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Arcadia: "Arcadia University"
Arkansas: "University of Arkansas"
AMNH: "American Museum of Natural History"
ASU: "Arizona State University"
BC: "Boston College"
Expand All @@ -21,14 +22,17 @@ KentState: "Kent State University"
KSU: "Kansas State University"
LoyolaChicago: "Loyola University Chicago"
LSMSA: "Louisiana School for Math, Science, and the Arts"
LSU: "Louisiana State University"
LSUHSC: "Louisiana State University Health Sciences Center"
Michigan: "University of Michigan"
Mines: "Colorado School of Mines"
MIT: "Massachusetts Institute of Technology"
Mizzou: "University of Missouri"
MSU: "Montana State University"
MTU: "Michigan Technological University"
NCSU: "North Carolina State University"
NIST: "National Institute of Standards and Technology"
NJIT: "New Jersey Institute of Technology"
NMSU: "New Mexico State University"
Northeastern: "Northeastern University"
OSU: "The Ohio State University"
Expand All @@ -45,11 +49,13 @@ Syracuse: "Syracuse University"
TNTech: "Tennessee Tech University"
TexasAM: "Texas A&M University"
UCBerkeley: "University of California, Berkeley"
UCDenver: "University of Colorado Denver"
UCHC: "University of Connecticut Health Center"
UCF: "University of Central Florida"
UCI: "University of California, Irvine"
UCLA: "University of California, Los Angeles"
UCMerced: "University of California, Merced"
UConn: "University of Connecticut"
UCR: "University of California, Riverside"
UCSD: "University of California, San Diego"
UEdinburgh: "University of Edinburgh"
Expand Down
9 changes: 9 additions & 0 deletions projects/Arkansas_Nelson.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Description: Statistical analysis on keys generated by a lattice based cryptography algorithm for post-quantum cryptography to determine patterns in the types of errors produced in the keys.
Department: Computer Science & Computer Engineering
FieldOfScience: Computer Science
Organization: University of Arkansas
PIName: Alexander Nelson

Sponsor:
CampusGrid:
Name: OSG Connect
12 changes: 12 additions & 0 deletions projects/Caltech_Chary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Name: Caltech_Chary
Description: Joint Survey Processing (JSP) is aimed at enabling science that requires pixel-level combination of data from the Vera C. Rubin Observatory, The Euclid Space Telescope, and the Nancy Grace Roman Space Telescope.
Department: IPAC
FieldOfScience: Astronomy and Astrophysics
Organization: California Institute of Technology
PIName: Ranga-Ram Chary

ID: '847'

Sponsor:
CampusGrid:
Name: OSG Connect
17 changes: 17 additions & 0 deletions projects/Columbia_Mandal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Description: Recent experiments demonstrated that by placing a
molecule inside an optical cavity one can modify ground state
chemical reactivity. It has been observed that when molecular
vibrations are strongly coupled to the quantized radiation
field inside an optical cavity, the chemical kinetics is
suppressed. The theoretical understanding of such remarkable
effects remains elusive. In this work, a quantum dynamics
approach for simulating the vibration-cavity
(Vibro-Polaritons) hybrid system will be developed.
Department: Department of Chemistry
FieldOfScience: Chemistry
Organization: Columbia University
PIName: Arkajit Mandal

Sponsor:
CampusGrid:
Name: OSG Connect
10 changes: 10 additions & 0 deletions projects/GATech_Jezghani.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Description: Free neutron and nuclear isotope beta decay is a sensitive test of the Standard Model and probe for BSM physics that complements high-energy efforts such as those at the LHC. Precision efforts such as the Nab experiment at ORNL rely on high-statistics simulations to constrain error. More details can be seen at https://nab.phys.virginia.edu.
Department: PACE
FieldOfScience: Physics
Organization: Georgia Institute of Technology
PIName: Aaron Jezghani


Sponsor:
CampusGrid:
Name: OSG Connect
11 changes: 11 additions & 0 deletions projects/GATech_Sholl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Description: Atomically-detailed simulation methods (e.g. Molecular Dynamics, Monte Carlo and quantum chemistry methods) are used to develop models of molecular separations based on adsorption in structured nanoporous materials. These materials include zeolites, metal-organic framework materials, activated carbons and polymers. A long-term goal is the discovery of new adsorbent materials for a diverse range of chemical separations, a problem for which a very large search space exists.
Department: Chemical & Biomolecular Engineering
FieldOfScience: Chemistry
Organization: Georgia Institute of Technology
PIName: David Sholl

ID: '848'

Sponsor:
CampusGrid:
Name: OSG Connect
10 changes: 10 additions & 0 deletions projects/IIT_Kang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Description: Create new statistical learning methodologies and machine learning algorithms
Department: Applied Mathematics
FieldOfScience: Data Science
Organization: Illinois Institute of Technology
PIName: Lulu Kang


Sponsor:
CampusGrid:
Name: OSG Connect
9 changes: 0 additions & 9 deletions projects/IU-GALAXY.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions projects/KSU_Comer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Description: We use molecular simulation to better understand biological and synthetic nanoscale systems and interactions between them.
Department: Department of Anatomy and Physiology
FieldOfScience: Health Sciences
Organization: Kansas State University
PIName: Jeff Comer

Sponsor:
CampusGrid:
Name: OSG Connect
9 changes: 9 additions & 0 deletions projects/LSU_Wilson.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Description: The study of disorder effects in quantum materials and in far-from equilibrium quantum systems.
Department: Physics and Astronomy
FieldOfScience: Physics
Organization: Louisiana State University
PIName: Justin Wilson

Sponsor:
CampusGrid:
Name: OSG Connect
9 changes: 9 additions & 0 deletions projects/MTU_Sha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Description: My methodological research projects focus on the development of novel statistical methods and efficient bioinformatical tools to address problems from genome-wide association studies and phenome-wide association studies.
Department: Department of Mathematical Sciences
FieldOfScience: Mathematics
Organization: Michigan Technological University
PIName: Qiuying Sha

Sponsor:
CampusGrid:
Name: OSG Connect
11 changes: 11 additions & 0 deletions projects/NCSU_Petersen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Description: Annealing of graphite by using large ensembles to
accelerate barrier crossing times.
https://www.sciencedirect.com/science/article/pii/S0022311517315490
Department: OIT HPC
FieldOfScience: Materials Science
Organization: North Carolina State University
PIName: Andrew Petersen

Sponsor:
CampusGrid:
Name: OSG Connect
9 changes: 0 additions & 9 deletions projects/ND-GALAXY.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions projects/NJIT_Nadim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Description: Work is concerned with uncovering the principles of underlying neural circuit function.
Department: Biological Sciences
FieldOfScience: Biological and Biomedical Sciences
Organization: New Jersey Institute of Technology
PIName: Farzan Nadim


Sponsor:
CampusGrid:
Name: OSG Connect
15 changes: 0 additions & 15 deletions projects/SPLINTER.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions projects/UAB_Worthey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Description: Application of data science, omics, computational biology to understan phenotypic differentiator in human disease.
Department: Department of Pediatrics and Pathology; CGDS
FieldOfScience: Biological and Biomedical Sciences
Organization: The University of Alabama at Birmingham
PIName: Elizabeth Worthey


Sponsor:
CampusGrid:
Name: OSG Connect
9 changes: 9 additions & 0 deletions projects/UC-Staff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Description: UC staff - testing and monitoring
FieldOfScience: Computer Science
Department: Physics
Organization: University of Chicago
PIName: Robert William Gardner Jr

Sponsor:
VirtualOrganization:
Name: OSG
Loading

0 comments on commit 1bf00e2

Please sign in to comment.