This guide will illustrate setting up an A&AI development environment for R4 Dublin in Ubuntu 16.04.
DRAFT - this guide is in process of being updated - thanks for your patience
NOTE - If you are updating an older version with a new schema object, it will need to be in the latest oxm. In the Dublin Release, the latest oxm and db edgerules version is v16.
(For alternative setup, see also and https://gerrit.onap.org/r/gitweb?p=aai%2Ftest-config.git;hb=e64f08ac8242a7db6eb3238ee0ad1a30c8aecf0d;f=local-setup )
For this exercise, I set up a new instance of Ubuntu in Virtualbox and gave it 16G RAM, 200GB dynamically allocated storage, and 3 processors.
Forking Cassandra...
Running `nodetool statusthrift`... OK (returned exit status 0 and printed string "running").
Forking Elasticsearch...
Connecting to Elasticsearch (127.0.0.1:9200)...... OK (connected to 127.0.0.1:9200).
Forking Gremlin-Server...
Connecting to Gremlin-Server (127.0.0.1:8182).... OK (connected to 127.0.0.1:8182).
Run gremlin.sh to connect.
you can verify whether everything is running by executing
./bin/janusgraph.sh status
Gremlin-Server (org.apache.tinkerpop.gremlin.server.GremlinServer) is running with pid 9835
Elasticsearch (org.elasticsearch.bootstrap.Elasticsearch) is running with pid 9567
Cassandra (org.apache.cassandra.service.CassandraDaemon) is running with pid 9207
Install the attached haproxy.cfg file in /etc/haproxy
$ wget https://wiki.onap.org/download/attachments/45306687/haproxy.cfg
Install the attached aai.pem file in /etc/ssl/private
Add these hostnames to the loopback interface in /etc/hosts:
127.0.0.1 localhost aai-traversal.api.simpledemo.openecomp.org aai-resources.api.simpledemo.openecomp.org
[INFO] aai-aai-common ..................................... SUCCESS [ 11.543 s]
[INFO] BUILD SUCCESS
[INFO] aai-aai-common ..................................... SUCCESS [ 44.181 s]
[INFO] aai-rest ........................................... SUCCESS [ 26.592 s]
[INFO] aai-schema-ingest .................................. SUCCESS [ 28.671 s]
[INFO] aai-annotations .................................... SUCCESS [ 0.718 s]
[INFO] aai-core ........................................... SUCCESS [ 40.965 s]
[INFO] aai-auth ........................................... SUCCESS [ 1.228 s]
[INFO] aai-utils .......................................... SUCCESS [ 5.942 s]
[INFO] BUILD SUCCESS
[INFO] aai-schema-service ................................. SUCCESS [ 1.422 s]
[INFO] BUILD SUCCESS
[INFO] aai-schema-service ................................. SUCCESS [ 3.070 s]
[INFO] aai-annotations .................................... SUCCESS [ 5.130 s]
[INFO] aai-schema-gen ..................................... SUCCESS [01:46 min]
[INFO] aai-schema ......................................... SUCCESS [ 32.504 s]
[INFO] aai-queries ........................................ SUCCESS [ 6.461 s]
[INFO] aai-schema-service ................................. SUCCESS [02:17 min]
[INFO] BUILD SUCCESS
[INFO] aai-resources ...................................... SUCCESS [ 1.190 s]
[INFO] BUILD SUCCESS
[INFO] aai-resources ...................................... SUCCESS [ 3.210 s]
[INFO] aai-resources ...................................... SUCCESS [ 41.213 s]
[INFO] BUILD SUCCESS
[INFO] aai-traversal ...................................... SUCCESS [ 1.090 s]
[INFO] BUILD SUCCESS
[INFO] aai-traversal ...................................... SUCCESS [ 3.181 s]
[INFO] aai-traversal ...................................... SUCCESS [ 58.001 s]
[INFO] BUILD SUCCESS
[INFO] BUILD SUCCESS
[INFO] BUILD SUCCESS
[INFO] aai-logging-service ................................ SUCCESS [ 1.101 s]
[INFO] BUILD SUCCESS
[INFO] aai-logging-service ................................ SUCCESS [ 5.230 s]
[INFO] Common Logging API ................................. SUCCESS [ 1.995 s]
[INFO] EELF Logging Implementation ........................ SUCCESS [ 4.235 s]
[INFO] Common Logging Distribution ........................ SUCCESS [ 0.530 s]
[INFO] BUILD SUCCESS
---- NOTE --- about to open graph (takes a little while)--------;
-- Loading new schema elements into JanusGraph --
-- graph commit
-- graph shutdown
Confirm log.txt contains:
> GET /aai/v16/cloud-infrastructure/complexes HTTP/1.1 { "requestError": { "serviceException": { "messageId": "SVC3001", "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)", "variables": [ "GET", "cloud-infrastructure/complexes", "Node Not Found:No Node of type complex found at: cloud-infrastructure/complexes", "ERR.5.4.6114" ] } } } |
then followed by:
> PUT /aai/v16/cloud-infrastructure/complexes/complex/clli2 HTTP/1.1 > GET /aai/v16/cloud-infrastructure/complexes/complex/clli2 HTTP/1.1 { "physical-location-id": "clli2", "data-center-code": "example-data-center-code-val-6667", "complex-name": "clli2", "identity-url": "example-identity-url-val-28399", "resource-version": "1543408364646", "physical-location-type": "example-physical-location-type-val-28399", "street1": "example-street1-val-28399", "street2": "example-street2-val-28399", "city": "example-city-val-28399", "state": "example-state-val-28399", "postal-code": "example-postal-code-val-28399", "country": "example-country-val-28399", "region": "example-region-val-28399", "latitude": "1111", "longitude": "2222", "elevation": "example-elevation-val-28399", "lata": "example-lata-val-28399" } |
and finishes with:
> DELETE /aai/v16/cloud-infrastructure/complexes/complex/clli2?resource-version=1543408364646 HTTP/1.1 > GET /aai/v16/cloud-infrastructure/complexes HTTP/1.1 { "requestError": { "serviceException": { "messageId": "SVC3001", "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)", "variables": [ "GET", "cloud-infrastructure/complexes", "Node Not Found:No Node of type complex found at: cloud-infrastructure/complexes", "ERR.5.4.6114" ] } } } |