Skip to content

Commit d3332a4

Browse files
author
blackduck-serv-builder
committed
Release 2025.1.0
1 parent 9b1ca15 commit d3332a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+627
-328
lines changed

Important_Upgrade_Announcement.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

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

5-
## Location of Black Duck 2024.10.1 archive:
5+
## Location of Black Duck 2025.1.0 archive:
66

7-
https://github.com/blackducksoftware/hub/archive/v2024.10.1.tar.gz
7+
https://github.com/blackducksoftware/hub/archive/v2025.1.0.tar.gz
88

99
NOTE:
1010

1111
Customers upgrading from a version prior to 2018.12.0 will experience a longer than usual upgrade time due to a data migration needed to support new features in
1212
subsequent releases. Upgrade times will depend on the size of the Black Duck database. If you would like to monitor the process of the upgrade, please contact
13-
Synopsys Customer Support for instructions.
14-
15-
Customers upgrading from a version prior to 4.2 should contact Synopsys Technical Support for assistance.
13+
Black Duck Customer Support for instructions.
1614

1715
Customers upgrading from a version prior to 2022.2.0 will have their PostgreSQL data volume automatically migrated from PostgreSQL 9.6.x to PostgreSQL 11.x.
1816

docker-swarm/README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Running Black Duck by Synopsys in Docker (Using Docker Swarm)
1+
# Running Black Duck in Docker (Using Docker Swarm)
22

33
This is the bundle for running with Docker Swarm.
44

55
## Important Upgrade Announcement
6-
7-
Customers upgrading from a version prior to 2018.12.0 will experience a longer than usual upgrade time due to a data migration needed to support new features in this release. Upgrade times will depend on the size of the Black Duck database. If you would like to monitor the process of the upgrade, please contact Synopsys Customer Support for instructions.
8-
9-
Customers upgrading from a version prior to 4.2, should contact Synopsys Technical Support for assistance.
6+
7+
Customers upgrading from a version prior to 2018.12.0 will experience a longer than usual upgrade time due to a data migration needed to support new features in
8+
this release. Upgrade times will depend on the size of the Black Duck database. If you would like to monitor the process of the upgrade, please contact Black
9+
Duck Customer Support for instructions.
1010

1111
## Requirements
1212

@@ -27,7 +27,10 @@ The performance of PostgreSQL might degrade if a network volume is used. This ha
2727

2828
----
2929

30-
Black Duck 2022.2.0 transitions the provided database container from PostgreSQL 9.6.x to PostgreSQL 11.x. If upgrading from Black Duck 4.2 through Black Duck 2021.10.x to Black Duck 2022.2.0 or later, the data migration is performed automatically when Black Duck 2022.2.0 (or later) is started. If upgrading from Black Duck versions older than 4.2, please contact Synopsys Technical Support before proceeding. In either case, Synopsys _strongly_ recommends backing up the database before upgrading.
30+
Black Duck 2022.2.0 transitions the provided database container from PostgreSQL 9.6.x to PostgreSQL 11.x. If upgrading from Black Duck 4.2 through Black Duck
31+
2021.10.x to Black Duck 2022.2.0 or later, the data migration is performed automatically when Black Duck 2022.2.0 (or later) is started. If upgrading from Black
32+
Duck versions older than 4.2, please contact Black Duck Technical Support before proceeding. In either case, Black Duck _strongly_ recommends backing up the
33+
database before upgrading.
3134

3235
### Migrating before starting Black Duck
3336

@@ -138,7 +141,7 @@ docker stack deploy --compose-file docker-compose.yml -c docker-compose.readonly
138141

139142
# Overriding defaults
140143

141-
Sometimes it is necessary to override the defaults settings contained within Black Duck by Synopsys. In order to perserve
144+
Sometimes it is necessary to override the defaults settings contained within Black Duck. In order to preserve
142145
these from version to version a file called "docker-compose.local-overrides.yml" has been provided. The sections below
143146
describe how to change this file for a variety of circumstances. In all cases, this file is appended as the last yml file used
144147
in the docker stack command. For instance, the "Binary Analysis with External Postgres" command just above would be:

docker-swarm/bin/hub_add_replication_user.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
TIMEOUT=${TIMEOUT:-10}
6-
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.9}
6+
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.10}
77
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}
88

99
function fail() {

docker-swarm/bin/hub_create_data_dump.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# 2. The database container has been properly initialized.
66

77
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}
8-
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.9}
9-
HUB_VERSION=${HUB_VERSION:-2024.10.1}
8+
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.10}
9+
HUB_VERSION=${HUB_VERSION:-2025.1.0}
1010
OPT_FORCE=
1111
OPT_LIVE_SYSTEM=
1212
OPT_MAX_CPU=${MAX_CPU:-1}

docker-swarm/bin/hub_db_migrate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
set -o errexit
1515

1616
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}
17-
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.9}
17+
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.10}
1818
OPT_MAX_CPU=${MAX_CPU:-1}
1919
OPT_NO_DATABASE=${NO_DATABASE:-}
2020
OPT_NO_STORAGE=${NO_STORAGE:-}

docker-swarm/bin/hub_replication_changepassword.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
TIMEOUT=${TIMEOUT:-10}
6-
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.9}
6+
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.10}
77
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}
88

99
function fail() {

docker-swarm/bin/hub_reportdb_changepassword.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
TIMEOUT=${TIMEOUT:-10}
6-
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.9}
6+
HUB_POSTGRES_VERSION=${HUB_POSTGRES_VERSION:-15-1.10}
77
HUB_DATABASE_IMAGE_NAME=${HUB_DATABASE_IMAGE_NAME:-postgres}
88

99
function fail() {

docker-swarm/bin/kubernetes_check.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright (C) 2021 Synopsys Inc.
4-
# http://www.synopsys.com/
3+
# Copyright (C) 2021 Black Duck Software, Inc.
4+
# http://www.blackduck.com/
55
# All rights reserved.
66
#
77
# This software is the confidential and proprietary information of
8-
# Synopsys ("Confidential Information"). You shall not
8+
# Black Duck ("Confidential Information"). You shall not
99
# disclose such Confidential Information and shall use it only in
1010
# accordance with the terms of the license agreement you entered into
11-
# with Synopsys.
11+
# with Black Duck.
1212
#
1313
# Gather system and orchestration data to aide in problem diagnosis.
1414
# This command should be run by a user with "kubectl" configured.

docker-swarm/bin/system_check.sh

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright (C) 2018 Black Duck Software Inc.
4-
# http://www.blackducksoftware.com/
3+
# Copyright (C) 2018 Black Duck Software, Inc.
4+
# http://www.blackduck.com/
55
# All rights reserved.
66
#
77
# This software is the confidential and proprietary information of
8-
# Black Duck Software ("Confidential Information"). You shall not
8+
# Black Duck ("Confidential Information"). You shall not
99
# disclose such Confidential Information and shall use it only in
1010
# accordance with the terms of the license agreement you entered into
11-
# with Black Duck Software.
11+
# with Black Duck.
1212

1313
# Gather system and orchestration data to aide in problem diagnosis.
1414
# This command should be run by "root" on the docker host, although
@@ -41,7 +41,7 @@ set -o noglob
4141

4242
readonly NOW="$(date +"%Y%m%dT%H%M%S%z")"
4343
readonly NOW_ZULU="$(date -u +"%Y%m%dT%H%M%SZ")"
44-
readonly HUB_VERSION="${HUB_VERSION:-2024.10.1}"
44+
readonly HUB_VERSION="${HUB_VERSION:-2025.1.0}"
4545
readonly OUTPUT_FILE="${SYSTEM_CHECK_OUTPUT_FILE:-system_check_${NOW}.txt}"
4646
readonly PROPERTIES_FILE="${SYSTEM_CHECK_PROPERTIES_FILE:-${OUTPUT_FILE%.txt}.properties}"
4747
readonly SUMMARY_FILE="${SYSTEM_CHECK_SUMMARY_FILE:-${OUTPUT_FILE%.txt}_summary.properties}"
@@ -326,7 +326,7 @@ readonly WARN="WARNING"
326326
readonly FAIL="FAIL"
327327
readonly NOTE="NOTE"
328328

329-
# See https://sig-confluence.internal.synopsys.com/display/SIGBD/Architecture+Overview
329+
# See https://blackduck.atlassian.net/wiki/spaces/SIGBD/pages/13107681/Architecture+Overview
330330
declare -ar REPLICABLE=(
331331
# "SERVICE=status"
332332
"hub_alert=$WARN"
@@ -1614,6 +1614,7 @@ END
16141614
################################################################
16151615
# shellcheck disable=SC2155,SC2046
16161616
# shellcheck disable=SC2030,SC2031 # False positives; see https://github.com/koalaman/shellcheck/issues/1409
1617+
# shellcheck disable=SC2319 # allow 'echo "$?"'
16171618
echo_port_status() {
16181619
# shellcheck disable=SC2128 # $FUNCNAME[0] does not work in Alpine ash
16191620
[[ "$#" -eq 1 ]] || error_exit "usage: $FUNCNAME <port>"
@@ -1760,6 +1761,56 @@ EOF
17601761
fi
17611762
}
17621763

1764+
################################################################
1765+
# Check redis system configuration settings
1766+
#
1767+
# Globals:
1768+
# SYSCTL_OVERCOMMIT_STATUS -- (out) PASS/FAIL vm.overcommit status message
1769+
# KERNEL_TRANSPARENT_HUGEPAGES -- (out) PASS/FAIL status message
1770+
# Arguments:
1771+
# None
1772+
# Returns:
1773+
# None
1774+
################################################################
1775+
# shellcheck disable=SC2046,SC2155
1776+
check_redis_settings() {
1777+
if [[ -z "${SYSCTL_OVERCOMMIT_STATUS}" ]] ; then
1778+
if ! is_linux ; then
1779+
readonly SYSCTL_OVERCOMMIT_STATUS="$UNKNOWN -- non-linux system"
1780+
return
1781+
fi
1782+
1783+
if ! have_command sysctl ; then
1784+
readonly SYSCTL_OVERCOMMIT_STATUS="$UNKNOWN -- sysctl not found"
1785+
elif is_macos ; then
1786+
readonly SYSCTL_OVERCOMMIT_STATUS="$PASS -- not applicable to macOS"
1787+
else
1788+
echo "Checking sysctl vm.overcommit_memory setting..."
1789+
local overcommit=$(sysctl vm.overcommit_memory | awk -F' = ' '{print $2}')
1790+
if [[ "$overcommit" -ne 1 ]]; then
1791+
readonly SYSCTL_OVERCOMMIT_STATUS="$FAIL: vm.overcommit_memory = ${overcommit}. Redis may fail under low memory conditions. See https://redis.io/docs/latest/develop/get-started/faq/#background-saving-fails-with-a-fork-error-on-linux"
1792+
else
1793+
readonly SYSCTL_OVERCOMMIT_STATUS="$PASS: vm.overcommit_memory = ${overcommit}"
1794+
fi
1795+
fi
1796+
1797+
if [[ -r /sys/kernel/mm/transparent_hugepage/enabled ]] ; then
1798+
echo "Checking transparent hugepage setting..."
1799+
local kth=$(cat /sys/kernel/mm/transparent_hugepage/enabled)
1800+
if [[ "$kth" =~ \[always\] ]] || [[ "$kth" == 'always' ]] ; then
1801+
KERNEL_TRANSPARENT_HUGEPAGES="$FAIL: '$kth'. See the 'Kernel Memory' section of the redis tuning guide."
1802+
else
1803+
KERNEL_TRANSPARENT_HUGEPAGES="$PASS: '$kth'"
1804+
fi
1805+
else
1806+
KERNEL_TRANSPARENT_HUGEPAGES="$UNKNOWN -- /sys/kernel/mm/transparent_hugepage/enabled not found"
1807+
fi
1808+
1809+
# https://redis.io/learn/operate/redis-at-scale/talking-to-redis/initial-tuning has many
1810+
# more setting suggestions that we are not checking...
1811+
fi
1812+
}
1813+
17631814
################################################################
17641815
# Report login manager settings
17651816
#
@@ -2740,7 +2791,7 @@ check_container_memory() {
27402791
# Globals:
27412792
# RUNNING_HUB_VERSION -- (out) running Black Duck version.
27422793
# RUNNING_BDBA_VERSION -- (out) running BDBA version.
2743-
# RUNNING_ALERT_VERSION -- (out) running Synopsys Alert version.
2794+
# RUNNING_ALERT_VERSION -- (out) running Black Duck Alert version.
27442795
# RUNNING_OTHER_VERSIONS -- (out) other Black Duck product versions.
27452796
# RUNNING_VERSION_STATUS -- (out) pass/fail version check message.
27462797
# Arguments:
@@ -3787,7 +3838,7 @@ check_reg_server_reachable() {
37873838
}
37883839
37893840
################################################################
3790-
# Test connectivity with the Synopsys artifactory
3841+
# Test connectivity with the Black Duck artifactory
37913842
#
37923843
# Globals: (set indirectly)
37933844
# SIG_REPO_RESOLVE_RESULT, SIG_REPO_RESOLVE_OUTPUT,
@@ -3806,7 +3857,7 @@ check_sig_repo_reachable() {
38063857
return 0
38073858
fi
38083859
3809-
local -r SIG_REPO_HOST="sig-repo.synopsys.com"
3860+
local -r SIG_REPO_HOST="repo.blackduck.com"
38103861
local -r SIG_REPO_URL="https://${SIG_REPO_HOST}/"
38113862
tracepath_host "${SIG_REPO_HOST}" "SIG_REPO"
38123863
probe_url "${SIG_REPO_URL}" "SIG_REPO" "${SIG_REPO_URL}"
@@ -4587,6 +4638,18 @@ IPVS timeout check ${IPVS_TIMEOUT_STATUS}
45874638
45884639
${TCP_KEEPALIVE_TIMEOUT_DESC}
45894640
4641+
$(generate_report_section "Redis Initial Configuration")
4642+
4643+
Memory overcommit: ${SYSCTL_OVERCOMMIT_STATUS}
4644+
4645+
Kernel transparent hugepages: ${KERNEL_TRANSPARENT_HUGEPAGES}
4646+
4647+
See https://redis.io/learn/operate/redis-at-scale/talking-to-redis/initial-tuning and
4648+
https://redis.io/docs/latest/operate/oss_and_stack/management/optimization/latency/ for
4649+
other tuning suggestions.
4650+
4651+
Make sure to configure settings on all nodes! This script only checks the master.
4652+
45904653
$(generate_report_section "Login manager settings")
45914654
45924655
Login manager settings: ${LOGINCTL_STATUS}
@@ -4723,7 +4786,7 @@ ${REG_TRACEPATH_RESULT}
47234786
Web access to Black Duck registration service via docker containers:
47244787
${REG_CONTAINER_WEB_REPORT}
47254788
4726-
$(generate_report_section "Synopsys artifactory connectivity")
4789+
$(generate_report_section "Black Duck artifactory connectivity")
47274790
47284791
${SIG_REPO_URL_REACHABLE}
47294792
@@ -4733,7 +4796,7 @@ ${SIG_REPO_RESOLVE_OUTPUT}
47334796
Path information: ${SIG_REPO_TRACEPATH_CMD}
47344797
${SIG_REPO_TRACEPATH_RESULT}
47354798
4736-
Web access to Synopsys artifactory via docker containers:
4799+
Web access to Black Duck artifactory via docker containers:
47374800
${SIG_REPO_CONTAINER_WEB_REPORT}
47384801
47394802
$(generate_report_section "Black Duck Docker registry connectivity")
@@ -5043,6 +5106,7 @@ main() {
50435106
50445107
check_hyperthreading
50455108
check_iosched
5109+
check_redis_settings
50465110
50475111
check_entropy
50485112
get_interface_info

docker-swarm/bin/upload-cache-source-migrator.pl

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env perl
22
#
3-
# Copyright (C) 2023 Synopsys Inc.
4-
# https://www.synopsys.com/
3+
# Copyright (C) 2023 Black Duck Software, Inc.
4+
# https://www.blackduck.com/
55
# All rights reserved.
66
#
77
# This software is the confidential and proprietary information of
8-
# Synopsys ("Confidential Information"). You shall not disclose such
8+
# Black Duck ("Confidential Information"). You shall not disclose such
99
# Confidential Information and shall use it only in accordance with
10-
# the terms of the license agreement you entered into with Synopsys.
10+
# the terms of the license agreement you entered into with Black Duck.
1111

1212
# Migrate sources from pre-2024.1.0 upload-cache storage volumes to a
1313
# 2024.1.0 or later server. Note that uploaded source is still
@@ -55,7 +55,8 @@
5555
my $TOKEN_EXPIRATION=0;
5656

5757
# Parse the command line
58-
my $verbose = 1;
58+
my $verbose = 0;
59+
my $continue = 0;
5960
my $help = 0;
6061
my $dry_run = 0;
6162
my $insecure = 0;
@@ -69,6 +70,7 @@
6970
'seal-key-path=s' => \$SEAL_KEY_PATH,
7071
'keys-volume=s' => \$KEYS_VOLUME,
7172
'data-volume=s' => \$DATA_VOLUME,
73+
'continue' => \$continue,
7274
'verbose|v+' => \$verbose,
7375
'dry-run|n' => \$dry_run,
7476
'insecure|k' => \$insecure,
@@ -101,9 +103,8 @@
101103
$filenum ++;
102104
if ($file =~ m:/[a-f0-9]{40}$:) {
103105
print "... $file ($filenum of ${\scalar(@files)})\n" if ($verbose > 0);
104-
my $rawData = &get_bytes($file);
105-
my $text = &decrypt($file, $masterKey, $rawData);
106-
&upload_source($file, $text);
106+
eval { &process_file($file) };
107+
if ($@) { if ($continue) { warn $@ } else { die $@ } };
107108
}
108109
}
109110

@@ -126,8 +127,9 @@ sub usage {
126127
--keys-volume <path> Location of the upload-cache keys volume [$KEYS_VOLUME]
127128
--data-volume <path> Location of the upload-cache data volume [$DATA_VOLUME]
128129
--insecure | -k Skip SSL certificate verification
129-
--dry-run | -n Do everything _except_ upload files
130-
--verbose Print more output, repeatable, alias '-v'
130+
--continue Continue processing files after an error
131+
--dry-run | -n Do everything except upload data
132+
--verbose | -v Print more output, repeatable
131133
132134
Values can be supplied on the command line via options or via environment variables
133135
(URL, API_TOKEN, SEAL_KEY_PATH, KEYS_VOLUME, or DATA_VOLUME).
@@ -224,3 +226,12 @@ sub upload_source {
224226
Content => $data);
225227
die "*** Unable to upload $file: @{[ $response->status_line ]}\n" unless $response->is_success;
226228
}
229+
230+
# Process a single file
231+
sub process_file {
232+
my ($file) = @_;
233+
234+
my $rawData = &get_bytes($file);
235+
my $text = &decrypt($file, $masterKey, $rawData);
236+
&upload_source($file, $text);
237+
}

0 commit comments

Comments
 (0)