Skip to content

Commit

Permalink
Update for PostgreSQL v12.3 and docker release script (#5)
Browse files Browse the repository at this point in the history
* Release script added

* [Update] PostgreSQL to version 12.3
  • Loading branch information
Alex Vorobiev authored Jun 9, 2020
1 parent 26db729 commit 60c0c25
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 7 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- **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.
2 changes: 1 addition & 1 deletion cdp4-database-bare-community-edition/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:9.6.14
FROM postgres:12.3
MAINTAINER [email protected]

COPY LICENSE /
Expand Down
1 change: 0 additions & 1 deletion cdp4-database-bare-community-edition/init-cdp4-cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/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;"
Expand Down
2 changes: 1 addition & 1 deletion cdp4-database-community-edition/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:9.6.14
FROM postgres:12.3
MAINTAINER [email protected]

COPY LICENSE /
Expand Down
82 changes: 82 additions & 0 deletions release.bat
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 60c0c25

Please sign in to comment.