Use an Internet Proxy
If you are behind a forward proxy server and need to perform tasks that access the internet (such as installing MyST Studio), you will need to setup the forward proxy server settings.
Note: Throughout this article the '' character is sometimes escaped as '%5c'.
Forward Proxy Configurations
Shell
Note: This level of configuration is for the current shell only, you can permanently apply this configuration in ~/.bashrc or ~/.bash_profile.
Steps
Testing HTTP
If the file is downloaded successfully, the proxy configuration is setup correctly. Now you can remove the file.
Testing HTTPS
If the file is downloaded successfully, the proxy configuration is setup correctly. Now you can remove the file.
Yum
Note: This level of configuration is for yum only.
Steps
Testing
Install xclock to test yum internet connectivity.
Docker
Note: This level of configuration is for the docker service only and doesn't automatically apply the proxy configuration to the docker container (e.g. /bin/bash).
Steps
Note: The no_proxy configuration is not required here. The docker service uses these proxy settings to pull images from internet, and docker won't be communicating to the CI server (or any internal servers). However, there should be no harm setting no_proxy.
Testing
Run command 'docker info' and check the Http Proxy and Https Proxy settings where '' backslash is replaced with '%5C'.
Run a command where docker requires internet activity (e.g. /opt/app/myst-studio/bin/start.sh). If successful then the proxy is configured correctly.
Jenkins (For NTLM Forward Proxy)
Note: This level of configuration is for Jenkins only, this proxy setting doesn't automatically apply on any other applications.
Steps (For NTML Forward Proxy Only)
Jenkins cannot communicate to proxy server that requires NTML Authentication. The solution is to force the JVM to enable "basic" authentication (Not NTML Authentication).
For information regarding NTML Authentication Issue:
The solution to this problem is to modify the jenkins yml file:
Add the following line after the Port definition:
The Jenkins JVM will use basic authentication to the proxy, not NTLM authenication.
Once the yml file is modified, run /myst-studio/bin/restart.sh to bounce the jenkins container (This will also bounce all other docker containers).
Steps (For Any Forward Proxy)
Note: The Advanced > Validate Proxy button will return "Failed to connect to http://www.google.com (code 407).", but the connection should still work. Simply ignore this error.
Testing
Jenkins Console > Jenkins > Manage Jenkins > Manage Plugins
Click Check Now and make sure there is no error.
Artifactory (For NTLM Forward Proxy)
Note: This level of configuration is for Artifactory only, this proxy setting doesn't automatically apply on any other applications.
Steps (For NTML Forward Proxy Only)
Artifactory cannot communicate to proxy server that requires NTML Authentication. The solution is to force the JVM to enable "basic" authentication (Not NTML Authentication).
The solution to this problem is to modify the jenkins yml file:
Add the following line after the Port definition:
The Artifactory JVM will use basic authentication to the proxy, not NTLM authenication.
Once the yml file is modified, run /myst-studio/bin/restart.sh to bounce the artifactory container (This will also bounce all other docker containers).
Steps (For Any Forward Proxy)
Provide the proxy configuration in the Artifactory console. For example:
Testing
Artifactory Console > Admin > Remote > Click on any Remote Repository (e.g. jcenter) > Click Test and make sure there is no error.
Maven
Note: This step isn't required if Artifactory is configured with Maven in settings.xml, because Artifactory will access Internet on behalf of Maven.
Steps
Add the below section to the global maven settings.xml file right after the root element.
Testing Prerequisite
Follow the below steps:
Add the below content and save the file.
Testing For Maven
Run run the following command to test Maven's Internet connectivity.
Testing For Maven + Artifactory (If Artifactory is configured in Maven settings.xml)
Ensure you have configured Artifactory with Internet connectivity.
Run run the following command to test Maven's Internet connectivity via Artifactory.
Last updated