This repository has been archived by the owner on Aug 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
env.conf
164 lines (119 loc) · 5.03 KB
/
env.conf
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# -*- mode: sh -*-
#
# Copyright (c) 2016 Jeong Han Lee
# Copyright (c) 2016 European Spallation Source ERIC
#
# The program is free software: you can redistribute
# it and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 2 of the
# License, or any newer version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see https://www.gnu.org/licenses/gpl-2.0.txt
#
# Author : Jeong Han Lee
# Email : han.lee@esss.se
# Date : Thursday, February 16 15:43:11 CET 2017
# Version : 0.0.1
TOMCAT_HOME=/usr/share/tomcat
TOMCAT_LIB=/usr/share/tomcat/lib
# We assume that we inherit the EPICS environment variables
# This includes setting up the LD_LIBRARY_PATH to include the JCA .so file.
# EPICS BASE is installed in the local directory
EPICS_BASE_VER="R3.15.5";
EPICS_BASE=${HOME}/epics/${EPICS_BASE_VER}
EPICS_HOST_ARCH=linux-x86_64
# LD_LIBRARY_PATH should have the EPICS
LD_LIBRARY_PATH=${EPICS_BASE}/lib/${EPICS_HOST_ARCH}:${LD_LIBRARY_PATH}
PATH=${EPICS_BASE}/bin/${EPICS_HOST_ARCH}:${PATH}
EPICS_CA_ADDR_LIST="127.0.0.1";
EPICS_CA_AUTO_ADDR_LIST=yes;
EPICS_CA_SERVER_PORT=5064
EPICS_CA_REPEATER_PORT=5065
# Tomcat lib
LD_LIBRARY_PATH=${TOMCAT_LIB}:${LD_LIBRARY_PATH}
AA_GIT_URL="https://github.com/slacmshankar";
AA_GIT_NAME="epicsarchiverap";
AA_GIT_DIR=${THIS_TOP}/${AA_GIT_NAME};
# aaSetup, aaService
AA_TARGET_TOP=/opt
ARCHAPPL_TOP=${AA_TARGET_TOP}/archappl
LD_LIBRARY_PATH=${ARCHAPPL_TOP}/engine/webapps/engine/WEB-INF/lib/native/${EPICS_HOST_ARCH}:${ARCHAPPL_TOP}/engine/webapps/engine/WEB-INF/lib:${LD_LIBRARY_PATH}
# Tomcat user
TOMCAT_USER="tomcat"
TOMCAT_GROUP=${TOMCAT_USER}
TOMCAT_USER_HOME=${ARCHAPPL_TOP}/temp
# # Use an in memory persistence layer
# ARCHAPPL_PERSISTENCE_LAYER=org.epics.archiverappliance.config.persistence.InMemoryPersistence
# # Tell the appliance that we are deploying all the components in one VM.
# # This reduces the thread count and other parameters in an effort to optimize memory.
# ARCHAPPL_ALL_APPS_ON_ONE_JVM="true"
#
# This approach is only valid for the single appliance installation.
# If one wants to install multiple appliances, appliances.xml should
# has the different structures.
#
AACHAPPL_SINGLE_IDENTITY="appliance0"
APPLIANCES_XML="appliances.xml";
# The following variables are defined in archappl.
# Do not change other names
ARCHAPPL_APPLIANCES=${ARCHAPPL_TOP}/${APPLIANCES_XML};
ARCHAPPL_MYIDENTITY=${AACHAPPL_SINGLE_IDENTITY};
SITE_POLICIES_FILE="ess_policies.py";
ARCHAPPL_POLICIES=${ARCHAPPL_TOP}/${SITE_POLICIES_FILE}
SITE_PROPERTIES_FILE="archappl.properties";
ARCHAPPL_PROPERTIES_FILENAME=${ARCHAPPL_TOP}/${SITE_PROPERTIES_FILE}
# Archiever Appliance User and Password for DB
# One should change the the default AA user password properly.
DB_USER_NAME="archappl";
DB_USER_PWD="archappl";
DB_NAME="archappl";
DB_BACKUP_PATH="db"
DB_JAVACLIENT_VER="1.5.4";
DB_CLASSNAME="org.mariadb.jdbc.Driver"
DB_AA_URL="mariadb"
JAR_CLIENT_NAME="mariadb-java-client";
MARIADB_CONNECTORJ_JAR="${JAR_CLIENT_NAME}-${DB_JAVACLIENT_VER}.jar";
# For MySQL,
# DB_CLASSNAME="com.mysql.jdbc.Driver"
# DB_AA_URL="mysql"
#
# Set Path for apache-commons-daemon.jar, because I use the CentOS packages
# apache-commons-daemon.x86_64 and apache-commons-daemon-jsvc.x86_64
# Somehow jsvc doesn't know where apache-commons-daemon.jar. So the clear PATH
# should be defined.
#
CLASS_PATH=/usr/share/java
#
# The original options are
#
# export JAVA_OPTS="-XX:MaxPermSize=128M -XX:+UseG1GC -Xmx4G -Xms4G -ea"
#
# -XX:MaxPermSize=size This option was deprecated in JDK 8,
# and superseded by the -XX:MaxMetaspaceSize option.
#
# The physical memory : 64G, so I use 8G instead of 4G, since we don't have any other application on the server.
# Set MaxMetaspaceSize : 256M, so it reduces the GC execution to compare with the original option.
#
JAVA_HEAPSIZE="512M"
JAVA_MAXMETASPACE="256M"
JAVA_OPTS="-XX:MaxMetaspaceSize=${JAVA_MAXMETASPACE} -XX:+UseG1GC -Xms${JAVA_HEAPSIZE} -Xmx${JAVA_HEAPSIZE} -ea"
# It might be better to assign the proper directory, while the installating CentOS.
# Anyway, /home has the most of space, so I created
# Make tmpfs for the short term storage by editing /etc/fstab file.
# For 10G file size add this line:
# tmpfs /srv/sts tmpfs defaults,size=10g 0 0
# preAA.bash
# aaService.bash
ARCHAPPL_STORAGE_TOP=/home/arch
# Set the location of short term and long term stores; this is necessary only if your policy demands it
ARCHAPPL_SHORT_TERM_FOLDER=${ARCHAPPL_STORAGE_TOP}/sts/ArchiverStore
ARCHAPPL_MEDIUM_TERM_FOLDER=${ARCHAPPL_STORAGE_TOP}/mts/ArchiverStore
ARCHAPPL_LONG_TERM_FOLDER=${ARCHAPPL_STORAGE_TOP}/lts/ArchiverStore
# Service order is matter, don't change them
tomcat_services=("mgmt" "engine" "etl" "retrieval")