...
Run the script in the format usage as described:
Usage: /data/scripts/docker_run.sh -e <environment name> -r <release> -p <docker-hub-port>Note Note: the use of spaces and dashes in the script format is mandatory.
Example usage as for the Orange environment:
Code Block language bash /data/scripts/docker_run.sh -e Orange -r 1610.2.12 -p 51220
A Health check to verify that OpenECOMP SDC is up and running is conducted as part of the docker_run.sh script. The expected output would look similar to that provided:
Code Block title Health Check Output root@vm1-asdc:~# /data/scripts/docker_health.sh { "cluster_name" : "ASDC-ES-OS-ETE-DFW", "status" : "green", "timed_out" : false, "number_of_nodes" : 1, "number_of_data_nodes" : 1, "active_primary_shards" : 1, "active_shards" : 1, "relocating_shards" : 0, "initializing_shards" : 0, "unassigned_shards" : 0, "delayed_unassigned_shards" : 0, "number_of_pending_tasks" : 0, "number_of_in_flight_fetch" : 0, "task_max_waiting_in_queue_millis" : 0, "active_shards_percent_as_number" : 100.0 } BE health-Check: { "sdcVersion": "1610.2.12", "siteMode": "unknown", "componentsInfo": [ { "healthCheckComponent": "BE", "healthCheckStatus": "UP", "version": "1610.2.12", "description": "OK" }, { "healthCheckComponent": "ES", "healthCheckStatus": "UP", "description": "OK" }, { "healthCheckComponent": "TITAN", "healthCheckStatus": "UP", "description": "OK" }, { "healthCheckComponent": "DE", "healthCheckStatus": "UP", "description": "OK" } ] } FE health-Check: { "sdcVersion": "1610.2.12", "siteMode": "unknown", "componentsInfo": [ { "healthCheckComponent": "BE", "healthCheckStatus": "UP", "version": "1610.2.12", "description": "OK" }, { "healthCheckComponent": "ES", "healthCheckStatus": "UP", "description": "OK" }, { "healthCheckComponent": "TITAN", "healthCheckStatus": "UP", "description": "OK" }, { "healthCheckComponent": "DE", "healthCheckStatus": "UP", "description": "OK" }, { "healthCheckComponent": "FE", "healthCheckStatus": "UP", "version": "1610.2.12", "description": "OK" } ] } [{"firstName":"Carlos","lastName":"Santana","userId":"cs0008","email":"designer@sdc.com","role":"DESIGNER","lastLoginTime":1483900163928,"status":"ACTIVE","fullName":"Carlos Santana"}]
5 SDC consumers setup
This section describes the process for creating an SDC consumer that allows OpenECOMP components to communicate with SDC.
Creating SDC consumers
In order to integrate with other OpenECOMP components, consumers are configured per component. This operation is performed as an integral part of executing the Backend Docker.
The following users are predefined:
- appc
- vid
- dcae
- aai
- sdnc
- mso
For the purposes of this document the manual consumer configuration process is described.
To create new SDC consumers:
- Login to the SDC Rackspace VM
- Copy the file security-utils-1610.2.1.jar to the VM under /tmp
Run the following commands from the Docker, providing consumer specific values for the parameters that are inside <>:
Code Block language bash Consumers creation, Run From Docker (Change the marked in yellow): consumerName=<Consumer user name> (For example: appc ) user_pass=<Consumer password> (For example: appcos ) IP=localhost <OR Docker IP> enc_pass=`java -cp /tmp/security-utils-*.jar org.openecomp.sdc.security.Passwords $user_pass |tr '[]' ' '|awk '{print $1}'` salt=`echo $enc_pass |awk -F: '{print $1}' pass=`echo $enc_pass |awk -F: '{print $2}' curl -X POST -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "HTTP_CSP_ATTUID: jh0003" http://$IP:8080/sdc2/rest/v1/consumers/ -d '{"consumerName": '$consumerName', "consumerSalt": '$salt',"consumerPassword": '$pass'}'
Note Note: Repeat the consumer creation process for each consumer, providing Consumer specific consumerName and user_pass
For Eample:Code Block consumerName=appc user_pass=appcos enc_pass=`java -cp /tmp/security-utils-1702.0.11.jar org.openecomp.sdc.security.Passwords $user_pass |tr '[]' ' '|awk '{print $1}'` salt=`echo $enc_pass |awk -F: '{print $1}'` pass=`echo $enc_pass |awk -F: '{print $2}'` curl -X POST -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "HTTP_CSP_ATTUID: jh0003" http://localhost:8080/sdc2/rest/v1/consumers/ -d '{"consumerName": '$consumerName', "consumerSalt": '$salt',"consumerPassword": '$pass'}'
Check that the consumer was successfully created in SDC:
Code Block curl -X GET -i -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -H "HTTP_CSP_ATTUID: jh0003" http://localhost:8080/sdc2/rest/v1/consumers/<consumerName> HTTP/1.1 200 OK Set-Cookie: JSESSIONID=1ahpyqpjjgfblahos4f03qun9;Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 X-ECOMP-RequestID: 6e47cbde-44e8-4b82-8f17-c6a731bf0081 Vary: Accept-Encoding, User-Agent Content-Length: 268 Server: Jetty(9.3.12.v20160915) {"consumerName":"vid","consumerPassword":"3936abc03d50693c90ec68a4a60427d6bdde8b085d60314333c9e58a270ff6f3","consumerSalt":"eaa62d9681d8f803ac05db342e3c9cc0","consumerLastAuthenticationTime":0,"consumerDetailsLastupdatedtime":1481211500749,"lastModfierAtuid":"jh0003"}