I'm trying to figure out the best way to stitch together a fast, repeatable, unbreakable build process for the following environment. I've got a plan for how to do it, but I'd really appreciate a critique. (I'd also appreciate some sample code, but more on that later)
All of these machines can talk to one another, except for Hudson. Hudson can't see any of the target machines. So code must be pulled, rather than pushed. (Security thing)
1. Web Server - Holds the website, and the read/write api. (The api itself writes to a replicated sql server environment).
2. Search Server - Houses the search api.
3. Hudson Server - Does not have permissions to push to any environment. They have to pull.
4. Lucene Server
5. Database Server
I've been trying to set this site up to run in a stress environment, but the number of setup steps, the amount of time it takes to update a component, the black-box nature of the current installers, and the time it takes to generate data into the test system is absolutely destroying my productivity. I tweak one setting, have to redeploy, restart in a certain order, resetup some of the settings, and rebuild test data. Errors result in headscratching, and then basically starting over. Very bad.
This problem is complicated further by my stress testing. I need to be able to turn on and off different external components, so that I can effectively determine the scalability of each piece. I've got strategies in place for how to do that for each dependency, but it further complicates my setup strategy, because now each component has 2 options. A mock version, or a real version. Configurations everywhere must be updated accordingly.
Here's what I've come up with so far, and what I've come looking for feedback on:
So that's it. I'm in a real time crunch to get this site stress-tested, so any feedback that you think could abbreviate the time this might take would be appreciated. That includes a shameless request for sample ruby code. I've not gotten too much further than puts "Hello World". :-) Just guidance would be helpful. Is this something that Rake would be useful for? How would you recommend I write tests for this animal? (I use interfaces and automocking frameworks to mock out things like http requests in .net. With ducktyping, it seems that this might be easier, but I don't know how to tell my code to use a fake duck in test, but a real one in practice)
Thanks all. Sorry for such such a long-winded, open-ended question.
I would recommend two things:
Centralize your configuration in a replicated, fault-tolerant repository, like ZooKeeper, CouchDB, etc. You can put all the information needed to bootstrap your various environments in this system, such that the only config you need for an individual component is the location of this repository. This will dramatically improve the scalability of your environment.
Use something like Puppet for deployment & server management. It will ensure that all your machines are in the proper state at any given time, and it will allow for easy deployment. It's incredibly powerful and will make your life much easier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With