Personal Services: Development Machine Setup

Submitted by code_admin on Mon, 07/23/2018 - 11:20

Set up SingleNodeServer Installer

Clean install of Eclipse (Mars) Java Developer
File -> Import -> Check out Maven Projects from SCM
Click Find more SVN connectors in the m2m Marketplace
select m2e-egit
Go through install
(Check for pop-up on another workspace)
After eclipse restarts
File -> Import -> Check out Maven Projects from SCM
Enter personal_services_Installer URL
Don't switch to Java 1.7 - Java 8 required.
Run, it will complain about having no CERT_current.jsk
Create a new project called: SingleNodeServerWorking (Just an empty project)
Edit the run configuration
Name it: SingleNodeServerInstaller
Change the working directory of the personal node services run configuration to workspace relative - ${workspace_loc:SingleNodeServerWorking}
go to the new workspace directory and run

Run the installer with no params and set it up a single node server.
- Use Data sub directory option
Change the run configuration for the installer
Name it: SingleNodeServerInstaller REINSTALL
Parameters: REINSTALL

Set up MultiNodeServer Installer

Create a new project called: MultiNodeServerWorking (Just an empty project)
Create a new run configuration for the Personal services installer with no argument.
Change the working directory to workspace relative - ${workspace_loc:MultiNodeServerWorking}

Run the installer with no params and set it up a multi node server.
Change the run configuration for the installer
Name it: MultiNodeServerInstaller REINSTALL
Parameters: REINSTALL

Import required libs

Create a new project called: external_libs (Just an empty project)
Download all external_libs from https://download.mylinkedthings.com/external_libs/ to this directory

Set up Java Common (RJM_Common)

Create a new Java Project called "RJM_Common" - name must be correct as it is embedded into maven projects
go to project directory
clone the java_common repository
delete the src directory
rename the cloned directory to src
load eclipse and refresh
In Project Properties
Java Build Path -> Source
Exclude:
metcarob.com.common.svn
metcarob.com.common.io.db.OracleUtilities,java
In Project Properties
Java Build Path -> Libraries
Add Jar
commons codec
sqlite-jdbc

Setup Personal Services Library

Create a new Java Project called "Library"
go to project directory
clone the java_common repository
delete the src directory
rename the cloned directory to src
load eclipse and refresh
In Project Properties
Java Build Path -> Projects
Add - RJM_Common
Go to Libraries
Add jars - Commons and SQList

Set up Single Node Server

Create a new Java Project called "SingleNodeServer"
go to project directory
clone the personal_services_SingleNodeServer.git
delete the current src directory
rename the cloned directory to src
In Eclipse and refresh
Java Build Path -> Projects
Add - RJM_Common, Library
Open "Main.java"
run it, It will say it needs input arguments
Name the new run configuration "SingleNodeServer"
Under arguments add following

  1. ${workspace_loc}/SingleNodeServerWorking/Data/SingleNodeServerSettings.xml 7PqRo-Qam1QEFLRroEHobH4t1?f18DioNzScaQa

(Replace second string with password - if you run a reinstall this needs to be updated)

MultiNodeServer

In eclipse click File -> Import -> Maven -> Check out Maven Project from SCM
Enter git URL and import.
Open "App.java"
run it, It will say it needs input arguments
Name the new run configuration "MultiNodeServer"
Under arguments add following

  1. ${workspace_loc}/MultiNodeServerWorking/Data/MultiNodeServerSettings.xml 7PqRo-Qam1QEFLRroEHobH4t1?f18DioNzScaQa

(Replace second string with password - if you run a reinstall this needs to be updated)

Set up Console

Create a new Java Project called "Console"
go to project directory
clone the personal_services_Console.git
delete the current src directory
rename the cloned directory to src
In Eclipse refresh the project directory
Add dependent projects:
Library
RJM_Common

Open "Main.java"
run it, It will say it needs input arguments
Name the new run configuration "SingleConsoleAnyNodeAdmin"
Under arguments add following

  1. ${workspace_loc}/SingleNodeServerWorking/Data/ConsoleSettings.xml AnyNodeAdmin mainNode

Test by running the SingleNodeServer then running the console. Make sure you can execute a command

Duplicate the run configuration and make one called MultiConsoleAnyNodeAdmin with:

  1. ${workspace_loc}/MultiNodeServerWorking/Data/ConsoleSettings.xml AnyNodeAdmin mainNode

Test by running MultiNodeServer then running the console. You should get the error "Error invalid node Name" since the node doesn't exist in the multi node server yet.

AdminWebServ html resources (html_res)

Go to workspace directory
clone personal_services_html_res.git into this directory
rename personal_services_html_res directory to html_res

Set up AdminWebServ

Create a new Java Project called "AdminWebServ"
go to project directory
clone the personal_services_AdminWebServ.git
delete the current src directory
rename the cloned directory to src
In Eclipse refresh the project directory
Add dependent projects:
Library
RJM_Common

Add dependent libraries from external libs:
Jetty-all
servlet-api

Open "Main.java"
run it, It will say it needs input arguments
Name the new run configuration "SingleAdminwebServ"
Under arguments add following

  1. ${workspace_loc}/SingleNodeServerWorking/Data/AdminWebServSettings.xml KCisXX8rXGi6_FRF?4=Zi=dMy-n3fP pyQ1ST77irkZP=922iFaFsBk4GTPFL95=t CiA7S7+D-YP_zXNzAYt-9EgGXKLdaaHTfq

The final 3 paramaters are passwords that will change if you reinstall.

Test by running the SingleNodeServer then running the AdnimWebServ. Browse to https://127.0.0.1:8080/app and log in as the first user.
Check Version Info and make sure all components report "development"

Duplicate the run configuration and make one called MultiConsoleAnyNodeAdmin with:

  1. ${workspace_loc}/MultiNodeServerWorking/Data/ConsoleSettings.xml **Passwords as before**

Test by running MultiNodeServer then running the console. You should get the error "Error invalid node Name" since the node doesn't exist in the multi node server yet.
Check Version Info and make sure all components report "development"

Commit Script

The commit script ChangePost.sh is useful to commit all changes together. Download it from this page and put it in the eclipse workspace directory.

Deployment Process

Start a bash shell and cd to the eclipse workspace directory
Clone personal_services_Releaser.git
Run the release_installer.sh it will fail. This is because the libs are not present
Go to the newly created RELEASES/libs directory and download the libs in the same way as for external_libs

Extra lib files are needed:
svnkit-1.7.8.jar
ojdbc5.jar

We are not sharing the same location to keep the releaser separate.

This completes setup

Tags

RJM Article Type
Work Notes