3 source /var/onap/functions
5 # clone_all_portal_repos() - Function that clones Portal source repo.
6 function clone_all_portal_repos {
7 for repo in ${repos[portal]}; do
8 if [[ "$repo" == "ui/dmaapbc" ]];then
13 clone_repo $repo ${src_folders[portal]}/${repo#*$prefix}
17 # compile_all_portal_repos() - Function that compiles Portal source repo.
18 function compile_all_portal_repos {
19 for repo in ${repos[portal]}; do
20 if [[ "$repo" == "ui/dmaapbc" ]];then
25 compile_src ${src_folders[portal]}/${repo#*$prefix}
29 # _build_portal_images() - Function that builds Portal Docker images from source code
30 function _build_portal_images {
33 pushd ${src_folders[portal]}/deliveries
35 export MVN=$(which mvn)
36 export GLOBAL_SETTINGS_FILE=/usr/share/maven3/conf/settings.xml
37 export SETTINGS_FILE=$HOME/.m2/settings.xml
38 bash build_portalapps_dockers.sh
42 # get_portal_images() - Function to get Portal images.
43 function get_portal_images {
44 if [[ "$build_image" == "True" ]]; then
47 pull_openecomp_image portaldb ecompdb:portal
48 pull_openecomp_image portalapps ep:1610-1
50 pull_docker_image mariadb
53 # _install_mariadb() - Pull and create a MariaDB container
54 function _install_mariadb {
55 docker create --name data_vol_portal -v /var/lib/mysql mariadb
58 # install_portal() - Function that installs the source code of Portal
59 function install_portal {
61 docker rm -f ecompdb_portal
64 pushd ${src_folders[portal]}/deliveries
65 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
67 unzip -o etc.zip -d /PROJECT/OpenSource/UbuntuEP/
70 install_docker_compose
71 bash portal_vm_init.sh
75 if [ ! -e /opt/config/boot.txt ]; then
76 install_package mysql-client
77 mysql -u root -p'Aa123456' -h $IP_ADDRESS < Apps_Users_OnBoarding_Script.sql
78 echo "yes" > /opt/config/boot.txt
83 # init_portal() - Function that initialize Portal services
84 function init_portal {
85 if [[ "$clone_repo" == "True" ]]; then
86 clone_all_portal_repos
87 if [[ "$compile_repo" == "True" ]]; then
88 compile_all_portal_repos
92 if [[ "$skip_get_images" == "False" ]]; then
94 if [[ "$skip_install" == "False" ]]; then