Remote Server Configuration
This has already been completed for all existing remote
servers.
Java 1.8 installed
Tomcat located at /srv/tomcat
XE database installed and running with fc_obj_owner user
Directory /home/deployment exists
Database backup script is located at
/home/deployment/dbbackup.sh
deployment.xml is located at home/deployment
deployment.jar is located at home/deployment
ssh key has been created and located at home/deployment
Remote Deployment Set-Up
After each central deployment, complete the following steps
to test and then later execute the remote deployment process at its scheduled
time. As of this writing, the remote deployment occurs on the Tuesday night
following the central deployment.
Download Files
Copy deployment war files from the deployment to same
working directory. The deployment war files can be downloaded in Archiva. The
deployment tool will only deploy back office and touchscreen applications.
Configure manifest.xml
Open manifest.xml and update based on the notes below.
Update timestamp with date of the remote deployment in
yyyy-mm-dd format.
<timestamp>yyyy-mm-dd</timestamp>
Update version number to next number in sequence. The
current value can be found on the file located on fcadmin under
/home/deployment/downloads.
<versionnumber>00070</versionnumber>
Confirm max download time. This should not need to be
updated.
Confirm download server tag has correct information for
downloading files. This should not need to be updated.
Under the database tag, remove existing rows and add the sql
scripts that will need to be executed.
filename – Name of the file including file extension. Ex. –
001_something_to_run.sql
username – Database username to execute the script as -
fc_obj_owner for all scripts except synonyms which use system
password – Database password to execute the script as
sha2sum – SHA-256 hash of the file - See SHA-256 section
delimiter – This will be either be a semi-colon (;) or
forward slash (/). A semi-colon will be used for most scripts. Scripts that
create or update a package or create a trigger will use a forward slash.
<sqlscript>
<filename>001_X.sql</filename>
<username>Username</username>
<password>Password
</password>
<sha2sum>SHA-256
Sum</sha2sum>
<delimiter>;</delimiter>
</sqlscript>
Under the application tag, add the war files that will be
deployed.
filename – Name of the file including file extension. Ex. –
Application.war
sha2sum – SHA-256 hash of the file - See SHA-256 section
version – Application version number to be used for
verifying that the correct application version is deployed
<application>
<filename>POSWebApplication.war</filename>
<sha2sum> SHA-256
Sum</sha2sum>
<version>X.XXX</version>
</application>
Using an xml validation tool (Ex. - XML Tools Plugin for
Notepad ++), validate the xml file against manifest-validator.xsd. In XML
Tools, go to Plugins – XML Tools – Validate Now.
Upload files to fcadmin01
Upload the following files to /home/deployment/downloads on
fcadmin01 from the local working directory.
Manifest.xml
Application
war files
SQL
scripts
Test Remote Deployment process
Connect to a Test Server documented below using PuTTY, run
the remote deployment process based on the desired run configuration in the
Execution section. This will typically be a full deployment.
Execution
Log on to remote server using root username. These commands
can be run via SSH on the server. Ansible may also be used to automate this
process and is used for the monthly scheduled process.
Depending on desired run configuration, run the following
commands:
To run deployment from start to finish
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar fullDeployment
To only download files
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar downloadOnly
To verify hashes on files
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar checkHash
To pick up after downloading of files
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar postDownload
To pick up after running of SQL scripts
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar postSQLScripts
To verify applications
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar verifyApplications
To verify applications and handle success
/usr/java/latest/bin/java -jar
/home/deployment/deployment.jar handleSuccess
Monitoring
To monitoring the remote deployment process while it is
running, the following query can be ran as your individual user to see current
production on-premise server results.This view displays information about the
current status of the deployment process sorted by time zone and community
name. To confirm a successful deployment has run, the stage should read
Deployment Complete and the result should be Success.
select * from fc_obj_admin.deployment_stage;
To see lab servers, run the folowing query.
select * from fc_obj_admin.event_logger where created_date
> sysdate - 1 and serial_number = ? order by created_date;
Troubleshooting
While the remote deployment process typically runs smoothly,
there can be times when the tool can fail. Below are the most common issues and
ways to remedy.
Files Unable to Download
In some cases, the server will be unable to successfully
download the files to run the deployment. When this occurs, the File Download
stage of the deployment will fail. The deployment process can be started again
to see if the files will download on a subsequent try. If that fails, it is
likely that the deployment for that server will need to be delayed until a
later date. Typically, if the deployment fails one night, it runs fine the next
night.
SQL Scripts Fail
In some cases, the server will be unable to run SQL scripts.
When this occurs, the SQL Scripts stage of the deployment will fail. Identify
the the SQL script that did not run by looking at the logs under
/home/deployment/log/deployment.log. The file name of the SQL script that did
not run will be listed as a failure. Determine if the SQL script should be
manually run on the remote server. If it should be run, manually run via
SQLDeveloper. Then SSH to the remote server and run the postSQLScripts step to
complete the deployment.
Resources
SHA-256
To get the SHA-256 value of a file, open a checksum utility.
If you do not have one, download the one linked below. Within the checksum
tool, browse to the file. The utility will display the values for SHA-256.
Press the Copy SHA-256 button and then paste into the manifest file.
Sha Checksum Utility
Test Server for Deployments
VMware-56 4d 9a ee 13 6b 26 90-04 71 06 06 b6 91 7e c8 -
FullCount Lab - FullCount Server 6.2.0 - JDK 8, Tomcat 7
VMware-56 4d c7 fa 42 3e 5a 06-57 77 b8 f1 e6 71 f6 02 -
FullCount Lab - FullCount Server 6.1.1 - JDK 8, Tomcat 7
VMware-56 4d d6 27 60 e4 73 89-3e df 2c d3 5f 5b 61 48 -
FullCount Server 4.2.3 - JDK 8, Tomcat 7