Deployment
Last updated
Last updated
The Video Inventory Management system is packaged as a ready to deploy WAR file, which can be deployed to any modern Tomcat container. VIMS uses environment variables to load in the Vault server URL, App Role, and App Secret.
To set environment variables in Tomcat, you will need to define them in either the setenv.sh
or setenv.bat
file. The script is placed either into CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named setenv.bat (on Windows) or setenv.sh (on *nix). The file has to be readable.
By default the setenv script file is absent. If the script file is present both in CATALINA_BASE and in CATALINA_HOME, the one in CATALINA_BASE is preferred.
In that file, you can define environment variables as you would on the base system (linux, windows, etc.). For example on Debian Linux, we would have export VAULT_ADDR="https://url:port"
.
You will need to create two secrets in the vault, one that will have the information for your production system, the other with your testing configuration. Information on how to setup Vault and AppRoles can be found at:
You will need to configure a MySQL Database with the . It is recommended that you create a user that has all permissions, however is restricted to only the database you just created. You can also implement IP restrictions if you desire.
Name
Value
VAULT_ADDR
Vault URL, including protocol and port number
VAULT_ROLE
App Role ID
VAULT_SECRET
App Role Secret
Name
Value
db-url
jdbc:mysql://db_host:3306/db_name
db-url
Database Username
db-password
Database Password
project_token
Unique Project Identifier for Session Tokens, If changed, all tokens will become invalid.
token_cypher
Token Encryption Cypher. If changed, all tokens will become invalid.
token_ttl
Token Longevity (How long will a user stay logged in) in Milliseconds Recommended Value: 86400000 -> 24 Hours.
Be sure to replace db_host, db_name and possibly the port with your MySQL server info
On the first run, provided there are no users in your User's table, a default Admin user will be created.
Username: admin
Password: admin
It is highly recommended that you either delete the admin user, or at a minimum change the admin password.