forked from internet2/InCommonTAP-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request internet2#152 from internet2/pc_July23
merge pc_July23: updates to midpoint and Grouper
- Loading branch information
Showing
11 changed files
with
50 additions
and
55 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
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
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 |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| FROM i2incommon/grouper:2.6.19 | ||
| FROM i2incommon/grouper:4.5.2 | ||
|
|
||
| LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" | ||
|
|
||
| RUN yum -y install netcat | ||
|
|
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 |
|---|---|---|
| @@ -1,42 +1,32 @@ | ||
| FROM i2incommon/grouper:2.6.19 | ||
| FROM i2incommon/grouper:4.5.2 | ||
|
|
||
| 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 / | ||
|
|
||
| RUN ln -s /usr/bin/resolveip /usr/libexec/resolveip | ||
|
|
||
| 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 && \ | ||
| /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 | ||
|
|
||
|
|
||
| CMD mysqld_safe | ||
| COPY container_files/sql/createSQLuser.sql / | ||
|
|
||
| #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 | ||
|
|
||
| #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 | ||
|
|
||
| RUN echo "host all all 0.0.0.0/0 trust" >> /var/lib/pgsql/data/pg_hba.conf | ||
|
|
||
| EXPOSE 5432 | ||
|
|
||
| CMD sudo -u postgres postgres -c listen_addresses='*' -D /var/lib/pgsql/data/ |
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
5 changes: 0 additions & 5 deletions
5
Workbench/grouper_data/container_files/mysql/createSQLuser.sql
This file was deleted.
Oops, something went wrong.
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 @@ | ||
| CREATE USER grouper PASSWORD 'password'; | ||
| CREATE DATABASE grouper; | ||
| GRANT ALL PRIVILEGES ON DATABASE grouper TO grouper; | ||
| ALTER DATABASE grouper OWNER TO grouper; |
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
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
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
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