English 中文(简体)
在联合执行的演播室中为Bamboo创建一个Windows AMI,用于建筑
原标题:Creating a Windows AMI for Bamboo in JIRA Studio for builds

Prerequisites I have:
- JIRA Studio (hosted)
- with Bamboo 3.0.4
- ami-1cbd4475

我假定,我必须安装Bamboo遥控器(有些是焦耳机)到这个视窗。 但是,我也找不到任何与代理安装的联系(见http://confluence.atlassian.com/display/BAMB/Creating+a+Remote+Agent”rel=“nofollow” http://confluence.atlassian.com/display/BAMB/Creating+a+Remote+Agent)。 我的假设是否完全正确?

Can anyone describe the process of setting up Windows AMI for Bamboo?

问题回答

Successfully installed it by myself. Thanks to internet and guys from Atlassian. So below are the steps I did.

To install an elastic agent on Windows AMI

  • Launch and RDP into any desirable Amazon Windows Image instance
  • Change Admin password at once
  • Install Google Chrome (for convenience)
  • Install Far Manager (for convenience)
  • Install the latest JDK
    • Update PATH to point to Java bin directory. If everything is ok, then java -version command should give you the version of Java
  • Download appropriate version of the agent from Atlassian
    • An elastic agent for Bamboo 3.0.4 can be found here
  • Extract the content of the zip into c:amboo-elastic-agent
    • Update PATH to point to c:amboo-elastic-agentin
    • Create folder c:amboo-agent-home
    • Create a file launch-bamboo.bat in c:amboo-elastic-agentin with the following contents

@echo off 
setlocal enabledelayedexpansion 
set BIN_PATH=%~dp0 
set OLD_PWD=%CD% 
cd %BIN_PATH% 
for %%J in ("..lib*.jar") do (
if defined CLASSPATH (
set CLASSPATH=!CLASSPATH!;%%J) else set CLASSPATH=%%J)

@echo on 

java -server -Xms32m -Xmx512m -XX:MaxPermSize=256m -classpath %CLASSPATH% -Dbamboo.home=C:amboo-agent-home com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap 2>&1 > C:amboo-agent-homeamboo-elastic-agent.log
@echo off
cd %OLD_PWD% 
set OLD_PWD=
  • Try to launch launch-bamboo.bat manually

    • If everything is configured fine, you either should get nothing in the output and agent logs or get something like this

          C:amboo-elastic-agent in>java -server -Xms32m -Xmx512m -XX:MaxPermSize=256m -classpath ..libacegi-security-1.0.4.jar;..libactivation-1.1.1.jar;..libactiveio-core-3.1.2.jar;..libact
          ivemq-core-5.3.2-atlassian-1.jar;..libactivemq-protobuf-1.0.jar;..libactivemq-ra-5.3.2.jar;..libannotations-6.0.5.jar;..libant-1.7.1.jar;..libant-launcher-1.7.1.jar;..libantlr-2.7.
          7.jar;..libantlr-runtime-3.1.3.jar;..libaopalliance-1.0.jar;..libaspectjrt-1.6.9.jar;..libaspectjweaver-1.6.9.jar;..libatlassian-aws-0.15.jar;..libatlassian-bamboo-agent-bootstrap-
          3.0.4.jar;..libatlassian-bamboo-agent-core-3.0.4.jar;..libatlassian-bamboo-agent-elastic-3.0.4.jar;..libatlassian-bamboo-agent-remote-3.0.4.jar;..libatlassian-bamboo-api-3.0.4.jar;..l
          ibatlassian-bamboo-core-3.0.4.jar;..libatlassian-bamboo-license-3.0.4.jar;..libatlassian-bandana-3.1.jar;..libatlassian-bonnie-3.4.1.jar;..libatlassian-bucket-0.17.jar;..libatlassia
          n-cache-api-1.0.jar;..libatlassian-config-0.9.jar;..libatlassian-cookie-tools-2.0.jar;..libatlassian-core-4.5.3.jar;..libatlassian-event-2.1.0.jar;..libatlassian-extras-2.4.jar;..li
          batlassian-johnson-1.0.jar;..libatlassian-mail-1.9.jar;..libatlassian-plugins-core-2.6.4.jar;..libatlassian-plugins-osgi-2.6.4.jar;..libatlassian-plugins-osgi-events-2.6.4.jar;..lib
          atlassian-plugins-servlet-2.6.4.jar;..libatlassian-plugins-spring-2.6.4.jar;..libatlassian-plugins-webfragment-2.6.4.jar;..libatlassian-plugins-webresource-2.6.4.jar;..libatlassian-pro
          filing-1.8.1.jar;..libatlassian-secure-random-1.0.jar;..libatlassian-seraph-2.4.0.jar;..libatlassian-spring-1.3.jar;..libatlassian-trusted-apps-core-2.1.jar;..libatlassian-trusted-ap
          ps-seraph-integration-2.1.jar;..libatlassian-tunnel-0.4.jar;..libatlassian-user-1.9.jar;..libatlassian-util-concurrent-0.0.12.jar;..libatlassian-velocity-0.5.jar;..libatlassian-xwork
          -12-1.10.jar;..libatlassian-xwork-core-1.10.jar;..libaxis-1.4.jar;..libaxis-jaxrpc-1.4.jar;..libaxis-saaj-1.4.jar;..libaxis-wsdl4j-1.5.1.jar;..libackport-util-concurrent-2.1.jar;.
          .libcmail-jdk15-1.44.jar;..libcprov-jdk15-1.44.jar;..libndlib-0.0.255.jar;..libcommons-beanutils-1.8.3.jar;..libcommons-codec-1.3.jar;..libcommons-collections-3.2.1.jar;..libc
          ommons-configuration-1.4.jar;..libcommons-dbcp-1.2.jar;..libcommons-digester-1.8.jar;..libcommons-discovery-0.2.jar;..libcommons-httpclient-3.0.1.jar;..libcommons-io-1.4-backport-IO-
          168.jar;..libcommons-jxpath-1.2.jar;..libcommons-lang-2.5.jar;..libcommons-logging-1.0.4.jar;..libcommons-pool-1.4-RC2-atlassian-1.jar;..libdom4j-1.4.jar;..libehcache-1.6.0-atlassi
          an-3.jar;..libexml-7.0.jar;..libfontbox-1.2.1.jar;..libfreemarker-2.3.16-atlassian-4.jar;..libgeronimo-connector-2.0.1.jar;..libgeronimo-j2ee-connector_1.5_spec-2.0.0.jar;..libgero
          nimo-j2ee-management_1.1_spec-1.0.1.jar;..libgeronimo-jms_1.1_spec-1.0.jar;..libgeronimo-jta_1.1_spec-1.0.jar;..libgeronimo-transaction-2.0.1.jar;..libgoogle-collections-1.0.jar;..lib
          hibernate-2.1.8-atlassian-9.jar;..libhowl-1.0.1-1.jar;..libhsqldb-1.8.0.7.jar;..libicu4j-3.8.jar;..libisorelax-20020414.jar;..libjavacvs-atlassian-20080407.jar;..libjavassist-3.6.
          ga.jar;..libjaxb-api-2.1.jar;..libjaxb-impl-2.1.10.jar;..libjaxen-1.1-beta-9.jar;..libjcip-annotations-1.0.jar;..libjcl-over-slf4j-1.5.8.jar;..libjdom-1.0.jar;..libjempbox-1.2.1.
          jar;..libjencks-2.1.jar;..libjencks-amqpool-2.1-atlassian-1.jar;..libjira-soapclient-4.0.jar;..libjmock-1.0.1.jar;..libjms-1.1.jar;..libjna-3.2.7.jar;..libjoda-time-1.6.jar;..li
          bjsch-0.1.38.jar;..libjta-1.0.1B.jar;..libjunit-4.5.jar;..libkahadb-5.3.2.jar;..libldaptemplate-1.0.1.jar;..liblingo-1.3.jar;..liblog4j-1.2.15.jar;..liblucene-analyzers-2.3.2.ja
          r;..liblucene-core-2.3.2.jar;..libmail-1.4.1.jar;..libmockobjects-alt-jdk1.3-j2ee1.3-0.09.jar;..libmsv-20020414.jar;..libodmg-3.0.jar;..libognl-2.7.3-atlassian-3.jar;..liborg.apa
          che.felix.framework-3.0.2.jar;..liboro-2.0.8.jar;..liboscore-2.2.7.jar;..libosuser-1.0-20060106.jar;..libp4java-0.7.5-atlassian-5.8.jar;..libpackage-scanner-0.9.4.jar;..libpdfbox-1
          .2.1.jar;..libplexus-utils-1.5.9.jar;..libpoi-3.5-FINAL.jar;..libpoi-scratchpad-3.5-FINAL.jar;..libpropertyset-1.3-21Nov03.jar;..libquartz-1.6.5.jar;..lib
      elaxngDatatype-20020414.j
          ar;..lib
      ife-continuations-0.0.2.jar;..lib
      ome-1.0.jar;..libsal-api-2.2.1.jar;..libsal-spi-2.2.1.jar;..libsal-spring-2.2.1.jar;..libsaxpath-1.0-FCS.jar;..libservlet-api-2.5.jar;.
          .libsitemesh-2.2.1.jar;..libslf4j-api-1.5.8.jar;..libslf4j-log4j12-1.5.8.jar;..libsmack-3.0.4.jar;..libsmackx-3.0.4.jar;..libspring-aop-2.0.7.jar;..libspring-beans-2.0.7.jar;..l
          ibspring-context-2.0.7.jar;..libspring-core-2.0.7.jar;..libspring-dao-2.0.7.jar;..libspring-hibernate2-2.0.7.jar;..libspring-jdbc-2.0.7.jar;..libspring-jms-2.0.7.jar;..libspring-m
          ock-2.0.7.jar;..libspring-remoting-2.0.7.jar;..libspring-support-2.0.7.jar;..libspring-web-2.0.7.jar;..libsqljet-1.0.4.jar;..libstax-api-1.0-2.jar;..libstringtemplate-3.2.jar;..li
          bsvnkit-1.3.5.7539.jar;..lib	rilead-ssh2-build213-svnkit-1.3-patch.jar;..lib	ypica-1.6.jar;..libvelocity-1.4.jar;..libwebwork-2.2.7-atlassian-5.jar;..libwsdl4j-1.6.1.jar;..libxapo
          ol-without-pool-1.4.jar;..libxbean-spring-3.2.jar;..libxercesImpl-2.9.1.jar;..libxfire-core-1.2.6.jar;..libxml-apis-1.3.03.jar;..libxmlParserAPIs-2.6.2.jar;..libXmlSchema-1.1.jar;.
          .libxpp3_min-1.1.4c.jar;..libxstream-1.3.1.jar;..libxwork-1.2.5-atlassian-2.jar -Dbamboo.home=C:amboo-agent-home com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap 2>&1 1
          >C:amboo-agent-homeamboo-elastic-agent.log
          java.io.FileNotFoundException: http://169.254.169.254/2008-02-01/user-data
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
          at java.net.URL.openStream(Unknown Source)
          at com.atlassian.urlfetcher.URLFetcherImpl.fetchSerializedObject(URLFetcherImpl.java:16)
          at com.atlassian.aws.ec2.EC2Utils.getUserData(EC2Utils.java:69)
          at com.atlassian.bamboo.agent.elastic.client.ElasticAgentBootstrap.main(ElasticAgentBootstrap.java:41)
      
    • If you get an error saying: Error: no server JVM at C:Program FilesJavajre6inserverjvm.dll, then copy C:Program FilesJavajdk1.6.0jrein to C:Program FilesJavajre1.6.0in

  • Download NSSM to configure the batch file to be launched as a service
    • Extract
    • launch with nssm.exe install bamboo-agent
    • enter path c:amboo-elastic-agentinlaunch-bamboo.bat
    • done
  • Make sure service bamboo-agent is configured to be launched automatically in the Windows Service Manager
    • input services.msc in cmd
    • check bamboo-agent service launch as automatic
  • Configure Firewall to allow port 26224
    • Or set in Advanced firewall options to log dropped packets
    • Stop instance
    • Create temp AMI
    • Launch this temp AMI from Bamboo
    • Login via RDP to the instance of this temp AMI
    • Review the blocked ports
    • Find out the number of the Bamboo port that is blocked
    • Terminate the instance of the temp AMI
    • Deregister temp AMI
    • Resume stopped original instance
    • Configure firewall to allow this port
  • Stop the Instance at Amazon Console
    • Don t confuse it with Terminate. You should just either Stop the instance on Console or make a regular Windows Shutdown via RDP
  • Create AMI of this stopped instance in Amazon Console
    • You may Terminate the stopped instance after AMI is created




相关问题
SimpleDB vs Tokyo Cabinet

Has anybody compared SimpleDB and Tokyo Cabinet for performance and scalability? I m coding my project against SimpleDB at the moment and considering benchmarking TC, be nice if somebody had already ...

How to make visual studio 2008 deploy to ftp in ACTIVE mode?

I m using Amazon EC2 services and would like to publish my WCF application to this server using the visual studio 2008. Instead of opening so many ports on the amazon firewall, I ll use the ftp ACTIVE ...

Passenger and Rails on Scalr.net

I m having an issue with Passenger and Rails working together on my Scalr application server. I have Rails 2.3.5 installed and Passenger 2.2.7. I am running ruby 1.8.6 (patchlevel 111). Previous ...

Many users, many cpus, no delays. Good for cloud?

I wish to set up a CPU-intensive time-important query service for users on the internet. A usage scenario is described below. Is cloud computing the right way to go for such an implementation? If so, ...

Homemade cheap and cheerful clustering with MySQL+EC2?

I ve got a Java web service backed by MySQL + EC2 + EBS. For data integrity I ve looked into DRBD, MySQL cluster etc. but wonder if there isn t a simpler solution. I don t need high availability (can ...

What s a good way to collect logs from Amazon EC2 instances?

My app is hosted on an Amazon EC2 cluster. Each instance writes events to log files. I need to collect (and data mine) over these logs at the end of each day. What s a recommended way to collect these ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Need some help choosing between Amazon EC2 and VPS [closed]

At my company we are looking at hosting a blog and a CMS . We are still in the process of building the product and havent made it live yet. We are looking at some hosting options. We need to have ...

热门标签