Configuring Connectors in Bamboo Data Center Docker for Jira Cloud Tunneling
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The Bamboo Data Center Docker container is designed to automatically generate a new server.xml
file from the template server.xml.j2
using environment variables. This process implies that any configurations made in the server.xml
file of the currently running application will be reset to default settings upon restart.
Product version The following steps have been validated in Bamboo Data Center 9.6.3 but may be applicable to other versions.
Solution
Steps to configure the template
Create a mount point for the
server.xml.j2
file. This ensures that the file persists through any changes, allowing updates or modifications to the image without the risk of losing changes.To the Docker creation command, you will need to add the following line:
-v /your-path/server.xml.j2:/opt/atlassian/etc/server.xml.j2 \
Modify the
server.xml.j2
file to include the connector. It should look like this:<Connector port="{{ atl_tomcat_port | default('8085') }}" maxThreads="{{ atl_tomcat_maxthreads | default('150') }}" minSpareThreads="{{ atl_tomcat_minsparethreads | default('25') }}" connectionTimeout="{{ atl_tomcat_connectiontimeout | default('20000') }}" enableLookups="{{ atl_tomcat_enablelookups | default('false') }}" protocol="{{ atl_tomcat_protocol | default('HTTP/1.1') }}" acceptCount="{{ atl_tomcat_acceptcount | default('100') }}" secure="{{ atl_tomcat_secure | default(catalina_connector_secure) | default('false') }}" scheme="{{ atl_tomcat_scheme | default(catalina_connector_scheme) | default('http') }}" proxyName="{{ atl_proxy_name | default(catalina_connector_proxyname) | default('') }}" proxyPort="{{ atl_proxy_port | default(catalina_connector_proxyport) | default('') }}" {%- if atl_tomcat_address %} address="{{ atl_tomcat_address }}" {%- endif %} {%- if atl_tomcat_secret %} secret="{{ atl_tomcat_secret }}" {%- endif %} {%- if atl_tomcat_secret_required %} secretRequired="{{ atl_tomcat_secret_required }}" {%- endif %} {%- if atl_tomcat_bamboo_encryption_key %} {% set bamboo_version_parts = bamboo_version.split('.') %} {%- if bamboo_version_parts[0]|int == 9 and bamboo_version_parts[1]|int >= 5 %} productEncryptionKey="{{ atl_tomcat_bamboo_encryption_key }}" {% elif bamboo_version_parts[0]|int >= 10 %} productEncryptionKey="{{ atl_tomcat_bamboo_encryption_key }}" {%- else %} bambooEncryptionKey="{{ atl_tomcat_bamboo_encryption_key }}" {%- endif %} {%- endif %} {%- if atl_tomcat_ssl_enabled %} SSLEnabled="{{ atl_tomcat_ssl_enabled }}" {%- endif %} {%- if atl_tomcat_ssl_protocol %} sslProtocol="{{ atl_tomcat_ssl_protocol }}" {%- endif %} {%- if atl_tomcat_ssl_certificate_file %} SSLCertificateFile="{{ atl_tomcat_ssl_certificate_file }}" {%- endif %} {%- if atl_tomcat_ssl_certificate_key_file %} SSLCertificateKeyFile="{{ atl_tomcat_ssl_certificate_key_file }}" {%- endif %} {%- if atl_tomcat_ssl_pass %} SSLPassword="{{ atl_tomcat_ssl_pass }}" {%- endif %} {%- if atl_tomcat_keystore_file %} keystoreFile="{{ atl_tomcat_keystore_file }}" {%- endif %} {%- if atl_tomcat_keystore_pass %} keystorePass="{{ atl_tomcat_keystore_pass }}" {%- endif %} {%- if atl_tomcat_key_pass %} keyPass="{{ atl_tomcat_key_pass }}" {%- endif %} {%- if atl_tomcat_client_auth %} clientAuth="{{ atl_tomcat_client_auth }}" {%- endif %} {%- if atl_tomcat_truststore_file %} truststoreFile="{{ atl_tomcat_truststore_file }}" {%- endif %} {%- if atl_tomcat_truststore_pass %} truststorePass="{{ atl_tomcat_truststore_pass }}" {%- endif %} relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>" bindOnInit="false" maxHttpHeaderSize="8192" useBodyEncodingForURI="true" {%- set compression = atl_tomcat_compression | default('off') %} {%- if compression in ['on', 'force'] or (compression.isdigit() and compression | int >= 1) %} compression="{{ atl_tomcat_compression }}" compressibleMimeType="{{ atl_tomcat_compressiblemimetype | default('text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml') }}" compressionMinSize="{{ atl_tomcat_compressionminsize | default('2048') }}" {%- endif %} disableUploadTimeout="true"> <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> </Connector> <Connector port="8093" connectionTimeout="20000" maxThreads="200" minSpareThreads="10" enableLookups="false" acceptCount="10" URIEnconding="UTF-8" />
After establishing the initial connector with the variables, we will hardcode the necessary values for the second connector required for the application tunnel.
Was this helpful?