You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/06/12 14:10:09 UTC

[2/2] syncope git commit: [SYNCOPE-1256] Docker compose examples

[SYNCOPE-1256] Docker compose examples


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/0167d668
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/0167d668
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/0167d668

Branch: refs/heads/master
Commit: 0167d6685951b4205ba1cf1ca7012989866d36e7
Parents: 8e61752
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Jun 12 15:54:01 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Jun 12 16:09:55 2018 +0200

----------------------------------------------------------------------
 .../src/main/resources/Master.properties.mssql  |  2 +-
 docker/pom.xml                                  |  9 ++
 docker/src/main/resources/docker-compose-ha.yml | 89 ++++++++++++++++++++
 .../main/resources/docker-compose-mariadb.yml   | 68 +++++++++++++++
 .../src/main/resources/docker-compose-mssql.yml | 70 +++++++++++++++
 .../src/main/resources/docker-compose-mysql.yml | 67 +++++++++++++++
 .../resources/docker-compose-postgresql.yml     | 73 ++++++++++++++++
 .../sqlserver/domains/Master.properties         |  4 +-
 8 files changed, 379 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/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
index a35a797..108e1fe 100644
--- a/docker/core/src/main/resources/Master.properties.mssql
+++ b/docker/core/src/main/resources/Master.properties.mssql
@@ -14,7 +14,7 @@
 # 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.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
 Master.url=${DB_URL}
 Master.schema=${DB_SCHEMA}
 Master.username=${DB_USER}

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/docker/pom.xml
----------------------------------------------------------------------
diff --git a/docker/pom.xml b/docker/pom.xml
index 46f61aa..aa23ba1 100644
--- a/docker/pom.xml
+++ b/docker/pom.xml
@@ -43,6 +43,15 @@ under the License.
     <module>enduser</module>
   </modules>
 
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+  </build>
+
   <profiles>
     <profile>
       <id>site</id>

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/docker/src/main/resources/docker-compose-ha.yml
----------------------------------------------------------------------
diff --git a/docker/src/main/resources/docker-compose-ha.yml b/docker/src/main/resources/docker-compose-ha.yml
new file mode 100644
index 0000000..f5d987b
--- /dev/null
+++ b/docker/src/main/resources/docker-compose-ha.yml
@@ -0,0 +1,89 @@
+# 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.
+
+version: '3.3'
+
+services:
+   db:
+     image: crunchydata/crunchy-postgres:centos7-10.3-1.8.2
+     restart: always
+     environment:
+       PG_ROOT_PASSWORD: postgres
+       PG_MODE: primary
+       PG_PRIMARY_USER: postgres
+       PG_PRIMARY_PASSWORD: postgres
+       PG_PRIMARY_HOST: localhost
+       PG_PRIMARY_PORT: 5432
+       PG_DATABASE: syncope
+       PG_USER: syncope
+       PG_PASSWORD: syncope
+
+   syncope1:
+     depends_on:
+       - db
+     image: apache/syncope:${syncope.version}
+     ports:
+       - "18080:8080"
+     restart: always
+     environment:
+       DBMS: postgresql
+       DB_URL: jdbc:postgresql://db:5432/syncope
+       DB_USER: syncope
+       DB_PASSWORD: syncope
+       DB_POOL_MAX: 10
+       DB_POOL_MIN: 2
+       OPENJPA_REMOTE_COMMIT: tcp(Addresses=syncope1;syncope2)
+
+   syncope2:
+     depends_on:
+       - db
+     image: apache/syncope:${syncope.version}
+     ports:
+       - "18081:8080"
+     restart: always
+     environment:
+       DBMS: postgresql
+       DB_URL: jdbc:postgresql://db:5432/syncope
+       DB_USER: syncope
+       DB_PASSWORD: syncope
+       DB_POOL_MAX: 10
+       DB_POOL_MIN: 2
+       OPENJPA_REMOTE_COMMIT: tcp(Addresses=syncope1;syncope2)
+
+   syncope-console:
+     depends_on:
+       - syncope1
+     image: apache/syncope-console:${syncope.version}
+     ports:
+       - "28080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope1
+       CORE_PORT: 8080
+
+   syncope-enduser:
+     depends_on:
+       - syncope1
+     image: apache/syncope-enduser:${syncope.version}
+     ports:
+       - "38080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope1
+       CORE_PORT: 8080

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/docker/src/main/resources/docker-compose-mariadb.yml
----------------------------------------------------------------------
diff --git a/docker/src/main/resources/docker-compose-mariadb.yml b/docker/src/main/resources/docker-compose-mariadb.yml
new file mode 100644
index 0000000..71063d0
--- /dev/null
+++ b/docker/src/main/resources/docker-compose-mariadb.yml
@@ -0,0 +1,68 @@
+# 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.
+
+version: '3.3'
+
+services:
+   db:
+     image: mariadb:10.3.7
+     restart: always
+     environment:
+       MYSQL_ROOT_PASSWORD: password
+       MYSQL_DATABASE: syncope
+       MYSQL_USER: syncope
+       MYSQL_PASSWORD: syncope
+
+   syncope:
+     depends_on:
+       - db
+     image: apache/syncope:${syncope.version}
+     ports:
+       - "18080:8080"
+     restart: always
+     environment:
+       DBMS: mariadb
+       DB_URL: jdbc:mysql://db:3306/syncope?characterEncoding=UTF-8&relaxAutoCommit=true&useSSL=false
+       DB_USER: syncope
+       DB_PASSWORD: syncope
+       DB_POOL_MAX: 10
+       DB_POOL_MIN: 2
+       OPENJPA_REMOTE_COMMIT: sjvm
+
+   syncope-console:
+     depends_on:
+       - syncope
+     image: apache/syncope-console:${syncope.version}
+     ports:
+       - "28080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080
+
+   syncope-enduser:
+     depends_on:
+       - syncope
+     image: apache/syncope-enduser:${syncope.version}
+     ports:
+       - "38080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/docker/src/main/resources/docker-compose-mssql.yml
----------------------------------------------------------------------
diff --git a/docker/src/main/resources/docker-compose-mssql.yml b/docker/src/main/resources/docker-compose-mssql.yml
new file mode 100644
index 0000000..29cc6bf
--- /dev/null
+++ b/docker/src/main/resources/docker-compose-mssql.yml
@@ -0,0 +1,70 @@
+# 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.
+
+version: '3.3'
+
+services:
+   db:
+     image: mcmoe/mssqldocker:latest
+     restart: always
+     environment:
+       ACCEPT_EULA: Y
+       SA_PASSWORD: 2astazeY
+       MSSQL_DB: syncope
+       MSSQL_USER: syncope
+       MSSQL_PASSWORD: Syncope123
+
+   syncope:
+     depends_on:
+       - db
+     image: apache/syncope:${syncope.version}
+     ports:
+       - "18080:8080"
+     restart: always
+     environment:
+       DBMS: mssql
+       DB_URL: jdbc:sqlserver://db:1433;databaseName=syncope
+       DB_SCHEMA: dbo
+       DB_USER: syncope
+       DB_PASSWORD: Syncope123
+       DB_POOL_MAX: 10
+       DB_POOL_MIN: 2
+       OPENJPA_REMOTE_COMMIT: sjvm
+
+   syncope-console:
+     depends_on:
+       - syncope
+     image: apache/syncope-console:${syncope.version}
+     ports:
+       - "28080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080
+
+   syncope-enduser:
+     depends_on:
+       - syncope
+     image: apache/syncope-enduser:${syncope.version}
+     ports:
+       - "38080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/docker/src/main/resources/docker-compose-mysql.yml
----------------------------------------------------------------------
diff --git a/docker/src/main/resources/docker-compose-mysql.yml b/docker/src/main/resources/docker-compose-mysql.yml
new file mode 100644
index 0000000..4321285
--- /dev/null
+++ b/docker/src/main/resources/docker-compose-mysql.yml
@@ -0,0 +1,67 @@
+# 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.
+
+version: '3.3'
+
+services:
+   db:
+     image: mysql/mysql-server:5.7
+     restart: always
+     environment:
+       MYSQL_DATABASE: syncope
+       MYSQL_USER: syncope
+       MYSQL_PASSWORD: syncope
+
+   syncope:
+     depends_on:
+       - db
+     image: apache/syncope:${syncope.version}
+     ports:
+       - "18080:8080"
+     restart: always
+     environment:
+       DBMS: mysql
+       DB_URL: jdbc:mysql://db:3306/syncope?characterEncoding=UTF-8&relaxAutoCommit=true&useSSL=false
+       DB_USER: syncope
+       DB_PASSWORD: syncope
+       DB_POOL_MAX: 10
+       DB_POOL_MIN: 2
+       OPENJPA_REMOTE_COMMIT: sjvm
+
+   syncope-console:
+     depends_on:
+       - syncope
+     image: apache/syncope-console:${syncope.version}
+     ports:
+       - "28080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080
+
+   syncope-enduser:
+     depends_on:
+       - syncope
+     image: apache/syncope-enduser:${syncope.version}
+     ports:
+       - "38080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/docker/src/main/resources/docker-compose-postgresql.yml
----------------------------------------------------------------------
diff --git a/docker/src/main/resources/docker-compose-postgresql.yml b/docker/src/main/resources/docker-compose-postgresql.yml
new file mode 100644
index 0000000..e815a9d
--- /dev/null
+++ b/docker/src/main/resources/docker-compose-postgresql.yml
@@ -0,0 +1,73 @@
+# 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.
+
+version: '3.3'
+
+services:
+   db:
+     image: crunchydata/crunchy-postgres:centos7-10.3-1.8.2
+     restart: always
+     environment:
+       PG_ROOT_PASSWORD: postgres
+       PG_MODE: primary
+       PG_PRIMARY_USER: postgres
+       PG_PRIMARY_PASSWORD: postgres
+       PG_PRIMARY_HOST: localhost
+       PG_PRIMARY_PORT: 5432
+       PG_DATABASE: syncope
+       PG_USER: syncope
+       PG_PASSWORD: syncope
+
+   syncope:
+     depends_on:
+       - db
+     image: apache/syncope:${syncope.version}
+     ports:
+       - "18080:8080"
+     restart: always
+     environment:
+       DBMS: postgresql
+       DB_URL: jdbc:postgresql://db:5432/syncope
+       DB_USER: syncope
+       DB_PASSWORD: syncope
+       DB_POOL_MAX: 10
+       DB_POOL_MIN: 2
+       OPENJPA_REMOTE_COMMIT: sjvm
+
+   syncope-console:
+     depends_on:
+       - syncope
+     image: apache/syncope-console:${syncope.version}
+     ports:
+       - "28080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080
+
+   syncope-enduser:
+     depends_on:
+       - syncope
+     image: apache/syncope-enduser:${syncope.version}
+     ports:
+       - "38080:8080"
+     restart: always
+     environment:
+       CORE_SCHEME: http
+       CORE_HOST: syncope
+       CORE_PORT: 8080

http://git-wip-us.apache.org/repos/asf/syncope/blob/0167d668/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties b/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties
index 5e005fa..e2dc131 100644
--- a/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties
+++ b/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties
@@ -14,8 +14,8 @@
 # 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=jdbc:jtds:sqlserver://teak:1433/syncope
+Master.driverClassName=com/microsoft/sqlserver/jdbc/SQLServerDriver
+Master.url=jdbc:sqlserver://teak:1433;databaseName=syncope
 Master.schema=dbo
 Master.username=syncope
 Master.password=syncope