2 Akraino Blueprint Validation UI
5 This project contains the source code of the Akraino Blueprint Validation UI.
7 This UI consists of the front-end and back-end parts.
8 The front-end part is based on HTML, CSS, and AngularJS technologies.
9 The back-end part is based on Spring MVC and Apache Tomcat technologies.
11 Based on these instructions, a user can provide the prerequisites, compile the source code and deploy the UI.
16 .. code-block:: console
18 git clone "https://gerrit.akraino.org/r/validation"
25 A PostgreSQL database instance is needed with the appropriate relations in order for the back-end system to store and retrieve data.
26 Configure the postgreSQL root password in the variable POSTGRES_PASSWORD and execute the following commands in order to build and deploy this database container:
28 .. code-block:: console
30 cd validation/docker/postgresql
32 ./deploy.sh POSTGRES_PASSWORD=password
34 Below, some data that is initialized in the aforementioned database is illustrated (note that this data is used mainly for testing purposes):
36 .. code-block:: console
39 id:1 , start date and time: now() (i.e. the time of the postgreSQL container deployment), duration: 10 (sec), lab: 0 (i.e. AT&T)
40 id:2 , start date and time: now() (i.e. the time of the postgreSQL container deployment), duration: 1000 (sec), lab: 0 (i.e. AT&T)
43 id: 1 , name : 'dummy'
44 id: 2 , name : 'Unicycle'
47 id: 1, blueprint_id: 1 (i.e. dummy), version: "0.0.2-SNAPSHOT", layer: 0 (i.e. Hardware), layer_description: "Dell Hardware", timeslot id: 1
48 id: 2, blueprint_id: 2 (i.e. Unicycle), version: "0.0.1-SNAPSHOT", layer: 0 (i.e. Hardware), layer_description: "Dell Hardware", timeslot id: 2
50 For more information about this data, please refer to the file:
52 validation/docker/postgresql/akraino-blueprint_validation_db.sql
54 Based on this data, the UI enables the user to select an appropriate blueprint instance for validation.
56 Currently, this data cannot be retrieved dynamically by the UI (see limitations subsection).
58 For this reason, in cases of new blueprint data, a user should define new entries in this database.
60 For example, if a user wants to define a new timeslot with the following data:
62 start date and time:now, duration: 123 in secs, lab: Community
64 the following file should be created:
68 insert into akraino.timeslot values(5, now(), 123, 2);
70 Then, the following command should be executed:
72 .. code-block:: console
74 psql -h <IP of the postgreSQL container> -p 6432 -U admin -f ./dbscript
76 Furthermore, if a user wants to define a new blueprint, namely "newBlueprint" and a new instance of this blueprint with the following data:
78 version: "0.0.1-SNAPSHOT", layer: 2 (i.e. K8s), layer_description: "K8s with High Availability Ingress controller", timeslot id: 5 (i.e. the new timeslot)
80 the following file should be created:
84 insert into akraino.blueprint (blueprint_id, blueprint_name) values(4, 'newBlueprint');
85 insert into akraino.blueprint_instance (blueprint_instance_id, blueprint_id, version, layer, layer_description, timeslot_id) values(6, 4, '0.0.1-SNAPSHOT', 2, 'K8s with High Availability Ingress controller', 5);
87 Then, the following command should be executed:
89 .. code-block:: console
91 psql -h <IP of the postgreSQL container> -p 6432 -U admin -f ./dbscript
93 The UI will automatically retrieve this new data and display it to the user.
95 - Jenkins Configuration
97 The Blueprint validation UI will trigger job executions in a Jenkins instance.
99 This instance must have the following option enabled: "Manage Jenkins -> Configure Global Security -> Prevent Cross Site Request Forgery exploits".
101 Also, currently corresponding Jenkins job should accept the following as input parameters: "SUBMISSION_ID", "BLUEPRINT", "LAYER" and "UI_IP".
102 The "SUBMISSION_ID" and "UI_IP" parameters (i.e. IP address of the UI host machine-this is needed by the Jenkins instance in order to send back Job completion notification) are created and provided by the backend part of the UI.
103 The "BLUEPRINT" and "LAYER" parameters are configured by the UI user.
105 Moreover, as the Jenkins notification plugin (https://wiki.jenkins.io/display/JENKINS/Notification+Plugin) seems to ignore proxy settings, the corresponding Jenkins job must be configured to execute the following command at the end (Post-build Actions)
107 .. code-block:: console
109 curl -v -H "Content-Type: application/json" -X POST --insecure --silent http://$UI_IP:8080/AECBlueprintValidationUI/api/jenkinsJobNotification/ --data '{"submissionId": "'"$SUBMISSION_ID"'" , "name":"'"$JOB_NAME"'", "buildNumber":"'"$BUILD_NUMBER"'"}'
111 Finally, the Jenkins instance must be accessible from the UI host without using system proxy.
115 All the blueprint validation results are stored in Nexus server.
117 These results must be available in the following url:
119 https://nexus.akraino.org/content/sites/logs/"lab"-blu-val/job/validation/"Jenkins job number"/results/"name_of_the_test_suite".
121 where "lab" is the name of the lab (for example 'att'), "Jenkins job number" is the number of the Jenkins job that produced this result, and "name_of_the_test_suite" is the name of the test suite.
122 If multiple test suites must run, multiple directories should be created.
124 Moreover, the results should be stored in the 'output.xml' file using the following format:
128 Finally, the Nexus server must be accessible from the UI (with or without using system proxy).
134 .. code-block:: console
142 In the context of deploying, the following data is needed:
144 - The postgres root user password
146 - The Jenkins username and password
147 - The name of Jenkins Job
148 - The Url of the Nexus results
149 - The host system's proxy ip and port
151 These variables must be configured as content of the deploy script input parameters. Execute the following commands in order to build and deploy the UI container:
153 .. code-block:: console
155 cd validation/docker/ui
157 ./deploy.sh postgres_db_user_pwd=password jenkins_url=http://192.168.2.2:8080 jenkins_user_name=name jenkins_user_pwd=jenkins_pwd jenkins_job_name=job1 nexus_results_url=https://nexus.akraino.org/content/sites/logs proxy_ip=172.28.40.9 proxy_port=3128
159 If no proxy exists, just do not define proxy ip and port variables.
161 The UI should be available in the following url:
163 http://localhost:8080/AECBlueprintValidationUI
168 - The UI has been tested using Chrome and Firefox browsers.
169 - The UI is not connected to any LDAP server. Currently, any user can login.
170 - The UI and postgreSQL containers must be deployed on the same server.
171 - The back-end part of the UI does not take into account the configured timeslot. It immediately triggers the corresponding Jenkins Job.
172 - Results data manipulation (filtering, graphical representation, indexing in time order, etc) is not supported.
173 - Only the following labs are supported: AT&T, Ericsson, Community and Arm.
174 - Only the following tabs are functional: 'Committed Submissions', 'Blueprint Validation Results -> Get by submission id'.
175 - The UI configures only the "BLUEPRINT" and "LAYER" input parameters of the Jenkins job.
176 - The available blueprints and timeslots must be manually configured in the PostgreSQL database.
177 - The Jenkins instance must be accessible from the UI host without using system proxy.