From c8201c119ec686e79797721156767685fe848aca Mon Sep 17 00:00:00 2001 From: shangxdy Date: Thu, 7 Apr 2016 14:08:49 -0400 Subject: Update tosca lib to version 0.5 Use tosca-parser and heat-translator to analyze to the basic nfv-tosca type definitions, and use simple tosca new feature such as policy, group and trigger, which are now supported by the latest version of tosca-parser and heat-translator. JIRA:PARSER-18 Change-Id: I797bcacbb5b32005d0aeb0f3f32851ac96e30f01 Signed--off-by: shangxdy Signed-off-by: shangxdy --- .../Scripts/MYSQLDBMS/configure.sh | 5 +++++ .../tosca_single_instance_wordpress/Scripts/MYSQLDBMS/install.sh | 9 +++++++++ .../tosca_single_instance_wordpress/Scripts/MYSQLDBMS/start.sh | 2 ++ .../Scripts/MYSQLDatabase/configure.sh | 8 ++++++++ .../tosca_single_instance_wordpress/Scripts/WebServer/install.sh | 5 +++++ .../tosca_single_instance_wordpress/Scripts/WebServer/start.sh | 2 ++ .../Scripts/WordPress/configure.sh | 4 ++++ .../tosca_single_instance_wordpress/Scripts/WordPress/install.sh | 5 +++++ 8 files changed, 40 insertions(+) create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/configure.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/install.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/start.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDatabase/configure.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/install.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/start.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/configure.sh create mode 100644 tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/install.sh (limited to 'tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts') diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/configure.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/configure.sh new file mode 100644 index 0000000..d4ef6b4 --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/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/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/install.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/install.sh new file mode 100644 index 0000000..38628b9 --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/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/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/start.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/start.sh new file mode 100644 index 0000000..3378670 --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/etc/init.d/mysql start \ No newline at end of file diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDatabase/configure.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDatabase/configure.sh new file mode 100644 index 0000000..092136a --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDatabase/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/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/install.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/install.sh new file mode 100644 index 0000000..4ca9b4e --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh +#This script installs apache web server + +apt-get update +apt-get install -y apache2 \ No newline at end of file diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/start.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/start.sh new file mode 100644 index 0000000..e962ca5 --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +service apache2 start \ No newline at end of file diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/configure.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/configure.sh new file mode 100644 index 0000000..5598b4f --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/configure.sh @@ -0,0 +1,4 @@ +#!/bin/sh +ln -s /usr/share/wordpress /var/www/html/wordpress +gzip -d /usr/share/doc/wordpress/examples/setup-mysql.gz +echo $wp_db_password | bash /usr/share/doc/wordpress/examples/setup-mysql -e $wp_db_name -u $wp_db_user localhost \ No newline at end of file diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/install.sh b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/install.sh new file mode 100644 index 0000000..1320443 --- /dev/null +++ b/tosca2heat/tosca-parser/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/install.sh @@ -0,0 +1,5 @@ +#!/bin/sh +#This script installs wordpress + +apt-get update +apt-get install -y wordpress \ No newline at end of file -- cgit 1.2.3-korg