Skip to content

Commit

Permalink
Update the JDK being used in the docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
slacmshankar committed Sep 30, 2021
1 parent 7b4ffcf commit d1b64dc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h3>System requirements</h3>
These are the prerequisites for the EPICS archiver appliance.
<ul>
<li>A recent version of Linux, definitely 64 bit Linux for production systems. If using RedHat, we should aim for RedHat 6.1.</li>
<li>JDK 1.12+ - definitely the 64 bit version for production systems. We need the JDK, <b>not</b> the JRE.</li>
<li>JDK 1.16+ - definitely the 64 bit version for production systems. We need the JDK, <b>not</b> the JRE.</li>
<li>A recent version of Tomcat 9.x; preferably <code>apache-tomcat-9.0.20</code> or later.</li>
<li>The management UI works best with a recent version of Firefox or Chrome.</li>
<li>By default, the EPICS archiver appliance uses a bundled versions of the Java CA and PVA libraries from <a href="https://github.com/epics-base/epicsCoreJava">EPICS base</a>.</li>
Expand Down
27 changes: 13 additions & 14 deletions docs/quickstart.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="js/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="docs.css" rel="Stylesheet" />
<link type="text/css" href="docs.css" rel="Stylesheet" />
<title>EPICS Archiver Appliance -- Quickstart</title>

</head>
Expand Down Expand Up @@ -43,27 +43,26 @@

<h3>Quickstart Guide</h3>
<div id="intro">
The steps outlined here should get you started quickly with evaluating and testing a new archiver appliance.
The steps outlined here should get you started quickly with evaluating and testing a new archiver appliance.
Note, <b>these steps are not meant for production deployments</b>, but are meant for evaluating and getting to know the system.
For more details on how to deploy in a cluster or in a production environment, please see the <a href="installguide.html">Installation</a> guide.
</div>
</div>

<section>
For folks familiar with deployment of WAR files, the archiver appliance consists of 4 WAR files.
These steps deploy these WAR files on a single Tomcat JVM, set the log levels to ERROR and start the VM.
To simplify matters, we are not persisting configuration and therefore there are no steps to define a connection pool for the configuration database.
To simplify matters, we are not persisting configuration and therefore there are no steps to define a connection pool for the configuration database.
</section>


<section>
Here are the steps to get started quickly.
<ol>
<li>Make sure you have a recent version of JDK 1.12 by running <code>java -version</code>. You should see something like so
<pre class="bash_output"><code>[ quickstart_test ]$ java -version
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment (build 12.0.1+12)
OpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
[ quickstart_test ]$ </code></pre>
<li>Make sure you have a recent version of JDK by running <code>java -version</code>. You should see something like so
<pre class="bash_output"><code>[ quickstart_test ]$ java -version
openjdk version "16" 2021-03-16
OpenJDK Runtime Environment (build 16+36-2231)
OpenJDK 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)[ quickstart_test ]$ </code></pre>
</li>
<li>Download the installation package to a Linux machine into a brand new folder. This should give you a tar.gz file like <code>archappl_vx.x.x.tar.gz</code>.</li>
<li>Download a recent version of Tomcat 9.x. into the same folder. You should now have two files in this folder like so
Expand All @@ -74,7 +73,7 @@ <h3>Quickstart Guide</h3>
[ quickstart_test ]$ </code></pre>
</li>
<li>Untar the <code>archappl_vx.x.x.tar.gz</code>. This should untar into 4 WAR files and a bash script like so
<pre class="bash_output"><code>[ quickstart_test ]$ tar zxf archappl_v0.0.1_SNAPSHOT_12-November-2019T21-10-12.tar.gz
<pre class="bash_output"><code>[ quickstart_test ]$ tar zxf archappl_v0.0.1_SNAPSHOT_12-November-2019T21-10-12.tar.gz
[ quickstart_test ]$ ls -l
total 312440
-rw-r--r-- 1 mshankar cd 11358 Sep 9 16:03 Apache_2.0_License.txt
Expand All @@ -93,7 +92,7 @@ <h3>Quickstart Guide</h3>
[ quickstart_test ]$ </code></pre>
</li>
<li>Run the script like so
<pre class="bash_output"><code>[ quickstart_test ]$ ./quickstart.sh apache-tomcat-9.0.20.tar.gz
<pre class="bash_output"><code>[ quickstart_test ]$ ./quickstart.sh apache-tomcat-9.0.20.tar.gz

</code></pre>
</li>
Expand All @@ -105,7 +104,7 @@ <h3>Quickstart Guide</h3>
</code></pre>
</li>
<li>Open a browser to <code>http://&lt;&lt;<i>machinename</i>&gt;&gt;:17665/mgmt/ui/index.html</code> and you should see the home screen for your archiver appliance.</li>
<li>If your EPICS environment variables are set up correctly, you should be able to start archiving PV's right away.
<li>If your EPICS environment variables are set up correctly, you should be able to start archiving PV's right away.
Note it takes about 5 minutes for the archiver appliance to measure the event rate, storage rate etc and to transition PVs from the <code>Initial sampling</code> state to the <code>Being archived</code> state.
</li>
<li>To stop the appliance, use a <code>CTRL-C</code> in the console.</li>
Expand All @@ -123,7 +122,7 @@ <h3>Quickstart Guide</h3>

<section>
<h4>Quickstart using predefined VMs</h4>
An alternate way to quickly get started and test the system is to use the predefined VM's provided by Martin.
An alternate way to quickly get started and test the system is to use the predefined VM's provided by Martin.
These consists of three repos needed to set up an EPICS Archiver Appliance test environment:
<ol>
<li><a href="https://stash.nscl.msu.edu/projects/DEPLOY/repos/vagrant_archiver_appliance">vagrant_archiver_appliance</a></li>
Expand Down
41 changes: 19 additions & 22 deletions docs/samples/single_machine_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ fi

if [[ -z ${JAVA_HOME} ]]
then
echo "Please set JAVA_HOME to point to a 1.8 JDK"
echo "Please set JAVA_HOME to point to a 1.16+ JDK"
exit 1
fi

if [[ ! -f ${JAVA_HOME}/include/linux/jni_md.h ]]
then
echo "Missing the include/jni.md.h file in ${JAVA_HOME}. Please set JAVA_HOME to point to a 1.8 JDK (not a JRE)"
echo "Missing the include/jni.md.h file in ${JAVA_HOME}. Please set JAVA_HOME to point to a 1.16+ JDK (not a JRE)"
exit 1
fi

Expand All @@ -36,7 +36,7 @@ java -version 2>&1 | grep --regexp 'version \"[1-9][2-9]'; echo $?
if (( ( $? != 0 ) ))
then
java -version
echo "This seems to be a older JDK. Please point your JAVA_HOME to a 1.12+ JDK for best results."
echo "This seems to be a older JDK. Please point your JAVA_HOME to a 1.16+ JDK for best results."
exit 1
fi

Expand Down Expand Up @@ -193,7 +193,7 @@ then
MSG="After calling deployMultipleTomcats.py to create the tomcats for the components, we did not find the mgmt ui. One reason for this is a mismatch between the appliance identity ${ARCHAPPL_MYIDENTITY} and your appliances file at ${ARCHAPPL_APPLIANCES}. Please make that the appliance information for ${ARCHAPPL_MYIDENTITY} in ${ARCHAPPL_APPLIANCES} is correct."
echo ${MSG}
zenity --text="${MSG}" --error
exit 1
exit 1
fi


Expand All @@ -214,7 +214,7 @@ echo "Setting MYSQL_CONNECTION_STRING to ${MYSQL_CONNECTION_STRING}"

# Use a SHOW DATABASES command to see if the connection string is valid
let numtries=5
mysql ${MYSQL_CONNECTION_STRING} -e "SHOW DATABASES" | grep information_schema
mysql ${MYSQL_CONNECTION_STRING} -e "SHOW DATABASES" | grep information_schema
while (( $? && ( ${numtries} > 1) ))
do
let numtries=numtries-1
Expand All @@ -226,13 +226,13 @@ do
# We've tried a few times; must be a bug in the script.
exit 1
fi

MSG="Please enter a MySQL Connection string like so"
DEFAULT_MYSQL_CONNECTION_STRING = ${MYSQL_CONNECTION_STRING}
echo $MSG
export MYSQL_CONNECTION_STRING=$(zenity --entry --width=800 --text="$MSG" --entry-text="${DEFAULT_MYSQL_CONNECTION_STRING}")
echo "Setting MYSQL_CONNECTION_STRING to ${MYSQL_CONNECTION_STRING}"

mysql ${MYSQL_CONNECTION_STRING} -e "SHOW DATABASES" | grep information_schema
done

Expand All @@ -247,7 +247,7 @@ then
if [[ $? == 0 ]] ; then
echo "Creating tables in ${MYSQL_CONNECTION_STRING}"
mysql ${MYSQL_CONNECTION_STRING} < ${SCRIPTS_DIR}/archappl_mysql.sql

mysql ${MYSQL_CONNECTION_STRING} -e "SHOW TABLES" | grep PVTypeInfo
if (( ( $? != 0 ) ))
then
Expand All @@ -259,10 +259,10 @@ then
else
echo "Skipping creating MySQL tables."
fi
else
else
MSG="The EPICS archiver appliance tables already exist in the schema accessed by using ${MYSQL_CONNECTION_STRING}"
echo ${MSG}
zenity --text="${MSG}" --info
zenity --text="${MSG}" --info
fi


Expand Down Expand Up @@ -305,9 +305,9 @@ then
fi
echo "Deploying a new release from \${WARSRC_DIR} onto \${DEPLOY_DIR}"
pushd \${DEPLOY_DIR}/mgmt/webapps && rm -rf mgmt*; cp \${WARSRC_DIR}/mgmt.war .; mkdir mgmt; cd mgmt; jar xf ../mgmt.war; popd;
pushd \${DEPLOY_DIR}/engine/webapps && rm -rf engine*; cp \${WARSRC_DIR}/engine.war .; mkdir engine; cd engine; jar xf ../engine.war; popd;
pushd \${DEPLOY_DIR}/etl/webapps && rm -rf etl*; cp \${WARSRC_DIR}/etl.war .; mkdir etl; cd etl; jar xf ../etl.war; popd;
pushd \${DEPLOY_DIR}/mgmt/webapps && rm -rf mgmt*; cp \${WARSRC_DIR}/mgmt.war .; mkdir mgmt; cd mgmt; jar xf ../mgmt.war; popd;
pushd \${DEPLOY_DIR}/engine/webapps && rm -rf engine*; cp \${WARSRC_DIR}/engine.war .; mkdir engine; cd engine; jar xf ../engine.war; popd;
pushd \${DEPLOY_DIR}/etl/webapps && rm -rf etl*; cp \${WARSRC_DIR}/etl.war .; mkdir etl; cd etl; jar xf ../etl.war; popd;
pushd \${DEPLOY_DIR}/retrieval/webapps && rm -rf retrieval*; cp \${WARSRC_DIR}/retrieval.war .; mkdir retrieval; cd retrieval; jar xf ../retrieval.war; popd;
echo "Done deploying a new release from \${WARSRC_DIR} onto \${DEPLOY_DIR}"
Expand Down Expand Up @@ -339,7 +339,7 @@ then
MSG="After deploying the release, cannot find a required file. The deployment did not succeed."
echo ${MSG}
zenity --text="${MSG}" --error
exit 1
exit 1
fi

cat ${SCRIPTS_DIR}/sampleStartup.sh \
Expand All @@ -349,7 +349,7 @@ cat ${SCRIPTS_DIR}/sampleStartup.sh \
| sed -e "s;export ARCHAPPL_APPLIANCES=/nfs/archiver/appliances.xml;export ARCHAPPL_APPLIANCES=${ARCHAPPL_APPLIANCES};g" \
| sed -e "s;export ARCHAPPL_MYIDENTITY=\"appliance0\";export ARCHAPPL_MYIDENTITY=\"${ARCHAPPL_MYIDENTITY}\";g" \
> ${DEPLOY_DIR}/sampleStartup.sh

MSG="Do you have a site specific policies.py file?"
echo ${MSG}
zenity --text="${MSG}" --question
Expand All @@ -371,15 +371,12 @@ then
cat ${DEPLOY_DIR}/sampleStartup.sh \
| sed -e "s;# export ARCHAPPL_POLICIES=/nfs/epics/archiver/production_policies.py;export ARCHAPPL_POLICIES=${SITE_SPECIFIC_POLICIES_FILE};g" \
> ${DEPLOY_DIR}/sampleStartup.sh.withpolicies

mv -f ${DEPLOY_DIR}/sampleStartup.sh.withpolicies ${DEPLOY_DIR}/sampleStartup.sh
fi

chmod +x ${DEPLOY_DIR}/sampleStartup.sh

MSG="Done with the installation. Please use ${DEPLOY_DIR}/sampleStartup.sh to start and stop the appliance and ${DEPLOY_DIR}/deployRelease.sh to deploy a new release."
MSG="Done with the installation. Please use ${DEPLOY_DIR}/sampleStartup.sh to start and stop the appliance and ${DEPLOY_DIR}/deployRelease.sh to deploy a new release."
echo ${MSG}
zenity --text="${MSG}" --info



zenity --text="${MSG}" --info

0 comments on commit d1b64dc

Please sign in to comment.