Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #34 from internet2/comanage-cron
adding comanage cron container for job shell support
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM i2incommon/comanage-registry-cron:3.3.1-20201026 | ||
|
||
ENV COMANAGE_REGISTRY_ADMIN_FAMILY_NAME=Anderson | ||
ENV COMANAGE_REGISTRY_ADMIN_USERNAME=banderson | ||
ENV COMANAGE_REGISTRY_DATASOURCE=Database/Mysql | ||
ENV COMANAGE_REGISTRY_DATABASE=registry | ||
ENV COMANAGE_REGISTRY_DATABASE_HOST=comanage-data | ||
ENV COMANAGE_REGISTRY_DATABASE_USER=registry_user | ||
ENV COMANAGE_REGISTRY_DATABASE_USER_PASSWORD=123321 | ||
ENV COMANAGE_REGISTRY_EMAIL_FROM=xxxx@example.edu | ||
ENV COMANAGE_REGISTRY_EMAIL_TRANSPORT=Smtp | ||
ENV COMANAGE_REGISTRY_EMAIL_PORT=25 | ||
ENV COMANAGE_REGISTRY_EMAIL_HOST=smtp.example.edu | ||
#ENV HTTPS_CERT_FILE=/etc/pki/tls/certs/localhost.crt | ||
#ENV HTTPS_PRIVKEY_FILE=/etc/pki/tls/private/localhost.key | ||
# COMANAGE_REGISTRY_SECURITY_SALT - autogenerated if not specified | ||
# COMANAGE_REGISTRY_SECURITY_SEED - autogenerated if not specified | ||
#ENV SHIBBOLETH_SP_CERT=/etc/shibboleth/sp-cert.pem | ||
#ENV SHIBBOLETH_SP_PRIVKEY=/etc/shibboleth/sp-key.pem | ||
#ENV SHIBBOLETH_SP_ENTITY_ID=comanage.example.edu | ||
#ENV SHIBBOLETH_SP_METADATA_PROVIDER_XML=sdf | ||
#ENV SHIBBOLETH_SP_SAMLDS_URL=thing | ||
|
||
RUN yum -y update && yum -y install --setopt=tsflags=nodocs epel-release python-pip && pip install awscli && pip install --upgrade pip | ||
|
||
ARG maintainer=my | ||
ARG imagename=comanage | ||
ARG version=3.3.1 | ||
ARG CSPHOSTNAME=localhost | ||
ENV CSPHOSTNAME=$CSPHOSTNAME | ||
ENV COMANAGE_REGISTRY_VIRTUAL_HOST_FQDN=$CSPHOSTNAME | ||
|
||
LABEL Version=$version | ||
ENV VERSION=$version | ||
|
||
COPY runcomangejob.sh /usr/local/bin/ | ||
COPY --chown=root:root root-crontab /usr/local/etc | ||
RUN chmod 755 /usr/local/bin/runcomangejob.sh && \ | ||
/usr/bin/crontab -u root /usr/local/etc/root-crontab | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* * * * * /usr/local/bin/runcomangejob.sh 1 | ||
* * * * * /usr/local/bin/runcomangejob.sh 2 | ||
# Deprecated job to run expirations, syncorgsources, and groupvalidity tasks (until Registry v4.0.0) | ||
0 * * * * /usr/local/bin/runcomangejob.sh |
12 changes: 12 additions & 0 deletions
12
Workbench/comanage_cron/container_files/system/runcomangejob.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
if [ "$#" -ne 1 ]; | ||
then | ||
echo Executing job to run expirations, syncorgsources, and groupvalidity tasks | ||
cd /srv/comanage-registry/app && Console/cake job -q | ||
exit | ||
fi | ||
|
||
echo Executing job shell for CO number $1 | ||
cd /srv/comanage-registry/app && Console/cake job -q -r -c $1 | ||
echo Done executing job shell for CO number $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters