5 source /var/onap/functions
7 portal_src_folder=$git_src_folder/portal
8 portal_repos=("portal" "portal/sdk" "ecompsdkos" "ui/dmaapbc")
10 # clone_all_portal_repos() - Function that clones Portal source repo.
11 function clone_all_portal_repos {
12 for repo in ${portal_repos[@]}; do
13 if [[ "$repo" == "ui/dmaapbc" ]];then
18 clone_repo $repo $portal_src_folder/${repo#*$prefix}
22 # compile_all_portal_repos() - Function that compiles Portal source repo.
23 function compile_all_portal_repos {
24 for repo in ${portal_repos[@]}; do
25 if [[ "$repo" == "ui/dmaapbc" ]];then
30 compile_src $portal_src_folder/${repo#*$prefix}
34 # _build_portal_images() - Function that builds Portal Docker images from source code
35 function _build_portal_images {
38 pushd $portal_src_folder/deliveries
40 export MVN=$(which mvn)
41 export GLOBAL_SETTINGS_FILE=/usr/share/maven3/conf/settings.xml
42 export SETTINGS_FILE=$HOME/.m2/settings.xml
43 bash build_portalapps_dockers.sh
47 # get_portal_images() - Function to get Portal images.
48 function get_portal_images {
49 if [[ "$build_image" == "True" ]]; then
52 pull_openecomp_image portaldb ecompdb:portal
53 pull_openecomp_image portalapps ep:1610-1
55 pull_docker_image mariadb
58 # _install_mariadb() - Pull and create a MariaDB container
59 function _install_mariadb {
60 docker create --name data_vol_portal -v /var/lib/mysql mariadb
63 # install_portal() - Function that installs the source code of Portal
64 function install_portal {
66 docker rm -f ecompdb_portal
69 pushd $portal_src_folder/deliveries
70 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
72 unzip -o etc.zip -d /PROJECT/OpenSource/UbuntuEP/
75 install_docker_compose
76 bash portal_vm_init.sh
80 if [ ! -e /opt/config/boot.txt ]; then
81 install_package mysql-client
82 mysql -u root -p'Aa123456' -h $IP_ADDRESS < Apps_Users_OnBoarding_Script.sql
83 echo "yes" > /opt/config/boot.txt
88 # init_portal() - Function that initialize Portal services
89 function init_portal {
90 if [[ "$clone_repo" == "True" ]]; then
91 clone_all_portal_repos
92 if [[ "$compile_repo" == "True" ]]; then
93 compile_all_portal_repos
97 if [[ "$skip_get_images" == "False" ]]; then
99 if [[ "$skip_install" == "False" ]]; then