Local test or demo system setup

Hi,

I have an existing OpenVPMS site that would like to run a test or demo system alongside the live one for testing of templates and for new staff to practice on.

What are the steps required to restore a copy of the real data (with customers and all in it) to another new database on that same server?

What would then be the web address of the new site.

Finally, how can the background colour of the demo system be changed to clearly differentiate it from the live system?

 

thanks very much

Marty Oliver, The Soho Box

www.thesohobox.com.au

Melbourne, Australia

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

RE: Local test or demo system setup

Hi Martin, This is a common request and although the response is quite technical I think it is worthwhile documenting it here for others to use if it applies.

I assume you have an existing, working OpenVPMS installation and have some technical understanding of Mysql, editing files etc.

  1. Backup your existing main openvpms database using the MySQL administrator.
  2. Using the restore function in Mysql administrator restore the database to a new schema (you will notice a drop down box in the restore screen which gives an option fo restoring to a new schema rather than the original schema). I usually call the new schema openvpms-demo but you can use any name. Just remember name for future steps.
  3. Stop Tomcat.
  4. In the Tomcat/webapps folder you will see a folder called openvpms. Make a copy of this folder in the webapps directory and rename to openvpms-demo.

In this folder navigate to the WEB-INF folder and edit the file web.xml. You will notice a section near the top that looks like:

 <context-param>
<param-name>webAppRootKey</param-name>
<param-value>openvpms</param-value>
</context-param>

change to

    <context-param>
<param-name>webAppRootKey</param-name>
<param-value>openvpms-demo</param-value>
</context-param>

and save the file.

  1. In the same WEB-INF folder navigate to the classes folder. Edit the file called hibernate.properties and find the section :
    hibernate.connection.url=jdbc:mysql://localhost:3306/openvpms

    and change to

    hibernate.connection.url=jdbc:mysql://localhost:3306/openvpms-demo

    the end section should equate to the schema name you restored to above.

  2. Restart Tomcat.
  3. In the above example the demo can be accessed at http://localhost:8080/openvpms-demo based on the name of the webapp folder you created.

To change the basic colour scheme you will need to edit the stylesheet file in the openvpms-demo folder. It can be found in WEB-INF\classes\org\openvpms\web\resource\style folder and is called default.stylesheet.

  1. make a copy of the file in another area justin case you make a mistake :-)
  2. Edit fiel with Notepad or similiar.
  3. To change the basic colour from say Green to Orange do a search and replace for 339933 and replace with FF9900 and save file.
  4. Start and Stop Tomcat to activate new colour scheme.

There are heaps of other changes you can make in the stylesheet but that information is for another day :-)

I hope this helps.

Cheers Tony

 

 

 

 

 

 

Schema Privileges

Thanks for that Tony.

One additional step was for me to use MySQL Administrator, User Administration, selecting the openvpms user account and clicking the Schema Privileges tab and setting the assigned privileges of the new openvpms-demo database to be the same as the existing openvpms one.

I then stopped and started both mysql and tomcat services all was good. After closing and reopening Firefox, http://localhost:8080/openvpms-demo worked and we logged in and the colour scheme was the new colour too.

Excellent

thanks for your help.

Marty

 

Syndicate content