Server Setup
Server Setup
Archive the required directories and exclude the logs using tar command :-
>> tar cvf file_name.tar file_name –exclude= *.log
example :
>>scp c******@rn-satt-lapp23.rno.apple.com:/tmp/sprout_project.tar
~/Desktop/server_temp/
Then move the files to the new server’s /tmp folder using scp command.
example :
>>scp ~/Desktop/server_temp/ sprout_project.tar c******@rn-satt-
lapp23.rno.apple.com:/tmp/
In the new server create a new directory ‘GA using ‘mkdir’ command.
>> mkdir GA
copy the files to the ‘GA’ folder and extract all the files from archive.
>>cd GA
>>tar –xvf file_name.tar
rn-gat-lapp01:/ngs/app/gat/GA/wildfly-15.0.0.Final/standalone/configuration->
rn-gat-lapp01:/ngs/app/gat/GA/wildfly-15.0.0.Final/bin ->./vault.sh
=========================================================================
JBoss Vault
JAVA: /usr/java/jre64-1.8.0_111/jre/bin/java
=========================================================================
**********************************
**** JBoss Vault ***************
**********************************
Please enter a Digit:: 0: Start Interactive Session 1: Remove Interactive Session 2: Exit
0
Starting an interactive session
Enter directory to store encrypted files: /ngs/app/gat/GA / wildfly-15.0.0.Final
/standalone/configuration
Enter Keystore URL: /ngs/app/gat/GA / wildfly-15.0.0.Final
/standalone/configuration/vault.keystore
Enter Keystore password:
Enter Keystore password again:
Values match
Enter 8 character salt: 13572468
Enter iteration count as a number (e.g.: 44): 50
Enter Keystore Alias: vault
WFLYSEC0056: Initializing Vault
Apr 06, 2019 5:12:09 PM org.picketbox.plugins.vault.PicketBoxSecurityVault init
INFO: PBOX00361: Default Security Vault Implementation Initialized and Ready
WFLYSEC0048: Vault Configuration commands in WildFly for CLI:
********************************************
For standalone mode:
/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "/ngs/app/gat/GA/ wildfly-
15.0.0.Final /standalone/configuration/vault.keystore"),("KEYSTORE_PASSWORD" =>
"MASK-CmEwSSJI5hI"),("KEYSTORE_ALIAS" => "vault"),("SALT" => "13572468"),
("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "/ngs/app/gat/GA / wildfly-
15.0.0.Final /standalone/configuration/")])
********************************************
For domain mode:
/host=the_host/core-service=vault:add(vault-options=[("KEYSTORE_URL" =>
"/ngs/app/gat/GA/wildfly-13.0.0/standalone/configuration/vault.keystore"),
("KEYSTORE_PASSWORD" => "MASK-CmEwSSJI5hI"),("KEYSTORE_ALIAS" => "vault"),("SALT"
=> "13572468"),("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "/ngs/app/gat/GA/
wildfly-15.0.0.Final /standalone/configuration/")])
********************************************
WFLYSEC0057: Vault is initialized and ready for use
WFLYSEC0058: Handshake with Vault complete
Please enter a Digit:: 0: Store a secured attribute 1: Check whether a secured attribute
exists 2: Remove secured attribute 3: Exit
0
Task: Store a secured attribute
Please enter secured attribute value (such as password)
Please enter secured attribute value again
Values match
Enter Vault Block:CEP
Enter Attribute Name:complexpassword
WFLYSEC0047: Secured attribute value has been stored in Vault.
Please make note of the following:
********************************************
Vault Block:CEP
Attribute Name:complexpassword
Configuration should be done as follows:
VAULT::CEP::complexpassword::1
********************************************
Please enter a Digit:: 0: Store a secured attribute 1: Check whether a secured attribute
exists 2: Remove secured attribute 3: Exit
1
Task: Verify whether a secured attribute exists
Enter Vault Block:CEP
Enter Attribute Name:complexpassword
A value exists for [CEP::complexpassword]
Please enter a Digit:: 0: Store a secured attribute 1: Check whether a secured attribute
exists 2: Remove secured attribute 3: Exit
3
rn-gat-lapp01:/ngs/app/gat/GA/ wildfly-15.0.0.Final /bin ->
<vault>
<vault-option name="KEYSTORE_URL"
value="/ngs/app/gat/GA/wildfly-15.0.0.Final/standalone/configuration/vault.keystore"/>
<vault-option name="KEYSTORE_PASSWORD" value="MASK-3QCEHsah7Md"/>
<vault-option name="KEYSTORE_ALIAS" value="vault"/>
<vault-option name="SALT" value="13572468"/>
<vault-option name="ITERATION_COUNT" value="50"/>
<vault-option name="ENC_FILE_DIR"
value="/ngs/app/gat/GA/wildfly-15.0.0.Final/standalone/configuration/"/>
</vault>
CONFIGURE WILDFLY:
1. Copy upgraded version of wildfly.
2. Modify Configuration files. (Path : /wildfly-15.0.0.Final/standalone/configuration/ )
2.1 In standalone.xml file, Provide Datasources for DB connections. Provide the
Hostname, Port Number, SSId, Username and Password.
2.2 In standalone.xml file, Provide Path and Password for .jks file.
2.3 In logging.properties file, Provide the path for log file. (e.g :
handler.FILE.fileName=/ngs/app/gat/GA/wildfly-15.0.0.Final /standalone/log/server.log)
3. Deploy War file on the server. (Path : / wildfly-15.0.0.Final /standalone/deployments/ )
4. Copy Properties File. (Path : / wildfly-15.0.0.Final /bin/Sprout_resources/ )
Provide authentication related information in authConfig.properties file. (Group Id,
AppId, AppPassword, etc)
Extract redis-5.0.5 inside GA/ then run this commands to install redis:
>>cd ~/GA/redis-5.0.5
>>make INSTALL
>>make test
Go to the configuration folder of wildfly and run these commands for the cert and key file:
In the GA/sprout_project folder add the cert and key file in the script to run gunicorn :