Setting up dev/testing databases for an inherited project

Here’s my situation, I’m new and have inherited a Ignition project that is already very developed.

I want to be able to test it on my dev and testing servers.

I realized all the queries made in the project do directly point to the production database by name (not just letting it be default/not picking from the database dropdown).

Right now the way I am testing is on my test server, I point to the testing database, but had to name it the same as the production database on the production server. This works, but it feels dangerous and liable to someone accidentally restoring a gateway, actually connecting to the production from the testing server and then I’ll have a mess on my hands.

Is there any other way I can get around this or handle this?

Do you mean the testing database has to have the same hostname? I agree that could be bad. But having the same connection name on the test Ignition instance point to a different DB hostnames seems the correct approach to me. You want the project/window/resource to work in production simply by tranferring it unchanged from the testing server.

1 Like

Yes it appears to me the testing database needs to have the same database name. In the project instead of leaving the option to be the default gateway database, it was specifically chosen by name in every or at least most queries. So right now in the testing server, I renamed the production db connection and I named the testing database what the production is called so all is working and I am getting the test data.

As long as I don’t do any gateway restores, this should be fine going forward yes?

Consider blocking network access from the testing Ignition server to the production database server so that a production backup loaded in to the testing server will have faulted connections. If not completely isolating the testing environment.

Is this something that can be done inside Ignition/Gateway or has to be done via my database software?

I would do it at the router level – simply do not allow traffic from the testing ignition server to the production database server.

1 Like

Thanks for the help!