Create docker-compose-test.yml in docker/csit directory (policy-docker project)
Only the policy_admin user and the policyadmin database which are related to policy are available at mariadb container creation time.
Code Block |
---|
language | yml |
---|
title | docker-compose-test.yml |
---|
|
#
# ===========LICENSE_START====================================================
# Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
# Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
# ============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=====================================================
#
version: '2'
services:
mariadb:
image: nexus3.onap.org:10001/mariadb:10.5.8
container_name: mariadb
hostname: mariadb
command: ['--lower-case-table-names=1', '--wait_timeout=28800']
env_file: config/db/db.conf
volumes:
- ./config/db:/docker-entrypoint-initdb.d:ro
expose:
- 3306
liquibase:
image: liquibase/liquibase
container_name: liquibase
hostnamedepends_on:
liquibase depends_on:- mariadb
-hostname: mariadbliquibase
env_file: config/db/db.conf
environment:
MYSQL_DB: policyadmin
volumes:
- ./config/db:/liquibase/changelog
- ./waitliquibase_forpolicy_itinit.sh:/liquibase/waitliquibase_forpolicy_itinit.sh:ro
- entrypoint: ['/bin/sh', '-c']./nc.sh:/liquibase/nc.sh:ro
command: [ - ./wait_for_port.sh:/liquibase/wait_for_port.sh:ro
'/liquibaseentrypoint: ./wait_for_itport.sh
mariadb:3306 command: [
-- /liquibase/liquibase'-c',
'./liquibase_policy_init.sh',
--driver=org.mariadb.jdbc.Driver 'mariadb', '3306'
--url=jdbc:mariadb://mariadb:3306/$${MYSQL_DB} --changeLogFile=changelog/dbchangelog.mariadb.yaml
--username=$${MYSQL_USER}
--password=$${MYSQL_PASSWORD}
update'
] |
Add wait_for_it.sh
Code Block |
---|
language | text |
---|
title | wait_for_it.sh |
---|
|
#!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available
WAITFORIT_cmdname=${0##*/}
echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
usage()
{
cat << USAGE >&2
Usage:
$WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args]
-h HOST | --host=HOST Host or IP under test
-p PORT | --port=PORT TCP port under test
Alternatively, you specify the host and port as host:port
-s | --strict Only execute subcommand if the test succeeds
-q | --quiet ] |
Add nc.sh (check_tcp_port.sh uses the nc command which is not available in the liquibase image)
Code Block |
---|
|
#!/bin/bash
# ============LICENSE_START====================================================
# Copyright (C) 2021. Nordix Foundation. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END======================================================
if [ $# -lt 2 ]; then
echo "nc.sh: hostname port" >&2
exit 1
fi
host=$1
port=$2
(echo -n > /dev/tcp/$host/$port) >/dev/null 2>&1
result=$?
if [ $result -eq 0 ]; then
echo "Connection to $host $port port [tcp/mysql] succeeded!"
exit 0
else
echo "nc: connect to $host port $port (tcp) failed: Connection refused"
exit 1
fi
|
Update wait_for_port.sh
Code Block |
---|
language | text |
---|
title | wait_for_port.sh |
---|
|
echo "Waiting for $host port $port..."
if [ -x ./nc.sh ]; then
timeout $tmout sh -c 'until ./nc.sh "$host" "$port"; do echo -n ".";
sleep 1; Dondone't
output any status messages else
-t TIMEOUT | --timeout=TIMEOUT timeout $tmout sh -c 'until nc -vz "$host" "$port"; do echo -n ".";
sleep 1; done'
fi
Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
USAGE
exit 1
}
wait_for()
{
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
else
echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout"
fi
WAITFORIT_start_ts=$(date +%s)
while :
do
if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then
nc -z $WAITFORIT_HOST $WAITFORIT_PORT
WAITFORIT_result=$?
else
(echo -n > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1
WAITFORIT_result=$?
fi
if [[ $WAITFORIT_result -eq 0 ]]; then
WAITFORIT_end_ts=$(date +%s)
echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds"
break
fi
sleep 1
done
return $WAITFORIT_result
}
wait_for_wrapper()
{
# In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
if [[ $WAITFORIT_QUIET -eq 1 ]]; then
timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
else
timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
fi
WAITFORIT_PID=$!
trap "kill -INT -$WAITFORIT_PID" INT
wait $WAITFORIT_PID
WAITFORIT_RESULT=$?
if [[ $WAITFORIT_RESULT -ne 0 ]]; then
echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
fi
return $WAITFORIT_RESULT
}
# process arguments
while [[ $# -gt 0 ]]
do
case "$1" in
*:* )
WAITFORIT_hostport=(${1//:/ })
WAITFORIT_HOST=${WAITFORIT_hostport[0]}
WAITFORIT_PORT=${WAITFORIT_hostport[1]}
shift 1
;;
--child)
WAITFORIT_CHILD=1
shift 1
;;
-q | --quiet)
WAITFORIT_QUIET=1
shift 1
;;
-s | --strict)
WAITFORIT_STRICT=1
shift 1
;;
-h)
WAITFORIT_HOST="$2"
if [[ $WAITFORIT_HOST == "" ]]; then break; fi
shift 2
;;
--host=*)
WAITFORIT_HOST="${1#*=}"
shift 1
;;
-p)
WAITFORIT_PORT="$2"
if [[ $WAITFORIT_PORT == "" ]]; then break; fi
shift 2
;;
--port=*)
WAITFORIT_PORT="${1#*=}"
shift 1
;;
-t)
WAITFORIT_TIMEOUT="$2"
if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi
shift 2
;;
--timeout=*)
WAITFORIT_TIMEOUT="${1#*=}"
shift 1
;;
--)
shift
WAITFORIT_CLI=("$@")
break
;;
--help)
usage
;;
*)
echoerr "Unknown argument: $1"
usage
;;
esac
done
if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then
echoerr "Error: you need to provide a host and port to test."
usage
fi
WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15}
WAITFORIT_STRICT=${WAITFORIT_STRICT:-0}
WAITFORIT_CHILD=${WAITFORIT_CHILD:-0}
WAITFORIT_QUIET=${WAITFORIT_QUIET:-0}
# Check to see if timeout is from busybox?
WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
WAITFORIT_BUSYTIMEFLAG=""
if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
WAITFORIT_ISBUSY=1
# Check if busybox timeout uses -t flag
# (recent Alpine versions don't support -t anymore)
if timeout &>/dev/stdout | grep -q -e '-t '; then
WAITFORIT_BUSYTIMEFLAG="-t"
fi
else
WAITFORIT_ISBUSY=0
fi
if [[ $WAITFORIT_CHILD -gt 0 ]]; then
wait_for
WAITFORIT_RESULT=$?
exit $WAITFORIT_RESULT
else
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
wait_for_wrapper
WAITFORIT_RESULT=$?
else
wait_for
WAITFORIT_RESULT=$?
fi
fi
if [[ $WAITFORIT_CLI != "" ]]; then
if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then
echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess"
exit $WAITFORIT_RESULT
fi
exec "${WAITFORIT_CLI[@]}"
else
exit $WAITFORIT_RESULT
fi
|
...
Add liquibase_policy_init.sh
Code Block |
---|
title | liquibase_policy_init.sh |
---|
|
#!/bin/sh
# ============LICENSE_START====================================================
# Copyright (C) 2021. Nordix Foundation. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END======================================================
/liquibase/liquibase \
--driver=org.mariadb.jdbc.Driver \
--url=jdbc:mariadb://mariadb:3306/${MYSQL_DB} \
--changeLogFile=changelog/dbchangelog-master.yaml \
--username=${MYSQL_USER} \
--password=${MYSQL_PASSWORD} \
update |
Add dbchangelog-master.yaml and dbchangelog.mariadb.yaml to config/db
Code Block |
---|
language | yml |
---|
title | dbchangelog-master.yaml |
---|
|
databaseChangeLog:
- include:
file: changelog/dbchangelog.mariadb.yaml |
Run docker-compose -f docker-compose-test.yml up --build
Creating network "csit_default" with the default driver
Creating mariadb ... done
Creating liquibase ... done
Attaching to mariadb, liquibase
liquibase | Waiting for mariadb port 3306...
mariadb | 2021-06-02 1004 12:4015:3055+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started.
mariadb | 2021-06-02 1004 12:4015:3056+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb | 2021-06-02 1004 12:4015:3056+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started.
mariadb | 2021-06-02 1004 12:4015:3156+00:00 [Note] [Entrypoint]: Initializing database files
liquibase | nc: connect to mariadb port 3306 (tcp) failed: Connection refused
liquibase | wait_for_it .sh: waiting 15 seconds for mariadb:3306nc: connect to mariadb port 3306 (tcp) failed: Connection refused
mariadb |
mariadb |
mariadb | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
mariadb | To do so, start the server, then issue the following commands:
mariadb |
mariadb | '/usr/bin/mysqladmin' -u root password 'new-password'
mariadb | '/usr/bin/mysqladmin' -u root -h password 'new-password'
mariadb |
mariadb | Alternatively you can run:
mariadb | '/usr/bin/mysql_secure_installation'
mariadb |
mariadb | which will also give you the option of removing the test
mariadb | databases and anonymous user created by default. This is
mariadb | strongly recommended for production servers.
mariadb |
mariadb | See the MariaDB Knowledgebase at https://mariadb.com/kb or the
mariadb | MySQL manual for more instructions.
mariadb |
mariadb | Please report any problems at https://mariadb.org/jira
mariadb |
mariadb | The latest information about MariaDB is available at https://mariadb.org/.
mariadb | You can find additional information about the MySQL part at:
mariadb | https://dev.mysql.com
mariadb | Consider joining MariaDB's strong and vibrant community:
mariadb | https://mariadb.org/get-involved/
mariadb |
mariadb | 2021-06-02 1004 12:4015:3257+00:00 [Note] [Entrypoint]: Database files initialized
mariadb | 2021-06-02 1004 12:4015:3257+00:00 [Note] [Entrypoint]: Starting temporary server
mariadb | 2021-06-02 1004 12:4015:3257+00:00 [Note] [Entrypoint]: Waiting for server startup
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] mysqld (mysqld 10.5.8-MariaDB-1:10.5.8+maria~focal) starting as process 113 114 ...
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Using Linux native AIO
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Uses event mutexes
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Number of pools: 1
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: 128 rollback segments are active.
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: 10.5.8 started; log sequence number 45118; transaction id 20
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] InnoDB: Buffer pool(s) load completed at 210602 10210604 12:4015:3258
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Warning] 'user' entry 'root@mariadb' ignored in --skip-name-resolve mode.
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Warning] 'proxies_priv' entry '@% root@mariadb' ignored in --skip-name-resolve mode.
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] Reading of all Master_info entries succeeded
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] Added new Master_info '' to hash table
mariadb | 2021-06-02 1004 12:4015:32 58 0 [Note] mysqld: ready for connections.
mariadb | Version: '10.5.8-MariaDB-1:10.5.8+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
liquibase | .nc: connect to mariadb port 3306 (tcp) failed: Connection refused
mariadb | 2021-06-02 1004 12:4015:3358+00:00 [Note] [Entrypoint]: Temporary server started.
mariadb | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
mariadb | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
liquibase | .nc: connect to mariadb port 3306 (tcp) failed: Connection refused
liquibase | .nc: connect to mariadb port 3306 (tcp) failed: Connection refused
mariadb | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
mariadb | 2021-06-02 1004 12:4016:36 01 5 [Warning] 'proxies_priv' entry '@% root@mariadb' ignored in --skip-name-resolve mode.
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Note] [Entrypoint]: Creating user policy_user
mariadb |
mariadb |
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/db.conf
mariadb |
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/db.sh
mariadb | #!/bin/bash -xv
mariadb | # Copyright 2019,2021 AT&T Intellectual Property. All rights reserved
mariadb | #
mariadb | # Licensed under the Apache License, Version 2.0 (the "License");
mariadb | # you may not use this file except in compliance with the License.
mariadb | # You may obtain a copy of the License at
mariadb | #
mariadb | # http://www.apache.org/licenses/LICENSE-2.0
mariadb | #
mariadb | # Unless required by applicable law or agreed to in writing, software
mariadb | # distributed under the License is distributed on an "AS IS" BASIS,
mariadb | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mariadb | # See the License for the specific language governing permissions and
mariadb | # limitations under the License.
mariadb |
mariadb | for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | do
mariadb | mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
mariadb | mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
mariadb | done
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret --execute 'CREATE DATABASE IF NOT EXISTS support;'
mariadb | + mysql -uroot -psecret --execute 'GRANT ALL PRIVILEGES ON `support`db}\`.* TO '\''policy_user'\''@'\''%'\'' ;'${MYSQL_USER}'@'%' ;"
mariadb | done
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS onap_sdksupport;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `onap_sdk``support`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS logonap_sdk;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `log``onap_sdk`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS migrationlog;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `migration``log`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS operationshistory10migration;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `operationshistory10``migration`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS poolingoperationshistory10;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `pooling``operationshistory10`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS policyadminpooling;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `policyadmin``pooling`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -psecret p****** --execute 'CREATE DATABASE IF NOT EXISTS operationshistorypolicyadmin;'
mariadb | + mysql -uroot -psecret p****** --execute 'GRANT ALL PRIVILEGES ON `operationshistory``policyadmin`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb |
mariadb | mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
mariadb | + mysql -uroot -psecret --execute ' FLUSH PRIVILEGES;'
mariadb | 2021-06-02 10:40:36 23 [Warning] 'proxies_priv' entry '@% root@mariadb' ignored in --skip-name-resolve mode.
mariadb |
mariadb | 2021-06-02 10:40:36+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/dbchangelog-test.mariadb.yaml
mariadb |
mariadb | 2021-06-02 10:40:36+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/dbchangelog.mariadb.yaml
mariadb |
mariadb |;'
mariadb | + for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory
mariadb | + mysql -uroot -p****** --execute 'CREATE DATABASE IF NOT EXISTS operationshistory;'
mariadb | + mysql -uroot -p****** --execute 'GRANT ALL PRIVILEGES ON `operationshistory`.* TO '\''policy_user'\''@'\''%'\'' ;'
mariadb |
mariadb | mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
mariadb | + mysql -uroot -p****** --execute 'FLUSH PRIVILEGES;'
liquibase | .nc: connect to mariadb port 3306 (tcp) failed: Connection refused
mariadb | 2021-06-02 1004 12:40:36+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/dbchangelog93.mariadb.yaml16:01 23 [Warning] 'proxies_priv' entry '@% root@mariadb' ignored in --skip-name-resolve mode.
mariadb |
mariadb |
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/dbchangelog94.mariadbdbchangelog-master.yaml
mariadb |
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/test2.xmldbchangelog.mariadb.yaml
mariadb |
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Warn] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/test3dbchangelog2.xml
mariadb |.yaml
mariadb | 2021-06-02 1004 12:4016:3601+00:00 [Note] [Entrypoint]: Stopping temporary server
mariadb | 2021-06-02 1004 12:4016:36 01 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
mariadb | 2021-06-02 1004 12:4016:36 01 0 [Note] Event Scheduler: Purging the queue. 0 events
mariadb | 2021-06-02 1004 12:4016:36 01 0 [Note] InnoDB: FTS optimize thread exiting.
mariadb | 2021-06-02 1004 12:4016:36 01 0 [Note] InnoDB: Starting shutdown...
mariadb | 2021-06-02 1004 12:4016:36 01 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
mariadb | 2021-06-02 1004 12:4016:36 01 0 [Note] InnoDB: Buffer pool(s) dump completed at 210602 10210604 12:4016:3601
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Shutdown completed; log sequence number 45130; transaction id 21
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] mysqld: Shutdown complete
mariadb |mysqld: Shutdown complete
mariadb |
liquibase | .nc: connect to mariadb port 3306 (tcp) failed: Connection refused
mariadb | 2021-06-02 1004 12:4016:3702+00:00 [Note] [Entrypoint]: Temporary server stopped
mariadb |
mariadb | 2021-06-02 1004 12:4016:3702+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
mariadb |
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] mysqld (mysqld 10.5.8-MariaDB-1:10.5.8+maria~focal) starting as process 1 ...
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Using Linux native AIO
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Uses event mutexes
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Number of pools: 1
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: 128 rollback segments are active.
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: 10.5.8 started; log sequence number 45130; transaction id 20
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] InnoDB: Buffer pool(s) load completed at 210602 10210604 12:4016:3702
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] Server socket created on IP: '::'.
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Warning] 'proxies_priv' entry '@% root@mariadb' ignored in --skip-name-resolve mode.
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] Reading of all Master_info entries succeeded
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] Added new Master_info '' to hash table
mariadb | 2021-06-02 1004 12:4016:37 02 0 [Note] mysqld: ready for connections.
mariadb | Version: '10.5.8-MariaDB-1:10.5.8+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
mariadb | 2021-06-02 1004 12:4016:38 03 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '192.168.0160.3' (This connection closed normally without authentication)
liquibase | wait_for_it.sh: mariadb:3306 is available after 7 seconds.Connection to mariadb 3306 port [tcp/mysql] succeeded!
liquibase | Liquibase Community 4.3.5 by Datical
liquibase | ####################################################
liquibase | ## _ _ _ _ ##
liquibase | ## | | (_) (_) | ##
liquibase | ## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
liquibase | ## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
liquibase | ## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
liquibase | ## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
liquibase | ## | | ##
liquibase | ## |_| ##
liquibase | ## ##
liquibase | ## Get documentation at docs.liquibase.com ##
liquibase | ## Get certified courses at learn.liquibase.com ##
liquibase | ## Free schema change activity reports at ##
liquibase | ## https://hub.liquibase.com ##
liquibase | ## ##
liquibase | ####################################################
liquibase | Starting Liquibase at 1012:4016:38 04 (version 4.3.5 #62 built at 2021-04-29 18:31+0000)
liquibase | Skipping auto-registration
liquibase | Liquibase: Update has been successful.
liquibase exited with code 0