Development/Test environment?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
kbosscawen
Member
Posts: 71
Joined: Thu Jul 03, 2003 8:53 am
Location: Raleigh, NC
Contact:

Development/Test environment?

Post by kbosscawen »

I did a search and didn't find an answer - I apologize if this has already been asked/answered...



What's the easiest way to set up a development/test environment and a production environment for HB on the same PC? Are there any command line switches or anything that would point the HB executable to a different path depending on whether you wanted test or production?



Thanks.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

There's really no easy way to do this. I run my production on another machine to make sure it is truly isolated from the development environment.



It may not be difficult to implement. Most of the directory/location settings are stored in the system registry. I may be able to add an option to specify the registry key to use. This would allow you to have separate configurations using a command line switch.



This may have to wait for 2.0, since it's a feature request.
Scott
kbosscawen
Member
Posts: 71
Joined: Thu Jul 03, 2003 8:53 am
Location: Raleigh, NC
Contact:

Post by kbosscawen »

I've gone ahead and set up two reg files that change the following keys:



HKEY_LOCAL_MACHINE\SOFTWARE\CEBotics\HouseBot\General Settings]

"Database Name"="C:\\Program Files\\HouseBot\\Config\\HBData.mdb"

"Root Application Directory"="C:\\Program Files\\HouseBot\\"



Can you think of any other keys that I need to be concerned with?
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

I think those should be the main ones. If you want other configuration differences between the two, you will obviously need to include more values.



Let me know how this works for you. Before I start the 2.0 development, I may include a more formal way of setting this to allow me to maintain any 1.6 issues as time goes on.
Scott
kbosscawen
Member
Posts: 71
Joined: Thu Jul 03, 2003 8:53 am
Location: Raleigh, NC
Contact:

Post by kbosscawen »

So far, so good. I haven't run into any problems switching back and forth, other than things that are specifically defined in a device or a theme (ie, a the path to the script that a Script device points to, the path to a graphic on a theme, etc.).
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

I have a related question which is how to setup a distributed development environment - i.e. I would like to setup my device and themes on my laptop while the server is running on my HTPC. The HouseBot directory on my HTPC is network shared with my laptop so I can access the config files from either machine.



Should I install a separate HouseBot server on my laptop and setup device replication? Should I install HouseBot on my laptop in the same shared directory where it is already installed on the HTPC? Should I export/import the configuration file each time I move from development to production? Any other ideas?



Thanks,

Alan
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Alan,



Don't use Device replication unless you are truly using Devices on both machines. That means that maybe you have some Software Devices or Hardware Interfaces that are on both machines but you want to have controllable through a single Theme/SW Remote.



Importing / Exporting is the only *real* way that is supported by HouseBot. However, it is a replicated environment and not distributed.



I've not tried this, so this is only a suggestion, but you could play around with a couple of registry settings after you have installed HouseBot on both machines. On the 'remote' machine, try changing thE HKEY_LOCAL_MACHINE\SOFTWARE\CEBotics\HouseBot\General Settings\Database Name value to point to the source machine.



You may also be able to change the HKEY_LOCAL_MACHINE\SOFTWARE\CEBotics\HouseBot\General Settings\Root Application Directory value to point to the remote machine as well.



I don't know if you can use a UNC name for the settings (I've not tried it), or whether you would need to map the remote drive.
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

Awesome Scott, thanks for the quick reply. I changed both registry strings using the UNC names of the server installation and it worked great. Now I can make changes on my laptop and when I run a software remote that connects to the server it automatically picks up the changes - I don't even need to restart the server. Nice!



Thanks,

Alan
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

It's good to know that works.



Theme configurations are stored in separate XML files, so they will be picked-up automatically by the SW Remotes regardless of which machine made the change. You have to be careful not to have the same Theme open on both machines, or you may save an older version over a newer one.



If you are mainly making changes to Themes, you should be ok. However, I think you may get into some real problems if you start adding things (Devices, Modes, Tasks) on each system separately. It may not crash, but it was not really designed to handle the shared database.



You might want to backup your database frequently until you are comfortable with the solution :wink:
Scott
yaccri
HouseBot Special Member
Posts: 304
Joined: Wed May 07, 2003 2:19 pm
Location: Tel-Aviv, Israel
Contact:

Post by yaccri »

Scott,



If these changes are all it takes to switch between configurations, maybe this should be a solution for keeping multiple configurations. I think there was a feature request for that, and I join that request. If you can make a user-friendly interface, it would be great. I'll be happy to help with the testing.



Yoram
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Although this does work to some degree, there's still a risk if updating the system from multiple systems simultaneously. I realize that that would not be the case for must people in that they are probably only updating Themes. However, I'm hesitant to add a feature that will only cause trouble for folks.



I'm still thinking about how to do it better, but in the interim, this is a good hack.
Scott
Post Reply