#!/bin/bash
# ----------------------------------------------------------------------------
#
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.
#
# ----------------------------------------------------------------------------
#
#  Server configuration script for Apache Stratos
# ----------------------------------------------------------------------------
#
#  Configure below parameters to install Apache Stratos using ../setup.sh.
#  General configuration parameters are mandatory and other sections are optional. 
#
# ----------------------------------------------------------------------------


# ----------------------------------------------------------------------------
# General configuration
# ----------------------------------------------------------------------------
export setup_path=/opt/stratos-installer/stratos-installer/ #Folder path containing stratos_setup
export stratos_packs=/opt/stratos-packs/ #Folder path containing stratos package and other third party packs and jars 
export stratos_path=/opt/stratos/ #Folder which stratos will be installed

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_03 #Java home path

export log_path=/var/log/apache-stratos

export host_user="supun" #A host user account for the machine which run Stratos component(s)

export stratos_domain="stratos.apache.org"

export host_ip="127.0.0.1" # Machine ip on host machine
export offset=0

export puppet_ip="127.0.0.1" 	# Machine ip on which puppet master run
export puppet_hostname="puppet-hostname" # Host name given to identify the puppet master
export puppet_environment="puppet_environment" # Name of puppet environment

export mb_ip="127.0.0.1" # Machine ip on which mb run
export mb_port=61616 #default port which the message broker service runs
 
export stratos_extract_path=$stratos_path/"apache-stratos"
export stratos_pack_zip=$stratos_packs/"apache-stratos-4.0.0.zip"

export activemq_pack=$stratos_packs/"apache-activemq-5.10.0-bin.tar.gz"
export activemq_path=$stratos_path/"apache-activemq-5.10.0"

export jndi_template_path=$setup_path/"config/all/repository/conf/activemq/jndi.properties"

export resource_path=$setup_path/resources


# IaaS Providers
# ----------------------------------------------------------------------------
# Set <iaas-name>_provider_enabled parameter to true to enable desired IaaS. A hybrid cloud could be
# created using multiple IaaSs.

# EC2
export ec2_provider_enabled=false
export ec2_identity="<ec2_identity>"
export ec2_credential="<ec2_credential>"
export ec2_keypair_name="<ec2_keypair_name>"
export ec2_owner_id="<ec2_owner_id>"
export ec2_availability_zone="<ec2_availability_zone>"
export ec2_security_groups="<ec2_security_groups>"

# Openstack
export openstack_provider_enabled=true
export openstack_identity="stratos:stratos" # Openstack project name:Openstack login user
export openstack_credential="password" # Openstack login password
export openstack_jclouds_endpoint="http://127.0.0.1:5000/v2.0"
export openstack_keypair_name=""
export openstack_security_groups=""

# vCloud
export vcloud_provider_enabled=false
export vcloud_identity="stratos" # vCloud login user
export vcloud_credential="password" # vCloud login password
export vcloud_jclouds_endpoint="https://vcloud/api"


# Database configuration
# ----------------------------------------------------------------------------
export mysql_connector_jar=$stratos_packs/"mysql-connector-java-5.1.33-bin.jar" #mysql connector jar file name

export userstore_db_hostname="localhost"
export userstore_db_schema="userstore"
export userstore_db_port="3306"
export userstore_db_user="root"
export userstore_db_pass="root"
