Headings added to aid navigation and fixed all the code examples to use
code-block
Issue-ID: DOC-114
Change-Id: I205f47016df26a298473ee8290931e0d809a140d
Signed-off-by: MatthewHarffy <Matthew.harffy@amdocs.com>
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.
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.
+Install openjdk 8
+-----------------
- sudo apt install openjdk-8-jdk
+ sudo apt install openjdk-8-jdk
-- Install single node hadoop/titan
+Install single node hadoop/titan
+--------------------------------
wget http://s3.thinkaurelius.com/downloads/titan/titan-1.0.0-hadoop1.zip
wget http://s3.thinkaurelius.com/downloads/titan/titan-1.0.0-hadoop1.zip
sudo ./bin/titan.sh start
sudo ./bin/titan.sh start
+Install haproxy
+---------------
sudo apt-get -y install haproxy
sudo apt-get -y install haproxy
`haproxy.cfg <https://wiki.onap.org/download/attachments/10782088/haproxy.cfg?version=2&modificationDate=1501018863000&api=v2>`__
`haproxy.cfg <https://wiki.onap.org/download/attachments/10782088/haproxy.cfg?version=2&modificationDate=1501018863000&api=v2>`__
sudo cp aai.pem /etc/ssl/private/aai.pem
sudo cp aai.pem /etc/ssl/private/aai.pem
`aai.pem <https://wiki.onap.org/download/attachments/10782088/aai.pem?version=1&modificationDate=1501019585000&api=v2>`__
`aai.pem <https://wiki.onap.org/download/attachments/10782088/aai.pem?version=1&modificationDate=1501019585000&api=v2>`__
sudo mkdir /usr/local/etc/haproxy
sudo mkdir /usr/local/etc/haproxy
-- Add these hostnames to the loopback interface in /etc/hosts:
+- Add these hostnames to the loopback interface in /etc/hosts
127.0.0.1 localhost aai-traversal.api.simpledemo.openecomp.org aai-resouces.api.simpledemo.openecomp.org
- Restart haproxy
127.0.0.1 localhost aai-traversal.api.simpledemo.openecomp.org aai-resouces.api.simpledemo.openecomp.org
- Restart haproxy
sudo service haproxy restart
sudo service haproxy restart
-- Set up repos. First, follow the initial setup instructions in
+Set up repos
+------------
+
+- First, follow the initial setup instructions in
`Setting Up Your Development Environment <https://wiki.onap.org/display/DW/Setting+Up+Your+Development+Environment>`__
`Setting Up Your Development Environment <https://wiki.onap.org/display/DW/Setting+Up+Your+Development+Environment>`__
settings.xml file should solve this problem:
`Setting Up Your Development Environment#MavenExamplesettings.xml <https://wiki.onap.org/display/DW/Setting+Up+Your+Development+Environment#SettingUpYourDevelopmentEnvironment-MavenExamplesettings.xml>`__
settings.xml file should solve this problem:
`Setting Up Your Development Environment#MavenExamplesettings.xml <https://wiki.onap.org/display/DW/Setting+Up+Your+Development+Environment#SettingUpYourDevelopmentEnvironment-MavenExamplesettings.xml>`__
-- Build aai-common, traversal, and resources
+Build aai-common, traversal, and resources
+------------------------------------------
mvn clean install # Should result in BUILD SUCCESS
mvn clean install # Should result in BUILD SUCCESS
- cd ~/LF/AAI/traversal # I had to add the following to traversal/pom.xml to get
- traversal to build:
+ cd ~/LF/AAI/traversal
+
+You might need to add the following to traversal/pom.xml to get traversal to build:
+
+ .. code-block:: xml
<repositories><repository><id>maven-restlet</id><name>Restlet repository</name><url>https://maven.restlet.com</url></repository></repositories>
<repositories><repository><id>maven-restlet</id><name>Restlet repository</name><url>https://maven.restlet.com</url></repository></repositories>
mvn clean install # Should result in BUILD SUCCESS
mvn clean install # Should result in BUILD SUCCESS
+Titan setup
+-----------
1. Modify both titan-cached.properties and
titan-realtime.properties to the following (for all MS’s that
will connect to the local Cassandra backend)
1. Modify both titan-cached.properties and
titan-realtime.properties to the following (for all MS’s that
will connect to the local Cassandra backend)
storage.backend=\ *cassandra*
storage.hostname=\ *localhost*
storage.backend=\ *cassandra*
storage.hostname=\ *localhost*
specified Titan will try to create/use a defaulted keyspace
named titan.
specified Titan will try to create/use a defaulted keyspace
named titan.
storage.cassandra.keyspace=<keyspace name>
storage.cassandra.keyspace=<keyspace name>
Runnable class org.onap.aai.dbgen.GenTester with the following vm
args.
Runnable class org.onap.aai.dbgen.GenTester with the following vm
args.
-DAJSC_HOME=~/LF/AAI/resources -DBUNDLECONFIG\_DIR="bundleconfig-local"
9. Here's the command I used, and it worked:
-DAJSC_HOME=~/LF/AAI/resources -DBUNDLECONFIG\_DIR="bundleconfig-local"
9. Here's the command I used, and it worked:
cd ~/LF/AAI; java -DAJSC_HOME=/home/jimmy/LF/AAI/resources/aai-resources
-DBUNDLECONFIG_DIR="bundleconfig-local" -cp
aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/\*
org.onap.aai.dbgen.GenTester
cd ~/LF/AAI; java -DAJSC_HOME=/home/jimmy/LF/AAI/resources/aai-resources
-DBUNDLECONFIG_DIR="bundleconfig-local" -cp
aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/\*
org.onap.aai.dbgen.GenTester
-- Start the "resources" microservice
+Start the "resources" microservice
+----------------------------------
1. Resources runs on port 8446. Go to the resources directory
1. Resources runs on port 8446. Go to the resources directory
- ..code:: bash
- cd ~/LF/AAI/resources
+ .. code-block:: bash
+
+ $ cd ~/LF/AAI/resources
2. Set the debug port to 9446
2. Set the debug port to 9446
- ..code:: bash
-
- export MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m
+ .. code-block:: bash
+
+ export MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=9446,server=y,suspend=n"
3. Start the microservice
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=9446,server=y,suspend=n"
3. Start the microservice
-16. Verify the resources microservice (this example uses Postman utility
- for Google Chrome)
+Verify the resources microservice (this example uses Postman utility for Google Chrome)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 1. | Use basic auth, user = AAI, pw = AAI
+ 1. Use basic auth, user = AAI, pw = AAI
- 2. | Set the X-TransactionId header (in the example below, the value is
- | 9999)
+ 2. Set the X-TransactionId header (in the example below, the value is
+ 9999)
- 3. | Set the X-FromAppId header (in the example below, the value is
- | jimmy-postman)
+ 3. Set the X-FromAppId header (in the example below, the value is
+ jimmy-postman)
- 4. | Perform a GET of https://127.0.0.1:8443/aai/v11/network/vces
+ 4. Perform a GET of https://127.0.0.1:8443/aai/v11/network/vces
- 5. | You should see an error as below, 404 Not Found, ERR.5.4.6114.
- | This indicates that the service is functioning normally:
+ 5. You should see an error as below, 404 Not Found, ERR.5.4.6114.
+ This indicates that the service is functioning normally:
+------------------------------------------+
+------------------------------------------+
+------------------------------------------+
+------------------------------------------+
+Start the "traversal" microservice
+----------------------------------
+
+ 1. Traversal runs on port 8447. Go to the traversal directory:
-18. Start the "traversal" microservice
- 1. | Traversal runs on port 8447. Go to the traversal directory
- ..code:: bash
- $ cd ~/LF/AAI/traversal
+ $ cd ~/LF/AAI/traversal
+
+ 2. Set the debug port to 9447
- 2. | Set the debug port to 9447
- | $ export MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m
+ $ export MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=9447,server=y,suspend=n"
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=9447,server=y,suspend=n"
- 3. | Start the microservice
- | $ mvn -P runAjsc
- | Should see something like this: 2017-07-26
- 12:46:35.524:INFO:oejs.Server:com.att.ajsc.runner.Runner.main():
- Started @25827ms
+ 3. Start the microservice
+
+ .. code-block:: bash
+
+ $ mvn -P runAjsc
+
+ You should see something like this:
-- Verify the traversal microservice
- 1. | Set up the widget models
- | This will set up the postman to add widget models: `Add Widget Models.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/Add%20Widget%20Models.postman_collection.json?version=2&modificationDate=1501102559000&api=v2>`__ `NamedQuery.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/NamedQuery.postman_collection.json?version=2&modificationDate=1501102582000&api=v2>`__
+ 2017-07-26
+ 12:46:35.524:INFO:oejs.Server:com.att.ajsc.runner.Runner.main():
+ Started @25827ms
- 2. | Create a runner using this file:
+Verify the traversal microservice
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ 1. Set up the widget models
+ This will set up the postman to add widget models: `Add Widget Models.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/Add%20Widget%20Models.postman_collection.json?version=2&modificationDate=1501102559000&api=v2>`__ `NamedQuery.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/NamedQuery.postman_collection.json?version=2&modificationDate=1501102582000&api=v2>`__
+
+ 2. Create a runner using this file:
`models.csv <https://wiki.onap.org/download/attachments/10782088/models.csv?version=1&modificationDate=1501100140000&api=v2>`__
`models.csv <https://wiki.onap.org/download/attachments/10782088/models.csv?version=1&modificationDate=1501100140000&api=v2>`__
- 3. | Run the test runner
- | |image2|
+ 3. Run the test runner
+ |image2|
+
+ 4. Add a named query called "getComponentList" (this named query is used by VID):
+
+ `NamedQuery.postman_collection.json <ificationDate=1501102582000&api=v2>`__
+
+ |image3|
- 4. | Add a named query called "getComponentList" (this named query is used by VID):
- `NamedQuery.postman_collection.json <ificationDate=1501102582000&api=v2>`__
- | |image3|
- 5. | Add objects:
- `Add Instances for Named Query.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/Add%20Instances%20for%20Named%20Query.postman_collection.json?version=1&modificationDate=1501102617000&api=v2>`__
+ `Add Instances for Named Query.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/Add%20Instances%20for%20Named%20Query.postman_collection.json?version=1&modificationDate=1501102617000&api=v2>`__
- 6. | Execute named-query:
- `Execute Named Query.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/Execute%20Named%20Query.postman_collection.json?version=1&modificationDate=1501102658000&api=v2>`__
- | You should see something like the following:
- | |image4|
+ 6. Execute named-query:
+ `Execute Named Query.postman_collection.json <https://wiki.onap.org/download/attachments/10782088/Execute%20Named%20Query.postman_collection.json?version=1&modificationDate=1501102658000&api=v2>`__
+ You should see something like the following:
+ |image4|
-- Your A&AI instance is now running, both the resources and traversal
- microservices are working properly with a local titan graph.
+- Your A&AI instance is now running, both the resources and traversal microservices are working properly with a local titan graph.
- Next: `Tutorial: Making and Testing a Schema Change in A&AI <https://wiki.onap.org/pages/viewpage.action?pageId=10783023>`__
- Next: `Tutorial: Making and Testing a Schema Change in A&AI <https://wiki.onap.org/pages/viewpage.action?pageId=10783023>`__