Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency com.sun.xml.ws:jaxws-ri 2.3.1 -> 2.3.5. Earlier ver… #2137

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4c2d137
Update dependency com.sun.xml.ws:jaxws-ri 2.3.1 -> 2.3.5. Earlier ver…
neilireson Nov 17, 2022
d0c3033
Comment
neilireson Nov 17, 2022
51ace13
Create a Bill Of Materials (BOM) module to properly control the depen…
neilireson Nov 23, 2022
a89796b
Attempting to get the Docker install working but still isn't working …
neilireson Nov 23, 2022
f02fb7d
Change for upgrade to elasticsearch version 7.2.1
neilireson Nov 23, 2022
68b0a30
Remove https login as certificate is deemed insecure and rebuilding w…
neilireson Nov 23, 2022
5012ee2
Add "tomee.jpa.factory.lazy=true" as potential fix for Tomcat issue
neilireson Nov 23, 2022
656376a
Revert back to elasticsearch 7.2.0. There's no reason to change that …
neilireson Nov 23, 2022
6942a5b
Set "xpack.ml.enabled: false" in order to compile on Mac M1. Need ela…
neilireson Nov 23, 2022
b76b401
README.md
neilireson Nov 23, 2022
c2ee146
=The default threshold disk usage to run Elasticsearch is <95% usage.…
neilireson Nov 23, 2022
9740252
Spelling
neilireson Nov 23, 2022
3ae466c
Update plugin for installing node as the old plugin was pointing to t…
neilireson Nov 24, 2022
9fff46d
Fix dependency for elasticsearch and code for compatibility with 7.2.0
neilireson Nov 28, 2022
be67e45
Fix dependency for elasticsearch and code for compatibility with 7.2.0
neilireson Nov 28, 2022
6956570
Default properties to mac/unix paths
neilireson Nov 28, 2022
e75c769
Improve INSTALL.md
neilireson Nov 28, 2022
f26d8e6
Improve INSTALL.md
neilireson Nov 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 97 additions & 18 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,82 +14,161 @@ https://www.youtube.com/playlist?list=PLrB3ZYSlISMA5aNaOhxhvqjoNHTjZIfkK

## Download Source Code

Any branch of GTAS can be built from source code, or you can download the .war files from the latest stable release. Grab the latest code from the 'dev' branch GitHub:

Any branch of GTAS can be built from source code, or you can download the .war files from the latest stable release.
Grab the latest code from the 'dev' branch GitHub:
```
git clone --branch dev --single-branch https://github.com/US-CBP/GTAS.git
```

OR download the master branch.

```
git clone https://github.com/US-CBP/GTAS.git
```

## Build

Standard build with unit tests. Note: if maven shows a java socket error (invalid argument 'connect'), you may need to add -Djava.net.preferIPv4Stack=true to the MAVEN_OPTS environment variable.

Standard build with unit tests.
Note: if maven shows a java socket error (invalid argument 'connect'),
you may need to add -Djava.net.preferIPv4Stack=true to the MAVEN_OPTS environment variable.
```
cd gtas-parent
mvn clean install
```

Build without unit tests

```
mvn clean install -Dskip.unit.tests=true
```

Build with integration tests (and unit tests). Requires setting up the database fully. See below.

```
mvn clean install -Dskip.integration.tests=false
```

## Configure & Deploy

### MariaDB Database

Create the database schema, load application configuration and lookup data using Maven:

Log in to MariaDB and run the following command to create the 'gtas' database:

```
MariaDB [(none)]> CREATE DATABASE IF NOT EXISTS gtas CHARACTER SET utf8 COLLATE utf8_general_ci;
```

To script the database, run the following commands
#### Adding the schema to the database

Note that in order to run on jdk11, the code uses hibernate-maven-plugin:2.1.2-SNAPSHOT from
https://github.com/neilireson/hibernate-maven-plugin.git, this has to be installed before the following will work.

To script the database, run the following commands
```
cd gtas-commons
mvn hibernate:update
mvn hibernate:drop
mvn hibernate:create
```

Deploy to tomcat, update application.properties file, and start the server.
### Initialise ELK services

Install all ELK stack (Installs Elasticsearch, Logstash, Kibana and configures self-signed certificates)

#### Mac
```
./gtas-parent/scripts/elastic/install/mac/install_all.sh
./gtas-parent/scripts/elastic/install/mac/start_all.sh
```
#### Linux
```
./gtas-parent/scripts/elastic/install/linux/install_all.sh
./gtas-parent/scripts/elastic/install/linux/start_all.sh
```

You will need to create two folders for processing messages in a development environment; one for unprocessed messages and one for messages that have been loaded by GTAS. You may name the files as you wish, but the names must correspond with those in the application.properties file. This file can be located in the directory below:
The ELK [random generated password] is created during the installation process by the setup-security.sh script

~/GTAS/gtas-parent/gtas-commons/src/main/resources/default.application.properties
`Elasticsearch`: <http://localhost:9200>
username: elastic
password: [random generated password]

This file must be moved to the ~/usr/local/apache-tomcat-9.0.22/conf directory before starting the server to take effect.
`Kibana`: <http://localhost:5601>
username: kibana_user
password: [random generated password]

Move the .war files to the tomcat server
### Install and start ActiveMQ

Install ActiveMQ (https://activemq.apache.org/getting-started)
```
cp gtas-webapp/target/gtas.war [tomcat home]/webapps
cp gtas-job-scheduler-war/target/gtas-job-scheduler.war [tomcat home]/webapps
activemq start
```

Start the server
`activemq`: <http://localhost:8161>
username: admin
password: admin

### Install and start Neo4J

#### Mac
```
./usr/local/apache-tomcat-9.0.22/bin/catalina.sh run
./gtas-parent/scripts/graph_db/mac/install_and_start_all.sh
```

#### Linux
```
./gtas-parent/scripts/graph_db/linux/install_and_start_all.sh
```

`neo4j`: <http://localhost:7474>
username: neo4j
password: neo4j

When logging Neo4j with the above credentials it will ask for a new password.
Change the password to the GTAS one:

password: password

### Download and configure Tomcat, and Deploy the WAR files

Download Tomcat (9) https://tomcat.apache.org/download-90.cgi

You will need to create two directories for processing messages in a development environment;
* ```message.dir.origin=...``` for unprocessed messages
* ```message.dir.processed=...``` for messages that have been loaded by GTAS.

You may name the files as you wish, but the names must correspond with those in the application.properties file.
This file must be copied to the configuration directory before starting the server.
```
cp ./gtas-parent/gtas-commons/src/main/resources/default.application.properties [TOMCAT_HOME]/conf/application.properties
```

Move the .war files to the tomcat server
```
cp ./gtas-parent/gtas-webapp/target/gtas.war [TOMCAT_HOME]/webapps
cp ./gtas-parent/gtas-job-scheduler-war/target/gtas-job-scheduler.war [TOMCAT_HOME]/webapps
```

### Start the tomcat server
```
[TOMCAT_HOME]/bin/catalina.sh run
```

### Input data

Copy API or PNR data into the directory specified by the 'message.dir.origin' property in the 'application.properties' file.

Any processing errors will be reported in Tomcat's catalina.log file

### Open interface in a browser

Access site at http://localhost:8080/gtas

The default login is:

user: admin
password: password

## Issues

The main GTAS attempts to open the Kibana app but responds with a "HTTP Status 404 – Not Found" message.
"The requested resource [/app/kibana] is not available"
It is possible to log into Kibana, I think this may be a password issue.
The password is created during the install_all.sh processing
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
http-proxy:
image: wcogtas/http-proxy:1.0.0
container_name: http-proxy
build:
build:
context: ./gtas-parent
dockerfile: docker-resources/proxy.Dockerfile
restart: always
Expand All @@ -23,13 +23,13 @@ services:
web-app:
image: wcogtas/web-app:1.0.0
container_name: web-app
build:
build:
context: ./gtas-parent
dockerfile: web-app.Dockerfile
ports:
- 8080:8080
- 8443:8443
environment:
environment:
- DB_HOST=mariadb
- KIBANA_HOST=kibana
- NEO4J_HOST=neo4j
Expand Down Expand Up @@ -62,7 +62,7 @@ services:
gtas-scheduler:
image: wcogtas/gtas-scheduler:1.0.0
container_name: gtas-scheduler
build:
build:
context: .
dockerfile: ./gtas-parent/gtas-job-scheduler-war/gtas-scheduler.Dockerfile
restart: always
Expand All @@ -80,14 +80,14 @@ services:
- webapp_neo4j_password
networks:
- GTAS_webapp-network
depends_on:
depends_on:
- activemq

activemq:
image: rmohr/activemq:5.15.9
container_name: activemq
restart: always
networks:
networks:
- GTAS_webapp-network

mariadb:
Expand Down Expand Up @@ -166,4 +166,4 @@ volumes:

networks:
GTAS_webapp-network:
attachable: true
attachable: true
20 changes: 10 additions & 10 deletions gtas-parent/docker-resources/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@
configuration is used below.
-->

<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
SSLEnabled="true" maxThreads="200" scheme="https"
secretRequired="false"
SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"
certificateVerification="none"
SSLCertificateFile="conf/wcogtas.org.crt"
SSLCertificateKeyFile="conf/wcogtas.org.key"
certificateKeyPassword="Pa$$word1" />
<!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol" -->
<!-- SSLEnabled="true" maxThreads="200" scheme="https"-->
<!-- secretRequired="false"-->
<!-- SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"-->
<!-- certificateVerification="none"-->
<!-- SSLCertificateFile="conf/wcogtas.org.crt" -->
<!-- SSLCertificateKeyFile="conf/wcogtas.org.key"-->
<!-- certificateKeyPassword="Pa$$word1" />-->

<!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" connectionTimeout="20000">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
Expand All @@ -118,7 +118,7 @@
type="RSA" />
</SSLHostConfig>
</Connector> -->


<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" secretRequired="false" redirectPort="8443" />
Expand Down
Loading