Custom DNS name for Load Balancer when using AWS CloudFormation

XMLWordPrintable

      Summary

      When setting up Confluence Data Center with AWS Cloudformation template, the Synchrony node always takes the ELB hostname even though the base url was changed on Confluence (including Synchrony service URL)

      Environment

      AWS

      Steps to Reproduce

      1. Setup Confluence Data Center from AWS Cloudformation template
      2. Get both Confluence and Synchrony nodes up and running
      3. Change Confluence base URL to a custom domain specific URL
      4. Update Synchrony service URL from <confluence-install>/bin/setenv.sh
        -Dsynchrony.service.url=https://your-custom-domain
        
      5. Scale down Synchrony node to 0 then back to 1

      Expected Results

      Synchrony node should be able to pick up those changes and set the proxy name and port on Synchrony to the DNS entry instead of the load balancer hostname

      Actual Results

      No changes on Synchrony side, the ELB hostname is still configured as the proxy name

      2017-06-01 17:01:29 === BEGIN: service atl-init-confluence start ===
      2017-06-01 17:01:29 Initialising Atlassian Confluence
      2017-06-01 17:01:29 Checking if Confluence has already been installed
      2017-06-01 17:01:29 Creating file /etc/ld.so.conf.d/confluence.conf
      2017-06-01 17:01:30 Creating file /etc/ld.so.conf.d/confluence.conf ==> done
      2017-06-01 17:01:30 Downloading Confluence 6.1.1 from https://s3.amazonaws.com/atlassian-software/releases/confluence/atlassian-confluence-6.1.1-linux-x64.bin
      2017-06-01 17:02:14 Creating Confluence install directory
      2017-06-01 17:02:14 Installing Confluence to /opt/atlassian/confluence
      Unpacking JRE ...
      Starting Installer ...
      Jun 01, 2017 5:02:16 PM java.util.prefs.FileSystemPreferences$1 run
      INFO: Created user preferences directory.
      The installation directory has been set to /opt/atlassian/confluence.
      [?7hExtracting files ...
      Jun 01, 2017 5:02:29 PM com.atlassian.modzdetector.HashRegistry store
      INFO: wrote 925 hashes to /opt/atlassian/confluence/install.reg
      Finishing installation ...
      2017-06-01 17:02:29 Installed Confluence to /opt/atlassian/confluence
      2017-06-01 17:02:29 Cleaning up
      2017-06-01 17:02:29 Confluence installation completed
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <xsl:output omit-xml-declaration="yes" indent="yes"/>
      
          <xsl:template match="@*|node()">
              <xsl:copy>
                  <xsl:apply-templates select="@*|node()"/>
              </xsl:copy>
          </xsl:template>
      
          <xsl:template match="/Server/Service/Connector[@port='8080' and not(@proxyName)]">
              <xsl:copy>
                  <xsl:apply-templates select="@*|node()"/>
                  <xsl:attribute name="secure">true</xsl:attribute>
                  <xsl:attribute name="scheme">https</xsl:attribute>
                  <xsl:attribute name="proxyName">Confl-LoadB-XXXXX-XXXXX.us-west-2.elb.amazonaws.com</xsl:attribute>
                  <xsl:attribute name="proxyPort">443</xsl:attribute>
              </xsl:copy>
          </xsl:template>
      </xsl:stylesheet>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <xsl:output omit-xml-declaration="yes" indent="yes"/>
      
          <xsl:template match="@*|node()">
              <xsl:copy>
                  <xsl:apply-templates select="@*|node()"/>
              </xsl:copy>
          </xsl:template>
      
         
          <xsl:template match="/Server/Service[not(Connector[@port='8081'])]">
               <xsl:copy>
                  <xsl:apply-templates select="@*|node()"/>
                  
                  <Connector port="8081" protocol="HTTP/1.1"
                         maxHttpHeaderSize="65536"
                         URIEncoding="UTF-8"
                         connectionTimeout="20000"
                         useBodyEncodingForURI="true"
                         compression="on"
                         compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />
              </xsl:copy>
          </xsl:template>
      </xsl:stylesheet>
      2017-06-01 17:02:29 Updated server.xml for host name change to Confl-LoadB-XXXXX-XXXXX.us-west-2.elb.amazonaws.com, secure=true, scheme=https, proxyPort=443
      2017-06-01 17:02:29 Updating web.xml to redirect HTTP to HTTPS.
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <xsl:output omit-xml-declaration="yes" indent="yes"/>
      
          <xsl:template match="@*|node()">
              <xsl:copy>
                  <xsl:apply-templates select="@*|node()"/>
              </xsl:copy>
          </xsl:template>
      
         
           <xsl:template match="/*[name() = 'web-app' and not(./*[name() = 'security-constraint'])]">
               <xsl:copy>
                  <xsl:apply-templates select="@*"/>
                  <security-constraint>
                      <web-resource-collection>
                          <web-resource-name>HTTPSOrHTTP</web-resource-name>
                          <url-pattern>/status*</url-pattern>
                      </web-resource-collection>
                      <user-data-constraint>
                          <transport-guarantee>NONE</transport-guarantee>
                      </user-data-constraint>
                  </security-constraint>
                  <security-constraint>
                      <web-resource-collection>
                          <web-resource-name>HTTPSOnly</web-resource-name>
                          <url-pattern>/*</url-pattern>
                      </web-resource-collection>
                      <user-data-constraint>
                          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
                      </user-data-constraint>
                  </security-constraint>
                  <xsl:apply-templates select="node()"/>
              </xsl:copy>
          </xsl:template>
      </xsl:stylesheet>
      

            Assignee:
            Duy Truong Luong
            Reporter:
            Rudy Slaiby
            Votes:
            2 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: