User Tools

Site Tools


ximixconsoleinstallers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ximixconsoleinstallers [2019/05/27 05:31] (current)
Line 1: Line 1:
 +====== Jar Base Console Installers ======
 +This section will describe the steps required to create a Jar based installer for the ximix console. The ximix console is a monitoring console that allows administrators to monitory ximix nodes in real time.
 +The Executable Jar files were chosen because:
 +
 +  - The complete process to build the jars can be examined and audited from beginning to end.
 +  - As target systems will be running java, the platform to run the installer would be available.
 +  - Jar files can be signed for later validation and repudiation.
 +
 +The executable installer will deploy the console to the target system.
 +
 +===== Creating an Installer =====
 +To create an installer you must install [[https://​www.gradle.org|Gradle]]. Gradle is a build system that is used by this project to automate the process of building ximix.
 +
 +==== Download and unpack ximix ====
 +Download the ximix source code and unpack it into a director of your choosing, using a terminal or a command prompt (cmd), "​cd"​ into the root of the source code.
 +
 +
 +**If this is a fresh installation**
 +
 +If this is a fresh installation you must run the following command from a command prompt or terminal window.
 +
 +<​code>​
 +cd /​path/​to/​ximix/​installation
 +
 +
 +mw$ gradle fetch_libs clean jar
 +:fetch_libs
 +</​code>​
 +And you should get output similar to the following.
 +
 +<​code>​
 +Fetching '​bcprov-jdk15on-150b03.jar'​ from '​https://​downloads.bouncycastle.org/​betas/​bcprov-jdk15on-150b03.jar'​ ... Complete
 +Fetching '​bcpkix-jdk15on-150b03.jar'​ from '​https://​downloads.bouncycastle.org/​betas/​bcpkix-jdk15on-150b03.jar'​ ... Complete
 +Fetching '​jpbc-api-1.2.1.jar'​ from '​https://​www.cryptoworkshop.com/​libs/​jpbc-api-1.2.1.jar'​ ... Complete
 +Fetching '​jpbc-crypto-1.2.1.jar'​ from '​https://​www.cryptoworkshop.com/​libs/​jpbc-crypto-1.2.1.jar'​ ... Complete
 +Fetching '​jpbc-plaf-1.2.1.jar'​ from '​https://​www.cryptoworkshop.com/​libs/​jpbc-plaf-1.2.1.jar'​ ... Complete
 +Fetching '​jpbc-pbc-1.2.1.jar'​ from '​https://​www.cryptoworkshop.com/​libs/​jpbc-pbc-1.2.1.jar'​ ... Complete
 +Fetching '​mapdb-0.9.3.jar'​ from '​https://​www.cryptoworkshop.com/​libs/​mapdb-0.9.3.jar'​ ... Complete
 +Fetching '​jackson-annotations-2.2.0.jar'​ from '​https://​www.cryptoworkshop.com/​libs//​jackson-annotations-2.2.0.jar' ​
 +
 +... output removed for brevity.
 +
 +
 +:​console:​processResources
 +:​console:​classes
 +:​console:​jar
 +:​demo:​compileJava
 +:​demo:​processResources UP-TO-DATE
 +:​demo:​classes
 +:demo:jar
 +:​installer:​compileJava
 +:​installer:​processResources
 +:​installer:​classes
 +:​installer:​jar
 +:​test:​compileJava
 +:​test:​processResources UP-TO-DATE
 +:​test:​classes
 +:test:jar
 +
 +BUILD SUCCESSFUL
 +
 +</​code>​
 +
 +The above step must work for you to continue.
 +
 +
 +==== Building on Unix Systems ====
 +If you are using a unix based system, such as linux or Mac OSX then there is a connivence script in the '​scripts'​ scripts directory of the ximix project. The scrips director is off the root of the ximix project and contains a script called '​mkconsoleinstaller.sh'​
 +
 +<​code>​
 +mw$ ls -al scripts/​mkconsoleinstaller.sh ​
 +-rwxr-xr-x ​ 1 mw  staff  416  1 Aug 19:43 scripts/​mkconsoleinstaller.sh
 +</​code>​
 +
 +Once you have found this script it can be run by providing two parameters:
 +  - The path to the mixnet.xml configuration file which defines the addresses of the nodes.
 +  - The path to the console.xml configuration file which supplies configuration information for the console.
 +
 +For example, (assuming you are in the root of the ximix project)
 +<​code>​
 +mw$ ./​scripts/​mkconsoleinstaller.sh demo/​conf/​mixnet.xml demo/​conf/​console.xml
 +</​code>​
 +
 +Will produce a demo console that will work with the demo configurations for the ximix nodes.
 +
 +When you run the above command you will see output similar to:
 +
 +<​code>​
 +./​scripts/​mkconsoleinstaller.sh demo/​conf/​mixnet.xml demo/​conf/​console.xml ​
 +:clean
 +:​common:​clean
 +:​console:​clean
 +:​crypto:​clean
 +:demo:clean
 +:​installer:​clean
 +:​mixnet:​clean
 +:node:clean
 +:test:clean
 +
 +... output removed for brevity.
 +
 +:​installer:​jar
 +:​test:​compileJava
 +:​test:​processResources UP-TO-DATE
 +:​test:​classes
 +:test:jar
 +:​make_console_installer
 +
 +Making Node Installer Jar
 +
 +
 +Installer Jar: /​Users/​meganwoods/​crypto-workshop/​ximix/​repo/​ximix/​build/​installers/​XimixConsoleInstaller.jar
 +The installer jar can run using:
 +java -jar /​Users/​meganwoods/​crypto-workshop/​ximix/​repo/​ximix/​build/​installers/​XimixConsoleInstaller.jar
 +
 +BUILD SUCCESSFUL
 +</​code>​
 +
 +If the the command is successful the installer jar and instructions on running the jar are shown in the output.
 +
 +When you run the jar file it will ask you for an installation location, once this is supplied it will proceed to install the console.
 +
 +==== Creating an installer on Windows ====
 +
 +Presently there is no script for windows but the same result can be achieved by:
 +
 +<​code>​
 +
 +> gradle clean jar make_console_installer "​-Dmixnet=demo/​conf/​mixnet.xml"​ "​-Dconfig=console/​conf/​console.xml"​
 +
 +</​code>​
 +
 +This will produce the installer jar and display the location of the installer and how to run it.
 +
 +===== Running the installer =====
 +The installer can be run by using the following command.
 +
 +<​code>​
 +java -jar XimixConsoleInstaller.jar
 +</​code>​
 +
 +When the installer runs it will ask you for an installation location the following applies to both unix and windows operating systems.
 +
 +<​code>​
 +mw$ java -jar XimixConsoleInstaller.jar ​
 +
 +Enter Install Directory [/​Users/​meganwoods/​crypto-workshop/​ximix/​repo/​ximix] >/​tmp/​ximix
 +Confirm Install to '/​private/​tmp/​ximix'​ Yes or [No] >y
 +
 +Unpacking: /​tmp/​ximix/​ximix-console/​bin/​start.bat
 +Unpacking: /​tmp/​ximix/​ximix-console/​bin/​start.sh
 +Unpacking: /​tmp/​ximix/​ximix-console/​conf/​console.xml
 +Unpacking: /​tmp/​ximix/​ximix-console/​conf/​mixnet.xml
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​bcprov-jdk15on-150b03.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​common.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​console.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​crypto.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jackson-annotations-2.2.0.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jackson-core-2.2.0.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jackson-databind-2.2.0.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​javax.servlet-3.0.0.v201112011016.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jetty-http-9.0.4.v20130625.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jetty-io-9.0.4.v20130625.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jetty-server-9.0.4.v20130625.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​jetty-util-9.0.4.v20130625.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​mixnet.jar
 +Unpacking: /​tmp/​ximix/​ximix-console/​libs/​node.jar
 +Setting posix file permissions on '​ximix-console/​bin/​start.sh'​ to '​rwxr-xr-x'​
 +
 +</​code>​
 +
 +===== Running the console =====
 +
 +To run the console cd into the '​ximix-console'​ directory and run '​./​bin/​start.sh'​ and you should see output similar to:
 +
 +<​code>​
 +./​bin/​start.sh
 +
 +mw$ 2013-08-01 20:​46:​59.465:​INFO:​oejs.Server:​main:​ jetty-9.0.4.v20130625
 +2013-08-01 20:​46:​59.481:​INFO:​oejsh.ContextHandler:​main:​ Started o.e.j.s.h.ContextHandler@5f9a5d3d{/​api,​null,​AVAILABLE}
 +2013-08-01 20:​46:​59.494:​INFO:​oejs.ServerConnector:​main:​ Started ServerConnector@211b3c6a{HTTP/​1.1}{0.0.0.0:​1887}
 +</​code>​
 +
 +To access the console use your web browser with the following url:
 +
 +(Note, you will need to start some nodes before the console will display any information.)
 +
 +http://​127.0.0.1:​1887
 +
 +
 +
  
ximixconsoleinstallers.txt ยท Last modified: 2019/05/27 05:31 (external edit)