diff --git a/CLA/Corporate Contributor License Agreement.pdf b/CLA/Corporate Contributor License Agreement.pdf new file mode 100644 index 0000000..6a8add5 Binary files /dev/null and b/CLA/Corporate Contributor License Agreement.pdf differ diff --git a/CLA/Individual Contributor License Agreement.pdf b/CLA/Individual Contributor License Agreement.pdf new file mode 100644 index 0000000..002e055 Binary files /dev/null and b/CLA/Individual Contributor License Agreement.pdf differ diff --git a/README.md b/README.md index 4cfa4bc..50644f0 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,33 @@ This is the Git repository of the official `CDP4 Community Edition` docker image ## CDP4 Database - Community Edition -The `CDP4 Database Community Edition` image is based on the official PostgreSQL 9.6.14 image and contains the CDP4 SQL schema required to run the CDP4 Webservices Community Edition. +The `CDP4 Database Community Edition` image is based on the official PostgreSQL 12.3 image and contains the CDP4 SQL schema required to run the CDP4 Webservices Community Edition. The docker image is available on [docker hub](https://hub.docker.com/r/rheagroup/cdp4-database-community-edition/) ## CDP4 Database Bare - Community Edition -The `CDP4 Database Bare - Community Edition` image is based on the official PostgreSQL 9.6.14 image. It does not contain the CDP4 SQL Schema, only the mininmal setup that is required to execute the [ECSS-E-TM-10-25 Annex C.2 Integration Test suite](https://github.com/RHEAGROUP/ecss-10-25-annexc-integration-tests). + +The `CDP4 Database Bare - Community Edition` image is based on the official PostgreSQL 12.3 image. It does not contain the CDP4 SQL Schema, only the minimal setup that is required to execute the [ECSS-E-TM-10-25 Annex C.2 Integration Test suite](https://github.com/RHEAGROUP/ecss-10-25-annexc-integration-tests). ## CDP4 Services Community Edition The **Dockerfile** of the [CDP4 Services Community Edition](https://github.com/RHEAGROUP/CDP4-WebServices-Community-Edition) is maintained [here](https://github.com/RHEAGROUP/CDP4-WebServices-Community-Edition/blob/master/Dockerfile). -# License +## License + +The CDP4 Web Services Community Edition is licensed under the [AGPL license](LICENSE). Each docker container grants additional permission under GNU GPL version 3 section 7. See the license files in the image specific folders. + +## Release Script + +The repository contains a `release.bat` file intended for pushing new containers to DockerHub. + +**NOTE**: In order to push the images to the registry you have to login by running `docker login` command and providing your DockerHub credentials. Owner privileges on the registry are required. + +Usage: + +```cmd +release.bat [version] [dry] +``` -The CDP4 Web Services Community Edition is licensed under the [AGPL license](LICENSE). Each docker container grants additional permission under GNU GPL version 3 section 7. See the license files in the image specific folders. \ No newline at end of file +- **version** (required) - the version tag of the images. Should be in the form `x.y.z`. +- **dry** (optional) - specify the word `dry` to make a dry-run of just building the images without pushing to the registry. \ No newline at end of file diff --git a/cdp4-database-bare-community-edition/Dockerfile b/cdp4-database-bare-community-edition/Dockerfile index e40aa4d..c487a06 100644 --- a/cdp4-database-bare-community-edition/Dockerfile +++ b/cdp4-database-bare-community-edition/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:9.6.14 +FROM postgres:12.3 MAINTAINER s.gerene@rheagroup.com COPY LICENSE / diff --git a/cdp4-database-bare-community-edition/init-cdp4-cluster.sh b/cdp4-database-bare-community-edition/init-cdp4-cluster.sh index 7b3bfd2..802caff 100644 --- a/cdp4-database-bare-community-edition/init-cdp4-cluster.sh +++ b/cdp4-database-bare-community-edition/init-cdp4-cluster.sh @@ -1,10 +1,6 @@ -#!/bin/bash psql -U postgres -p 5432 --command="CREATE USER cdp4 WITH PASSWORD 'cdp4';" +psql -U postgres -p 5432 --command="ALTER USER cdp4 WITH SUPERUSER;" psql -U postgres -p 5432 --command="GRANT pg_signal_backend TO cdp4;" psql -U postgres -p 5432 --command="CREATE DATABASE cdp4manage WITH OWNER = cdp4 ENCODING 'UTF-8';" psql -U postgres -p 5432 -d cdp4manage --command="CREATE EXTENSION IF NOT EXISTS hstore;" -psql -U postgres -p 5432 -d cdp4manage --command="CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" -psql -U postgres -p 5432 --command="GRANT CONNECT ON DATABASE cdp4manage TO cdp4;" -psql -U postgres -p 5432 --command="GRANT ALL ON DATABASE cdp4manage TO cdp4;" -psql -U postgres -p 5432 --command="ALTER USER cdp4 CREATEDB;" -psql -U postgres -p 5432 --command="ALTER ROLE cdp4 SET statement_timeout = 30000;" \ No newline at end of file +psql -U postgres -p 5432 -d cdp4manage --command="CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" \ No newline at end of file diff --git a/cdp4-database-community-edition/Dockerfile b/cdp4-database-community-edition/Dockerfile index 43615fe..94b1d39 100644 --- a/cdp4-database-community-edition/Dockerfile +++ b/cdp4-database-community-edition/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:9.6.14 +FROM postgres:12.3 MAINTAINER s.gerene@rheagroup.com COPY LICENSE / diff --git a/release.bat b/release.bat new file mode 100644 index 0000000..f837d7a --- /dev/null +++ b/release.bat @@ -0,0 +1,82 @@ +@echo off + +IF %1.==. GOTO VersionError +set version=%1 + +GOTO Setup + +:VersionError +ECHO. +ECHO ERROR: No version was specified +ECHO. + +GOTO End + +:Setup + +ECHO Releasing Version %version% + +set dry=false + +IF %2.==. GOTO Begin +IF %2==dry GOTO Dry + +:Dry + +ECHO. +ECHO Performing dry run... +ECHO. + +set dry=true + +:Begin + +ECHO. +ECHO Cleaning up... +ECHO. + +REM cleanup previous if exists +docker rmi cdp4-test-database-community-edition:%version% +docker rmi rheagroup/cdp4-test-database-community-edition:%version% + +docker rmi cdp4-database-community-edition:%version% +docker rmi rheagroup/cdp4-database-community-edition:%version% + +REM remove local latest if exists +docker rmi cdp4-test-database-community-edition:latest +docker rmi rheagroup/cdp4-test-database-community-edition:latest + +docker rmi cdp4-database-community-edition:latest +docker rmi rheagroup/cdp4-database-community-edition:latest + +ECHO. +ECHO Building images... +ECHO. + +REM build and tag +docker build -f cdp4-database-bare-community-edition\Dockerfile -t cdp4-test-database-community-edition:%version% -t cdp4-test-database-community-edition:latest .\cdp4-database-bare-community-edition +docker tag cdp4-test-database-community-edition:%version% rheagroup/cdp4-test-database-community-edition:%version% +docker tag cdp4-test-database-community-edition:latest rheagroup/cdp4-test-database-community-edition:latest + +docker build -f cdp4-database-community-edition\Dockerfile -t cdp4-database-community-edition:%version% -t cdp4-database-community-edition:latest .\cdp4-database-community-edition +docker tag cdp4-database-community-edition:%version% rheagroup/cdp4-database-community-edition:%version% +docker tag cdp4-database-community-edition:latest rheagroup/cdp4-database-community-edition:latest + +IF %dry% equ true GOTO End + +ECHO. +ECHO Pushing... +ECHO. + +REM push +docker push rheagroup/cdp4-test-database-community-edition:%version% +docker push rheagroup/cdp4-test-database-community-edition:latest + +docker push rheagroup/cdp4-database-community-edition:%version% +docker push rheagroup/cdp4-database-community-edition:latest + +:End + +ECHO. +ECHO Release %version% Completed +ECHO. \ No newline at end of file