From 6a3e9d53686eda1d45fb54b97869a594741f089c Mon Sep 17 00:00:00 2001 From: Zhaoxing Date: Fri, 22 Sep 2017 15:40:57 +0800 Subject: Move python files to root dir Change-Id: I16a66e1f6bcb65cbb68f2b622618252885ab47fc Issue-Id: MODELING-20 Signed-off-by: Zhaoxing --- .../tests/artifacts/mysql/mysql_database_configure.sh | 8 ++++++++ .../toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh | 5 +++++ .../toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh | 9 +++++++++ nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh create mode 100644 nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh create mode 100644 nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh create mode 100644 nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh (limited to 'nfvparser/toscaparser/tests/artifacts/mysql') diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh new file mode 100644 index 0000000..092136a --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh @@ -0,0 +1,8 @@ +#!/bin/sh +cat << EOF | mysql -u root --password=$db_root_password +CREATE DATABASE $db_name; +GRANT ALL PRIVILEGES ON $db_name.* TO "$db_user"@"localhost" +IDENTIFIED BY "$db_password"; +FLUSH PRIVILEGES; +EXIT +EOF \ No newline at end of file diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh new file mode 100644 index 0000000..d4ef6b4 --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh @@ -0,0 +1,5 @@ +#!/bin/sh +sed --regexp-extended "s/(port\s*=\s*)[0-9]*/\1$db_port/g" /tmp/my.cnf +mv -f /tmp/my.cnf /etc/mysql/my.cnf +/etc/init.d/mysql stop +/etc/init.d/mysql start \ No newline at end of file diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh new file mode 100644 index 0000000..38628b9 --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh @@ -0,0 +1,9 @@ +#!/bin/bash +#This script installs mysql server + +apt-get update + +debconf-set-selections <<< "mysql-server mysql-server/root_password password $db_root_password" +debconf-set-selections <<< "mysql-server mysql-server/root_password_again password $db_root_password" + +apt-get -y install --fix-missing mysql-server \ No newline at end of file diff --git a/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh new file mode 100644 index 0000000..3378670 --- /dev/null +++ b/nfvparser/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/etc/init.d/mysql start \ No newline at end of file -- cgit 1.2.3-korg