Skip to content

Commit

Permalink
1.0.4 release (#140)
Browse files Browse the repository at this point in the history
* EWC-366 now deprovision works if agent hasn't connection to controller (#132)

* EWC-359 controller status renaming ok -> online (#133)

* Update HornetQ version

* Fix `isolated_docker_container` configuration

* EWC-375 config switcher

* cleanup

* EWC-375 config switcher import fix

* EWC-375 fixed help for iofog-agent client

* updating config switcher

* iofog agent os group fix

* version 1.0.4 (#139)
  • Loading branch information
Railag authored and dbusel committed Nov 30, 2018
1 parent e30614d commit 95655f5
Show file tree
Hide file tree
Showing 22 changed files with 1,609 additions and 1,127 deletions.
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>iofog-agent</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
148 changes: 77 additions & 71 deletions client/src/org/eclipse/iofog/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,80 +95,86 @@ private static boolean sendCommandlineParameters(String... args) {
* @return String
*/
private static String showHelp() {

return ("Usage 1: iofog-agent [OPTION]\n" + "Usage 2: iofog-agent [COMMAND] <Argument>\n"
+ "Usage 3: iofog-agent [COMMAND] [Parameter] <Value>\n" + "\n"
+ "Option GNU long option Meaning\n"
+ "====== =============== =======\n"
+ "-h, -? --help Show this message\n"
+ "-v --version Display the software version and\n"
+ " license information\n" + "\n" + "\n"
+ "Command Arguments Meaning\n"
+ "======= ========= =======\n"
+ "help Show this message\n"
+ "version Display the software version and\n"
+ " license information\n"
+ "status Display current status information\n"
+ " about the software\n"
+ "provision <provisioning key> Attach this software to the\n"
+ " configured ioFog controller\n"
+ "deprovision Detach this software from all\n"
+ " ioFog controllers\n"
+ "info Display the current configuration\n"
+ " and other information about the\n"
+ " software\n"
+ "login -u <username> Login to Oro Networks application\n"
+ " -p <password> \n"
+ "config [Parameter] [VALUE] Change the software configuration\n"
+ " according to the options provided\n"
+ " defaults Reset configuration to default values\n"
+ " -d <#GB Limit> Set the limit, in GiB, of disk space\n"
+ " that the software is allowed to use\n"
+ " -dl <dir> Set the directory to use for disk\n"
+ " storage\n"
+ " -m <#MB Limit> Set the limit, in MiB, of RAM memory that\n"
+ " the software is allowed to use for\n"
+ " messages\n"
+ " -p <#cpu % Limit> Set the limit, in percentage, of CPU\n"
+ " time that the software is allowed\n"
+ " to use\n"
+ " -a <uri> Set the uri of the fog controller\n"
+ " to which this software connects\n"
+ " -ac <filepath> Set the file path of the SSL/TLS\n"
+ " certificate for validating the fog\n"
+ " controller identity\n"
+ " -c <uri> Set the UNIX socket or network address\n"
+ " that the Docker daemon is using\n"
+ " -n <network adapter> Set the name of the network adapter\n"
+ " that holds the correct IP address of \n"
+ " this machine\n"
+ " -l <#MB Limit> Set the limit, in MiB, of disk space\n"
+ " that the log files can consume\n"
+ " -ld <dir> Set the directory to use for log file\n"
+ " storage\n"
+ " -lc <#log files> Set the number of log files to evenly\n"
+ " split the log storage limit\n"
+ " -sf <#seconds> Set the status update frequency\n"
+ " -cf <#seconds> Set the get changes frequency\n"
+ " -df <#seconds> Set the post diagnostics frequency\n"
+ " -idc <on/off> Set the mode on which any not\\n"
+ " registered docker container will be\n"
+ " shutted down\n" + "\n" + "\n"
+ " -gps <auto/off Set gps location of fog.\n"
+ " /#GPS DD.DDD(lat), Use auto to get coordinates by IP,\n"
+ " DD.DDD(lon) use off to forbid gps,\n"
+ " use GPS coordinates in DD format to set them manually\n"
+ " -ft <auto Set fog type.\n"
+ " /intel_amd/arm> Use auto to detect fog type by system commands,\n"
+ " use arm or intel_amd to set it manually\n"
+ " -dev <on/off> Set the developer's mode without using ssl \\n"
+ " certificates. \\n" + "\n" + "\n"
+ "Report bugs to: edgemaster@iofog.org\n" + "ioFog Agent home page: http://iofog.org\n"
+ "For users with Eclipse accounts, report bugs to: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=iofog");
return ("Usage 1: iofog-agent [OPTION]\\n" +
"Usage 2: iofog-agent [COMMAND] <Argument>\\n" +
"Usage 3: iofog-agent [COMMAND] [Parameter] <Value>\\n" +
"\\n" +
"Option GNU long option Meaning\\n" +
"====== =============== =======\\n" +
"-h, -? --help Show this message\\n" +
"-v --version Display the software version and\\n" +
" license information\\n" +
"\\n" +
"\\n" +
"Command Arguments Meaning\\n" +
"======= ========= =======\\n" +
"help Show this message\\n" +
"version Display the software version and\\n" +
" license information\\n" +
"status Display current status information\\n" +
" about the software\\n" +
"provision <provisioning key> Attach this software to the\\n" +
" configured ioFog controller\\n" +
"deprovision Detach this software from all\\n" +
" ioFog controllers\\n" +
"info Display the current configuration\\n" +
" and other information about the\\n" +
" software\\n" +
"switch <dev|prod|def> Switch to different config \\n" +
"config [Parameter] [VALUE] Change the software configuration\\n" +
" according to the options provided\\n" +
" defaults Reset configuration to default values\\n" +
" -d <#GB Limit> Set the limit, in GiB, of disk space\\n" +
" that the software is allowed to use\\n" +
" -dl <dir> Set the directory to use for disk\\n" +
" storage\\n" +
" -m <#MB Limit> Set the limit, in MiB, of RAM memory that\\n" +
" the software is allowed to use for\\n" +
" messages\\n" +
" -p <#cpu % Limit> Set the limit, in percentage, of CPU\\n" +
" time that the software is allowed\\n" +
" to use\\n" +
" -a <uri> Set the uri of the fog controller\\n" +
" to which this software connects\\n" +
" -ac <filepath> Set the file path of the SSL/TLS\\n" +
" certificate for validating the fog\\n" +
" controller identity\\n" +
" -c <uri> Set the UNIX socket or network address\\n" +
" that the Docker daemon is using\\n" +
" -n <network adapter> Set the name of the network adapter\\n" +
" that holds the correct IP address of \\n" +
" this machine\\n" +
" -l <#MB Limit> Set the limit, in MiB, of disk space\\n" +
" that the log files can consume\\n" +
" -ld <dir> Set the directory to use for log file\\n" +
" storage\\n" +
" -lc <#log files> Set the number of log files to evenly\\n" +
" split the log storage limit\\n" +
" -sf <#seconds> Set the status update frequency\\n" +
" -cf <#seconds> Set the get changes frequency\\n" +
" -df <#seconds> Set the post diagnostics frequency\\n" +
" -sd <#seconds> Set the scan devices frequency\\n" +
" -idc <on/off> Set the mode on which any not\\n" +
" registered docker container will be\\n" +
" shut down\\n" +
" -gps <auto/off Set gps location of fog.\\n" +
" /#GPS DD.DDD(lat), Use auto to get coordinates by IP,\\n" +
" DD.DDD(lon) use off to forbid gps,\\n" +
" use GPS coordinates in DD format to set them manually\\n" +
" -ft <auto Set fog type.\\n" +
" /intel_amd/arm> Use auto to detect fog type by system commands,\\n" +
" use arm or intel_amd to set it manually\\n" +
" -dev <on/off> Set the developer's mode without using ssl \\n" +
" certificates. \\n" +
"\\n" +
"\\n" +
"Report bugs to: edgemaster@iofog.org\\n" +
"ioFog home page: http://iofog.org\\n" +
"For users with Eclipse accounts, report bugs to: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=iofog");
}

private static String version() {
return "ioFog Agent 1.0.0 " +
return "ioFog Agent 1.0.4 " +
"\nCopyright (C) 2018 Edgeworx, Inc." +
"\nEclipse ioFog is provided under the Eclipse Public License (EPL2)" +
"\nhttps://www.eclipse.org/legal/epl-v20.html";
Expand Down
11 changes: 8 additions & 3 deletions daemon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>iofog-agent</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -117,8 +117,13 @@
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
<version>2.3.0.BETA1</version>
<artifactId>hornetq-core-client</artifactId>
<version>2.3.0.Final</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-server</artifactId>
<version>2.3.0.Final</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
Expand Down
28 changes: 3 additions & 25 deletions daemon/src/org/eclipse/iofog/Daemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,6 @@ private static void setupEnvironment() {
daemonFilePath.mkdirs();
}

/**
* loads config.xml
*/
private static void loadConfiguration() {
try {
Configuration.loadConfig();
} catch (ConfigurationItemException e) {
System.out.println("invalid configuration item(s).");
System.out.println(e.getMessage());
System.exit(1);
} catch (Exception e) {
System.out.println("Error while parsing " + Constants.CONFIG_DIR + ". " + e.getMessage());
System.exit(1);
}
}

/**
* starts logging service
*/
Expand Down Expand Up @@ -165,7 +149,7 @@ public void write(int b) {
}

public static void main(String[] args) throws ParseException {
loadConfiguration();
Configuration.load();

setupEnvironment();

Expand All @@ -183,14 +167,8 @@ public static void main(String[] args) throws ParseException {

outToNull();

LoggingService.logInfo(MODULE_NAME, "starting supervisor");
Supervisor supervisor = new Supervisor();
try {
supervisor.start();
} catch (Exception exp) {
LoggingService.logWarning(MODULE_NAME, exp.getMessage());
}

Configuration.setupSupervisor();

System.setOut(Constants.systemOut);
}
}
Expand Down
Loading

0 comments on commit 95655f5

Please sign in to comment.