diff --git a/.gitignore b/.gitignore index 29b018f..2599804 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,13 @@ hadoop-common-project/hadoop-kms/downloads/ hadoop-hdfs-project/hadoop-hdfs/downloads hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads hadoop-common-project/hadoop-common/src/test/resources/contract-test-options.xml + hadoop-tools/hadoop-openstack/src/test/resources/contract-test-options.xml +hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml +hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml +hadoop-tools/hadoop-azure/src/test/resources/azure-auth-keys.xml + +# Yarn UI hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/tla/yarnregistry.toolbox hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/dist hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tmp @@ -35,12 +41,10 @@ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.sass-cache hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/connect.lock hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/coverage/* hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/libpeerconnection.log -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webappnpm-debug.log -hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapptestem.log +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/npm-debug.log +hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/testem.log hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/dist hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tmp + yarnregistry.pdf -hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml -hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml -hadoop-tools/hadoop-azure/src/test/resources/azure-auth-keys.xml patchprocess/ diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md new file mode 100644 index 0000000..6365e13 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md @@ -0,0 +1,75 @@ + + +# YARN-UI + +The YARN UI is an ember based web-app that provides visualization of applications running on the Apache Hadoop YARN framework. + +## Configurations + +### In configs.env + This environment configuration file can be found at `./src/main/webapp/config/configs.env` + + * `ENV.hosts.localBaseAddress` : Local URL. This is empty by default. In case when ResourceManager and Timeline Server (ATS) are running on same node, cross domain requests has to be supported. In such cases, proxy URL can be configured here to handle requests (CORS). For eg:"localhost:1337" + * `ENV.hosts.timelineWebAddress` : Timeline web interface can be configured below. By default timeline server is set as localhost:8188, uncomment and change the following value for pointing to a different address. + * `ENV.hosts.rmWebAddress` : RM web interface can be configured below. By default RM web address is set as localhost:8088, uncomment and change the following value for pointing to a different address. + * `ENV.hosts.protocolScheme` : Protocol scheme. It can be "http:" or "https:". By default, http is used. + +## Package & deploy + +### Get war package + * YARN UI is distributed as a war package. + * To build & package UI without running test cases, run `mvn clean package -DskipTests -Pyarn-ui` in this directory. + * This would give you a war file in `./target`. + * UI build is part of hadoop build, refer BUILDING.txt for more info. + +### Using UI war +##### Remotely: + Use webfront tomcat manager to upload & deploy your war remotely. +##### Manually: + The war can be added to any tomcat instance. + 1. Remove any old deployments in `$TOMCAT_HOME/webapps` + 2. Copy the war to `$TOMCAT_HOME/webapps` + 3. Restart tomcat and the war will get deployed. The content of the war would be available in + `$TOMCAT_HOME/webapps/hadoop-yarn-ui-[version]` directory. + +## Development + +All the following commands must be run inside `src/main/webapp`. + +### Prerequisites + +You will need the following things properly installed on your computer. + +* Install [Node.js](http://nodejs.org/) (with NPM) +* Install [Bower](http://bower.io/) +* After Node.js installed, install corsproxy: npm install -g corsproxy +* Install all dependencies by running `npm install` & `bower install` + +### Running UI + +* `npm start` +* Visit your app at [http://localhost:4200](http://localhost:4200) in your browser. + +### Building + +* `npm run build` (production) +* Files would be stored in "dist/" + +### Adding new routes (pages), controllers, components etc. + +* Use ember-cli blueprint generator - [Ember CLI](http://ember-cli.com/extending/#generators-and-blueprints) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml index 2933a76..d15b5f6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml @@ -30,7 +30,7 @@ ${packaging.type} - jar + war src/main/webapp node v0.12.2 @@ -52,9 +52,26 @@ src/main/webapp/bower.json src/main/webapp/package.json src/main/webapp/testem.json + + src/main/webapp/dist/**/* + src/main/webapp/tmp/**/* src/main/webapp/public/assets/images/**/* + src/main/webapp/public/assets/images/* src/main/webapp/public/robots.txt + + public/assets/images/**/* public/crossdomain.xml + + src/main/webapp/.tmp/**/* + src/main/webapp/.bowerrc + src/main/webapp/.editorconfig + src/main/webapp/.ember-cli + src/main/webapp/.gitignore + src/main/webapp/.jshintrc + src/main/webapp/.travis.yml + src/main/webapp/.watchmanconfig + src/main/webapp/tests/.jshintrc + src/main/webapp/blueprints/.jshintrc diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.bowerrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.bowerrc new file mode 100644 index 0000000..959e169 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory": "bower_components", + "analytics": false +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.editorconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.editorconfig new file mode 100644 index 0000000..47c5438 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.editorconfig @@ -0,0 +1,34 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false +indent_style = space +indent_size = 2 + +[*.css] +indent_style = space +indent_size = 2 + +[*.html] +indent_style = space +indent_size = 2 + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.ember-cli b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.ember-cli new file mode 100644 index 0000000..ee64cfe --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + Ember CLI sends analytics information by default. The data is completely + anonymous, but there are times when you might want to disable this behavior. + + Setting `disableAnalytics` to true will prevent any data from being sent. + */ + "disableAnalytics": false +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.jshintrc new file mode 100644 index 0000000..08096ef --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.jshintrc @@ -0,0 +1,32 @@ +{ + "predef": [ + "document", + "window", + "-Promise" + ], + "browser": true, + "boss": true, + "curly": true, + "debug": false, + "devel": true, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "eqnull": true, + "esnext": true, + "unused": true +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.watchmanconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.watchmanconfig new file mode 100644 index 0000000..e7834e3 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +}