Hi Lincoln,

Are you trying to run the robot init script to load your openstack information 
into ONAP? It's not a pre-requisite to execute the heat-based OVP test, and we 
didn't use it when we were developing the test.

Below is an alternative, and are the steps we use to configure ONAP with the 
necessary cloud, customer, subscriber, etc..., as well as what information 
you'll need to supply to the OVP test when you're ready to run it. I'll add 
some comments inline as well.

# first step, clone the integration repo. This has the script that you can use 
to bootstrap ONAP w/ your cloud info.
(stark_env3) C02TH5Z2G8WN:tmp stark$ git clone 
https://github.com/onap/integration.git
Cloning into 'integration'...
remote: Enumerating objects: 344, done.
remote: Counting objects: 100% (344/344), done.
remote: Compressing objects: 100% (266/266), done.
remote: Total 23372 (delta 197), reused 215 (delta 68), pack-reused 23028
Receiving objects: 100% (23372/23372), 17.65 MiB | 693.00 KiB/s, done.
Resolving deltas: 100% (12563/12563), done.

# next, export a KUBECONFIG variable in your shell and set it to your 
kubeconfig file for your k8 cluster.
# If you don't have one, you can download it from the rancher ui. see here 
https://rancher.com/docs/rancher/v2.x/en/cluster-admin/cluster-access/kubectl/
(stark_env3) C02TH5Z2G8WN:tmp stark$ export KUBECONFIG=/tmp/mykubeconfig

# create a configuration file with the following contents.
# A lot of the values can be whatever you like (you'll use them later during 
the test), I'll comment where you need to change things for your environment
(stark_env3) C02TH5Z2G8WN:tmp stark$ cat /tmp/test-bootstrap.conf
export CLLI=testclli2
export CLOUD_OWNER=testcloudowner
export CLOUD_REGION=testcloudregion
export OPENSTACK_IP=10.0.200.4 # make this the IP your openstack api is 
accessible from ONAP
export OPENSTACK_USER=onap_user # this is the username you use to log into 
Openstack
export OPENSTACK_PASS=supersecret # this is the password you log into openstack
export OPENSTACK_TENANT=onap_project # this is the tenant you use in openstack
export OPENSTACK_REGION=RegionOne # this is the region you use in openstack, 
typically its just RegionOne
export CUSTOMER=testcustomer2
export SUBSCRIBER=testsubscriber2
export SERVICE_TYPE=onapservice
export AZ=nova # this is the availability_zone defined in openstack
export OE=testentity2
export LOB=testlob2
export PLATFORM=testplatform2
export PROJECT=testproject2
export OS_ID=TestOpenstack
export OS_TENANT_ROLE=admin
export OS_KEYSTONE=KEYSTONE_V3 # this is the version of the keystone api 
openstack is using. If its using the keystone v2 api, value is just KEYSTONE. I 
think Rocky is v3.
export KUBECONFIG=/tmp/mykubeconfig # this is the full path to your kubeconfig 
file you downloaded from rancher earlier

# now, run this command line to bootstrap ONAP with the information you 
provided above. The argument to the script is the path to the config file you 
created above.
# Because your environments are already up and running, it should only take 
like 5 minutes to run. If it's taking longer, you may have some other 
environment issues going on.
(stark_env3) C02TH5Z2G8WN:tmp stark$ 
/tmp/integration/deployment/aks/post-install/000_bootstrap_onap.sh 
/tmp/test-bootstrap.conf
configmap/onap-bootstrap created
pod/onap-bootstrap created
Creating pod to Bootstrap ONAP with OpenStack details.
This might take a while if OpenStack is still launching...
onap-bootstrap is ContainerCreating
onap-bootstrap is Running
onap-bootstrap is Running
onap-bootstrap is Completed
onap-bootstrap pod logs available at /tmp/onap-bootstrap-log
pod "onap-bootstrap" deleted
configmap "onap-bootstrap" deleted

# At this point, your ONAP instance should be ready to run the test.
# Below is an example of downloading the test, and using one of the examples 
from the test wiki page to execute it.

(stark_env3) C02TH5Z2G8WN:tmp stark$ git clone "https://gerrit.onap.org/r/oom"; 
--recurse-submodules
Cloning into 'oom'...
remote: Counting objects: 15, done
remote: Finding sources: 100% (9/9)
remote: Total 43709 (delta 0), reused 43707 (delta 0)
Receiving objects: 100% (43709/43709), 29.75 MiB | 1.55 MiB/s, done.
Resolving deltas: 100% (31110/31110), done.
Submodule 'kubernetes/aai' (https://gerrit.onap.org/r/aai/oom) registered for 
path 'kubernetes/aai'
Submodule 'kubernetes/robot' (https://gerrit.onap.org/r/testsuite/oom) 
registered for path 'kubernetes/robot'
Cloning into '/private/tmp/oom/kubernetes/aai'...
remote: Counting objects: 4, done
remote: Total 4052 (delta 0), reused 4052 (delta 0)        B/s
Receiving objects: 100% (4052/4052), 748.82 KiB | 591.00 KiB/s, done.
Resolving deltas: 100% (2908/2908), done.
Cloning into '/private/tmp/oom/kubernetes/robot'...
remote: Counting objects: 2, done
remote: Total 1382 (delta 0), reused 1382 (delta 0)
Receiving objects: 100% (1382/1382), 203.13 KiB | 742.00 KiB/s, done.
Resolving deltas: 100% (700/700), done.
Submodule path 'kubernetes/aai': checked out 
'd801a6ee395220b11bfac773c3111489282e735c'
Submodule path 'kubernetes/robot': checked out 
'bc1480dc6c66d23ed04feaff93fca10da6a65a8f'

(stark_env3) C02TH5Z2G8WN:tmp stark$ cd oom/kubernetes/robot/

(stark_env3) C02TH5Z2G8WN:robot stark$ ./instantiate-k8s.sh --help
./instantiate-k8s.sh [options]

required:
-n, --namespace <namespace>       namespace that robot pod is running under.
-f, --folder <folder>             path to folder containing heat templates, 
preloads, and vnf-details.json.

additional options:
-p, --poll                        some cloud environments (like azure) have a 
short time out value when executing
kubectl. If your shell exits before the testsuite finishes, using this option
will poll the testsuite logs every 30 seconds until the test finishes.

This script executes the VNF instantiation robot testsuite.
- It copies the VNF folder to the robot container that is part of the ONAP 
deployment.
- It models, distributes, and instantiates a heat-based VNF.
- It copies the logs to an output directory, and creates a tarball for upload 
to the OVP portal.

# Modify the vnf-details.json file with the information you used to bootstrap 
ONAP. See below for how my file
# looks when i use the information from the example above.
(stark_env3) C02TH5Z2G8WN:robot stark$ cat 
/Users/stark/Desktop/single_module/vnf-details.json
{
"vnf_name": "SingleModule_VNFAPI",
"description": "Some Description",
"modules": [
{
"filename": "base.yaml",
"isBase": "true",
"preload": "base_preload.json"
}
],
"api_type": "vnf_api",
"subscriber": "testsubscriber2",
"service_type": "onapservice",
"tenant_name": "onap_project",
"region_id": "testcloudregion",
"cloud_owner": "testcloudowner",
"project_name": "testproject2",
"owning_entity": "testentity2",
"platform": "testplatform2",
"line_of_business": "testlob2",
"os_password": "supersecret"
}

# Now, execute the test. If you're using the example from the wiki, it should 
take about 10 minutes to run.
# At the end of the test, it will tell you where the log file is created on 
your machine.
(stark_env3) C02TH5Z2G8WN:robot stark$ ./instantiate-k8s.sh --folder 
/Users/stark/Desktop/single_module/ --namespace onap

Hope this helps,
Steven

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#5831): https://lists.onap.org/g/onap-tsc/message/5831
Mute This Topic: https://lists.onap.org/mt/69699236/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-tsc/leave/2743226/1412191262/xyzzy  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to