Hi all
I have pushed the code of REST API to create NDS Lab to the
nds-27-implement-create-rest-endpoint branch.
https://bitbucket.org/nds-org/nds-webservice/src/8eeff20c855b27893418b1cc056db17c284b89f7?at=nds-27-implement-create-rest-endpoint
<https://urldefense.proofpoint.com/v2/url?u=https-3A__bitbucket.org_nds-2Dorg_nds-2Dwebservice_src_8eeff20c855b27893418b1cc056db17c284b89f7-3Fat-3Dnds-2D27-2Dimplement-2Dcreate-2Drest-2Dendpoint&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=iEj4zY2m23d9QPzTewICNOX29P1IYSX9q3kyeqIQKeo&m=89NnXcXnhkwcENaqjCnS9Q86T2FUVe3fBndL6TGTVuc&s=5krOedlROcqw2IMxxT6cTEY9R-6zZtvE4jGV0ISiGTk&e=>
To try the API, you have to install strongloop on which the api are
built. It provides a test server running on you local host and a GUI to
send HTTP request. https://strongloop.com/get-started/
<https://urldefense.proofpoint.com/v2/url?u=https-3A__strongloop.com_get-2Dstarted_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=iEj4zY2m23d9QPzTewICNOX29P1IYSX9q3kyeqIQKeo&m=89NnXcXnhkwcENaqjCnS9Q86T2FUVe3fBndL6TGTVuc&s=8oQlgrgFaa9Qd2-IB0e_HPKwX0956-FHlkkcxLy9tFE&e=>
After installing the strongloop, cd into nds-webservice directory and run
npm install
to install all dependencies.
And then you need to
1. modify nds-webservice/common/models/environment.js. In line 10,
specify your ssh key name, openstack user name, password in the
arguments of the python script.
2. modify nds-webservice/startup_ndslabs.py in line 129-136, specify
your own volumes ids which can be found in openstack dash board.
The last step is to follow instructions here provided by Mike to resolve
the connectivity issue to the vlad-mgmt:
https://wiki.ncsa.illinois.edu/display/NDS/Connectivity+to+the+VLAD+OpenStack+Management+Network
<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.ncsa.illinois.edu_display_NDS_Connectivity-2Bto-2Bthe-2BVLAD-2BOpenStack-2BManagement-2BNetwork&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=iEj4zY2m23d9QPzTewICNOX29P1IYSX9q3kyeqIQKeo&m=89NnXcXnhkwcENaqjCnS9Q86T2FUVe3fBndL6TGTVuc&s=1AEZ3qFWwrjj4LqRnPD-Q37chGSgmvyNHtCyjOJWEvw&e=>
You can start the server with command:
node .
and then browse to http://localhost:3000/explorer/
<https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A3000_explorer_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=iEj4zY2m23d9QPzTewICNOX29P1IYSX9q3kyeqIQKeo&m=89NnXcXnhkwcENaqjCnS9Q86T2FUVe3fBndL6TGTVuc&s=C8GusXWOtRw61nBuDjzOYZxjWgKCmfWcZQTz3p8Cyf8&e=>
to try the API.
At this point, just specify the lab name and put 3 for the number of
instances. It will create 3 instances in openstack and one of them is
master node with public ip. It will store the instance id and ip address
to the mongodb, with which we can manipulate those instances in other
apis. Email me any issues you run into. Thank you.
Best
Zeo