summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql')
-rwxr-xr-xtosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh8
-rwxr-xr-xtosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh5
-rwxr-xr-xtosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh9
-rwxr-xr-xtosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh2
4 files changed, 24 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh
new file mode 100755
index 0000000..092136a
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/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/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh
new file mode 100755
index 0000000..d4ef6b4
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/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" </etc/mysql/my.cnf >/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/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh
new file mode 100755
index 0000000..38628b9
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/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/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh b/tosca2heat/tosca-parser-0.3.0/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh
new file mode 100755
index 0000000..3378670
--- /dev/null
+++ b/tosca2heat/tosca-parser-0.3.0/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