ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject incubator-ignite git commit: IGNITE-843 Improve agent build and documentation.
Date Fri, 14 Aug 2015 09:54:17 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 a03d6876b -> a1a44c88f


IGNITE-843 Improve agent build and documentation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a1a44c88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a1a44c88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a1a44c88

Branch: refs/heads/ignite-843
Commit: a1a44c88f5c6e77b387b15c1c0b40f54e7278c23
Parents: a03d687
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Fri Aug 14 16:54:29 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Fri Aug 14 16:54:29 2015 +0700

----------------------------------------------------------------------
 modules/control-center-agent/README.txt         | 55 ++++++++++++++++----
 .../jdbc-drivers/README.txt                     |  9 ++++
 .../control-center-agent/src/assembly/build.xml |  1 +
 .../apache/ignite/agent/AgentConfiguration.java | 18 ++++---
 .../org/apache/ignite/agent/AgentLauncher.java  |  2 +-
 .../handlers/DatabaseMetadataExtractor.java     |  2 +-
 6 files changed, 68 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/README.txt
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/README.txt b/modules/control-center-agent/README.txt
index 0ee9d76..410b366 100644
--- a/modules/control-center-agent/README.txt
+++ b/modules/control-center-agent/README.txt
@@ -5,22 +5,55 @@ Control Center Agent communicates with grid nodes via REST interface and
connect
 
 Two main functions of Control Center Agent:
  1. Proxy between Ignite Web Control Center and Ignite Grid to execute SQL statements and
collect metrics for monitoring.
+    You may need to specify URI for connect to Ignite REST server via "-n" option.
+
  2. Proxy between Ignite Web Control Center and user RDBMS to collect database metadata for
later CacheTypeMetadata configuration.
+    You may need to copy JDBC driver into "./jdbc-drivers" subfolder or specify path via
"-drv" option.
 
+Usage example:
+    agent.sh -l john.smith@gmail.com -p qwerty -s wss://control-center.example.com
 
-Usage example
-======================================
+Configuration file:
+    Should be a file with simple line-oriented format as described here: http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.Reader)
+
+    Available entries names:
+        login
+        password
+        serverURI
+        nodeURI
+        driverFolder
+
+    Example configuration file:
+        login=john.smith@gmail.com
+        serverURI=wss://control-center.example.com
+
+Options:
+    -h, --help
+       Print this help message.
+
+    -c, --config
+       Path to optional configuration file.
 
-agent.sh -l john.smith@gmail.com -p qwerty -s wss://control-center.gridgain.com
+    -drv, --driverFolder
+       Path to folder with JDBC drivers, for example "/home/user/drivers".
+       Default: "./jdbc-drivers".
+
+    -l, --login
+       User's login (email) on Web Control Center.
+
+    -n, --nodeUri
+       URI for connect to Ignite REST server, for example: "http://localhost:8080".
+       Default: "http://localhost:8080".
+
+    -p, --password
+       User's password.
+
+    -s, --serverUri
+       URI for connect to Ignite Web Control Center, for example: "wss://control-center.example.com".
+       Default: "wss://localhost:3001".
 
-Main command line arguments:
-    -l User's login (email) on web-control-center
-    -p User's password
-    -s Link to Ignite Control Center web-socket server.
-    -n Ignite REST server
-    -c Configure agent using configuration file. Configuration file is a properties file,
-       see /control-center-agent/src/main/resources/config.properties as example.
 
 Ignite Control Center Agent Build Instructions
-======================================
+==============================================
+If you want to build from sources run following command in Ignite project root folder:
     mvn clean package -pl :ignite-control-center-agent -am -P control-center -DskipTests=true

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/jdbc-drivers/README.txt
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/jdbc-drivers/README.txt b/modules/control-center-agent/jdbc-drivers/README.txt
new file mode 100644
index 0000000..5148c9d
--- /dev/null
+++ b/modules/control-center-agent/jdbc-drivers/README.txt
@@ -0,0 +1,9 @@
+Ignite Control Center Agent
+======================================
+
+This is default folder for JDBC drivers.
+You could specify custom folder using option: -drv CUSTOM_PATH_TO_FOLDER_WITH_JDBC_DRIVERS
+
+Copy JDBC drivers for your databases in this folder.
+
+Note, you need to copy JDBC drivers if you are planning to load cache type metadata from
your existing databases.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/src/assembly/build.xml
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/assembly/build.xml b/modules/control-center-agent/src/assembly/build.xml
index 942c36b..83b071b 100644
--- a/modules/control-center-agent/src/assembly/build.xml
+++ b/modules/control-center-agent/src/assembly/build.xml
@@ -12,6 +12,7 @@
             <directory>${project.basedir}</directory>
             <outputDirectory>/</outputDirectory>
             <includes>
+                <include>jdbc-drivers/README*</include>
                 <include>README*</include>
                 <include>LICENSE*</include>
                 <include>NOTICE*</include>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
index ec2674e..cf10e77 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
@@ -28,7 +28,7 @@ import java.util.*;
  */
 public class AgentConfiguration {
     /** */
-    @Parameter(names = {"-l", "--login"}, description = "User's login (email) on web-control-center")
+    @Parameter(names = {"-l", "--login"}, description = "User's login (email) on Ignite Web
Control Center")
     private String login;
 
     /** */
@@ -36,12 +36,13 @@ public class AgentConfiguration {
     private String pwd;
 
     /** */
-    @Parameter(names = {"-s", "--serverUri"}, description = "Link to web-control-center web-socket
server, " +
-        "for example: wss://localhost:3001 or wss://control-center.gridgain.com")
+    @Parameter(names = {"-s", "--serverUri"}, description = "URI for connect to Ignite Web
Control Center via " +
+        "web-socket protocol, for example: wss://control-center.my-company.com")
     private String srvUri = "wss://localhost:3001";
 
     /** */
-    @Parameter(names = {"-n", "--nodeUri"}, description = "ignite REST server, for example:
http://localhost:8080")
+    @Parameter(names = {"-n", "--nodeUri"}, description = "URI for connect to Ignite REST
server, " +
+        "for example: http://localhost:8080")
     private String nodeUri = "http://localhost:8080";
 
     /** */
@@ -49,8 +50,8 @@ public class AgentConfiguration {
     private String cfgPath;
 
     /** */
-    @Parameter(names = {"-drv", "--driver-folder"}, description = "Path to folder with JDBC
drivers, for example " +
-        "/home/user/drivers")
+    @Parameter(names = {"-drv", "--driverFolder"}, description = "Path to folder with JDBC
drivers, for example " +
+        "/home/user/jdbc-drivers")
     private String driversFolder;
 
     /** */
@@ -170,6 +171,11 @@ public class AgentConfiguration {
 
         if (val != null)
             setNodeUri(val);
+
+        val = (String)props.remove("driverFolder");
+
+        if (val != null)
+            setDriversFolder(val);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
index 35223de..a3afea2 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentLauncher.java
@@ -83,7 +83,7 @@ public class AgentLauncher {
         try {
             SslContextFactory sslCtxFactory = new SslContextFactory();
 
-            if (Boolean.TRUE.equals(Boolean.getBoolean("trust.all")))
+            // TODO IGNITE-843 Fix issue with trust all: if (Boolean.TRUE.equals(Boolean.getBoolean("trust.all")))
                 sslCtxFactory.setTrustAll(true);
 
             WebSocketClient client = new WebSocketClient(sslCtxFactory);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1a44c88/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
index c07b55b..8f6f5b2 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/handlers/DatabaseMetadataExtractor.java
@@ -42,7 +42,7 @@ public class DatabaseMetadataExtractor {
             File agentHome = AgentUtils.getAgentHome();
 
             if (agentHome != null)
-                driversFolder = agentHome + "/drivers";
+                driversFolder = agentHome + "/jdbc-drivers";
         }
 
         this.driversFolder = driversFolder;


Mime
View raw message