Skip to content

Commit

Permalink
update Grouper to 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Aug 8, 2023
1 parent 29a0436 commit 1e22ead
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 39 deletions.
7 changes: 4 additions & 3 deletions Workbench/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ services:
aliases:
- grouper-data
ports:
- 3306:3306
- 45432:5432
healthcheck:
test: curl -s 127.0.0.1:3306
test: /usr/bin/pg_isready
interval: 30s
timeout: 30s
retries: 3
volumes:
- grouper_data:/var/lib/mysql
- grouper_data:/var/lib/pgsql/data/

directory:
build: ./directory/
Expand Down Expand Up @@ -620,6 +620,7 @@ secrets:

volumes:
grouper_data:
grouper_data_2:
source_data:
comanage_data:
comanage_midpoint_data:
Expand Down
2 changes: 1 addition & 1 deletion Workbench/grouper_daemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM i2incommon/grouper:2.6.19
FROM i2incommon/grouper:4.4.0

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

40 changes: 14 additions & 26 deletions Workbench/grouper_data/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,30 @@
FROM i2incommon/grouper:2.6.19
FROM i2incommon/grouper:4.4.0

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

RUN yum install -y epel-release \
&& yum update -y \
&& yum install -y mariadb-server mariadb \
&& dnf module enable -y postgresql:12 \
&& dnf install -y postgresql-server \
&& yum clean all \
&& rm -rf /var/cache/yum

COPY container_files/conf/ /opt/grouper/grouperWebapp/WEB-INF/classes/
COPY container_files/bootstrap/ /tmp/
COPY container_files/mysql/createSQLuser.sql /
COPY container_files/sql/createSQLuser.sql /

RUN ln -s /usr/bin/resolveip /usr/libexec/resolveip
#setup DB
RUN chown -R postgres:postgres /var/lib/pgsql/
RUN echo "password" > /db-user-pwd.txt
RUN sudo -u postgres initdb -D /var/lib/pgsql/data/ --username=postgres --pwfile=/db-user-pwd.txt

RUN mysql_install_db \
&& chown -R mysql:mysql /var/lib/mysql/ \
&& sed -i 's/^\(bind-address\s.*\)/# \1/' /etc/my.cnf \
&& sed -i 's/^\(log_error\s.*\)/# \1/' /etc/my.cnf \
&& sed -i 's/\[mysqld\]/\[mysqld\]\ncharacter_set_server = utf8/' /etc/my.cnf \
&& sed -i 's/\[mysqld\]/\[mysqld\]\ncollation_server = utf8_general_ci/' /etc/my.cnf \
&& sed -i 's/\[mysqld\]/\[mysqld\]\nport = 3306/' /etc/my.cnf \
&& cat /etc/my.cnf \
&& echo "/usr/bin/mysqld_safe &" > /tmp/config \
&& echo "mysqladmin --silent --wait=30 ping || exit 1" >> /tmp/config \
&& echo "mysql -e 'GRANT ALL PRIVILEGES ON *.* TO \"root\"@\"%\" WITH GRANT OPTION;'" >> /tmp/config \
&& echo "mysql -e 'CREATE DATABASE grouper CHARACTER SET utf8 COLLATE utf8_bin;'" >> /tmp/config \
&& echo "mysql < /createSQLuser.sql" >> /tmp/config \
&& bash /tmp/config \
&& rm -f /tmp/config

RUN (mysqld_safe & ) \
&& while ! curl -s localhost:3306 > /dev/null; do echo waiting for mysqld to start; sleep 1; done; \
/opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh -registry -check -runscript -noprompt && \
#create grouper DB
RUN sudo -u postgres pg_ctl start -D /var/lib/pgsql/data/ \
&& psql -U postgres -f /createSQLuser.sql \
&& /opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh -registry -check -runscript -noprompt && \
/opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh /tmp/initialize.gsh && \
/opt/grouper/grouperWebapp/WEB-INF/bin/gsh.sh /tmp/set-prov.gsh

EXPOSE 3306

EXPOSE 5432

CMD mysqld_safe
CMD sudo -u postgres postgres -D /var/lib/pgsql/data/
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
# e.g. hsqldb (b): jdbc:hsqldb:hsql://localhost:9001/grouper
# e.g. postgres: jdbc:postgresql://localhost:5432/database
# e.g. mssql: jdbc:sqlserver://localhost:3280;databaseName=grouper
hibernate.connection.url = jdbc:mysql://localhost:3306/grouper?CharSet=utf8&useUnicode=true&characterEncoding=utf8
hibernate.connection.url = jdbc:postgresql://localhost:5432/grouper

hibernate.connection.username = grouper
# If you are using an empty password, depending upon your version of
# Java and Ant you may need to specify a password of "".
# Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122
hibernate.connection.password = password
registry.auto.ddl.upToVersion = 2.6.*
registry.auto.ddl.upToVersion = 4.*.*

This file was deleted.

4 changes: 4 additions & 0 deletions Workbench/grouper_data/container_files/sql/createSQLuser.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE DATABASE grouper;
CREATE USER grouper WITH PASSWORD 'password';
CREATE SCHEMA grouper;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA grouper TO grouper;
2 changes: 1 addition & 1 deletion Workbench/grouper_ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM i2incommon/grouper:2.6.19
FROM i2incommon/grouper:4.4.0

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

Expand Down
2 changes: 1 addition & 1 deletion Workbench/grouper_ws/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM i2incommon/grouper:2.6.19
FROM i2incommon/grouper:4.4.0

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

Expand Down

0 comments on commit 1e22ead

Please sign in to comment.