Skip to content

Commit

Permalink
Added retirees group to configuration; advancing version number to 1.…
Browse files Browse the repository at this point in the history
…5.1.
  • Loading branch information
Mike Simpson committed Dec 2, 2019
1 parent b5d1a9c commit 06a9773
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 15 deletions.
8 changes: 4 additions & 4 deletions DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ In a terminal window on my local workstation:
$ git clone https://github.com/ualibraries/patron-groups.git ual-patron-groups
$ cd ual-patron-groups
$ git checkout v1.5.0
$ git checkout v1.5.1
$ cd src/main/python
$ sudo pip3 install --trusted-host pypi.python.org -r requirements.txt
$ python3 setup.py sdist
$ cd ../../..
$ cd src/main/docker
$ cp ../python/dist/petal-1.5.0.tar.gz .
$ docker build -t pgrps:1.5.0 .
$ cp ../python/dist/petal-1.5.1.tar.gz .
$ docker build -t pgrps:1.5.1 .
$ cd ../../..

$ export LDAP_PASSWD=[ldap password]
Expand All @@ -136,4 +136,4 @@ In a terminal window on my local workstation:
$ docker run -e "LDAP_PASSWD=${LDAP_PASSWD}" \
-e "GROUPER_PASSWD=${GROUPER_PASSWD}" \
-e "SLACK_WEBHOOK=${SLACK_WEBHOOK}" \
--rm -d pgrps:1.5.0
--rm -d pgrps:1.5.1
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ prerequisites, and then build a source distribution of the module:
% python setup.py sdist

% ls dist
petal-1.5.0.tar.gz
petal-1.5.1.tar.gz
% cd ../../..

Expand All @@ -105,12 +105,12 @@ Change to the Docker source directory, copy the distribution file over
from the Python side, and build the Docker container image:

% cd src/main/docker
% cp ../python/dist/petal-1.5.0.tar.gz .
% docker build -t pgrps:1.5.0 .
% cp ../python/dist/petal-1.5.1.tar.gz .
% docker build -t pgrps:1.5.1 .

% docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pgrps 1.5.0 16cfafa9d0f1 12 seconds ago 80.1MB
pgrps 1.5.1 16cfafa9d0f1 12 seconds ago 80.1MB
% cd ../../..

Expand All @@ -136,7 +136,7 @@ hand, instantiate using an interactive shell:
% docker run -e "LDAP_PASSWD=${LDAP_PASSWD}" \
-e "GROUPER_PASSWD=${GROUPER_PASSWD}" \
-e "SLACK_WEBHOOK=${SLACK_WEBHOOK}" \
--rm -it pgrps:1.5.0 /bin/bash
--rm -it pgrps:1.5.1 /bin/bash

# which petl
/usr/bin/petl
Expand All @@ -159,7 +159,7 @@ in the background:
% docker run -e "LDAP_PASSWD=${LDAP_PASSWD}" \
-e "GROUPER_PASSWD=${GROUPER_PASSWD}" \
-e "SLACK_WEBHOOK=${SLACK_WEBHOOK}" \
--rm -d pgrps:1.5.0
--rm -d pgrps:1.5.1

The log output from the "run_petl" invocation should once again wind
up in the Slack channel associated with the "SLACK_WEBHOOK"
Expand Down
6 changes: 3 additions & 3 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV PACKAGES="dumb-init bash python3 python3-dev ca-certificates tzdata" \
GROUPER_PASSWD="***supply at runtime***" \
SLACK_WEBHOOK="***supply at runtime***"

ADD petal-1.5.0.tar.gz /var/tmp
ADD petal-1.5.1.tar.gz /var/tmp
ADD run_petl /etc/periodic/daily

RUN echo \
Expand All @@ -27,8 +27,8 @@ RUN echo \
&& echo "US/Arizona" > /etc/timezone \
#
# install petal
&& pip install --trusted-host pypi.python.org -r /var/tmp/petal-1.5.0/requirements.txt \
&& pip install /var/tmp/petal-1.5.0
&& pip install --trusted-host pypi.python.org -r /var/tmp/petal-1.5.1/requirements.txt \
&& pip install /var/tmp/petal-1.5.1

ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
CMD [ "/usr/sbin/crond", "-f" ]
2 changes: 1 addition & 1 deletion src/main/docker/run_petl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

for g in faculty-base staff-base students-base dcc-base hsl-base
for g in faculty-base staff-base students-base dcc-base retirees-base hsl-base
do
/usr/bin/petl --config /etc/petal/petl.ini \
--group ${g} \
Expand Down
50 changes: 50 additions & 0 deletions src/main/python/config/petl.ini
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ grouper_group = ual-dcc-base
batch_size = 1000
batch_timeout = 900

#
# For retirees, you must have an affiliation of "retiree".

[retirees-base]
ldap_query =
(eduPersonAffiliation=retiree)
grouper_group = ual-retirees-base
batch_size = 1000
batch_timeout = 900

#
# The HSL group combines the same definitions of faculty, staff, students, and DCCs
# as configured above, but adds some specific requirements used to confirm an
Expand Down Expand Up @@ -273,6 +283,46 @@ ldap_query =
(dccPrimaryDept=9975)(dccPrimaryDept=9985)
)
)
(&
(eduPersonAffiliation=retiree)
(|
(employeePrimaryDept=0207)(employeePrimaryDept=0417)(employeePrimaryDept=0650)(employeePrimaryDept=0655)(employeePrimaryDept=0659)
(employeePrimaryDept=0660)(employeePrimaryDept=0662)(employeePrimaryDept=0663)(employeePrimaryDept=0664)(employeePrimaryDept=0665)
(employeePrimaryDept=0666)(employeePrimaryDept=0667)(employeePrimaryDept=0668)(employeePrimaryDept=0669)(employeePrimaryDept=0670)
(employeePrimaryDept=0671)(employeePrimaryDept=0672)(employeePrimaryDept=0673)(employeePrimaryDept=0674)(employeePrimaryDept=0675)
(employeePrimaryDept=0676)(employeePrimaryDept=0677)(employeePrimaryDept=0678)(employeePrimaryDept=0679)(employeePrimaryDept=0680)
(employeePrimaryDept=0681)(employeePrimaryDept=0682)(employeePrimaryDept=0683)(employeePrimaryDept=0684)(employeePrimaryDept=0685)
(employeePrimaryDept=0686)(employeePrimaryDept=0700)(employeePrimaryDept=0701)(employeePrimaryDept=0702)(employeePrimaryDept=0703)
(employeePrimaryDept=0704)(employeePrimaryDept=0705)(employeePrimaryDept=0706)(employeePrimaryDept=0707)(employeePrimaryDept=0708)
(employeePrimaryDept=0709)(employeePrimaryDept=0710)(employeePrimaryDept=0711)(employeePrimaryDept=0712)(employeePrimaryDept=0713)
(employeePrimaryDept=0715)(employeePrimaryDept=0716)(employeePrimaryDept=0717)(employeePrimaryDept=0718)(employeePrimaryDept=0719)
(employeePrimaryDept=0720)(employeePrimaryDept=0721)(employeePrimaryDept=0722)(employeePrimaryDept=0723)(employeePrimaryDept=0724)
(employeePrimaryDept=0728)(employeePrimaryDept=0729)(employeePrimaryDept=0730)(employeePrimaryDept=0731)(employeePrimaryDept=0733)
(employeePrimaryDept=0735)(employeePrimaryDept=0736)(employeePrimaryDept=0738)(employeePrimaryDept=0739)(employeePrimaryDept=0740)
(employeePrimaryDept=0741)(employeePrimaryDept=0742)(employeePrimaryDept=0744)(employeePrimaryDept=0745)(employeePrimaryDept=0746)
(employeePrimaryDept=0747)(employeePrimaryDept=0749)(employeePrimaryDept=0750)(employeePrimaryDept=0753)(employeePrimaryDept=0754)
(employeePrimaryDept=0755)(employeePrimaryDept=0757)(employeePrimaryDept=0758)(employeePrimaryDept=0759)(employeePrimaryDept=0760)
(employeePrimaryDept=0761)(employeePrimaryDept=0762)(employeePrimaryDept=0763)(employeePrimaryDept=0765)(employeePrimaryDept=0766)
(employeePrimaryDept=0767)(employeePrimaryDept=0768)(employeePrimaryDept=0769)(employeePrimaryDept=0770)(employeePrimaryDept=0771)
(employeePrimaryDept=0772)(employeePrimaryDept=0773)(employeePrimaryDept=0774)(employeePrimaryDept=0775)(employeePrimaryDept=0776)
(employeePrimaryDept=0777)(employeePrimaryDept=0778)(employeePrimaryDept=0779)(employeePrimaryDept=0780)(employeePrimaryDept=0781)
(employeePrimaryDept=0782)(employeePrimaryDept=0783)(employeePrimaryDept=0784)(employeePrimaryDept=0785)(employeePrimaryDept=0786)
(employeePrimaryDept=0788)(employeePrimaryDept=0789)(employeePrimaryDept=0790)(employeePrimaryDept=0791)(employeePrimaryDept=0792)
(employeePrimaryDept=0795)(employeePrimaryDept=0796)(employeePrimaryDept=0797)(employeePrimaryDept=0798)(employeePrimaryDept=0799)
(employeePrimaryDept=0850)(employeePrimaryDept=0851)(employeePrimaryDept=0852)(employeePrimaryDept=0853)(employeePrimaryDept=0854)
(employeePrimaryDept=0855)(employeePrimaryDept=1401)(employeePrimaryDept=1704)(employeePrimaryDept=1709)(employeePrimaryDept=1901)
(employeePrimaryDept=1902)(employeePrimaryDept=1903)(employeePrimaryDept=1904)(employeePrimaryDept=1905)(employeePrimaryDept=1906)
(employeePrimaryDept=1907)(employeePrimaryDept=1908)(employeePrimaryDept=2511)(employeePrimaryDept=2533)(employeePrimaryDept=3301)
(employeePrimaryDept=3302)(employeePrimaryDept=3303)(employeePrimaryDept=3310)(employeePrimaryDept=4201)(employeePrimaryDept=4202)
(employeePrimaryDept=4203)(employeePrimaryDept=4204)(employeePrimaryDept=4205)(employeePrimaryDept=4206)(employeePrimaryDept=4207)
(employeePrimaryDept=4209)(employeePrimaryDept=4210)(employeePrimaryDept=4211)(employeePrimaryDept=6801)(employeePrimaryDept=6803)
(employeePrimaryDept=6804)(employeePrimaryDept=6805)(employeePrimaryDept=6806)(employeePrimaryDept=6807)(employeePrimaryDept=6808)
(employeePrimaryDept=6809)(employeePrimaryDept=6810)(employeePrimaryDept=6811)(employeePrimaryDept=6812)(employeePrimaryDept=6813)
(employeePrimaryDept=6814)(employeePrimaryDept=6815)(employeePrimaryDept=6816)(employeePrimaryDept=6817)(employeePrimaryDept=6818)
(employeePrimaryDept=6851)(employeePrimaryDept=713D)(employeePrimaryDept=713P)(employeePrimaryDept=9011)(employeePrimaryDept=9908)
(employeePrimaryDept=9975)(employeePrimaryDept=9985)
)
)
)
grouper_group = ual-hsl-base
batch_size = 1000
Expand Down
2 changes: 1 addition & 1 deletion src/main/python/src/petal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.5.0'
__version__ = '1.5.1'

from .ldap_query import LDAPQuery
from .grouper_query import GrouperQuery
Expand Down

0 comments on commit 06a9773

Please sign in to comment.