blob: f4f290000d74d23e0f87e85db1c7c9694da4ba5b [file] [log] [blame]
#
# Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
#blah
#!/bin/sh
# This script creates and starts a domain called "sqe-domain"
# with a single server instance named "sqe-server".
#--- Extract environment properties ---
for x in `cat $APS_HOME/config.properties`
do
varval=`echo $x |cut -d'=' -f1`
if [ $varval = "admin.user" ];
then
AS_ADMIN_USER=`echo $x |cut -d'=' -f2`
fi
if [ $varval = "admin.port" ];
then
AS_ADMIN_PORT=`echo $x |cut -d'=' -f2`
fi
if [ $varval = "admin.password" ];
then
AS_ADMIN_PASSWORD=`echo $x |cut -d'=' -f2`
fi
done
export AS_ADMIN_USER
export AS_ADMIN_PASSWORD
export AS_ADMIN_PORT
#----Create domain: sqe-domain
${S1AS_HOME}/bin/asadmin create-domain --adminport ${AS_ADMIN_PORT} --adminuser ${AS_ADMIN_USER} --adminpassword ${AS_ADMIN_PASSWORD} domain1
#----Start domain: sqe-domain
${S1AS_HOME}/bin/asadmin start-domain --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} domain1
#----Create node agent (sqe-agent) referencing sqe-domain.
${S1AS_HOME}/bin/asadmin create-node-agent --host localhost --port ${AS_ADMIN_PORT} --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} --savemasterpassword --passwordfile $APS_HOME/eeconfig/masterpassword.txt NA1
#----Create cluster
${S1AS_HOME}/bin/asadmin create-cluster --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} --port ${AS_ADMIN_PORT} C1
#----Create the server instance: sqe-server
${S1AS_HOME}/bin/asadmin create-instance --nodeagent NA1 --cluster C1 --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} --port ${AS_ADMIN_PORT} C1S1
${S1AS_HOME}/bin/asadmin create-instance --nodeagent NA1 --cluster C1 --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} --port ${AS_ADMIN_PORT} C1S2
${S1AS_HOME}/bin/asadmin create-instance --nodeagent NA1 --cluster C1 --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} --port ${AS_ADMIN_PORT} C1S3
#----Start the sqe-agent.
${S1AS_HOME}/bin/asadmin start-node-agent --user ${AS_ADMIN_USER} --password ${AS_ADMIN_PASSWORD} NA1
#./asadmin deploy --user admin --password adminadmin --target C1 --type application --retrieve /home/sheetal/ws8-4/appserv-tests//build/module/archive /home/sheetal/ws8-4/appserv-tests//build/module/archive/loadbalancing-AppApp.ear
#./asadmin undeploy --user admin --password adminadmin --target C1 --type application loadbalancing-AppApp
#./asadmin create-jdbc-connection-pool --datasourceclassname com.pointbase.jdbc.jdbcDataSource --restype javax.sql.DataSource --target C1 --user admin --password adminadmin bmpEnrollerPool
#./asadmin create-jdbc-resource --user admin --password adminadmin --connectionpoolid bmpEnrollerPool --target C1 jdbc/bmp-enrollerDB
#./asadmin set --user admin --password adminadmin --host localhost --port 4849 domain.resources.jdbc-connection-pool.bmpEnrollerPool.property.DatabaseName=jdbc:pointbase:server://localhost:9092/sqe-samples,new
#./asadmin set --user admin --password adminadmin --host localhost --port 4849 domain.resources.jdbc-connection-pool.bmpEnrollerPool.property.User=pbPublic
#./asadmin set --user admin --password adminadmin --host localhost --port 4849 domain.resources.jdbc-connection-pool.bmpEnrollerPool.property.Password=pbPublic
#./asadmin create-jms-resource --restype jakarta.jms.QueueConnectionFactory --user admin --password adminadmin --target C1 jms/QCFactory
#./asadmin create-jmsdest --desttype queue --user admin --password adminadmin --target C1 Queue
#./asadmin create-jms-resource --restype jakarta.jms.Queue --property imqDestinationName=Queue --target C1 --user admin --password adminadmin jms/SampleQueue