title: Building and deploying on a remote windows server using Bamboo
body: <p>I'm hoping people might be kind enough to point me in the right direction with a Bamboo query I have, please.</p>
  
  <p>The company I'm at has an existing Bamboo CI server that's running quite successfully (despite being an old version - 2.6) and I need to set up a new build. The two people who've done almost all of the previous Bamboo work have now left, and so I don't really have anyone internally to turn to for advice.</p>
  
  <p>I was hoping I could describe the manual process, and then have someone suggest the best way to automate this.</p>
  
  <p>Manual process (all on the Windows deployment server):</p>
  
  <ol>
  <li>Run "svn update --force" on six separate working directories, which in turn use two separate Subversion repositories</li>
  <li>Run "mvn clean install" on all six directories, with one of them needing an extra -Duser.timezone parameter passed in, and which sometimes needs running two or three times before it builds successfully</li>
  <li>Run a "DeployLocal.bat" batch file</li>
  <li>Start two JBOSS instances, by executing their "bin\run.bat" startup files</li>
  </ol>
  
  <p>The batch file itself can be broken down into several steps:</p>
  
  <ol>
  <li>Do a Maven build of some of the projects (yes, redundant after the above)</li>
  <li>Copy some build subdirectories to the deployment server location</li>
  <li>Set up self-signed SSL certificates and keystores for the deployment servers</li>
  <li>Copy lots more files into the right place in the deployment server directories</li>
  </ol>
  
  <p>I'm not sure how this best works with our Bamboo server. I started creating a new plan, but when it asked which repository to use (we're using two servers and six repositories) I started to get mightily confused!</p>
  
  <p>If I understand correctly - which I may not - I believe that the normal thing to do would be to do all the building on the Bamboo server and then move files to the right place on the servers, before calling some remote startup command. Is this what I need to do here?</p>
  
  <p>Even if someone can point me to a good guide to Bamboo, I'd be very appreciative. If someone can explain the concepts briefly enough for me to understand what specifically I need to learn to achieve, then that'd be even better!!</p>
  
  <p>Advice much appreciated :)</p>