-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
39 lines (38 loc) · 1.32 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# updating system only if needed
apt-get update -y -qq
# apt-get upgrade -y -qq
# installing java jdk 8
apt-get install -y oraclejdk8 -qq
# installing mysql
apt-get -y install mysql-server -qq
mysqladmin -u root password iae2016
# installing git
apt-get install -y git -qq
# downloading project
git clone https://github.com/ZZ3-IAE/IAE.git
# installing payara
cp -r IAE/matos/payara41 .
# driver jdbc
cp IAE/matos/mysql-jdbc.jar payara41/glassfish/lib
# creation of database
mysql -u root --password=iae2016 < IAE/matos/script.sql
# starting payara
payara41/bin/asadmin start-domain
# creating a connexion pool
payara41/bin/asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --restype javax.sql.DataSource --property user=root:password=iae2016:DatabaseName=tp_iae:ServerName=localhost:port=3306 tp_iae_pool
payara41/bin/asadmin ping-connection-pool tp_iae_pool
# creating a data source
payara41/bin/asadmin create-jdbc-resource --connectionpoolid tp_iae_pool tp_iae
# build
chmod +rwx . -R
cd IAE/rdvMed
chmod +rwx ../matos/apache-ant-1.10.1/bin/ant
../matos/apache-ant-1.10.1/bin/ant dist
cd ../..
# deploying app
payara41/bin/asadmin deploy IAE/rdvMed/dist/rdvMed.war
# launching demo
cd IAE/rdvMed
../matos/apache-ant-1.10.1/bin/ant mytest
../matos/apache-ant-1.10.1/bin/ant javadoc