[SYNCOPE-1256] Docker images ready
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7033b8a9 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7033b8a9 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7033b8a9 Branch: refs/heads/master Commit: 7033b8a98624be099fccc49876bff804e165df15 Parents: d51e1cc Author: Francesco Chicchiriccò <ilgro...@apache.org> Authored: Tue Jun 12 12:39:56 2018 +0200 Committer: Francesco Chicchiriccò <ilgro...@apache.org> Committed: Tue Jun 12 13:03:12 2018 +0200 ---------------------------------------------------------------------- docker/console/pom.xml | 151 +++++++++++++++++ docker/console/src/main/resources/Dockerfile | 35 ++++ docker/console/src/main/resources/build.sh | 58 +++++++ .../main/resources/console.properties.template | 52 ++++++ .../oidcclient-agent.properties.template | 26 +++ .../resources/saml2sp-agent.properties.template | 26 +++ docker/console/src/main/resources/startup.sh | 35 ++++ docker/core/pom.xml | 169 +++++++++++++++++++ docker/core/src/main/resources/Dockerfile | 38 +++++ .../main/resources/Master.properties.mariadb | 28 +++ .../src/main/resources/Master.properties.mssql | 28 +++ .../src/main/resources/Master.properties.mysql | 28 +++ .../main/resources/Master.properties.postgresql | 28 +++ docker/core/src/main/resources/build.sh | 60 +++++++ .../src/main/resources/persistence.properties | 19 +++ .../resources/provisioning.properties.mariadb | 32 ++++ .../resources/provisioning.properties.mssql | 32 ++++ .../resources/provisioning.properties.mysql | 32 ++++ .../provisioning.properties.postgresql | 31 ++++ docker/core/src/main/resources/startup.sh | 32 ++++ docker/enduser/pom.xml | 139 +++++++++++++++ docker/enduser/src/main/resources/Dockerfile | 34 ++++ docker/enduser/src/main/resources/build.sh | 58 +++++++ .../main/resources/enduser.properties.template | 33 ++++ .../oidcclient-agent.properties.template | 26 +++ .../resources/saml2sp-agent.properties.template | 26 +++ docker/enduser/src/main/resources/startup.sh | 35 ++++ docker/pom.xml | 109 ++++++++++++ fit/core-reference/pom.xml | 8 +- pom.xml | 19 +++ 30 files changed, 1423 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/pom.xml ---------------------------------------------------------------------- diff --git a/docker/console/pom.xml b/docker/console/pom.xml new file mode 100644 index 0000000..63539f2 --- /dev/null +++ b/docker/console/pom.xml @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker</artifactId> + <version>2.1.0-SNAPSHOT</version> + </parent> + + <name>Apache Syncope Docker Console</name> + <description>Apache Syncope Docker Console</description> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker-console</artifactId> + + <properties> + <rootpom.basedir>${basedir}/../..</rootpom.basedir> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-deb-console</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.syncope.fit</groupId> + <artifactId>syncope-fit-console-reference</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <inherited>true</inherited> + <executions> + <execution> + <id>setup</id> + <phase>process-resources</phase> + <configuration> + <target> + <copy file="${basedir}/../../deb/console/target/apache-syncope-console-${project.version}.deb" + todir="${project.build.directory}/classes" overwrite="true"/> + + <copy todir="${project.build.directory}/classes/flowable-modeler"> + <fileset dir="${basedir}/../../fit/console-reference/target/flowable-modeler"/> + </copy> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <configuration> + <verbose>true</verbose> + <images> + <image> + <name>apache/syncope-console:%v</name> + <build> + <dockerFileDir>${project.build.directory}/classes</dockerFileDir> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>remove-syncope-console</id> + <phase>initialize</phase> + <goals> + <goal>remove</goal> + </goals> + </execution> + <execution> + <id>build-syncope-console</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + </build> + + <profiles> + <profile> + <id>apache-release</id> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <skipSource>true</skipSource> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/src/main/resources/Dockerfile ---------------------------------------------------------------------- diff --git a/docker/console/src/main/resources/Dockerfile b/docker/console/src/main/resources/Dockerfile new file mode 100644 index 0000000..dbdebb2 --- /dev/null +++ b/docker/console/src/main/resources/Dockerfile @@ -0,0 +1,35 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +FROM debian:stable-slim +MAINTAINER d...@syncope.apache.org + +RUN set -x + +COPY *.deb /tmp/ + +COPY *.properties.template /etc/apache-syncope/ +COPY flowable-modeler/ /etc/apache-syncope/flowable-modeler/ + +COPY build.sh /tmp +RUN chmod 755 /tmp/build.sh && /tmp/build.sh && rm /tmp/build.sh + +COPY startup.sh /sbin +RUN chmod 755 /sbin/startup.sh +CMD ["/sbin/startup.sh"] + +EXPOSE 8080 http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/src/main/resources/build.sh ---------------------------------------------------------------------- diff --git a/docker/console/src/main/resources/build.sh b/docker/console/src/main/resources/build.sh new file mode 100755 index 0000000..a164395 --- /dev/null +++ b/docker/console/src/main/resources/build.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +set -x + +##### +# Disable suggests/recommends +##### +echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras +echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras + +export DEBIAN_FRONTEND noninteractive +export DEBCONF_TERSE true + +# needed by debian:stable-slim +mkdir -p /usr/share/man/man1/ + +###### +# Install packages +###### +apt-get -q update \ + && apt-get -q install -y \ + xtail \ + openjdk-8-jdk \ + tomcat8 \ + libservlet3.1-java \ + && apt-get clean + +dpkg -i /tmp/*.deb && rm /tmp/*deb + +###### +# Setup Tomcat +###### + +sed -i 's/--exec/--startas/' /etc/init.d/tomcat8 + +echo "JAVA_OPTS=\"\${JAVA_OPTS} -Dfile.encoding=UTF-8 -server \ +-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \ +-XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC \ +-Djava.security.egd=file:/dev/./urandom\"" >> /etc/default/tomcat8 + +echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> /etc/default/tomcat8 http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/src/main/resources/console.properties.template ---------------------------------------------------------------------- diff --git a/docker/console/src/main/resources/console.properties.template b/docker/console/src/main/resources/console.properties.template new file mode 100644 index 0000000..b043aab --- /dev/null +++ b/docker/console/src/main/resources/console.properties.template @@ -0,0 +1,52 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +console.directory=/etc/apache-syncope + +site=http://syncope.apache.org + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +scheme=${CORE_SCHEME} +host=${CORE_HOST} +port=${CORE_PORT} +rootPath=/syncope/rest/ +useGZIPCompression=true +maxUploadFileSizeMB=5 + +# Max wait time on apply changes from modals/wizards (given in seconds) +maxWaitTimeOnApplyChanges=30 + +csrf=true + +flowableModelerDirectory=/etc/apache-syncope/flowable-modeler + +reconciliationReportKey=c3520ad9-179f-49e7-b315-d684d216dd97 + +page.dashboard=org.apache.syncope.client.console.pages.Dashboard +page.realms=org.apache.syncope.client.console.pages.Realms +page.topology=org.apache.syncope.client.console.topology.Topology +page.reports=org.apache.syncope.client.console.pages.Reports +page.workflow=org.apache.syncope.client.console.pages.Workflow +page.audit=org.apache.syncope.client.console.pages.Audit +page.implementations=org.apache.syncope.client.console.pages.Implementations +page.logs=org.apache.syncope.client.console.pages.Logs +page.security=org.apache.syncope.client.console.pages.Security +page.types=org.apache.syncope.client.console.pages.Types +page.policies=org.apache.syncope.client.console.pages.Policies +page.notifications=org.apache.syncope.client.console.pages.Notifications +page.parameters=org.apache.syncope.client.console.pages.Parameters http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/src/main/resources/oidcclient-agent.properties.template ---------------------------------------------------------------------- diff --git a/docker/console/src/main/resources/oidcclient-agent.properties.template b/docker/console/src/main/resources/oidcclient-agent.properties.template new file mode 100644 index 0000000..28d2006 --- /dev/null +++ b/docker/console/src/main/resources/oidcclient-agent.properties.template @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +conf.directory=/etc/apache-syncope + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +scheme=${CORE_SCHEME} +host=${CORE_HOST} +port=${CORE_PORT} +rootPath=/syncope/rest/ +useGZIPCompression=true http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/src/main/resources/saml2sp-agent.properties.template ---------------------------------------------------------------------- diff --git a/docker/console/src/main/resources/saml2sp-agent.properties.template b/docker/console/src/main/resources/saml2sp-agent.properties.template new file mode 100644 index 0000000..28d2006 --- /dev/null +++ b/docker/console/src/main/resources/saml2sp-agent.properties.template @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +conf.directory=/etc/apache-syncope + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +scheme=${CORE_SCHEME} +host=${CORE_HOST} +port=${CORE_PORT} +rootPath=/syncope/rest/ +useGZIPCompression=true http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/console/src/main/resources/startup.sh ---------------------------------------------------------------------- diff --git a/docker/console/src/main/resources/startup.sh b/docker/console/src/main/resources/startup.sh new file mode 100755 index 0000000..6c89707 --- /dev/null +++ b/docker/console/src/main/resources/startup.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +cd /etc/apache-syncope + +sed "s/\${CORE_SCHEME}/$CORE_SCHEME/" console.properties.template | +sed "s/\${CORE_HOST}/$CORE_HOST/" | sed "s/\${CORE_PORT}/$CORE_PORT/" > console.properties + +sed "s/\${CORE_SCHEME}/$CORE_SCHEME/" oidcclient-agent.properties.template | +sed "s/\${CORE_HOST}/$CORE_HOST/" | sed "s/\${CORE_PORT}/$CORE_PORT/" > oidcclient-agent.properties + +sed "s/\${CORE_SCHEME}/$CORE_SCHEME/" saml2sp-agent.properties.template | +sed "s/\${CORE_HOST}/$CORE_HOST/" | sed "s/\${CORE_PORT}/$CORE_PORT/" > saml2sp-agent.properties + +/etc/init.d/tomcat8 start + +xtail /var/log/apache-syncope/*.log /var/log/tomcat8/ + +/bin/bash http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/pom.xml ---------------------------------------------------------------------- diff --git a/docker/core/pom.xml b/docker/core/pom.xml new file mode 100644 index 0000000..72b6ea4 --- /dev/null +++ b/docker/core/pom.xml @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker</artifactId> + <version>2.1.0-SNAPSHOT</version> + </parent> + + <name>Apache Syncope Docker Core</name> + <description>Apache Syncope Docker Core</description> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker-core</artifactId> + + <properties> + <rootpom.basedir>${basedir}/../..</rootpom.basedir> + </properties> + + <dependencies> + <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + <version>${jdbc.postgresql.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>${jdbc.mysql.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${jdbc.mariadb.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>com.microsoft.sqlserver</groupId> + <artifactId>mssql-jdbc</artifactId> + <version>${jdbc.mssql.version}8</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-deb-core</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <inherited>true</inherited> + <executions> + <execution> + <id>setup</id> + <phase>process-resources</phase> + <configuration> + <target> + <copy file="${settings.localRepository}/org/postgresql/postgresql/${jdbc.postgresql.version}/postgresql-${jdbc.postgresql.version}.jar" + todir="${project.build.directory}/classes" overwrite="true"/> + <copy file="${settings.localRepository}/mysql/mysql-connector-java/${jdbc.mysql.version}/mysql-connector-java-${jdbc.mysql.version}.jar" + todir="${project.build.directory}/classes" overwrite="true"/> + <copy file="${settings.localRepository}/org/mariadb/jdbc/mariadb-java-client/${jdbc.mariadb.version}/mariadb-java-client-${jdbc.mariadb.version}.jar" + todir="${project.build.directory}/classes" overwrite="true"/> + <copy file="${settings.localRepository}/com/microsoft/sqlserver/mssql-jdbc/${jdbc.mssql.version}8/mssql-jdbc-${jdbc.mssql.version}8.jar" + todir="${project.build.directory}/classes" overwrite="true"/> + + <copy file="${basedir}/../../deb/core/target/apache-syncope-${project.version}.deb" + todir="${project.build.directory}/classes" overwrite="true"/> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <configuration> + <verbose>true</verbose> + <images> + <image> + <name>apache/syncope:%v</name> + <build> + <dockerFileDir>${project.build.directory}/classes</dockerFileDir> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>remove-syncope-core</id> + <phase>initialize</phase> + <goals> + <goal>remove</goal> + </goals> + </execution> + <execution> + <id>build-syncope-core</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>apache-release</id> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <skipSource>true</skipSource> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/Dockerfile ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/Dockerfile b/docker/core/src/main/resources/Dockerfile new file mode 100644 index 0000000..1963405 --- /dev/null +++ b/docker/core/src/main/resources/Dockerfile @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +FROM debian:stable-slim +MAINTAINER d...@syncope.apache.org + +RUN set -x + +COPY *.jar /tmp/ + +COPY *.deb /tmp/ + +COPY provisioning.properties.* /etc/apache-syncope/ +COPY *.properties /etc/apache-syncope/ +COPY Master.properties.* /etc/apache-syncope/domains/ + +COPY build.sh /tmp +RUN chmod 755 /tmp/build.sh && /tmp/build.sh && rm /tmp/build.sh + +COPY startup.sh /sbin +RUN chmod 755 /sbin/startup.sh +CMD ["/sbin/startup.sh"] + +EXPOSE 8080 http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/Master.properties.mariadb ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/Master.properties.mariadb b/docker/core/src/main/resources/Master.properties.mariadb new file mode 100644 index 0000000..c8231cf --- /dev/null +++ b/docker/core/src/main/resources/Master.properties.mariadb @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +Master.driverClassName=org.mariadb.jdbc.Driver +Master.url=${DB_URL} +Master.schema= +Master.username=${DB_USER} +Master.password=${DB_PASSWORD} +Master.databasePlatform=org.apache.openjpa.jdbc.sql.MariaDBDictionary(blobTypeName=LONGBLOB,timestampTypeName=DATETIME(3)) +Master.orm=META-INF/spring-orm.xml + +Master.pool.maxActive=${DB_POOL_MAX} +Master.pool.minIdle=${DB_POOL_MIN} + +Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/Master.properties.mssql ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/Master.properties.mssql b/docker/core/src/main/resources/Master.properties.mssql new file mode 100644 index 0000000..a35a797 --- /dev/null +++ b/docker/core/src/main/resources/Master.properties.mssql @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +Master.driverClassName=net.sourceforge.jtds.jdbc.Driver +Master.url=${DB_URL} +Master.schema=${DB_SCHEMA} +Master.username=${DB_USER} +Master.password=${DB_PASSWORD} +Master.databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary +Master.orm=META-INF/spring-orm-sqlserver.xml + +Master.pool.maxActive=${DB_POOL_MAX} +Master.pool.minIdle=${DB_POOL_MIN} + +Master.audit.sql=audit_sqlserver.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/Master.properties.mysql ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/Master.properties.mysql b/docker/core/src/main/resources/Master.properties.mysql new file mode 100644 index 0000000..cc412e1 --- /dev/null +++ b/docker/core/src/main/resources/Master.properties.mysql @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +Master.driverClassName=com.mysql.jdbc.Driver +Master.url=${DB_URL} +Master.schema= +Master.username=${DB_USER} +Master.password=${DB_PASSWORD} +Master.databasePlatform=org.apache.openjpa.jdbc.sql.MySQLDictionary(blobTypeName=LONGBLOB,timestampTypeName=DATETIME(3)) +Master.orm=META-INF/spring-orm.xml + +Master.pool.maxActive=${DB_POOL_MAX} +Master.pool.minIdle=${DB_POOL_MIN} + +Master.audit.sql=audit_mysql_innodb.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/Master.properties.postgresql ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/Master.properties.postgresql b/docker/core/src/main/resources/Master.properties.postgresql new file mode 100644 index 0000000..74b3471 --- /dev/null +++ b/docker/core/src/main/resources/Master.properties.postgresql @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +Master.driverClassName=org.postgresql.Driver +Master.url=${DB_URL} +Master.schema= +Master.username=${DB_USER} +Master.password=${DB_PASSWORD} +Master.databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary +Master.orm=META-INF/spring-orm.xml + +Master.pool.maxActive=${DB_POOL_MAX} +Master.pool.minIdle=${DB_POOL_MIN} + +Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/build.sh ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/build.sh b/docker/core/src/main/resources/build.sh new file mode 100755 index 0000000..d311e47 --- /dev/null +++ b/docker/core/src/main/resources/build.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +set -x + +##### +# Disable suggests/recommends +##### +echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras +echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras + +export DEBIAN_FRONTEND noninteractive +export DEBCONF_TERSE true + +# needed by debian:stable-slim +mkdir -p /usr/share/man/man1/ + +###### +# Install packages +###### +apt-get -q update \ + && apt-get -q install -y \ + xtail \ + openjdk-8-jdk \ + tomcat8 \ + libservlet3.1-java \ + && apt-get clean + +dpkg -i /tmp/*.deb && rm /tmp/*deb + +###### +# Setup Tomcat +###### + +sed -i 's/--exec/--startas/' /etc/init.d/tomcat8 + +mv /tmp/*.jar /usr/share/tomcat8/lib/ + +echo "JAVA_OPTS=\"\${JAVA_OPTS} -Dfile.encoding=UTF-8 -server \ +-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \ +-XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC \ +-Djava.security.egd=file:/dev/./urandom\"" >> /etc/default/tomcat8 + +echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> /etc/default/tomcat8 http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/persistence.properties ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/persistence.properties b/docker/core/src/main/resources/persistence.properties new file mode 100644 index 0000000..6df8091 --- /dev/null +++ b/docker/core/src/main/resources/persistence.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +content.directory=/etc/apache-syncope +any.search.dao=org.apache.syncope.core.persistence.jpa.dao.JPAAnySearchDAO +openjpa.RemoteCommitProvider=${OPENJPA_REMOTE_COMMIT} http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/provisioning.properties.mariadb ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/provisioning.properties.mariadb b/docker/core/src/main/resources/provisioning.properties.mariadb new file mode 100644 index 0000000..cc042e7 --- /dev/null +++ b/docker/core/src/main/resources/provisioning.properties.mariadb @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +asyncConnectorFacadeExecutor.poolSize=10 + +# see http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#scheduling-task-namespace-executor +propagationTaskExecutorAsyncExecutor.poolSize=5-25 +propagationTaskExecutorAsyncExecutor.queueCapacity=100 +propagationTaskExecutor=org.apache.syncope.core.provisioning.java.propagation.PriorityPropagationTaskExecutor + +userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager +groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager +anyObjectProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager +virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache + +quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate +quartz.sql=tables_mariadb.sql +quartz.scheduler.idleWaitTime=5000 +quartz.disableInstance=false http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/provisioning.properties.mssql ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/provisioning.properties.mssql b/docker/core/src/main/resources/provisioning.properties.mssql new file mode 100644 index 0000000..1a21fef --- /dev/null +++ b/docker/core/src/main/resources/provisioning.properties.mssql @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +asyncConnectorFacadeExecutor.poolSize=10 + +# see http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#scheduling-task-namespace-executor +propagationTaskExecutorAsyncExecutor.poolSize=5-25 +propagationTaskExecutorAsyncExecutor.queueCapacity=100 +propagationTaskExecutor=org.apache.syncope.core.provisioning.java.propagation.PriorityPropagationTaskExecutor + +userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager +groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager +anyObjectProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager +virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache + +quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate +quartz.sql=tables_sqlServer.sql +quartz.scheduler.idleWaitTime=5000 +quartz.disableInstance=false http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/provisioning.properties.mysql ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/provisioning.properties.mysql b/docker/core/src/main/resources/provisioning.properties.mysql new file mode 100644 index 0000000..3883cb5 --- /dev/null +++ b/docker/core/src/main/resources/provisioning.properties.mysql @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +asyncConnectorFacadeExecutor.poolSize=10 + +# see http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#scheduling-task-namespace-executor +propagationTaskExecutorAsyncExecutor.poolSize=5-25 +propagationTaskExecutorAsyncExecutor.queueCapacity=100 +propagationTaskExecutor=org.apache.syncope.core.provisioning.java.propagation.PriorityPropagationTaskExecutor + +userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager +groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager +anyObjectProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager +virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache + +quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate +quartz.sql=tables_mysql_innodb.sql +quartz.scheduler.idleWaitTime=5000 +quartz.disableInstance=false http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/provisioning.properties.postgresql ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/provisioning.properties.postgresql b/docker/core/src/main/resources/provisioning.properties.postgresql new file mode 100644 index 0000000..29aca0d --- /dev/null +++ b/docker/core/src/main/resources/provisioning.properties.postgresql @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +asyncConnectorFacadeExecutor.poolSize=10 + +# see http://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#scheduling-task-namespace-executor +propagationTaskExecutorAsyncExecutor.poolSize=5-25 +propagationTaskExecutorAsyncExecutor.queueCapacity=100 +propagationTaskExecutor=org.apache.syncope.core.provisioning.java.propagation.PriorityPropagationTaskExecutor + +userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager +groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager +anyObjectProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager +virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache + +quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate +quartz.sql=tables_postgres.sql +quartz.disableInstance=false http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/core/src/main/resources/startup.sh ---------------------------------------------------------------------- diff --git a/docker/core/src/main/resources/startup.sh b/docker/core/src/main/resources/startup.sh new file mode 100755 index 0000000..4d70229 --- /dev/null +++ b/docker/core/src/main/resources/startup.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +cd /etc/apache-syncope +rm provisioning.properties +ln -s provisioning.properties.$DBMS provisioning.properties + +cd domains +rm Master.properties +ln -s Master.properties.$DBMS Master.properties + +/etc/init.d/tomcat8 start + +xtail /var/log/apache-syncope/*.log /var/log/tomcat8/ + +/bin/bash http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/pom.xml ---------------------------------------------------------------------- diff --git a/docker/enduser/pom.xml b/docker/enduser/pom.xml new file mode 100644 index 0000000..7ff3898 --- /dev/null +++ b/docker/enduser/pom.xml @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker</artifactId> + <version>2.1.0-SNAPSHOT</version> + </parent> + + <name>Apache Syncope Docker Enduser</name> + <description>Apache Syncope Docker Enduser</description> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker-enduser</artifactId> + + <properties> + <rootpom.basedir>${basedir}/../..</rootpom.basedir> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-deb-enduser</artifactId> + <version>${project.version}</version> + <type>war</type> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <inherited>true</inherited> + <executions> + <execution> + <id>setup</id> + <phase>process-resources</phase> + <configuration> + <target> + <copy file="${basedir}/../../deb/enduser/target/apache-syncope-enduser-${project.version}.deb" + todir="${project.build.directory}/classes" overwrite="true"/> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <configuration> + <verbose>true</verbose> + <images> + <image> + <name>apache/syncope-enduser:%v</name> + <build> + <dockerFileDir>${project.build.directory}/classes</dockerFileDir> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>remove-syncope-enduser</id> + <phase>initialize</phase> + <goals> + <goal>remove</goal> + </goals> + </execution> + <execution> + <id>build-syncope-enduser</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + </build> + + <profiles> + <profile> + <id>apache-release</id> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <skipSource>true</skipSource> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/src/main/resources/Dockerfile ---------------------------------------------------------------------- diff --git a/docker/enduser/src/main/resources/Dockerfile b/docker/enduser/src/main/resources/Dockerfile new file mode 100644 index 0000000..2338eae --- /dev/null +++ b/docker/enduser/src/main/resources/Dockerfile @@ -0,0 +1,34 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +FROM debian:stable-slim +MAINTAINER d...@syncope.apache.org + +RUN set -x + +COPY *.deb /tmp/ + +COPY *.properties.template /etc/apache-syncope/ + +COPY build.sh /tmp +RUN chmod 755 /tmp/build.sh && /tmp/build.sh && rm /tmp/build.sh + +COPY startup.sh /sbin +RUN chmod 755 /sbin/startup.sh +CMD ["/sbin/startup.sh"] + +EXPOSE 8080 http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/src/main/resources/build.sh ---------------------------------------------------------------------- diff --git a/docker/enduser/src/main/resources/build.sh b/docker/enduser/src/main/resources/build.sh new file mode 100755 index 0000000..a164395 --- /dev/null +++ b/docker/enduser/src/main/resources/build.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +set -x + +##### +# Disable suggests/recommends +##### +echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras +echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras + +export DEBIAN_FRONTEND noninteractive +export DEBCONF_TERSE true + +# needed by debian:stable-slim +mkdir -p /usr/share/man/man1/ + +###### +# Install packages +###### +apt-get -q update \ + && apt-get -q install -y \ + xtail \ + openjdk-8-jdk \ + tomcat8 \ + libservlet3.1-java \ + && apt-get clean + +dpkg -i /tmp/*.deb && rm /tmp/*deb + +###### +# Setup Tomcat +###### + +sed -i 's/--exec/--startas/' /etc/init.d/tomcat8 + +echo "JAVA_OPTS=\"\${JAVA_OPTS} -Dfile.encoding=UTF-8 -server \ +-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m \ +-XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC \ +-Djava.security.egd=file:/dev/./urandom\"" >> /etc/default/tomcat8 + +echo "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> /etc/default/tomcat8 http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/src/main/resources/enduser.properties.template ---------------------------------------------------------------------- diff --git a/docker/enduser/src/main/resources/enduser.properties.template b/docker/enduser/src/main/resources/enduser.properties.template new file mode 100644 index 0000000..8f0547a --- /dev/null +++ b/docker/enduser/src/main/resources/enduser.properties.template @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +enduser.directory=/etc/apache-syncope + +domain=Master + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} +adminUser=${adminUser} +useGZIPCompression=true +maxUploadFileSizeMB=5 + +scheme=${CORE_SCHEME} +host=${CORE_HOST} +port=${CORE_PORT} +rootPath=/syncope/rest/ + +captcha=true +xsrf=true http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/src/main/resources/oidcclient-agent.properties.template ---------------------------------------------------------------------- diff --git a/docker/enduser/src/main/resources/oidcclient-agent.properties.template b/docker/enduser/src/main/resources/oidcclient-agent.properties.template new file mode 100644 index 0000000..28d2006 --- /dev/null +++ b/docker/enduser/src/main/resources/oidcclient-agent.properties.template @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +conf.directory=/etc/apache-syncope + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +scheme=${CORE_SCHEME} +host=${CORE_HOST} +port=${CORE_PORT} +rootPath=/syncope/rest/ +useGZIPCompression=true http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/src/main/resources/saml2sp-agent.properties.template ---------------------------------------------------------------------- diff --git a/docker/enduser/src/main/resources/saml2sp-agent.properties.template b/docker/enduser/src/main/resources/saml2sp-agent.properties.template new file mode 100644 index 0000000..28d2006 --- /dev/null +++ b/docker/enduser/src/main/resources/saml2sp-agent.properties.template @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. +conf.directory=/etc/apache-syncope + +anonymousUser=${anonymousUser} +anonymousKey=${anonymousKey} + +scheme=${CORE_SCHEME} +host=${CORE_HOST} +port=${CORE_PORT} +rootPath=/syncope/rest/ +useGZIPCompression=true http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/enduser/src/main/resources/startup.sh ---------------------------------------------------------------------- diff --git a/docker/enduser/src/main/resources/startup.sh b/docker/enduser/src/main/resources/startup.sh new file mode 100755 index 0000000..fa2b5f3 --- /dev/null +++ b/docker/enduser/src/main/resources/startup.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF 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. + +cd /etc/apache-syncope + +sed "s/\${CORE_SCHEME}/$CORE_SCHEME/" enduser.properties.template | +sed "s/\${CORE_HOST}/$CORE_HOST/" | sed "s/\${CORE_PORT}/$CORE_PORT/" > enduser.properties + +sed "s/\${CORE_SCHEME}/$CORE_SCHEME/" oidcclient-agent.properties.template | +sed "s/\${CORE_HOST}/$CORE_HOST/" | sed "s/\${CORE_PORT}/$CORE_PORT/" > oidcclient-agent.properties + +sed "s/\${CORE_SCHEME}/$CORE_SCHEME/" saml2sp-agent.properties.template | +sed "s/\${CORE_HOST}/$CORE_HOST/" | sed "s/\${CORE_PORT}/$CORE_PORT/" > saml2sp-agent.properties + +/etc/init.d/tomcat8 start + +xtail /var/log/apache-syncope/*.log /var/log/tomcat8/ + +/bin/bash http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/docker/pom.xml ---------------------------------------------------------------------- diff --git a/docker/pom.xml b/docker/pom.xml new file mode 100644 index 0000000..46f61aa --- /dev/null +++ b/docker/pom.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope</artifactId> + <version>2.1.0-SNAPSHOT</version> + </parent> + + <name>Apache Syncope Docker</name> + <description>Apache Syncope Docker</description> + <groupId>org.apache.syncope</groupId> + <artifactId>syncope-docker</artifactId> + <packaging>pom</packaging> + + <properties> + <rootpom.basedir>${basedir}/..</rootpom.basedir> + </properties> + + <modules> + <module>core</module> + <module>console</module> + <module>enduser</module> + </modules> + + <profiles> + <profile> + <id>site</id> + + <build> + <plugins> + <plugin> + <groupId>org.asciidoctor</groupId> + <artifactId>asciidoctor-maven-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <inherited>true</inherited> + <configuration> + <skip>true</skip> + <skipDeploy>true</skipDeploy> + <generateReports>false</generateReports> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>copy-docs-to-site</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>apache-release</id> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <skipSource>true</skipSource> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/fit/core-reference/pom.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml index 1e268db..5f359a9 100644 --- a/fit/core-reference/pom.xml +++ b/fit/core-reference/pom.xml @@ -523,7 +523,7 @@ under the License. <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.2.2</version> + <version>${jdbc.postgresql.version}</version> <scope>test</scope> </dependency> </dependencies> @@ -570,7 +570,7 @@ under the License. <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> - <version>5.1.43</version> + <version>${jdbc.mysql.version}</version> <scope>test</scope> </dependency> </dependencies> @@ -606,7 +606,7 @@ under the License. <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> - <version>1.6.1</version> + <version>${jdbc.mariadb.version}</version> <scope>test</scope> </dependency> </dependencies> @@ -678,7 +678,7 @@ under the License. <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> - <version>6.4.0.jre8</version> + <version>${jdbc.mssql.version}8</version> <scope>test</scope> </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/syncope/blob/7033b8a9/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index e330b51..ee28a2d 100644 --- a/pom.xml +++ b/pom.xml @@ -495,6 +495,11 @@ under the License. <nodejs.version>v6.9.4</nodejs.version> <protractor.version>4.0.14</protractor.version> + <jdbc.postgresql.version>42.2.2</jdbc.postgresql.version> + <jdbc.mysql.version>5.1.46</jdbc.mysql.version> + <jdbc.mariadb.version>2.2.5</jdbc.mariadb.version> + <jdbc.mssql.version>6.4.0.jre</jdbc.mssql.version> + <adminUser>admin</adminUser> <anonymousUser>anonymous</anonymousUser> <adminPassword>DE088591C00CC98B36F5ADAAF7DA2B004CF7F2FE7BBB45B766B6409876E2F3DB13C7905C6AA59464</adminPassword> @@ -1917,6 +1922,12 @@ under the License. </plugin> <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.26.0</version> + </plugin> + + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.1.0</version> @@ -2553,6 +2564,14 @@ under the License. </build> </profile> + <profile> + <id>docker</id> + + <modules> + <module>docker</module> + </modules> + </profile> + </profiles> <modules>