Skip to content

Commit 4b69f0a

Browse files
committed
Use standard tas-runtime-{postgres,mysql-...} imgs
We created the following images off of our standard cloudfoundry/tas-runtime-build image: - cloudfoundry/tas-runtime-mysql-5.7 - cloudfoundry/tas-runtime-mysql-8.0 - cloudfoundry/tas-runtime-postgres This commit switches the cf-networking-release scripts to use them locally and in CI. This also switches the default db when one invokes scripts/docker-shell to postgres, which used to be the default. Also removes things related to cf-networking-postgres-ifb because all of the IFB feature work, including tests, was merged upstream to containernetworking/plugins in like 2018 and we don't even run tests related to this anymore. That is to say, we don't need the ifb image and haven't used it in earnest for years at this point. [#182691815](https://www.pivotaltracker.com/story/show/182691815)
1 parent 628a708 commit 4b69f0a

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

scripts/docker-shell

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ set -e -u
44
ROOT_DIR_PATH="$(cd $(dirname $0)/.. && pwd)"
55
cd "${ROOT_DIR_PATH}"
66

7-
db=${DB:-"mysql"} # if not set, default to mysql
7+
# if DB not set, default to postgres because we usually use
8+
# postgres in our deployments
9+
db=${DB:-"postgres"}
810

911
if [ "$db" = "mysql" ]; then
10-
docker_image=cloudfoundry/cf-networking-mysql
12+
docker_image=cloudfoundry/tas-runtime-mysql-5.7
1113
elif [ "$db" = "mysql8" ]; then
12-
docker_image=cloudfoundry/cf-networking-mysql8
14+
docker_image=cloudfoundry/tas-runtime-mysql-8.0
1315
else
14-
docker_image=cloudfoundry/cf-networking-postgres-ifb
16+
docker_image=cloudfoundry/tas-runtime-postgres
1517
fi
1618

1719
docker run \

scripts/start-db-helper

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,16 @@ function bootDB {
44
db="$1"
55

66
if [ "${db}" = "postgres" ]; then
7-
launchDB="(docker-entrypoint.sh postgres &> /var/log/postgres-boot.log) &"
7+
launchDB="(/postgres-entrypoint.sh postgres &> /var/log/postgres-boot.log) &"
88
testConnection="psql -h localhost -U postgres -c '\conninfo'"
99
elif [ "${db}" = "mysql" ] || [ "${db}" = "mysql-5.6" ] || [ "${db}" = "mysql8" ]; then
10-
launchDB="(MYSQL_ROOT_PASSWORD=password /entrypoint.sh mysqld &> /var/log/mysql-boot.log) &"
10+
launchDB="(MYSQL_ROOT_PASSWORD=password /mysql-entrypoint.sh mysqld &> /var/log/mysql-boot.log) &"
1111
testConnection="mysql -h localhost -u root -D mysql -e '\s;' --password='password'"
1212
else
1313
echo "skipping database"
1414
return 0
1515
fi
1616

17-
echo -n "loading IFB kernel module"
18-
set +e
19-
depmod "$(uname -r)"
20-
modprobe ifb
21-
set -e
22-
2317
echo -n "booting ${db}"
2418
eval "$launchDB"
2519
for _ in $(seq 1 60); do

0 commit comments

Comments
 (0)