Configure DC/OS for Proxy

Configure DC/OS for Proxy

By default the DC/OS Universe repository is hosted on the internet. The DC/OS OAuth Service must have access to dcos.auth0.com to fetch the required public key via HTTPS to validate access tokens. If your DC/OS cluster is behind a corporate proxy, you must update your configuration post-installation to fetch the Universe packages and OAuth service to work.

Configure DC/OS Master node

  1. Create /var/lib/dcos/ directory if it doesn’t exist and add the following variables in the file /var/lib/dcos/environment.proxy:

    http_proxy=http://<user>:<pass>@<proxy_host>:<http_proxy_port>
    https_proxy=https://<user>:<pass>@<proxy_host>:<https_proxy_port>
    no_proxy=".mesos,.thisdcos.directory,.dcos.directory,.zk,127.0.0.1,localhost"
    

    If you are not sure about the values for http_proxy and https_proxy variables for your environment, contact your system administrator.

    If you have any hosts or domains you would like to bypass the proxy you can add them to the no_proxy variable like this: no_proxy=".mesos,.thisdcos.directory,.dcos.directory,.zk,127.0.0.1,localhost,foo.bar.com,.baz.com"

  2. Restart the Cosmos service for the changes to take effect.

    sudo systemctl restart dcos-cosmos
    
  3. Edit the unit file /opt/mesosphere/active/dcos-oauth/dcos.target.wants_master/dcos-oauth.service to add a line EnvironmentFile=-/var/lib/dcos/environment.proxy just after EnvironmentFile=/opt/mesosphere/environment.

  4. Do a daemon-reload so that changes in the util file are registered.

    sudo systemctl daemon-reload
    
  5. Restart the Oauth service for the changes to take effect.

    sudo systemctl restart dcos-oauth
    

Configure DC/OS Private Agent Node

  1. Create /var/lib/dcos/ directory if it doesn’t exist and add http_proxy, https_proxy, and no_proxy lines from above in the file /var/lib/dcos/mesos-slave-common.
  1. Restart the Mesos Agent service for the changes to take effect.

    sudo systemctl restart dcos-mesos-slave
    

Configure DC/OS Public Agent Node

  1. Create /var/lib/dcos/ directory if it doesn’t exist and add http_proxy,https_proxyandno_proxylines from above in the file/var/lib/dcos/mesos-slave-common`.
  1. Restart the Mesos Agent service for the changes to take effect.

    sudo systemctl restart dcos-mesos-slave-public