Wondering what are the views on this
We have a CI server that runs some integration tests on the DB server, and well... it just seems wrong to install a database server on the CI server to accommodate that
More info to answer comment: Why is it necessary to do this? This particular part of the tests checks for db schema generation and migrations and runs some methods on top of that.
What CI system are you using? Team City, but I dont think that is a relevant question TBH
Are you concerned about performance if you separate CI from the database serve开发者_开发百科r? not really, thou I do realise that the separation will make the tests run slower which is a bad idea.
I d love to hear other developers views on the subject
If that database only exists in order to run integration tests from the CI build, then it doesn't seem so bad to me. If however, a few months down the line it starts to get repurposed for other means and used by other clients, then well maybe it's worth a rethink.
To be honest though, it doesn't seem like something that can be answered objectively. Lots of other factors play a part - licensing, the spec of the machine, availability of other servers, level of usage of virtulaisation, support policy where you work, etc etc.
If it is working without a hitch then is it something to worry about?
Ideally, you'd have all your "systems" (database, CI, data warehouse, web server, pre-production, etc.) on separate servers since you have the benefits of isolation, performance, and a nice separation of concerns.
However, if your limited to physical machines, there's nothing inherently wrong with having these two items on the same server. You just need to make sure you know how they are interacting and you make sure that neither is hogging up too much of the resources.
I don't necessarily think its a bad idea having the two share the same server, although it does depend very much on your circumstances.
As mentioned, having it on separate servers is the ideal way and makes trouble shooting issues easier.
Why do you need the CI server to be on the DB server? Are you tests tightly coupled to this in some way?
Have you considered virtualizing both? I use http://www.virtualbox.org/ its free and does a great job. You could get the benefits mentioned above and at no extra hardware cost.
This would also allow you to have an easy backup/restore process if the hardware fails, which will most likely happen just before you want to do a test before releasing :-)
HTH
Ralph
I'm not sure I'm following exactly what you are testing.
I would certainly not have my only development DB server on the CI server, because then you can't stress test it without affecting the server. So then, if you are talking about adding yet another development DB server just for running this test during CI processes (and why does it even need to be on the CI server), then you are adding more management, administration and backup.
You could build the database locally for each build. For one of our builds we actually have sql scripts that will create DB, tables and data (importing CSV files) from scratch. We run our integration tests against this database locally.
I think one of the principles of Continuous Integration is that you can take any virgin machine and run the build with a single click.
精彩评论