You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2017/11/20 07:53:08 UTC
ignite git commit: IGNITE-6927 Added Web Console direct-install
build. - Fixes #3058.
Repository: ignite
Updated Branches:
refs/heads/master aca1ce370 -> 9a0e36b23
IGNITE-6927 Added Web Console direct-install build. - Fixes #3058.
Signed-off-by: Andrey Novikov <an...@gridgain.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9a0e36b2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9a0e36b2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9a0e36b2
Branch: refs/heads/master
Commit: 9a0e36b23402785699c25a1b8a79574f0d943b8b
Parents: aca1ce3
Author: oleg-ostanin <oo...@gridgain.com>
Authored: Mon Nov 20 14:52:25 2017 +0700
Committer: Andrey Novikov <an...@gridgain.com>
Committed: Mon Nov 20 14:52:25 2017 +0700
----------------------------------------------------------------------
modules/web-console/DEVNOTES.txt | 20 ++--
modules/web-console/assembly/README.txt | 60 +++++++++++
modules/web-console/assembly/direct-install.xml | 91 ++++++++++++++++
modules/web-console/pom.xml | 103 ++++++++++++++++---
4 files changed, 256 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9a0e36b2/modules/web-console/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/DEVNOTES.txt b/modules/web-console/DEVNOTES.txt
index 4ff68a7..6dbb15a 100644
--- a/modules/web-console/DEVNOTES.txt
+++ b/modules/web-console/DEVNOTES.txt
@@ -2,13 +2,13 @@ Ignite Web Console Build Instructions
=====================================
1. Install locally MongoDB (version >=3.2.x) follow instructions from site http://docs.mongodb.org/manual/installation.
2. Install locally NodeJS (version >=6.5.x) using installer from site https://nodejs.org/en/download/current for your OS.
-3. Change directory to '$IGNITE_HOME/modules/web-console/backend' and
+3. Change directory to '/modules/web-console/backend' and
run "npm install --no-optional" for download backend dependencies.
-4. Change directory to '$IGNITE_HOME/modules/web-console/frontend' and
+4. Change directory to '/modules/web-console/frontend' and
run "npm install --no-optional" for download frontend dependencies.
5. Build ignite-web-agent module follow instructions from 'modules/web-console/web-agent/README.txt'.
-6. Copy ignite-web-agent-<version>.zip from '$IGNITE_HOME/modules/web-console/web-agent/target'
- to '$IGNITE_HOME/modules/web-console/backend/agent_dists' folder.
+6. Copy ignite-web-agent-<version>.zip from '/modules/web-console/web-agent/target'
+ to '/modules/web-console/backend/agent_dists' folder.
Steps 1 - 4 should be executed once.
@@ -17,10 +17,10 @@ Ignite Web Console Run In Development Mode
1. Configure MongoDB to run as service or in terminal change dir to $MONGO_INSTALL_DIR/server/3.2/bin
and start MongoDB by executing "mongod".
-2. In new terminal change directory to '$IGNITE_HOME/modules/web-console/backend'.
+2. In new terminal change directory to '/modules/web-console/backend'.
If needed run "npm install --no-optional" (if dependencies changed) and run "npm start" to start backend.
-3. In new terminal change directory to '$IGNITE_HOME/modules/web-console/frontend'.
+3. In new terminal change directory to '/modules/web-console/frontend'.
If needed run "npm install --no-optional" (if dependencies changed) and start webpack in development mode "npm run dev".
4. In browser open: http://localhost:9000
@@ -30,3 +30,11 @@ How to migrate model:
1. Model will be upgraded on first start.
2. To downgrade model execute in terminal following command: "./node_modules/.bin/migrate down <migration-name> -d <dbConnectionUri>".
Example: "./node_modules/.bin/migrate down add_index -d mongodb://localhost/console".
+
+
+Ignite Web Console Direct-Install Maven Build Instructions
+==========================================================
+To build direct-install archive from sources run following command in Ignite project root folder:
+"mvn clean package -pl :ignite-web-agent,:ignite-web-console -am -P web-console -DskipTests=true"
+
+Assembled archive can be found here: `/modules/web-console/target/ignite-web-console-direct-install-*.zip`.
http://git-wip-us.apache.org/repos/asf/ignite/blob/9a0e36b2/modules/web-console/assembly/README.txt
----------------------------------------------------------------------
diff --git a/modules/web-console/assembly/README.txt b/modules/web-console/assembly/README.txt
new file mode 100644
index 0000000..2b64a73
--- /dev/null
+++ b/modules/web-console/assembly/README.txt
@@ -0,0 +1,60 @@
+Requirements
+-------------------------------------
+1. JDK 7 bit for your platform, or newer.
+2. Supported browsers: Chrome, Firefox, Safari, Edge.
+3. Ignite cluster should be started with `ignite-rest-http` module in classpath. For this copy `ignite-rest-http` folder from `libs\optional` to `libs` folder.
+
+
+How to run
+-------------------------------------
+1. Unpack ignite-web-console-x.x.x.zip to some folder.
+2. Start ignite-web-console-xxx executable for you platform:
+ For Linux: ignite-web-console-linux
+ For MacOS: ignite-web-console-macos
+ For Windows: ignite-web-console-win.exe
+
+Note: on Linux and Mac OS X `root` permission is required to bind to 80 port, but you may always start Web Console on another port if you don't have such permission.
+
+3. Open URL `localhost` in browser.
+4. Login with user `admin@admin` and password `admin`.
+5. Start web agent from folder `web agent`. For Web Agent settings see `web-agent\README.txt`.
+Cluster URL should be specified in `web-agent\default.properties` in `node-uri` parameter.
+
+Technical details
+-------------------------------------
+1. Package content:
+ `libs` - this folder contains Web Console and MongoDB binaries.
+ `user_data` - this folder contains all Web Console data (registered users, created objects, ...) and should be preserved in case of update to new version.
+2. Package already contains MongoDB for Mac OS X, Windows, RHEL, CentOs and Ubuntu on other platforms MongoDB will be downloaded on first start. MongoDB executables will be downloaded to `libs\mogodb` folder.
+3. Web console will start on default HTTP port `80` and bind to all interfaces `0.0.0.0`.
+3. To bind Web Console to specific network interface:
+ On Linux: `./ignite-web-console-linux --server:host 192.168.0.1`
+ On Windows: `ignite-web-console-win.exe --server:host 192.168.0.1`
+4. To start Web Console on another port, for example `3000`:
+ On Linux: `sudo ./ignite-web-console-linux --server:port 3000`
+ On Windows: `ignite-web-console-win.exe --server:port 3000`
+
+All available parameters with defaults:
+ Web Console host: --server:host 0.0.0.0
+ Web Console port: --server:port 80
+ Enable HTTPS: --server:ssl false
+ HTTPS key: --server:key "serve/keys/test.key"
+ HTTPS cetificate: --server:cert "serve/keys/test.crt"
+ HTTPS passphrase: --server:keyPassphrase "password"
+ MongoDB URL: --mongodb:url mongodb://localhost/console
+ Mail service: --mail:service "gmail"
+ Signature text: --mail:sign "Kind regards, Apache Ignite Team"
+ Greeting text: --mail:greeting "Apache Ignite Web Console"
+ Mail FROM: --mail:from "Apache Ignite Web Console <so...@somecompany.somedomain>"
+ User to send e-mail: --mail:auth:user "someusername@somecompany.somedomain"
+ E-mail service password: --mail:auth:pass ""
+
+Troubleshooting
+-------------------------------------
+1. On Windows check that MongoDB is not blocked by Antivirus/Firewall/Smartscreen.
+2. Root permission is required to bind to 80 port under Mac OS X and Linux, but you may always start Web Console on another port if you don't have such permission.
+3. For extended debug output start Web Console as following:
+ On Linux execute command in terminal: `DEBUG=mongodb-* ./ignite-web-console-linux`
+ On Windows execute two commands in terminal:
+ `SET DEBUG=mongodb-*`
+ `ignite-web-console-win.exe`
http://git-wip-us.apache.org/repos/asf/ignite/blob/9a0e36b2/modules/web-console/assembly/direct-install.xml
----------------------------------------------------------------------
diff --git a/modules/web-console/assembly/direct-install.xml b/modules/web-console/assembly/direct-install.xml
new file mode 100644
index 0000000..d34cd07
--- /dev/null
+++ b/modules/web-console/assembly/direct-install.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+ <id>release-ignite-web-agent</id>
+
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/target</directory>
+ <outputDirectory>/libs/agent_dists</outputDirectory>
+ <excludes>
+ <exclude>**/*</exclude>
+ </excludes>
+ </fileSet>
+
+ <fileSet>
+ <directory>${project.basedir}/target</directory>
+ <outputDirectory>/libs/mongodb/mongodb-download</outputDirectory>
+ <excludes>
+ <exclude>**/*</exclude>
+ </excludes>
+ </fileSet>
+
+ <fileSet>
+ <directory>${project.basedir}/target</directory>
+ <outputDirectory>/user_data</outputDirectory>
+ <excludes>
+ <exclude>**/*</exclude>
+ </excludes>
+ </fileSet>
+
+ <fileSet>
+ <directory>${basedir}/assembly</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>**/README*</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>${basedir}/backend/build</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>ignite-web-console-win.exe</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/backend/build</directory>
+ <outputDirectory>/</outputDirectory>
+ <fileMode>0755</fileMode>
+ <includes>
+ <include>ignite-web-console-*</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>${basedir}/web-agent/target</directory>
+ <outputDirectory>/libs/agent_dists</outputDirectory>
+ <includes>
+ <include>ignite-web-agent-${project.version}.zip</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>${basedir}/frontend/build</directory>
+ <outputDirectory>/libs/frontend</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/9a0e36b2/modules/web-console/pom.xml
----------------------------------------------------------------------
diff --git a/modules/web-console/pom.xml b/modules/web-console/pom.xml
index 677b60a..f935ca6 100644
--- a/modules/web-console/pom.xml
+++ b/modules/web-console/pom.xml
@@ -34,49 +34,120 @@
<version>2.3.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
+ <properties>
+ <node.version>v8.9.0</node.version>
+ </properties>
+
+ <dependencies>
+ <!-- Ignite dependencies -->
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-web-agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>1.6</version>
+ <configuration>
+ <nodeVersion>${node.version}</nodeVersion>
+ <installDirectory>target</installDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
- <version>1.0</version>
-
- <configuration>
- <workingDirectory>frontend</workingDirectory>
- </configuration>
<executions>
<execution>
- <id>install node and npm</id>
+ <id>install node and npm for frontend</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
+ </execution>
+
+ <execution>
+ <id>download dependencies for frontend</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
+ <configuration>
+ <workingDirectory>frontend</workingDirectory>
+ <arguments>install --no-optional --prod</arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>build frontend</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+
<configuration>
- <nodeVersion>v4.4.7</nodeVersion>
- <npmVersion>3.8.6</npmVersion>
<workingDirectory>frontend</workingDirectory>
+ <arguments>run build</arguments>
+ <environmentVariables>
+ <NODE_ENV>production</NODE_ENV>
+ </environmentVariables>
</configuration>
</execution>
<execution>
- <id>npm install</id>
+ <id>download dependencies for backend</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
+ <workingDirectory>backend</workingDirectory>
<arguments>install --no-optional</arguments>
</configuration>
</execution>
<execution>
- <id>gulp build</id>
+ <id>build backend</id>
<goals>
- <goal>gulp</goal>
+ <goal>npm</goal>
</goals>
<configuration>
- <arguments>build</arguments>
+ <workingDirectory>backend</workingDirectory>
+ <arguments>run build</arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.4</version>
+ <inherited>false</inherited>
+
+ <executions>
+ <execution>
+ <id>release-web-agent</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/direct-install.xml</descriptor>
+ </descriptors>
+ <finalName>ignite-web-console-direct-install-${project.version}</finalName>
+ <outputDirectory>target</outputDirectory>
+ <appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
@@ -84,6 +155,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>