SRE-4027 build: provide ZSCALER_CA_FILE arg for local docker builds - #19045
SRE-4027 build: provide ZSCALER_CA_FILE arg for local docker builds#19045soumagne wants to merge 1 commit into
Conversation
Fix leap 15 docker build Signed-off-by: Jerome Soumagne <jerome.soumagne@hpe.com>
|
As mentioned in the ticket, the way I would have to currently build images locally is by doing: which means passing the zscaler root certificate directly. If instead someone tells me that this certificate can be hosted somewhere and we can instead use some URL directly, this might work too for me. |
|
Errors are Unable to load ticket data |
| ARG JENKINS_URL | ||
| ARG REPOS | ||
| ARG DAOS_LAB_CA_FILE_URL | ||
| ARG ZSCALER_CA_FILE |
There was a problem hiding this comment.
Do not make this type of change, it is not going to help you at all long term.
All access to the dockerfiles has to come from Artifactory.
If you are running your own docker host, in the lab you need to have it setup to use:
hub.daos.hpc.amslabs.hpecorp.net or it will not work reliably.
Docker is blocking most access from the corporate proxy from anonymous users. We have setup the CI docker builders to pull from alternative sources because of this and we use a trick to make it look like it is using images from the dockerhub.
Any use of HTTPS_PROXY to avoid using the internal Artifact Servers is a bug, that needs to be removed.
There was a problem hiding this comment.
Just to be clear, this is not something I want to use in CI builds. I only want to use that option for my local docker builds on my laptop.
There was a problem hiding this comment.
Then install the ZSCALER CA on laptop on what ever is running docker. It does not need to be in the dockerfile.
I have updated the ticket for this with how to access the internal docker hub.
There was a problem hiding this comment.
I understand more of what you are trying to do now, I think.
Now when you are doing this build on your laptop, are you using any lab resources at all?
If you are not using lab resources than you use:
DAOS_LAB_CA_FILE_URl to pass your zscaler cert contents.
And then the repo-helper scripts can see of DAOS_LAB_CA_FILE_URI starts with HTTP:// or HTTPS:// and then install the CA accordingly.
If you are using LAB resources like Artifactory, then you should be able to get what you need without the Zscaler CA.
There was a problem hiding this comment.
That's right, I'm not using any of the lab resources in this case. I think I can try doing what you just proposed with DAOS_LAB_CA_FILE_URI.
Zscaler intercepts all HTTP traffic on HPE laptops so afaik there is no other solution than installing the Zscaler certificate, this is further described in https://docs.docker.com/guides/zscaler/
|
Test stage Unit Test completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19045/1/testReport/ |
I'm trying to build docker images locally on my laptop, in this particular case a Mac, what is your solution then ? To me this is a quick solution for testing things without having to go through CI. |
JohnMalmberg
left a comment
There was a problem hiding this comment.
Can you just reuse the DAOS_LAB_CA_FILE_URI parameter instead of adding a new one?
| ARG JENKINS_URL | ||
| ARG REPOS | ||
| ARG DAOS_LAB_CA_FILE_URL | ||
| ARG ZSCALER_CA_FILE |
There was a problem hiding this comment.
I understand more of what you are trying to do now, I think.
Now when you are doing this build on your laptop, are you using any lab resources at all?
If you are not using lab resources than you use:
DAOS_LAB_CA_FILE_URl to pass your zscaler cert contents.
And then the repo-helper scripts can see of DAOS_LAB_CA_FILE_URI starts with HTTP:// or HTTPS:// and then install the CA accordingly.
If you are using LAB resources like Artifactory, then you should be able to get what you need without the Zscaler CA.
|
Right now, I have determined that when in the lab environment the HTTP_PROXY/HTTPS_PROXY are not needed for the Dockerfiles. And so far I have not found any CI tests that need them set either when in the lab. I will change my PR a bit when I get a chance to remove the use of those experimental repos. |
If I recall @knard38 was the one who added those HTTP_PROXY stuff so you might want to see with him :) (this is outside the scope of this PR) |
Looks like a document is needed to explain how to properly use proxy and artifact servers, and why using proxy environment variables should be avoided when ever possible. Currently we seem to be using HTTP_PROXY where we should not be, and this is causing some of the instability in our CI. |
Fix leap 15 docker build
Steps for the author:
After all prior steps are complete: