@@ -21,7 +21,13 @@ The YARN UI is an Ember based web-app that provides visualization of the applica
2121
2222## Configurations
2323
24- * You can point the UI to custom locations by setting the environment variables in ` src/main/webapp/config/configs.env `
24+ You can point the UI to custom locations by setting the environment variables in ` src/main/webapp/config/configs.env ` .
25+
26+ In order to make the UI running on Ember server (started by ` yarn start ` )
27+ work with independently running ResouceManager,
28+ you need to enable CORS by setting ` hadoop.http.cross-origin.enabled ` to true
29+ and adding ` org.apache.hadoop.security.HttpCrossOriginFilterInitializer `
30+ to ` hadoop.http.filter.initializers ` in core-site.xml of the ResourceManager.
2531
2632## Development
2733
@@ -32,7 +38,7 @@ All the following commands must be run inside `src/main/webapp`.
3238You will need the following things properly installed on your computer.
3339
3440* Install [ Yarn] ( https://yarnpkg.com ) v0.21.3
35- * Install [ Bower] ( http://bower.io/ ) v1.7.7
41+ * Install [ Bower] ( http://bower.io/ ) v1.8.8
3642* Install all dependencies by running ` yarn install ` & ` bower install `
3743
3844### Running UI
@@ -62,3 +68,22 @@ YARN UI has replaced NPM with Yarn package manager. And hence Yarn would be used
6268### Adding new routes (pages), controllers, components etc.
6369
6470* Use ember-cli blueprint generator - [ Ember CLI] ( http://ember-cli.com/extending/#generators-and-blueprints )
71+
72+ ### Building with Maven
73+
74+ [ YARN-6278] ( https://issues.apache.org/jira/browse/YARN-6278 )
75+ added ` yarn-ui ` profile to pom.xml leveraging
76+ [ frontend-maven-plugin] ( https://github.com/eirslett/frontend-maven-plugin ) which
77+ automatically installs Node.js and Yarn locally under target/webapp directory.
78+ After building yarn-ui by ` mvn package -Pyarn-ui ` , you can reuse
79+ the locally installed Node.js and Yarn instead of manually installing them.
80+
81+ ```
82+ $ mvn package -Pyarn-ui
83+ $ export PATH=$PWD/target/webapp/node:$PATH
84+ $ export YARNJS=$PWD/target/webapp/node/yarn/dist/bin/yarn.js
85+ $ cd src/main/webapp/
86+ $ node $YARNJS install
87+ $ node node_modules/.bin/bower install
88+ $ node $YARNJS start
89+ ```
0 commit comments