Skip to content

Commit

Permalink
Release 2019.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Builder Service committed Oct 31, 2019
1 parent bd283ce commit c21a0a6
Show file tree
Hide file tree
Showing 37 changed files with 237 additions and 121 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This repository contains orchestration files and documentation for deploying Black Duck Docker containers.

## Location of Black Duck 2019.8.1 archive:
## Location of Black Duck 2019.10.0 archive:

https://github.com/blackducksoftware/hub/archive/v2019.8.1.tar.gz
https://github.com/blackducksoftware/hub/archive/v2019.10.0.tar.gz

## Important Upgrade Announcement

Expand Down Expand Up @@ -32,7 +32,7 @@ https://github.com/blackducksoftware/hub/releases
* https://hub.docker.com/r/blackducksoftware/blackduck-webapp/
* https://hub.docker.com/r/blackducksoftware/blackduck-zookeeper/
* https://hub.docker.com/r/blackducksoftware/blackduck-upload-cache/
* https://hub.docker.com/r/blackducksoftware/appcheck-worker/
* https://hub.docker.com/r/sigsynopsys/appcheck-worker/
* https://hub.docker.com/r/blackducksoftware/rabbitmq/

# Running Black Duck in Docker
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/bin/hub_add_replication_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

function fail() {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/bin/hub_create_data_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

database_name=""
Expand Down
8 changes: 4 additions & 4 deletions docker-compose/bin/hub_db_migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

SCHEMA_NAME=${HUB_POSTGRES_SCHEMA:-st}
function fail() {
message=$1
exit_status=$2
Expand Down Expand Up @@ -140,7 +140,7 @@ function determine_database_emptiness() {
# Make sure that the database is empty
if [ "${database}" == "bds_hub" ];
then
table_count=`docker exec -i -u postgres ${container} psql -A -t -c "select count(*) from information_schema.tables where table_schema = 'st'" ${database}`
table_count=`docker exec -i -u postgres ${container} psql -A -t -c "select count(*) from information_schema.tables where table_schema = '${SCHEMA_NAME}'" ${database}`
[ "${table_count}" -ne 0 ] && fail "Unable to migrate as database ${database} in container ${container} has already been populated" 9
else
table_count=`docker exec -i -u postgres ${container} psql -A -t -c "select count(*) from information_schema.tables where table_schema = 'public'" ${database}`
Expand Down Expand Up @@ -183,7 +183,7 @@ function cleanup_database() {
then
# Clear the ETL jobs from bds_hub to bds_hub_report
docker exec -i -u postgres ${container} psql -d ${database} << EOF
UPDATE st.job_instances SET status='FAILED' where job_type='ReportingDatabaseTransferJob' and (status='SCHEDULED' or status='DISPATCHED' or status='RUNNING');
UPDATE ${SCHEMA_NAME}.job_instances SET status='FAILED' where job_type='ReportingDatabaseTransferJob' and (status='SCHEDULED' or status='DISPATCHED' or status='RUNNING');
EOF
else
# Grant permissions to blackduck_user for bds_hub_report and bdio
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/bin/hub_replication_changepassword.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

function fail() {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/bin/hub_reportdb_changepassword.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

function fail() {
Expand Down
106 changes: 80 additions & 26 deletions docker-compose/bin/system_check.sh

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docker-compose/blackduck-config.env
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ BLACKDUCK_CORS_ALLOWED_HEADERS_PROP_NAME=
BLACKDUCK_CORS_EXPOSED_HEADERS_PROP_NAME=

# Do not change
HUB_VERSION=2019.8.1
HUB_VERSION=2019.10.0

# Specify any property-specific overrides here
#
Expand Down Expand Up @@ -58,6 +58,6 @@ ENABLE_SOURCE_UPLOADS=
# Set the number of days of logs that will be gathered for the '/download/logszip' endpoint, defaults to 14
# LOG_DOWNLOAD_THRESHOLD=
#The retention time (in days) for notifications.
BLACKDUCK_HUB_NOTIFICATIONS_DELETE_DAYS=180
BLACKDUCK_HUB_NOTIFICATIONS_DELETE_DAYS=30
#The delay between subsequent runs of the notification reclaimer
BLACKDUCK_HUB_NOTIFICATIONS_DELAYS_DAYS=1
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.bdba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
webserver:
env_file: [hub-bdba.env]
binaryscanner:
image: blackducksoftware/appcheck-worker:2019.06
image: sigsynopsys/appcheck-worker:2019.09
links: [cfssl, rabbitmq, logstash, webserver]
env_file: [hub-bdba.env]
entrypoint: /docker-entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.dbmigrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
user: 'logstash:root'

postgres:
image: blackducksoftware/blackduck-postgres:1.0.7
image: blackducksoftware/blackduck-postgres:1.0.10
links:
- cfssl
- logstash
Expand Down
14 changes: 7 additions & 7 deletions docker-compose/docker-compose.externaldb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
authentication:
links: [ cfssl, logstash, registration, zookeeper, webapp]
user: authentication:root
image: blackducksoftware/blackduck-authentication:2019.8.1
image: blackducksoftware/blackduck-authentication:2019.10.0
volumes: ['authentication-volume:/opt/blackduck/hub/hub-authentication/ldap' ,'secrets-volume:/run/secrets']
env_file: [blackduck-config.env , hub-postgres.env]
healthcheck:
Expand All @@ -29,7 +29,7 @@ services:
webapp:
links: [ cfssl, logstash, registration, zookeeper]
user: webapp:root
image: blackducksoftware/blackduck-webapp:2019.8.1
image: blackducksoftware/blackduck-webapp:2019.10.0
volumes: ['log-volume:/opt/blackduck/hub/logs', 'webapp-volume:/opt/blackduck/hub/hub-webapp/ldap' ,'secrets-volume:/run/secrets']
env_file: [blackduck-config.env , hub-postgres.env]
healthcheck:
Expand All @@ -47,7 +47,7 @@ services:
scan:
links: [ cfssl, logstash, registration, zookeeper]
user: scan:root
image: blackducksoftware/blackduck-scan:2019.8.1
image: blackducksoftware/blackduck-scan:2019.10.0
volumes: [ 'secrets-volume:/run/secrets' ]
env_file: [blackduck-config.env , hub-postgres.env]
healthcheck:
Expand All @@ -65,7 +65,7 @@ services:
jobrunner:
links: [ cfssl, logstash, registration, zookeeper]
user: jobrunner:root
image: blackducksoftware/blackduck-jobrunner:2019.8.1
image: blackducksoftware/blackduck-jobrunner:2019.10.0
volumes: [ 'secrets-volume:/run/secrets' ]
env_file: [blackduck-config.env , hub-postgres.env]
healthcheck:
Expand Down Expand Up @@ -104,7 +104,7 @@ services:
restart: always
mem_limit: 1024m
registration:
image: blackducksoftware/blackduck-registration:2019.8.1
image: blackducksoftware/blackduck-registration:2019.10.0
links: [logstash, cfssl]
volumes: ['config-volume:/opt/blackduck/hub/hub-registration/config']
env_file: [blackduck-config.env]
Expand Down Expand Up @@ -133,7 +133,7 @@ services:
restart: always
mem_limit: 384M
webserver:
image: blackducksoftware/blackduck-nginx:1.0.8
image: blackducksoftware/blackduck-nginx:1.0.9
ports: ['443:8443']
env_file: [hub-webserver.env, blackduck-config.env]
links: [webapp, cfssl, documentation, authentication, scan]
Expand All @@ -148,7 +148,7 @@ services:
mem_limit: 640M
tmpfs: [/opt/blackduck/hub/webserver/security]
documentation:
image: blackducksoftware/blackduck-documentation:2019.8.1
image: blackducksoftware/blackduck-documentation:2019.10.0
links: [logstash]
env_file: [blackduck-config.env]
user: documentation:root
Expand Down
16 changes: 8 additions & 8 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: '2.3'

services:
postgres:
image: blackducksoftware/blackduck-postgres:1.0.7
image: blackducksoftware/blackduck-postgres:1.0.10
ports: ['55436:5432']
links: [cfssl, logstash]
volumes: ['postgres96-data-volume:/var/lib/postgresql/data']
Expand All @@ -26,7 +26,7 @@ services:
authentication:
links: [postgres, cfssl, logstash, registration, zookeeper, webapp]
user: authentication:root
image: blackducksoftware/blackduck-authentication:2019.8.1
image: blackducksoftware/blackduck-authentication:2019.10.0
volumes: ['authentication-volume:/opt/blackduck/hub/hub-authentication/ldap' ]
env_file: [blackduck-config.env ]
healthcheck:
Expand All @@ -44,7 +44,7 @@ services:
webapp:
links: [postgres, cfssl, logstash, registration, zookeeper]
user: webapp:root
image: blackducksoftware/blackduck-webapp:2019.8.1
image: blackducksoftware/blackduck-webapp:2019.10.0
volumes: ['log-volume:/opt/blackduck/hub/logs', 'webapp-volume:/opt/blackduck/hub/hub-webapp/ldap' ]
env_file: [blackduck-config.env ]
healthcheck:
Expand All @@ -62,7 +62,7 @@ services:
scan:
links: [postgres, cfssl, logstash, registration, zookeeper]
user: scan:root
image: blackducksoftware/blackduck-scan:2019.8.1
image: blackducksoftware/blackduck-scan:2019.10.0
volumes: [ ]
env_file: [blackduck-config.env ]
healthcheck:
Expand All @@ -80,7 +80,7 @@ services:
jobrunner:
links: [postgres, cfssl, logstash, registration, zookeeper]
user: jobrunner:root
image: blackducksoftware/blackduck-jobrunner:2019.8.1
image: blackducksoftware/blackduck-jobrunner:2019.10.0
volumes: [ ]
env_file: [blackduck-config.env ]
healthcheck:
Expand Down Expand Up @@ -119,7 +119,7 @@ services:
restart: always
mem_limit: 1024m
registration:
image: blackducksoftware/blackduck-registration:2019.8.1
image: blackducksoftware/blackduck-registration:2019.10.0
links: [logstash, cfssl]
volumes: ['config-volume:/opt/blackduck/hub/hub-registration/config']
env_file: [blackduck-config.env]
Expand Down Expand Up @@ -148,7 +148,7 @@ services:
restart: always
mem_limit: 384M
webserver:
image: blackducksoftware/blackduck-nginx:1.0.8
image: blackducksoftware/blackduck-nginx:1.0.9
ports: ['443:8443']
env_file: [hub-webserver.env, blackduck-config.env]
links: [webapp, cfssl, documentation, authentication, scan]
Expand All @@ -163,7 +163,7 @@ services:
mem_limit: 640M
tmpfs: [/opt/blackduck/hub/webserver/security]
documentation:
image: blackducksoftware/blackduck-documentation:2019.8.1
image: blackducksoftware/blackduck-documentation:2019.10.0
links: [logstash]
env_file: [blackduck-config.env]
user: documentation:root
Expand Down
16 changes: 10 additions & 6 deletions docker-compose/external-postgres-init.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ CREATE USER blackduck_reporter;

\c bds_hub
CREATE EXTENSION pgcrypto;
CREATE SCHEMA st AUTHORIZATION blackduck;
GRANT USAGE ON SCHEMA st TO blackduck_user ;
GRANT SELECT, INSERT, UPDATE, TRUNCATE, DELETE, REFERENCES ON ALL TABLES IN SCHEMA st TO blackduck_user;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA st to blackduck_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA st GRANT SELECT, INSERT, UPDATE, TRUNCATE, DELETE, REFERENCES ON TABLES TO blackduck_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA st GRANT ALL PRIVILEGES ON SEQUENCES TO blackduck_user;
CREATE SCHEMA ${blackduck_mt_schema} AUTHORIZATION blackduck;
GRANT USAGE ON SCHEMA ${blackduck_mt_schema} TO blackduck_user ;
GRANT SELECT, INSERT, UPDATE, TRUNCATE, DELETE, REFERENCES ON ALL TABLES IN SCHEMA ${blackduck_mt_schema} TO blackduck_user;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA ${blackduck_mt_schema} to blackduck_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA ${blackduck_mt_schema} GRANT SELECT, INSERT, UPDATE, TRUNCATE, DELETE, REFERENCES ON TABLES TO blackduck_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA ${blackduck_mt_schema} GRANT ALL PRIVILEGES ON SEQUENCES TO blackduck_user;
GRANT USAGE ON SCHEMA reporting TO blackduck_reporter;
GRANT SELECT ON ALL TABLES IN SCHEMA reporting TO blackduck_reporter;
REVOKE INSERT, UPDATE, TRUNCATE, DELETE, REFERENCES ON ALL TABLES IN SCHEMA reporting FROM blackduck_reporter;
REVOKE ALL ON SCHEMA st FROM blackduck_reporter;

\c bds_hub_report
GRANT SELECT ON ALL TABLES IN SCHEMA public TO blackduck_reporter;
Expand Down
2 changes: 1 addition & 1 deletion docker-swarm/bin/hub_add_replication_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

function fail() {
Expand Down
2 changes: 1 addition & 1 deletion docker-swarm/bin/hub_create_data_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

database_name=""
Expand Down
8 changes: 4 additions & 4 deletions docker-swarm/bin/hub_db_migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

SCHEMA_NAME=${HUB_POSTGRES_SCHEMA:-st}
function fail() {
message=$1
exit_status=$2
Expand Down Expand Up @@ -140,7 +140,7 @@ function determine_database_emptiness() {
# Make sure that the database is empty
if [ "${database}" == "bds_hub" ];
then
table_count=`docker exec -i -u postgres ${container} psql -A -t -c "select count(*) from information_schema.tables where table_schema = 'st'" ${database}`
table_count=`docker exec -i -u postgres ${container} psql -A -t -c "select count(*) from information_schema.tables where table_schema = '${SCHEMA_NAME}'" ${database}`
[ "${table_count}" -ne 0 ] && fail "Unable to migrate as database ${database} in container ${container} has already been populated" 9
else
table_count=`docker exec -i -u postgres ${container} psql -A -t -c "select count(*) from information_schema.tables where table_schema = 'public'" ${database}`
Expand Down Expand Up @@ -183,7 +183,7 @@ function cleanup_database() {
then
# Clear the ETL jobs from bds_hub to bds_hub_report
docker exec -i -u postgres ${container} psql -d ${database} << EOF
UPDATE st.job_instances SET status='FAILED' where job_type='ReportingDatabaseTransferJob' and (status='SCHEDULED' or status='DISPATCHED' or status='RUNNING');
UPDATE ${SCHEMA_NAME}.job_instances SET status='FAILED' where job_type='ReportingDatabaseTransferJob' and (status='SCHEDULED' or status='DISPATCHED' or status='RUNNING');
EOF
else
# Grant permissions to blackduck_user for bds_hub_report and bdio
Expand Down
2 changes: 1 addition & 1 deletion docker-swarm/bin/hub_replication_changepassword.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

function fail() {
Expand Down
2 changes: 1 addition & 1 deletion docker-swarm/bin/hub_reportdb_changepassword.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

TIMEOUT=${TIMEOUT:-10}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.7}
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-1.0.10}
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}

function fail() {
Expand Down
Loading

0 comments on commit c21a0a6

Please sign in to comment.