Add a new variable Robot loglevel
[validation.git] / ui / README.rst
index 822808f..771973a 100644 (file)
@@ -169,25 +169,23 @@ Also, a script has been developed, namely validation/docker/mysql/deploy.sh whic
 
 CONTAINER_NAME, name of the container, default value is akraino-validation-mysql
 MYSQL_ROOT_PASSWORD, the desired mysql root user password, this variable is required
-MYSQL_AKRAINO_PASSWORD, the desired mysql akraino user password, this variable is required
+MYSQL_USER, the mysql user, the default value is 'akraino'
+MYSQL_PASSWORD, the desired mysql user password, this variable is required
 REGISTRY, registry of the mysql image, default value is akraino
 NAME, name of the mysql image, default value is validation
 TAG_PRE, first part of the image version, default value is mysql
 TAG_VER, last part of the image version, default value is latest
-MYSQL_HOST_PORT, port on which mysql is exposed on host, default value is 3307
-
-Currently, two users are supported by the UI, namely admin (full privileges) and akraino (limited privileges). Their passwords are changed and stored at UI deployment (refer to UI deployment section).
 
 In order to build and deploy the image using only the required parameters, the below instructions should be followed:
 
-The mysql root password, mysql akraino user password (currently the UI connects to the database using the akraino user), the UI admin password and the UI akraino password should be configured using the appropriate variables and the following commands should be executed:
+The mysql root password and the mysql user password (currently the UI connects to the database using the akraino user) should be configured using the appropriate variables and the following commands should be executed (the user should override default variables based on requirements):
 
 .. code-block:: console
 
     cd validation/ui
     mvn docker:build -Ddocker.filter=akraino/validation:dev-mysql-latest
     cd ../docker/mysql
-    ./deploy.sh TAG_PRE=dev-mysql MYSQL_ROOT_PASSWORD=<mysql root user password> MYSQL_AKRAINO_PASSWORD=<mysql akraino user password>
+    ./deploy.sh --TAG_PRE dev-mysql --MYSQL_ROOT_PASSWORD <mysql root user password> --MYSQL_PASSWORD <mysql akraino user password>
     mysql -p<MYSQL_AKRAINO_PASSWORD> -uakraino -h <IP of the mysql container> < ../../ui/db-scripts/examples/initialize_db_example.sql
 
 In order to retrieve the IP of the mysql container, the following command should be executed:
@@ -207,26 +205,23 @@ REGISTRY, the registry of the mysql image, default value is akraino
 NAME, the name of the mysql image, default value is validation
 TAG_PRE, the first part of the image version, default value is mysql
 TAG_VER, the last part of the image version, default value is latest
-MYSQL_HOST_PORT, the port on which mysql is exposed on host, default value is 3307
-
-In order to deploy the image using only the required parameters and the existing persistent storage, the below instructions should be followed:
 
-The mysql root user password should be configured using the appropriate variable and the following commands should be executed:
+In order to deploy the image using only the required parameters and the existing persistent storage, the below instructions should be followed (the user should override the default variables based on the requirements):
 
 .. code-block:: console
 
     cd validation/docker/mysql
-    ./deploy_with_existing_persistent_storage.sh TAG_PRE=dev-mysql
+    ./deploy_with_existing_persistent_storage.sh --TAG_PRE dev-mysql
 
 Finally, if the database must be re-deployed (it is assumed that the corresponding mysql container has been stopped and deleted) and the old persistent storage must be deleted, the used docker volume should be first deleted (note that all database's data will be lost).
 
-To this end, after the image build process, the following commands should be executed:
+To this end, after the image build process, the following commands should be executed (the user should override the default variables based on the requirements):
 
 .. code-block:: console
 
     docker volume rm akraino-validation-mysql
     cd validation/docker/mysql
-    ./deploy.sh TAG_PRE=dev-mysql MYSQL_ROOT_PASSWORD=<root user password> MYSQL_AKRAINO_PASSWORD=<mysql akraino user password>
+    ./deploy.sh --TAG_PRE dev-mysql --MYSQL_ROOT_PASSWORD <root user password> --MYSQL_PASSWORD <mysql akraino user password>
     mysql -p<MYSQL_AKRAINO_PASSWORD> -uakraino -h <IP of the mysql container> < ../../ui/db-scripts/examples/initialize_db_example.sql
 
 In the context of the UI application, the following tables exist in the database:
@@ -288,7 +283,7 @@ the following file should be created:
 name: dbscript
 content:
     SET FOREIGN_KEY_CHECKS=1;
-    use akraino;
+    use akraino_bluvalui;
     insert into lab (id, lab, silo) values(2, 'community', 'community');
 
 Then, the following command should be executed:
@@ -306,7 +301,7 @@ the following file should be created:
 name: dbscript
 content:
     SET FOREIGN_KEY_CHECKS=1;
-    use akraino;
+    use akraino_bluvalui;
     insert into timeslot values(2, 'now', null, 2);
 
 2 is the id of the community lab.
@@ -322,7 +317,7 @@ Furthermore, if a user wants to define a new blueprint, namely "newBlueprint", a
 name: dbscript
 content:
     SET FOREIGN_KEY_CHECKS=1;
-    use akraino;
+    use akraino_bluvalui;
     insert into blueprint (id, blueprint_name) values(3, 'newBlueprint');
     insert into blueprint_instance (id, blueprint_id, version) values(3, 3, 'master');
     insert into blueprint_layer (id, layer) values(4, 'k8s');
@@ -395,7 +390,8 @@ Also, a script has been developed, namely validation/docker/ui/deploy.sh which e
 
 CONTAINER_NAME, the name of the container, default value is akraino-validation-ui
 DB_IP_PORT, the IP and port of the mysql instance, this variable is required
-MYSQL_AKRAINO_PASSWORD, the mysql akraino user password, this variable is required
+MYSQL_USER, the mysql user, the default value is 'akraino'
+MYSQL_PASSWORD, the mysql user password, this variable is required
 REGISTRY, the registry of the ui image, default value is akraino
 NAME, the name of the ui image, default value is validation
 TAG_PRE, the first part of the image version, default value is ui
@@ -409,7 +405,8 @@ JENKINS_PROXY, the needed proxy in order for the Jenkins server to be reachable,
 CERTDIR, the directory where the SSL certificates can be found, default value is the working directory where self signed certificates exist only for demo purposes
 ENCRYPTION_KEY, the key that should be used by the AES algorithm for encrypting passwords stored in database, this variable is required
 UI_ADMIN_PASSWORD, the desired Blueprint Validation UI password for the admin user, this variable is required
-UI_AKRAINO_PASSWORD, the desired Blueprint Validation UI password for the akraino user, this variable is required
+TRUST_ALL, the variable that defines whether the UI should trust all certificates or not, default value is false
+USE_NETWORK_HOST, the variable that defines whether the UI container should run in 'network host' mode or not, default value is "false"
 
 So, for a functional UI, the following prerequisites are needed:
 
@@ -417,25 +414,29 @@ So, for a functional UI, the following prerequisites are needed:
 - A Jenkins instance capable of running the blueprint validation test (this is optional and is needed only for UI full control loop mode)
 - A Nexus repo in which all the test results are stored.
 
-Then, the following commands can be executed in order to deploy the UI container:
+Then, the following commands can be executed in order to deploy the UI container (the user should override the default variables based on requirements):
 
 .. code-block:: console
     cd ../docker/ui
-    ./deploy.sh TAG_PRE=dev-ui DB_IP_PORT=<IP and port of the mysql> MYSQL_AKRAINO_PASSWORD=<mysql akraino password> ENCRYPTION_KEY=<encryption key> UI_ADMIN_PASSWORD=<UI admin user password> UI_AKRAINO_PASSWORD=<UI akraino user password>
+    ./deploy.sh --TAG_PRE dev-ui --DB_IP_PORT <IP and port of the mysql> --MYSQL_PASSWORD <mysql akraino password> --ENCRYPTION_KEY <encryption key> --UI_ADMIN_PASSWORD <UI admin user password>
 
 The content of the DB_IP_PORT can be for example '172.17.0.3:3306'. Also, the value of the encryption key can be for example 'AGADdG4D04BKm2IxIWEr8o=='.
 
+Currently, one user is supported by the UI, namely admin (full privileges). Its password is initialized during UI deployment. This password can be modified using the UI. Furthermore, more users can be created/modified using the UI.
+
 Furthermore, the TAG_PRE variable should be defined as the default value is 'ui' (note that the 'dev-ui' is used for development purposes - look at pom.xml file).
 
 If no proxy exists, the proxy ip and port variables should not be defined.
 
 More users can be created using the 'Create User' tab of the UI. This tab is available only for the admin user.
 
-The UI should be available in the following url:
+If the content of the 'USE_NETWORK_HOST' is equal to true (in this case, the ports 8443 and 443 must be available on the host), the UI should be available in the following url:
+
+    https://<IP of the host>
 
-    https://<IP of UI container>:8443/bluvalui/
+Else, the UI should be available in the following url:
 
-Note that the deployment uses the network host mode, so the ports 8080 and 8443 must be available on the host.
+    https://<IP of the UI container>
 
 As far as the SSL certificates are concerned, self-signed built-in certificates exist in the 'validation/docker/ui' directory which are used by default. It should be noted that these
 certificates should be used only for demo purposes. If a user wants to use different ones which are more appropriate for a production environment, the directory that contains these new