...
Contents:
Table of Contents |
---|
Related pages:
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
PropertyName | Default value | Meaning |
---|---|---|
SysAdmin configuration | ||
KIUWAN_HOST KIUWAN_PORT | kop.mydomain.com | Hostname (Fully Qualified Domain Name, see note below ) and port number to access KOP. These variables will be used to build Kiuwan URL. Example (with default values):
Fully Qualified Domain Name (FQDN): https://en.wikipedia.org/wiki/Fully_qualified_domain_name |
KIUWAN_DOCKER_IMAGE | Name of the docker image (repository name) to be built | |
DIR_PERSISTENT_VOLUME | /Datavol | Root directory of docker server where the container volume will be bound |
KIUWAN_VOL | /kiuwan_vol | Directory of the container where KOP will be installed. |
EXTERNAL_PORT_TO_MAP_MYSQL_INTERNAL_PORT | 3306 | Docker server port to access container's MySQL
|
EXTERNAL_PORT_TO_MAP_SSH_PORT | 2222 | Docker server port to access container thorugh SSH
|
MONGODB_START | false | Depending of your Kiuwan On Premises purchased license:
|
Proxy settings | ||
USE_PROXY | false |
|
HOST_PROXY PORT_PROXY | Hostname (or ip address) and port number of proxy used for Intenet connectivity during the image building process | |
USER_PROXY PWD_PROXY | Username and password to connect Proxy.
| |
NO_PROXY | localhost,127.* | Comma-separated list of destinations that will not be accessed through proxy. Do not use quotes (single or double) to enclose these values. Important: KIUWAN_HOST value is automatically appended |
KOP users | ||
KIUWAN_USER KIUWAN_GROUP | kiuwan kiuwan | System user/group for KOP installation and execution |
MYSQL_ROOT_PWD | root | Password for root user of KOP's MySQL instance |
KIUWAN_MYSQL_USER KIUWAN_MYSQL_USERPWD | kiuwan kiuwan | Username and password used by KOP to access MySQL database |
SSH_ROOT_PWD | password | Password for root user (SSH) of Kiuwan Container |
KIUWAN_EMAIL_ADMIN_ACCOUNT | Email address of kiuwanadmin user
| |
KOP e-mail (SMTP) configuration | ||
KIUWAN_SMTP_HOST | SMTP host and port | |
KIUWAN_SMTP_USER_ACCOUNT KIUWAN_SMTP_USER_PASSWORD | SMTP account : username and password | |
KIUWAN_EMAIL_USER_ACCOUNT | Sender email address for KOP email notifications | |
Advanced configuration (WildFly, MySQL, Redis, etc) | ||
INNODB_BUFFER_POOL_SIZE | 2G | |
APPS_JVMMAXMEMORY | 3G | Max ammount of heap memory to be used by WidlFly |
KIUWAN_REDIS_MAXMEMORY | 2gb | Max memory limit to be used by Redis server (https://redis.io/topics/config) |
You can visit Advanced Configuration for additional configuration parameters.
Step 3. Build the Kiuwan Docker image
Info |
---|
After configuration, you will build the Kiuwan docker image.
IMPORTANT: Please be sure you have already installed KOP licenses, otherwise the docker image will not be built !!
To build the docker image: cd $KOP_INSTDIR/vX.Y ./create_and_init_kop.sh
This step requires Internet connectivity. If your installation uses an proxy, you should have previolsy configured the proxy settings.
In case you need to execute the Kiuwan container in a host server without Internet connectivity:
|
After image creation, you will be able to list the images in your docker server and identify your kiuwan image by issuing the next command:
docker images
Step 3.1 (Optional) Moving the image to another server host
After creating the image, if you want to move it to another host server you first must save it to a tarball by executing:
docker save kop:v1.2 > kop_v12_saved_image.tar
docker load --input kop_v12_saved_image.tar
Step 4. Executing the Kiuwan Docker container
Info |
---|
After executing docker image build script (./create_and_init_kop.sh ), two scripts are generated based on settings.custom configuration file
run_kop.sh Script to start the Kiuwan docker container and make KOP fully available and accessible to users.
run_init_kop.sh Script to initilize the Kiuwan docker container (i.e. resetting completely the KOP installation to factory defaults) without to create a new image. This script will remove any existing data of KOP installation (for example, all the database contents will be deleted).
IMPORTANT:
You can stop the Kiuwan container by issuing the following command: docker stop <my_container_name> |
Step 4.1 Execution in debug mode (only sshd)
Just in case you are running with problems while executing Kiuwan container, you can run it in debug mode.
This means to apply the configuration but not starting the services, allowing you to access the container through ssh.
Info |
---|
After the container is built, you can execute (run) the Kiuwan container in debug mode by issuing the following command:
docker run --rm --name <my_container_name> \ -h <my_container_host_name> \ -v <server_host_mount_dir:container_mount_dir> \ -p <ssh_port_ext>:22 \ -d \ <image_name:version> |
Step 5. (Optional) Making Kiuwan On Premise running on HTTPS
In you need to execute Kiwuan On Premise over HTTPS protocol, please follow next steps.
Step 5.1 Create your KOP SSL configuration file
SSL configuration is currently done by creating a configuration file (ssl.custom) within ssl directory
There's a file (ssl.tpl) you can use as a template to configure your own settings.
- cd ssl
- Create ssl.custom file by copying the template file
- cp ssl.tpl ssl.custom
- Edit the properties of ssl.custom file and change default values
Property Name | Default value | Meaning |
---|---|---|
Commons | ||
SSL_O | Your Organization | |
SSL_LOCALITY | Your Locality | |
SSL_STATE | Your State | |
SSL_COUNTRY | Your Country | |
SSL_OU | Your Organization Unit | |
Keystore | ||
SSL_KS_PWD | Password for Keystore that will be created | |
Aliases | ||
SSL_ALIAS | wildfly | Alias of the Certificate to be created. |
HTTPS_PORT | 443 | HTTPS port |
Step 5.2 Create the Private key and Certificate Signing Request (CSR) for your server
- within ssl directory execute the script CreateKey_and_ReqCSR.sh
- this script generates the CSR file under ssl/certs
- that file is named <yourhost.yourdomain.com>.csr , according to $KIUWAN_HOST configuration property
- send CSR file to your CA (Certificate Authority)
- CA will send back to you two files:
- CA's Certificate file (IMPORTANT: rename it to ca.crt )
- your host's Certificate file : for example yourhost.yourdomain.com.crt
- copy received files to ssl/certs directory
Step 5.3 Create the Keystore and switch from HTTP to HTTPS
- within ssl directory execute the script TransferFilesToContainer.sh
- this script transfers your server's certificate, your private key and CA's certificate to KOP container
also, it transfers the script templates that will be used to create the keystore and to change the configuration from http to https
within ssl directory execute the script run_create_Keystore.sh
- this script executes (into the container) the script create_Keystore.sh (created from template create_Keystore.tpl)
- within ssl directory execute the script run_change_ToHTTPS.sh
- this script stops wildfly service and executes the script change_ToHTTPS.sh (created from template change_ToHTTPS.tpl), this script will create files with .rollback extension of modified ones
- then, it starts wildfly service
Info |
---|
After the conversion to HTTPS, please download a new version of Kiuwan Local Analyzer from your KOP site. |
Step 5.4 Just in case you are using your own CA, make it valid to your browsers and Java
If the certificate is signed by your own Certification Authority, the browsers will not recognize it as a valid CA and you will get an error messages such as:
Your connection is not private
Attackers might be trying to steal your information from youthost.yourdomain.com (for example, passwords, messages, or credit cards).
NET::ERR_CERT_AUTHORITY_INVALID
To solve this issue, you have to import your CA Certificate into your browser :
- In Chrome: Configuration >> Settings >> Advanced >> Manage certificates >> Import (ca.crt) into "Trusted root certification entity store"
Info |
---|
Importing CA Cert into Java's Keystore must be done in the KOP Container as well as in any client machine using Kiuwan for Developers (K4D) plugin. |
Log in to the KOP container and execute next commands:
- cd /opt/jdk*/jre/lib/security/
- supervisorctl stop wildfly
- cp cacerts cacerts.bck.original
- keytool -import -noprompt -alias root -keystore cacerts -trustcacerts -file /<kiuwan_vol>/configurations/ssl/ca.crt -storepass changeit
- NOTE: change <kiuwan_vol> to the value of $KIUWAN_VOL (as configured in settings.custom)
- supervisorctl start wildfly
Then, log in to your docker server and make above changes persistent (i.e. to keep them after rebooting the container):
- docker commit <kop docker name> <kop docker image>
- NOTE: run 'docker ps' to get NAMES and IMAGE values of your KOP container
Rollback to HTTP
- Log in to your docker server and go to your installation directory ($KOP_INSTDIR)
- cd ssl
- execute the script run_rollback_HTTPS.sh
After execution, KOP will come back to configuration previous to the execution of run_change_ToHTTPS.sh script.
Step 6. Accessing Kiuwan On Premise
KOP URL
Once Kiuwan On Premise container is running, you can access it from a browser in the following URL:
http[s]://<KIUWAN_HOST>:<KIUWAN_PORT>/saas
where KIUWAN_HOST and KIUWAN_PORT match the values of those properties as configured in settings.custom
KOP REST-API URL
http[s]://<KIUWAN_HOST>:<KIUWAN_PORT>/saas/rest/v1
KOP built-in users
KOP comes with the following built-in users.
- kiuwanadmin (password: kiuwanadmin)
- access to Kiuwan "functional" administration modules such as Users, Applications and Model Management (see Admin Guide )
- log in as kiuwanadmin to create users of your KOP instance
- sysadmin (password: sysadmin)
- log in as sysadmin to access functionalities related to monitoring and tuning KOP execution
- sysadmin will give you access KOP sysconsole
Upgrading your KOP installation
In order to maintain your KOP installation up-to-date to new features, bugfixes, etc, you will have to upgrade your KOP installation.
The following pages describe the upgrading Installation procedures of releases of KOP.
Before starting the upgrade process, it's always advisable to make a backup of current KOP installation.
- make a backup of MySQL
- stop the container
- docker stop <$KIUWAN_HOST>
- make a copy of permanent volume ( $KIUWAN_VOL setting ).
- cp -rpf <$KIUWAN_VOL> <$KIUWAN_VOL>.bck
- start the container
- run_kop.sh
Basically, a new relase is distributed as a new KOP Installation Package, consisting on a tarball gz file (docker-for-kiuwan_master.X.Y.tar.gz) containing all the new kiuwan docker files.
- copy the new distribution tarball to your host server’s updates directory ($KOP_INSTDIR/updates/download)
- uncompress the distribution tarball
- tar xvzf docker-for-kiuwan_master.X.Y.tar.gz
- a $KOP_INSTDIR/updates/download/docker-for-kiuwan_master.X.Y directory will be created
- change directory to $KOP_INSTDIR/updates/bin
- execute the script updateKiuwanLauncher.sh
- this script makes all the work to upgrade your current KOP app instance to the new one
- execute the script updateClientsLauncher.sh
- this script makes new KLA and K4D ready to be downloadable by KOP client users
Advanced Configuration
As above specified, settings.custom file allows you to specify most (but not all) configuration parameters.
Info |
---|
There are some additional configuration parameters that you can configure at Dockerfile (located in your $KOP_INSTDIR)
Configuration done at settings.custom file always take precedence over configuration done at Dockerfile |
...
PropertyName (=default value)
...
Meaning
...
APPS_JVMMINMEMORY=512M
APPS_JVMMAXMEMORY=3G
...
Max and min ammount of perm gen memory to be used by WildFly
(see https://issues.jboss.org/browse/WFLY-5955)
...
innodb_buffer_pool_size=2G
join_buffer_size=4M
query_cache_limit=16M
read_buffer_size=16M
read_rnd_buffer_size=4M
sort_buffer_size=4M
max_connections=1024
tmp_table_size=16M
max_allowed_packet=64M
...
Default MySQL parameters used to create database instance.
(see https://dev.mysql.com/doc/refman/5.6/en/ for reference) redis
...
KIUWAN_REDIS_MAXCLIENTS=100
KIUWAN_REDIS_MAXMEMORY=2gb
Maximum number of Redis clients that could be handled simultaneously (https://redis.io/topics/clients)
...