Child pages
  • Database Synchronization with Symmetric DS

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Done. Completed as specified on Wiki - Multiple Instances with the renamed .wars of omrsroot and omrsclient running on 2 ports for jetty. Independent two databases and 'omrsroot' and 'omrsclient' for sync, and having individual application data directories.
{color:#000000}{+}

Steps

to

setup

a

root

instance

and

a

client

instance

for

the

project

demo

purpose{+}{color} Folders referred to steps given below. OpenMRS checkout

purpose

Folders referred to steps given below.

OpenMRS checkout location=OpenMRS-1.x.x


Default

Application

Data

Directory=


Linux:

/home/

{

user_name

}

/.OpenMRS

Windows7:

C:\Users\your_name\AppData\Roaming\OpenMRS

{color:#008000}Step

Step 1:

{color}

First

rename

your

existing Application

data

directory

to

something

else

so

that

the

setup

will

run

all

new. {color:#008000}Step 2:{color} Make two copies of OpenMRS.war and rename them to

new. This applies if you have already been using OpenMRS before this trial.
Step 2: Make two copies of OpenMRS.war and rename them to root.war,

client.war

inside

OpenMRs-1.x.x/webapp/target

{color:#008000}Step


Step 3:

{color}

Go

to

OpenMRs-1.x.x/webapp,

{

Panel
Wiki Markup
}
Code Block
mvn jetty:run -Dwebapp.name=root -Djetty.port=8042
{code}

Set

up

OpenMRS

using

the

Advanced

option

where

you

can

name

your

own

database.

Name

the

database

to

rootdb.

{color:#008000}Step


Step 4:

{color}

Exit

Jetty.

Now

you

once

again

have

a

new

Application

data

directory

created.

Rename

this

to

something

else.

Say

OpenMRS_root.


Go

inside,

copy

all

the

folders

and

files.

Create

a

new

folder

where

you

prefer.

eg:

OpenMRS-1.x.x/webapp/root.

Paste

the

copied

content

inside

this

folder.

So

root

is

your

new

Application

data

directory

for

the

root

instance

we

are

going

to

try.

{color:#008000}Step


Step 5:

{color}

Open

the

runtime

properties

file

inside

this

folder,

paste

the

following

line

in

it.

We

are

letting

the

root-runtime

properties

know

where

to

find

its

own

application

data

directory,

with

its

own

modules

seperated

from

another

instance's

ones.


application_data_directory=path.to.root.folder


Copy

the

edited

runtime.properties

file

to

OpenMRS-1.x.x/webapp

from

where

you

run

the

mvn

jetty

run

command.

{quote}

eg:

application_data_directory=root

{quote}

Note:

This

path

is

relative

to

the

new

placement

of

root-runtime.properties.

(Additionally,

you

may

paste

the

same

runtime.properties

to

OpenMRs-1.x.x/webapp/target

where

the

.war

actually

resides,

for

safety

\

:)

)


Cool,

so

the

root

is

setup.

Run

the command  {code}

the command 

Code Block
mvn jetty:run -Dwebapp.name=root -Djetty.port=8042
{code}

to

see

your

working

root

OpenMRS

instance

\! {color:#008000}Step 6:{color} Repeat step3 with the

!
Step 6: Repeat step3 with the client.war.

eg:

{

}
Code Block
mvn jetty:run -Dwebapp.name=root -Djetty.port=8047
{code}

And

name

your

new

database

to

clientdb {color:#008000}Step 7:{color} Repeat step 4 with renaming to

clientdb
Step 7: Repeat step 4 with renaming to OpenMRS_client.

Let

the

new

folder

you

create

be

OpenMRS-1.x.x/webapp/client

for

example.

So

client

is

your

new

Application

data

directory

for

the

root

instance

we

are

going

to

try.

{color:#008000}Step


Step 8:

{color}

Repeat

step

5

with

application_data_directory=path.to.client.folder

{quote}

eg:

application_data_directory=client

{quote}

Now

the

client

is

all

setup

\

!


So

by

the

end,

you

will

have

2

OpenMRS

instances

you

can

run

at

the

same

time.As

for

my

example,

  root on

 
root on localhost/8042,

with

rootdb,

and

appdata

directory=root


client

on

localhost/8047,

with

clientdb,

and

appdata

directory=client

2. Configure SymmetricDS for the two OpenMRS instances. Then Synchronize the Person table. (As with the 2.x release of Symmetric)

...