This guide will show you how to install KOP Licenses.
Installation of KOP Licenses
KOP Licenses are distributed through two license distribution zip files:
- license.zip
- configq1.zip
The installation of the KOP licenses is different depending on whether you have already built a KOP container or not.
License installation before building the container
- Copy both zip files to "license" directory of your KOP installation directory
- cp license.zip $KOP_INSTDIR/license
- cp configq1.zip $KOP_INSTDIR/license
- Continue building your KOP image
License installation after the container is built:
- Copy both zipfiles to "license" directory of you KOP installation directory
- cp license.zip $KOP_INSTDIR/license
- cp configq1.zip $KOP_INSTDIR/license
- Change to directory $KOP_INSTDIR and execute the script applyLicense.sh
How to Change Email Configuration
This guide will explain how to change the email configuration in KOP.
Changes to KOP emails configuration
After building the docker image you may need to change the email-related configuration.
Below you can find the settings you can configure in Dockerfile.
| KIUWAN_EMAIL_ADMIN_ACCOUNT |
The email address of Kiuwan admin user
|
| KIUWAN_EMAIL_USER_ACCOUNT |
Sender email address for Kiuwan notifications
|
| KIUWAN_SMTP_USER_ACCOUNT KIUWAN_SMTP_USER_PASSWORD |
SMTP account: username and password |
| KIUWAN_SMTP_HOST= KIUWAN_SMTP_PORT=25 |
SMTP host and port |
You can change these settings in Dockerfile and rebuild the image. But, if this approach is not possible, you can find in this article how to do it.
1. Stop Wildfly
Within the docker server:
docker exec -it <container_name> supervisorctl stop wildfly
Within the KOP container:
supervisorctl stop wildfly
2. Make changes to the configuration
Email configuration is located within the container at $(KIUWAN_VOL)/configurations/wildfly/standalone/configuration/standalone.xml
To change KIUWAN_EMAIL_USER_ACCOUNT, KIUWAN_SMTP_USER_ACCOUNT and/or KIUWAN_SMTP_USER_PASSWORD
- Search for <mail-session> element with property name="mailSession"
<mail-session name="mailSession" jndi-name="java:/mail/Session" from="dummy@dummy.domain.com">
<smtp-server username="DUMMY_SMTP_USER" password="DUMMY_PASSWORD_SMTP_USER" tls="true" outbound-socket-binding-ref="Kiuwan_Mail_Section"/>
</mail-session>
Make changes according to:
- from: KIUWAN_EMAIL_USER_ACCOUNT
- username: KIUWAN_SMTP_USER_ACCOUNT
- password: KIUWAN_SMTP_USER_PASSWORD
To change KIUWAN_SMTP_HOST and/or KIUWAN_SMTP_PORT
- search for <outbound-socket-binding> element with property name="Kiuwan_Mail_Section"
<outbound-socket-binding name="Kiuwan_Mail_Section">
<remote-destination host="DUMMY_SMTP_HOST" port="25"/>
</outbound-socket-binding>
Make changes according to:
- host : KIUWAN_SMTP_HOST
- port : KIUWAN_SMTP_PORT
3. Re-start WildFly service
Within the docker server:
docker exec -it <container_name> supervisorctl stop wildfly
docker exec -it <container_name> supervisorctl start wildfly
Within the KOP container:
supervisorctl stop wildfly
supervisorctl start wildfly
Please visit How to check the status and manage KOP services for instructions on how to do it.
How to make changes to KOP configuration
This guide will show you how to make changes to the KOP configuration.
Configuration changes to KOP (web app) and WidlFly
- How to make changes in the KOP configuration?
- Within the KOP container, edit configuration files located under $(KIUWAN_VOL)/deployconfig/kiuwan
- Deploy Kiuwan (see below point #3)
- How to make changes in the Wildfly configuration?
- Within the KOP container, edit configuration files located under $(KIUWAN_VOL)/deployconfig/wildfly
- Deploy Kiuwan (see below point #3)
- How to deploy Kiuwan (after configuration changes)?
- Within the docker server:
cd <KIUWAN_VOL>/koptools (KIUWAN_VOL as set in settings.custom)./redeployKiuwan.sh
- Within the docker server:
Configuration changes to MySQL, Redis, and sshd
- Can I make changes to the configuration of MySQL, Redis, and SSHD?
- Yes, you can (although Kiuwan Docker is presumably configured to suit your needs)
- Changes can only be done within the Docker container
- To change the MySQL configuration
- supervisorctl stop wildfly
- supervisorctl stop mysql
- edit mysqld.cnf located at <KIUWAN_VOL>/configurations/etc/mysql/mysql.conf.d
- supervisorctl start mysql
- supervisorctl start wildfly
- To change the Redis configuration
- supervisorctl stop wildfly
- supervisorctl stop redis
- edit redis.conf located at <KIUWAN_VOL>/configurations/etc/redis
- supervisorctl start redis
- supervisorctl start wildfly
- To change the SSHD configuration
- after making any change to sshd configuration, you must persist docker image :
- logout from the container and log in to docker server
- execute: commit <kop docker name> <kop docker image>
- NOTE: run 'docker ps' to get NAMES and IMAGE values of your KOP container
- after making any change to sshd configuration, you must persist docker image :
How to check status and manage KOP services
This guide will show you how to manage KOP services.
Management of KOP Services
KOP availability is based on the following services running within the KOP Container:
- mysql (KOP ddbb)
- wildfly (app server running KOP)
- redis (in-memory cache)
- mongod (internal ddbb for Architecture product)
- sshd (ssh daemon)
These services must be up-and-running for a correct KOP operation.
If you search for the order to check the status and starting/stopping them, you can use the following commands:
Within the docker server:
docker exec -it <container_name> supervisorctl status
docker exec -it <container_name> supervisorctl start|stop [mysql|wildfly|redis|mongod|sshd]
Within the KOP container:
supervisorctl status
supervisorctl start|stop [mysql|wildfly|redis|mongod|sshd]
How to obtain KOP log files
This guide shows you how to obtain the KOP log files.
KOP dumps activity logs to several locations. In case you need to collect log files (for example, to send them to Kiuwan Technical Support), you can obtain them through Sysadmin Console.
Sysadmin Console is available at http://<$KIUWAN_HOST>:<$KIUWAN_PORT>/saas/web/sysadmin
- System administration user (sysadmin) has access to Sysadmin Console
Sysadmin console provides access to the Support module.
- The support Module allows the collection of the most important log files of KOP installation for troubleshooting purposes.
- By clicking on Extract support data, you will obtain a zip file with the most relevant log files.
To obtain the KLA analysis logs:
- be sure you know the Analysis Code (for example A-7e3-16bfa17a2f8 )
- within the docker server:
- cd $DIR_PERSISTENT_VOLUME/$KIUWAN_HOST
- execute next command substituting by your analysis code
- file=`find . -name *A-7e3-16bfa17a2f8* | awk -F "_" '{ print $2 }'` && find . -name $file-decrypted.zip
- above command will display the relative path to KLA logs for that analysis, for example:
- ./KiuwanCentralWorkingDirectory/sources/kiuwanadmin-2/reports/ws-7e3-10cb1bf12cbc2b-decrypted.zip
How to change passwords after KOP container is built
This guide will show you how to change passwords after the KOP container is built, for both OS and MySQL users.
How to change the password of KOP container operating system users
By default, there are two operating system users:
- root
- kiuwan (defined by KIUWAN_USER property at settings.custom file)
In case you need to change the password for any of these users, please follow these steps:
- Log-in to KOP container with root user
- Change the password of the user by using common linux commands
- By default, only root and the configured user for tunning Wildfly exist into the KOP container
- After modifying the password, make sure you persist docker image:
- logout from the container and login to docker server
- execute : docker commit <kop docker name> <kop docker image>
- NOTE: run 'docker ps' to get NAMES and IMAGE values of your KOP container
How to change the password of MySQL users
By default, there are two MySQL users:
- root
- kiuwan (defined by KIUWAN_MYSQL_USER property at settings.custom file)
Root
In case you need to change the password for MySQL root, please follow these steps:
- Log-in to KOP container with root user
- Connect to mysql shell by executing:
- mysql -uroot -p mysql ( password as defined by MYSQL_ROOT_PWD property at settings.custom file)
- Within mysql shell execute following commands
- UPDATE user SET Password=PASSWORD('new_password') WHERE USER='root';
- FLUSH PRIVILEGES;
Kiuwan
In case you need to change the password for MySQL kiuwan, please follow these steps:
- Log-in to KOP container with root user
- Connect to mysql shell by executing:
- mysql -uroot -p mysql ( password as defined by MYSQL_ROOT_PWD property at settings.custom file)
- Within mysql shell execute following commands
- UPDATE user SET Password=PASSWORD('new_password') WHERE USER='kiuwan'; ( user as defined by KIUWAN_MYSQL_USER property at settings.custom file)
- FLUSH PRIVILEGES;
- exit;
- Change to directory of the container where KOP is installed (KIUWAN_VOL property at settings.custom file)
- Execute next commands (substituting old_password and new_password with your proper values) :
- sed -i 's|password=old_password|password=new_password'|g' deployconfig/kiuwan/configuration/WEB-INF/classes/config/hibernate/csaas-hibernate.properties
- sed -i 's|^KIUWAN_MYSQL_PWD=.*|KIUWAN_MYSQL_PWD=new_password'|g' koptools/deployKiuwan.sh
- sed -i 's|password=old_password|password=new_password'|g' release/installation/conf/db-connection.properties
- ONLY if you are using HTTPS :
- sed -i 's|password=old_password|password=new_password'|g' deployconfig/kiuwan/configuration/WEB-INF/classes/config/application.properties.http.rollback
- sed -i 's|^KIUWAN_MYSQL_PWD=.*|KIUWAN_MYSQL_PWD=new_password'|g' koptools/deployKiuwan.sh.http.rollback
- Change to koptools
- Execute next script :
- ./redeployKiuwan.sh