Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Add ciao-webui support to ciao-down and Single VM#1006

Merged
tpepper merged 3 commits into
ciao-project:masterfrom
markdryan:singlevm-webui
Jan 12, 2017
Merged

Add ciao-webui support to ciao-down and Single VM#1006
tpepper merged 3 commits into
ciao-project:masterfrom
markdryan:singlevm-webui

Conversation

@markdryan

Copy link
Copy Markdown
Contributor

This PR adds ciao-webui support to ciao-down and Single VM. In short ciao-down installs and configures node and downloads the ciao-webui repo into a directory shared with the host. Single VM creates a configuration file that contains all the information the webui needs to talk to the Single VM ciao instance.

We also fix a bug which causes a launcher crash when container creation fails due to a network error.

@markdryan

markdryan commented Jan 11, 2017

Copy link
Copy Markdown
Contributor Author

@jorgevgut I need your help with this one. The ciao-webui is working okay but I cannot build the latest version of the code inside single VM, e.g., make install-dev errors out. It seems to be complaining about proxy issues but I have set the proxies using npm config.

Perhaps there are other npm configs I need to set, like the prefix. I'd be grateful if you could take a look. To test,

git checkout -b markdryan-singlevm-webui master
git pull https://github.com/markdryan/ciao.git singlevm-webui

cd $GOPATH/src/github.com/01org/ciao/testutil/ciao-down
go build
./ciao-down prepare --ui-path "PATH to your ciao-webui repo"

Wait 10 minutes

ciao-down connect

Now you're in the VM. cd to the ciao-webui directory ( should be the same directory you use on the HOST)

make install-dev

It will fail. Please help me figure out why.

@coveralls

coveralls commented Jan 11, 2017

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.009%) to 66.921% when pulling d45e803 on markdryan:singlevm-webui into 4fe33ae on 01org:master.

Mark Ryan added 3 commits January 12, 2017 11:40
This commit generates a certificate and a conf file for use by the web-ui.
The conf file contains all the settings the web-ui needs to access the
Single VM ciao cluster.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
Launcher was crashing when creating containers if the attempt to
create the Vnic failed.  This commit fixes the crash by checking
to see if an error has been returned before trying to access the
inof structure.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit adds webui support to ciao-down.  In short it

- Adds a new option to the prepare command that allows a directory containing
  the ciao-webui repo to be shared between the host and the guest
- Clones the web-ui if necessary
- Installs nodejs and make in the guest
- Configures noodejs
- Adds ciao-webui launching instructions to the bash prompt

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
@markdryan

markdryan commented Jan 12, 2017

Copy link
Copy Markdown
Contributor Author

@jorgevgut I fixed all the proxy and installation issues. If you follow the instructions above and build with

DESTDIR=/usr/local/nodejs make install-dev

most of the errors are gone. But I still see some compile errors when building some of the modules,

> browserify build/pages/tenant_detail.js -o build/javascripts/bundle_tenant_detail.js


/home/markus/src/ciao-webui/node_modules/d3-scale/index.js:1
export {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

npm ERR! Linux 4.4.0-47-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build-detailby-tenant"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! ciao-webui@1.0.0 build-detailby-tenant: `browserify build/pages/tenant_detail.js -o build/javascripts/bundle_tenant_detail.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ciao-webui@1.0.0 build-detailby-tenant script 'browserify build/pages/tenant_detail.js -o build/javascripts/bundle_tenant_detail.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ciao-webui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     browserify build/pages/tenant_detail.js -o build/javascripts/bundle_tenant_detail.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ciao-webui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ciao-webui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/markus/src/ciao-webui/npm-debug.log
Makefile:49: recipe for target 'install-dev' failed

This happens on both the master and development branches. It seems to be related to bablify but I have no idea how to fix it.

@markdryan

markdryan commented Jan 12, 2017

Copy link
Copy Markdown
Contributor Author

@jorgevgut Note you should update your make file to initialize DESTDIR using npm config get prefix

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.005%) to 66.898% when pulling c812d43 on markdryan:singlevm-webui into e57e064 on 01org:master.

1 similar comment
@coveralls

coveralls commented Jan 12, 2017

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.005%) to 66.898% when pulling c812d43 on markdryan:singlevm-webui into e57e064 on 01org:master.

@markdryan

Copy link
Copy Markdown
Contributor Author

@jorgevgut Okay, the issue seems to be an existing ciao-webui build bug (intel/ciao-webui#129). What should I do? Do an

npm install d3-scale

when setting up the VM or will you guys fix this in the web-ui.

@markdryan markdryan changed the title [Don't Merge] Add ciao-webui support to ciao-down and Single VM Add ciao-webui support to ciao-down and Single VM Jan 12, 2017
@markdryan

Copy link
Copy Markdown
Contributor Author

@rbradford , @tpepper This should be good to go now.

return nil
}

func getProxy(upper, lower string) (string, error) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we keep osprepare, it probably should leverage this as a higher level library utility function.

@tpepper tpepper merged commit 0fd6579 into ciao-project:master Jan 12, 2017
@markdryan markdryan deleted the singlevm-webui branch January 16, 2017 11:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants