summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/vid
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-06-16 18:32:48 -0500
committerVictor Morales <victor.morales@intel.com>2017-06-20 21:13:28 -0500
commit89ce3216514b002b725777d132df144b3838e42d (patch)
treefd1dcc35972c448a576265a7eb6381d8b89e115c /bootstrap/vagrant-onap/lib/vid
parentf5cd892f130bd6a8d0cdf44d705b966c3cee3499 (diff)
Add vagrant-onap project
This commit contains the current state of the files and folders imported from github repository[1]. Fixes and features are expected to be implemented in this project. [1] https://github.com/electrocucaracha/vagrant-onap Change-Id: Ib1e8d264e9566c5e44454f5475b5da4638879cb7 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-id: CIMAN-28
Diffstat (limited to 'bootstrap/vagrant-onap/lib/vid')
-rwxr-xr-xbootstrap/vagrant-onap/lib/vid29
1 files changed, 29 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/lib/vid b/bootstrap/vagrant-onap/lib/vid
new file mode 100755
index 000000000..25d2c68f6
--- /dev/null
+++ b/bootstrap/vagrant-onap/lib/vid
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -o xtrace
+
+# pull_mariadb_image() - Pull MariaDB container image from a Docker Registry Hub
+function pull_mariadb_image {
+ is_package_installed docker-ce || install_docker
+ docker login -u $nexus_username -p $nexus_password $nexus_docker_repo
+ docker pull $nexus_docker_repo/library/mariadb:10
+}
+
+# install_vid() - Download and configure Vid source code
+function install_vid {
+ local src_folder=/opt/vid
+ clone_repo vid $src_folder
+ pull_openecomp_image vid
+ pull_mariadb_image
+
+ docker rm -f vid-mariadb
+ docker rm -f vid-server
+
+ docker run --name vid-mariadb -e MYSQL_DATABASE=vid_openecomp -e MYSQL_USER=vidadmin -e MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -e MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY -v /opt/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf -v /opt/vid/lf_config/vid-pre-init.sql:/docker-entrypoint-initdb.d/vid-pre-init.sql -v /var/lib/mysql -d mariadb:10
+ docker run -e VID_MYSQL_DBNAME=vid_openecomp -e VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d $nexus_docker_repo/openecomp/vid:$docker_version
+}
+
+# init_vid() - Function that initialize Vid services
+function init_vid {
+ install_vid
+}