Dynamic cloud-based build agents and server registration

Comments

6 comments

  • Avatar
    Marco Abis

    Hi Bret,

      indeed it's already possible and we have quite a few customers doing exactly this in both private and public clouds. You should be able to do everything you need in order to provision (and decommission) agents programmatically without using the web interface in the agents APIs.

    Some (e.g. deleting an agent) were added after version 12.2.2 and I really encourage you to upgrade, not only because you are missing out on the first step of the dashboard refresh and great new features like Value Stream Maps and Custom Commands Repository but also because 12.2.2 is out of support now.

    You can see a list of all the new features, enhancement and bug fixes since 12.2.2 on the What's New page.

    Hope it helps

    P.S.: just so you know we are likely to release the minor version 13.2.1 by the end of the month

    Marco

     

     

    0
    Comment actions Permalink
  • Avatar
    Brett Cave

    Awesome, thanks for the feedback Marco. Scheduling an upgrade into tracker now.

     

    0
    Comment actions Permalink
  • Avatar
    Marco Abis

    You are welcome, please do let us know how it goes and if we can help more.

    One thing you want to read about upgrading is a one-time change we made with Go 12.3, it's not absolutely required, everything will keep working even if you don't do this step but it's recommended you do it, even at a later stage: Changes In v12.3 Go Agents

     

    Marco

     

     

    0
    Comment actions Permalink
  • Avatar
    Brett Cave

    Marco, we have upgraded and are now running 13.2.2.

    a few questions:

    1. Can you repost a link on agent api? The link above has moved and I'm not sure how to preconfigure agents with specific environments / resources automatically.
    2. We are migrating from a local Go server to a cloud-based server. I shut down the go-agent, deleted the config directory, updated the config file (/etc/default/go-agent) and started the agent again.  It fails due to SSL exceptions:

    [loopThread] ERROR thoughtworks.cruise.agent.AgentController:131 - There has been a problem with one of Go's SSL certificates. This can be caused by a man-in-the-middle attack, or by pointing the agent to a new server, or by deleting and re-installing Go Server. Go will ask for a new certificate. If this fails to solve the problem, try deleting config/trust.jks in Go Agent's home directory.
    javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
            at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1708)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1691)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1617)
            at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:105)
            at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
            at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
            at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:827)
            at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1525)
            at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1975)
            at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
            at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
            at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
            at com.thoughtworks.cruise.agent.service.SslInfrastructureService.checkForUpgrade(SslInfrastructureService.java:109)
            at com.thoughtworks.cruise.agent.service.SslInfrastructureService.registerIfNecessary(SslInfrastructureService.java:87)

     

    What is the recommended process for changing Go servers? The cloud-based server was provisioned / configured by restoring a backup of our local go server installation.

    0
    Comment actions Permalink
  • Avatar
    Brett Cave

    (i'm find with agent api, its in the docs on the server).

    0
    Comment actions Permalink
  • Avatar
    Brett Cave

    Resolved! We were running the Go server behind an ELB (in AWS), and had configured the ELB with HTTPS listener with our own certificate -> HTTPS on the Go server. The error was caused by CA issues.

    By changing the load balancer from HTTPS on port 8154 -> HTTPS on port 8154 to TCP:8154->TCP:8154, the agent registration started working

    0
    Comment actions Permalink

Please sign in to leave a comment.