Skip to content

Commit

Permalink
update grouper connector, move grouper's midpoint DB to its own DB
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Aug 22, 2023
1 parent 5b6e38e commit cb164df
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ db.sis.driver = com.mysql.jdbc.Driver
db.midPoint.driver = org.postgresql.Driver
#db.midPoint.pass = ${java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD_FILE') != null ? org.apache.commons.io.FileUtils.readFileToString(java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD_FILE'), "utf-8") : java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD') }
db.midPoint.pass = password
db.midPoint.url = jdbc:postgresql://comanage_midpoint_data:5432/grouper_to_midpoint?CharSet=utf8
db.midPoint.url = jdbc:postgresql://grouper_data:5432/grouper_to_midpoint?CharSet=utf8
db.midPoint.user = grouper

# provisioner midpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ hibernate.connection.username = grouper
# Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122
# hibernate.connection.password.elConfig = ${java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD_FILE') != null ? org.apache.commons.io.FileUtils.readFileToString(java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD_FILE'), "utf-8") : java.lang.System.getenv().get('GROUPER_DATABASE_PASSWORD') }
hibernate.connection.password = password
hibernate.c3p0.max_size = 200

2 changes: 2 additions & 0 deletions Workbench/grouper_data/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN yum install -y epel-release \
COPY container_files/conf/ /opt/grouper/grouperWebapp/WEB-INF/classes/
COPY container_files/bootstrap/ /tmp/
COPY container_files/sql/createSQLuser.sql /
COPY container_files/sql/createDBforMP.sql /

#setup DB
RUN chown -R postgres:postgres /var/lib/pgsql/
Expand All @@ -21,6 +22,7 @@ RUN sudo -u postgres initdb -D /var/lib/pgsql/data/ --username=postgres --pwfile
#create grouper DB
RUN sudo -u postgres pg_ctl start -D /var/lib/pgsql/data/ \
&& psql -U postgres -f /createSQLuser.sql \
&& psql -U postgres -f /createDBforMP.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ hibernate.connection.username = grouper
# Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122
hibernate.connection.password = password
registry.auto.ddl.upToVersion = 4.*.*
hibernate.c3p0.max_size = 200

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CREATE DATABASE grouper_to_midpoint WITH ENCODING=utf8;
CREATE USER grouper WITH PASSWORD 'password';
CREATE DATABASE grouper_to_midpoint;
GRANT ALL PRIVILEGES ON DATABASE grouper_to_midpoint TO grouper;

\connect grouper_to_midpoint;
Expand Down
2 changes: 2 additions & 0 deletions Workbench/grouper_data/container_files/sql/createSQLuser.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ALTER system SET max_connections=250;
ALTER system SET shared_buffers='180MB';
CREATE USER grouper PASSWORD 'password';
CREATE DATABASE grouper;
GRANT ALL PRIVILEGES ON DATABASE grouper TO grouper;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</connectorRef>
<connectorConfiguration xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
<icfc:configurationProperties xmlns:grpconf="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector.connector-grouper/com.evolveum.polygon.connector.grouper.GrouperConnector">
<grpconf:host>comanage_midpoint_data</grpconf:host>
<grpconf:host>grouper_data</grpconf:host>
<grpconf:port>5432</grpconf:port>
<grpconf:userName>grouper</grpconf:userName>
<grpconf:password>password</grpconf:password>
Expand Down

0 comments on commit cb164df

Please sign in to comment.