Environment proxy server configuration

2 minute read

In your environment, proxy servers might exist between an intranet and internet. Because proxy servers can inhibit certain types of internet access, you may need to set proxy settings for each impacted machine in your installation. CloudBees CD servers or web servers can be deployed behind a proxy server.

It is not a common practice to place repository servers or agent systems behind a proxy server since these systems communicate with CloudBees CD through an intranet connection.

Configuring proxy settings for servers

  • Web server

    ecconfigure --webProxyUrl \https://<IP_ADDRESS:PORT> \ --webNoProxyHosts <HOST1,HOST2,HOST3>
  • CloudBees CD server

    HTTP:

    ecconfigure --serverProxyHost <IP_ADDRESS_PROXY> \ --serverProxyPort <PORT> \ --serverNoProxyHosts "<HOST1,HOST2>"

    Where:

    <IP_ADDRESS_PROXY> is the IP address of the proxy server,

    <PORT> is the server port for the proxy server, and

    <HOST1,HOST2> is one or more comma separated host names for the servers in the configuration.

    HTTPS:

    • In wrapper.conf, set the following:

      Linux: /opt/electriccloud/electriccommander/conf/agent/wrapper.conf

      Windows: C:\ProgramData\Electric Cloud\ElectricCommander\conf\agent\wrapper.conf

      wrapper.java.additional.700=-Djava.net.useSystemProxies=true wrapper.java.additional.710=-Dhttps.proxyHost=35.237.115.111 wrapper.java.additional.711=-Dhttps.proxyPort=34128
    • Import the HTTPS proxy certificate into the CloudBees CD server Java trust store:

      (Linux) cd /opt/electriccloud/electriccommander/jre/lib/security (Windows) cd C:\ProgramData\Electric Cloud\ElectricCommander\jre\lib\security keytool -importcert -file /tmp/CA_crt.pem -keystore cacerts -alias myArtifactory
Restart all the servers where you have applied a proxy setting. Proxy settings do not take effect until the servers are restarted.

Testing server proxy settings

Use the following task to verify your proxy server settings.

  • From the Plugin Manager web page, verify the configuration:

    • Web server: Verify the catalog can be viewed and no errors are reported when accessing the catalog URL.

    • CloudBees CD server: Verify you can install a plugin from the catalog.

Configuring proxy agents

Use ecconfigure to set proxy settings for any agent system that is deployed behind a proxy server. A proxy server is not usually placed between agents and a CloudBees CD server.

When you use a proxy agent, the proxy target must run an SSH v2 server.

Run the following command to set agent proxy settings:

ecconfigure --agentProxyHost <IP_ADDRESS_PROXY> \ --agentProxyPort <PORT> \ --agentNoProxyHosts "<HOST1,HOST2>"

Where:

<IP_ADDRESS_PROXY> is the IP address of the proxy server,

<PORT> is the server port for the proxy server, and

<HOST1,HOST2> is one or more comma separated host names for the servers in the configuration.