Skip to content

merge pc_Sept2022 #134

Merged
merged 5 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Workbench/comanage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM i2incommon/comanage-registry:3.3.4-20210712
FROM i2incommon/comanage-registry:4.0.2-20220223

ENV COMANAGE_REGISTRY_ADMIN_FAMILY_NAME=Anderson
ENV COMANAGE_REGISTRY_ADMIN_USERNAME=banderson
ENV COMANAGE_REGISTRY_DATASOURCE=Database/Mysql
ENV COMANAGE_REGISTRY_DATASOURCE=Database/Postgres
ENV COMANAGE_REGISTRY_DATABASE=registry
ENV COMANAGE_REGISTRY_DATABASE_HOST=comanage-data
ENV COMANAGE_REGISTRY_DATABASE_PORT=5432
ENV COMANAGE_REGISTRY_DATABASE_USER=registry_user
ENV COMANAGE_REGISTRY_DATABASE_USER_PASSWORD=123321
ENV COMANAGE_REGISTRY_EMAIL_FROM=noreply@workbench.incommon.org
Expand All @@ -31,7 +32,7 @@ RUN yum -y update && yum -y install --setopt=tsflags=nodocs epel-release python-

ARG maintainer=my
ARG imagename=comanage
ARG version=3.3.1
ARG version=4.0.2
ARG CSPHOSTNAME=localhost
ENV CSPHOSTNAME=$CSPHOSTNAME
ENV COMANAGE_REGISTRY_VIRTUAL_HOST_FQDN=$CSPHOSTNAME
Expand All @@ -41,6 +42,12 @@ ENV VERSION=$version

COPY container_files/shibboleth/* /etc/shibboleth/

# activate SQL plugin
RUN mkdir -p /srv/comanage-registry/local/Plugin/
RUN ln -s /srv/comanage-registry/app/AvailablePlugin/SqlProvisioner /srv/comanage-registry/local/Plugin/

COPY container_files/httpd/ /etc/httpd/conf.d/

COPY container_files/system/setservername.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/setservername.sh && rm -f /etc/httpd/conf.d/ssl.conf

Expand Down
6 changes: 6 additions & 0 deletions Workbench/comanage/container_files/httpd/comanage-api.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Directory /var/www/html/registry>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
26 changes: 12 additions & 14 deletions Workbench/comanage_cron/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM i2incommon/comanage-registry-cron:3.3.4-20210712
FROM i2incommon/comanage-registry-cron:4.0.2-20220223

ENV COMANAGE_REGISTRY_ADMIN_FAMILY_NAME=Anderson
ENV COMANAGE_REGISTRY_ADMIN_USERNAME=banderson
ENV COMANAGE_REGISTRY_DATASOURCE=Database/Mysql
ENV COMANAGE_REGISTRY_DATASOURCE=Database/Postgres
ENV COMANAGE_REGISTRY_DATABASE=registry
ENV COMANAGE_REGISTRY_DATABASE_HOST=comanage-data
ENV COMANAGE_REGISTRY_DATABASE_USER=registry_user
Expand All @@ -15,32 +15,30 @@ ENV COMANAGE_REGISTRY_EMAIL_HOST=smtp.example.edu
#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 apt-get update --allow-releaseinfo-change && apt-get update
RUN apt-get install -y netcat
RUN apt-get install -y sendmail

ARG maintainer=my
ARG imagename=comanage
ARG version=3.3.1
ARG version=4.0.2
ARG CSPHOSTNAME=localhost
ENV CSPHOSTNAME=$CSPHOSTNAME
ENV COMANAGE_REGISTRY_VIRTUAL_HOST_FQDN=$CSPHOSTNAME

LABEL Version=$version
ENV VERSION=$version

# activate SQL provisioning plugin
RUN mkdir -p /srv/comanage-registry/local/Plugin/
RUN ln -s /srv/comanage-registry/app/AvailablePlugin/SqlProvisioner /srv/comanage-registry/local/Plugin/

COPY container_files/system/setupcroncomanage.sh /usr/local/bin/setupcroncomanage.sh
COPY container_files/system/runcomangejob.sh /usr/local/bin/
COPY --chown=www-data:www-data container_files/system/root-crontab /usr/local/etc
RUN chmod 755 /usr/local/bin/runcomangejob.sh && \
mkdir -p /srv/comanage-registry/app/tmp && \
chown -R www-data:www-data /srv/comanage-registry/app/tmp
#&& \
# /usr/bin/crontab -u root /usr/local/etc/root-crontab

/usr/bin/crontab -u www-data /usr/local/etc/root-crontab

ENV COMANAGE_REGISTRY_CRONTAB=/usr/local/etc/root-crontab


3 changes: 2 additions & 1 deletion Workbench/comanage_cron/container_files/system/root-crontab
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
* * * * * /usr/local/bin/runcomangejob.sh 1
* * * * * /usr/local/bin/runcomangejob.sh 2
* * * * * /usr/local/bin/runcomangejob.sh 3
# Deprecated job to run expirations, syncorgsources, and groupvalidity tasks (until Registry v4.0.0)
0 * * * * /usr/local/bin/runcomangejob.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# COmanage Registry shell script to install TIER beacon crontab
#
# Portions licensed to the University Corporation for Advanced Internet
# Development, Inc. ("UCAID") under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# UCAID licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

CRONFILE='/tmp/cronfile'

# Set up job scripts for COmanage Cos

echo "# Run the job queue for CO 1 every 5 minutes" >> "${CRONFILE}"
#echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * cd /srv/comanage-registry/app && Console/cake job -q -r -c 1 >> /tmp/cron.log" >> "${CRONFILE}"
echo "* * * * * /usr/local/bin/runcomangejob.sh 1" >> "${CRONFILE}"
echo "# Run the job queue for CO 2 every 5 minutes, but 2 minutes later than for CO 1" >> "${CRONFILE}"
echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/runcomangejob.sh 2 " >> "${CRONFILE}"
echo "# TODO support an arbitrary number of COs for jobshell" >> "${CRONFILE}"
echo "# Deprecated job to run expirations, syncorgsources, and groupvalidity tasks (until Registry v4.0.0)" >> "${CRONFILE}"
echo "0 * * * * cd /srv/comanage-registry/app && Console/cake job -q" >> "${CRONFILE}"

chmod 644 "${CRONFILE}"
crontab "${CRONFILE}"

10 changes: 3 additions & 7 deletions Workbench/comanage_data/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
FROM tier/mariadb:mariadb10
FROM postgres:12

COPY container_files/seed-data/ /docker-entrypoint-initdb.d/

COPY container_files/seed-data/ /seed-data/

ENV MYSQL_DATABASE registry
ENV MYSQL_USER registry_user
ENV MYSQL_PASSWORD 123321
ENV MYSQL_DATADIR /var/lib/mysqlmounted
ENV AFTER_FIRST_TIME_SQL /seed-data/comanage-bootstrap.sql
Loading