Conversation
|
Currently failing with az commands not running in containers. |
stevekuznetsov
left a comment
There was a problem hiding this comment.
This doesn't feel good. We are (ab)using the template mechanism to embed bash into pods and not really making any use of the ci-operator flows from what I can tell.
There was a problem hiding this comment.
We should be doing this with the tag specification in ci-operator for the 3.10 branch, not here
There was a problem hiding this comment.
Agreed. I'm not sure I understand the tag specification completely. This made it very easy.
There was a problem hiding this comment.
Hopefully the config reference is useful https://github.com/openshift/ci-operator/blob/master/CONFIGURATION.md#tag_specification
|
It is still missing ci-operator config part in this PR too. |
59b63f7 to
bc87d45
Compare
There was a problem hiding this comment.
s/azure/e2e-azure-secret/
There was a problem hiding this comment.
This still needs changing :)
There was a problem hiding this comment.
Yeah, I was still testing it locally. I thought this was necessary for local tests.
d284a98 to
3ec8a3a
Compare
There was a problem hiding this comment.
Today we have separate jobs for the rhel and centos. How do you foresee us having a single template and passing in variables for the build job? I can variable-ize the flavor of OS but how does that get passed into the job?
There was a problem hiding this comment.
What do you mean loops indefinitely? It shouldn't. What do you see if we dont have timeout?
There was a problem hiding this comment.
I experienced failures where the cluster creation would wait indefinitely even though there were failures in the deployment. This occurred when I shared the same resource group with the node build and the cluster build. This pod would never complete so I added a timeout.
|
You might want to update : to have similar format What do you want to do with prow config for this template? we would need still to add it. Separate PR? |
There was a problem hiding this comment.
This is thing we didn't do, but we suppose to. This tags all particular release images into our ci-namespace for us to use. If we need ansible,origin, or any other image from another team - this is how we get them so we dont need to build it ourselves.
|
Please remove the branched jobs, they don't apply to us (at least yet) |
What did you mean by this? The On a side note, how do we get 3.10 builds for centos and rhel without hard coding them into the template? I put in a variable but I'm unsure how that variable gets populated for the actual run of the job. |
|
Your ci-operator jobs should be jobs we run in openshift-ansible and also periodically, right? The openshift-azure and azure-misc release jobs are not used. |
we run then in openshift-azure but we consume artifacts from |
|
Not sure I follow. What's the relation between openshift-azure and the node image? What's the overhead of building the ansible docker image? |
|
The node image is built using the origin-ansible container. Once it has completed, we will use the latest openshift-azure build to test a cluster build. Once the image has passed a cluster build, the image is tagged as |
|
Easier to show than to tell :) tomorrow will show this.
…On Wed, 5 Sep 2018, 19:48 Michalis Kargakis, ***@***.***> wrote:
we run then in openshift-azure but we consume artifacts from
openshift-ansible runs. This way we dont need to rebuild ansible image each
time.
Not sure I follow. What's the relation between openshift-azure and the
node image? What's the overhead of building the ansible docker image?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#1224 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADE4kEVOipD5bAKfnYYMeKWZM0z5ekhKks5uYBx3gaJpZM4WEl_J>
.
|
We have e2e tests for cluster deployments in openshift-azure that use the latest published image. We don't have e2e tests for gating openshift-ansible changes, right? Or at least we need to migrate those jobs away from Jenkins. We should still be able to pull openshift-azure and run a cluster deployment in a job that runs in openshift-ansible. |
Correct.
This is the beginning of that work. The old node image jobs that are in Jenkins do not perform a cluster build. Currently we are not testing our images which is something I was hoping to fix by merging this PR. They used to test cluster builds but we removed that functionality when we stopped using acs-engine deployments.
This is essentially the same thing. Whether we run the job from openshift-azure or openshift-ansible the need for each repo is equivalent. If you prefer moving the job to openshift-ansible and using openshift-azure for images that is fine. Currently the job is using openshift-azure's release-3.10.json and pulling the origin-ansible container image from openshift-ansible. This felt better as we own the process for openshift-azure and we don't have to touch openshift-ansible's files/config/templates. |
|
The problem with having this in openshift-azure is additional runtime in PR
tests and extra churn to debug failures unrelated to the repo. If we want
to test node builds we should be doing that in the repo the node build code
resides (today openshift-ansible, maybe a separate repo in the future).
…On Wed, Sep 5, 2018, 21:53 Kenny Woodson ***@***.***> wrote:
@Kargakis <https://github.com/kargakis>
We have e2e tests for cluster deployments in openshift-azure that use the
latest published image.
Correct.
We don't have e2e tests for gating openshift-ansible changes, right? Or at
least we need to migrate those jobs away from Jenkins.
This is the beginning of that work. The old node image jobs that are in
Jenkins do not perform a cluster build. Currently we are not testing our
images which is something I was hoping to fix by merging this PR. They used
to test cluster builds but we removed that functionality when we stopped
using acs-engine deployments.
We should still be able to pull openshift-azure and run a cluster
deployment in a job that runs in openshift-ansible.
This is essentially the same thing. Whether we run the job from
openshift-azure or openshift-ansible the need for each repo is equivalent.
If you prefer moving the job to openshift-ansible and using openshift-azure
for images that is fine. Currently the job is using openshift-azure's
release-3.10.json and pulling the origin-ansible container image from
openshift-ansible. This felt better as we own the process for
openshift-azure and we don't have to touch openshift-ansible's
files/config/templates.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1224 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADuFf8beykcjLr-NEe-L74n4OTGnTJbkks5uYCvSgaJpZM4WEl_J>
.
|
28d6765 to
e007472
Compare
There was a problem hiding this comment.
I think this is not needed anymore?
There was a problem hiding this comment.
openshift-azure master is effectively origin 3.10 (we already use 3.10 images in master.yaml). I think this is the wrong place to branch node build jobs, and it's more appropriate to be using the openshift-ansible ci-operator specs.
There was a problem hiding this comment.
setup to mirror the install container in the other templates
There was a problem hiding this comment.
Is there any reason for a separate container for doing the tagging? It seems we would reduce the size of bash we maintain by moving this after running the node build playbook?
There was a problem hiding this comment.
Sorry, just realized you need to tag after the e2e test succeeds. Nvmd.
There was a problem hiding this comment.
For ansible PRs and merged commits this needs to be ${LOCAL_IMAGE_BIN}. For periodic jobs, it should be fine as is. Unclear how to best template that.
|
@stevekuznetsov @bbguimaraes any suggestions on how to clone a repo (openshift-azure) in an openshift-ansible test? |
What are you trying to acheive? This is the wrong flow. I think this issue should have been tackled as "how does CI Operator support first-class creation and publishing of artifacts that are not container images or RPMs" |
e007472 to
99d195c
Compare
|
The other templates we use for e2e tests in openshift-azure
…On Thu, Sep 13, 2018, 21:23 Kenny Woodson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ci-operator/templates/build-azure-image-310.yaml
<#1224 (comment)>:
> +
+ source /etc/azure/credentials/secret
+ az login --service-principal -u ${AZURE_CLIENT_ID} -p ${AZURE_CLIENT_SECRET} --tenant ${AZURE_TENANT_ID} &>/dev/null
+ # TODO: Configure these from prow
+ export DNS_DOMAIN=osadev.cloud
+ export DNS_RESOURCEGROUP=dns
+ export DEPLOY_VERSION=v${OPENSHIFT_RELEASE}
+ export RUN_SYNC_LOCAL=true
+ export IMAGE_RESOURCEGROUP=images
+
+ source /tmp/shared/environment
+ export IMAGE_RESOURCENAME=${IMAGE_NAME}
+ cd /go/src/github.com/openshift/openshift-azure/
+
+ # added timeout as this seems to loop infinitely awaiting cluster deployment
+ timeout 30m ./hack/create.sh ${RESOURCE_GROUP}-e2e
Which other templates are you referring to? The other containers in this
template?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1224 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADuFf-cQY7YvMBl-myH2NU7OoMIX8lpdks5uarCdgaJpZM4WEl_J>
.
|
|
Apart from the lack of support for publishing non-container image related
artifacts in the ci-operator, the main issue here is that we have an
openshift-ansible playbook for building cloud images and we need to run a
cluster install on top of the image build using our own installer
(openshift-azure). Ideally, this job should gate every openshift-ansible PR
because the actual thing that is tested is the image build and the cluster
install is there for verification but we can start with a periodic.
Eventually I would love to see us move away from openshift-ansible
altogether but we haven't discussed/prioritized that yet.
…On Thu, Sep 13, 2018, 19:03 Steve Kuznetsov ***@***.***> wrote:
@stevekuznetsov <https://github.com/stevekuznetsov> @bbguimaraes
<https://github.com/bbguimaraes> any suggestions on how to clone a repo
(openshift-azure) in an openshift-ansible test?
What are you trying to acheive? This is the wrong flow.
I think this issue should have been tackled as "how does CI Operator
support first-class creation and publishing of artifacts that are not
container images or RPMs"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1224 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADuFf-0qtecWWlpiUre01MIIZsvUeTRaks5uao_SgaJpZM4WEl_J>
.
|
|
As a short-term hack you could use |
|
| @@ -0,0 +1,315 @@ | |||
| # This template is being used for testing OpenShift Ansible image builds for Azure. | |||
There was a problem hiding this comment.
This template needs to be moved in ci-operator/templates/openshift/openshift-azure.
Is this going to work for a periodic job with |
|
|
||
| cp -r /tmp/shared/_data /go/src/github.com/openshift/openshift-azure/ | ||
| cd /go/src/github.com/openshift/openshift-azure/ | ||
| source /etc/azure/credentials/secret |
There was a problem hiding this comment.
You also need to source /tmp/shared/environment to get the resource group, right?
|
|
||
| # Performs cleanup of all created resources | ||
| - name: teardown | ||
| image: ${LOCAL_IMAGE_BIN} |
There was a problem hiding this comment.
LOCAL_IMAGE_SRC should be enough I think
There was a problem hiding this comment.
BIN and SRC one difference is that BIN has generated code and binaries built already. We use binaries for sync image build in the local namespace. Didn't checked end-to-end but I think we need bin for this, as it is used for sync image build. Just to keep consistent.
There was a problem hiding this comment.
But we don't care about building the sync image and we can just pull it from quay since what is tested here is the node build.
There was a problem hiding this comment.
I guess a mismatch between the pushed image in quay and the plugin code that is pulled from git can fail the cluster install, assuming there is a breaking change in between.
There was a problem hiding this comment.
our experience shows we good at this...
There was a problem hiding this comment.
Probably a good one to have so we can stop breaking things :)
|
|
||
| # Runs an install | ||
| - name: setup | ||
| image: ${LOCAL_IMAGE_BIN} |
There was a problem hiding this comment.
LOCAL_IMAGE_SRC should be enough I think
| export DNS_DOMAIN=osadev.cloud | ||
| export DNS_RESOURCEGROUP=dns | ||
| export DEPLOY_VERSION=v${OPENSHIFT_RELEASE} | ||
| export RUN_SYNC_LOCAL=true |
|
|
||
| source /etc/azure/credentials/secret | ||
| az login --service-principal -u ${AZURE_CLIENT_ID} -p ${AZURE_CLIENT_SECRET} --tenant ${AZURE_TENANT_ID} &>/dev/null | ||
| # TODO: Configure these from prow |
|
The periodic prowjob I came up with: - agent: kubernetes
decorate: true
name: azure-build-node-image-rhel-310
extra_refs:
- org: openshift
repo: openshift-azure
base_ref: master
skip_cloning: true
spec:
containers:
- args:
- --secret-dir=/usr/local/e2e-azure-secret
- --template=/usr/local/azure-image-build
command:
- ci-operator
env:
- name: CONFIG_SPEC
valueFrom:
configMapKeyRef:
key: release-3.10.yaml
# Use openshift-ansible ci-operator config for as long as
# the node build code is part of that repo.
name: ci-operator-openshift-openshift-ansible
- name: JOB_NAME_SAFE
value: azure-image-build
- name: CLUSTER_TYPE
value: azure
image: ci-operator:latest
name: test
volumeMounts:
- mountPath: /usr/local/azure-image-build
name: job-definition
subPath: azure-image-build.yaml
- mountPath: /usr/local/e2e-azure-secret
name: cluster-secrets-azure-file
serviceAccountName: ci-operator
volumes:
- configMap:
name: prow-job-azure-build-image
name: job-definition
- name: cluster-secrets-azure-file
projected:
sources:
- secret:
name: cluster-secrets-azure-fileHaven't actually tested but my question is, will |
I think I know what you have in mind, but need more tech details on how it should be implemented. |
|
Closing in favor of #1502 |
First attempt at node image build with e2e tests.