3 source /var/onap/functions
5 # get_mso_images() - Function that retrieves or create MSO Docker images
6 function get_mso_images {
7 if [[ "$build_image" == "True" ]]; then
8 export GIT_NO_PROJECT=/opt/
9 compile_src ${src_folders[mso]}
10 build_docker_image ${src_folders[mso]}/packages/docker docker
14 # install_mso() - Install MSO Docker configuration project
15 function install_mso {
16 MSO_ENCRYPTION_KEY=$(cat /opt/mso/docker-config/encryption.key)
17 echo -n "$openstack_api_key" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
19 # Deployments in OpenStack require a keystone file
20 if [ -e /opt/config/keystone.txt ]; then
21 KEYSTONE_URL=$(cat /opt/config/keystone.txt)
22 DCP_CLLI="DEFAULT_KEYSTONE"
23 AUTH_TYPE="USERNAME_PASSWORD"
25 KEYSTONE_URL="https://identity.api.rackspacecloud.com/v2.0"
26 DCP_CLLI="RAX_KEYSTONE"
27 AUTH_TYPE="RACKSPACE_APIKEY"
30 # Update the MSO configuration file.
31 read -d '' MSO_CONFIG_UPDATES <<-EOF
39 "environmentName": "$dmaap_topic"
42 "mso-po-adapter-config":
47 "dcp_clli": "$DCP_CLLI",
48 "identity_url": "$KEYSTONE_URL",
49 "mso_id": "$openstack_username",
50 "mso_pass": "$openstack_password",
51 "admin_tenant": "service",
52 "member_role": "admin",
53 "tenant_metadata": "true",
54 "identity_server_type": "KEYSTONE",
55 "identity_authentication_type": "$AUTH_TYPE"
62 export MSO_CONFIG_UPDATES
63 export MSO_DOCKER_IMAGE_VERSION=$docker_version
66 install_docker_compose
67 # Deploy the environment
68 pushd ${src_folders[mso]}/docker-config
70 if [[ "$build_image" == "True" ]]; then
73 # This script takes in input 2 nexus repos (the first one for the MSO image, the second one for mariadb)
74 bash deploy.sh $nexus_docker_repo $nexus_username $nexus_password $nexus_docker_repo $nexus_username $nexus_password
79 # init_mso() - Function that initialize MSO services
81 if [[ "$clone_repo" == "True" ]]; then
83 if [[ "$compile_repo" == "True" ]]; then
88 if [[ "$skip_get_images" == "False" ]]; then
90 if [[ "$skip_install" == "False" ]]; then