Description of problem: The `apb run` command runs fail when the user running it outside of the cluster. Version-Release number of selected component (if applicable): apb version: apb-1.1.2-1.20171221180811.fc25.noarch How reproducible: Always Steps to Reproduce: 1, Install the apb tool in my local, not in the cluster. su -c 'wget https://copr.fedorainfracloud.org/coprs/g/ansible-service-broker/ansible-service-broker-latest/repo/epel-7/group_ansible-service-broker-ansible-service-broker-latest-epel-7.repo -O /etc/yum.repos.d/ansible-service-broker.repo' sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum -y install apb 2, Switch to su user and enable docker daemon 3, Init an APB project. 4, Login a cluster. 5, Running the `apb run` command. [root@localhost hello-world-apb]# apb run --project jian4 --tag docker.io/zjianbjz/hello-world-apb Finished writing dockerfile. Building APB using tag: [docker.io/zjianbjz/hello-world-apb] Successfully built APB image: docker.io/zjianbjz/hello-world-apb Creating project jian4 Created project Creating service account in jian4 Created service account Creating role binding for apb-run-hello-world-apb7qqws in jian4 Created Role Binding Creating pod with image docker.io/zjianbjz/hello-world-apb in jian4 Created Pod APB run started Actual results: Access into the cluster, and check the pod. [root@host-172-16-120-108 ~]# oc get pods -n jian4 NAME READY STATUS RESTARTS AGE apb-run-hello-world-apbpqtz6 0/1 ErrImagePull 0 36s Expected results: Provision the APB successfully. Additional info:
https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/pull/210
I find the above PR(#210) haven't merged yet. Changed status to MODIFIED and waiting for this PR merged.
The above PR(#210) have merged, but have not released yet. The current apb tool release is 1.1.6. [root@localhost jzhang]# rpm -qa| grep apb apb-1.1.6-1.20180123164703.el7.centos.noarch I will verify this bug once it's released.
Change status to MODIFIED since the release not ready.
Changing status to "ON_QA" since apb-tools image ready for test in downstream registry.
This was an intentional change, to move to build and push the image to the internal registry before running, to make 'apb run' work on external clusters. Please, re-run without the tag argument.
David, Based on your comments, I did the below test: [root@localhost hello-world-db-apb]# apb version Version: apb-1.1.7 1, Push the image to the internal registry before running. Here, we can see the "dh-hello-world-db-apb". [root@localhost hello-world-db-apb]# apb list Didn't find OpenShift Ansible Broker route in namespace: ansible-service-broker. Trying openshift-ansible-service-broker Contacting the ansible-service-broker at: https://asb-1338-openshift-ansible-service-broker.apps.0208-x5n.qe.rhcloud.com/ansible-service-broker/v2/catalog ID NAME DESCRIPTION 3b18d5937f0cbb99ee6693993a525be7 dh-fail-apb This is an APB built to fail on provision or deprovision 0a8f417c71d090c39dc2ba73f538c148 dh-hello-test-apb deploys hello-test web application b43a4272a6efcaaa3e0b9616324f1099 dh-hello-world-db-apb A sample APB which deploys Hello World Database f6c4486b7fb0cdac4b58e193607f7011 dh-mediawiki-apb Mediawiki apb implementation 2, Execute the `apb run` command. [root@localhost hello-world-db-apb]# apb run --project jian Found registry IP at: 172.30.113.235:5000 Finished writing dockerfile. Building APB using tag: [172.30.113.235:5000/openshift/hello-world-db-apb] Successfully built APB image: 172.30.113.235:5000/openshift/hello-world-db-apb Exception occurred! UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60) Here, I think should replace the "172.30.113.235:5000" with its route. And, we also opened a new bug about the `--registry-route` argument, there: https://bugzilla.redhat.com/show_bug.cgi?id=1541903 And, more, I have some concrens about your commnets: > to move to build and push the image to the internal registry before running, Since the building image step in the `app run` process, why we need to push it in advance? If we must do it in advance, I think we should remove the building image step.
I believe we misunderstood each other. What I was trying to say was that the APB run command will build and push the image to the internal registry, you do not need to push in advance. If you use apb run --help you can see the flags available for pushing to the internal registry are also available on apb run. I recommend you specify the registry on apb run in the same way you did to push in step 1 in the previous comment.
David, Oh, yeah, I think we misunderstood each other. Sorry for that. Please see the step 2 of the comment 11, ignore my concerns and the step 1, thanks!
The new bug 1541903 is being actively worked on and makes this one a duplicate. *** This bug has been marked as a duplicate of bug 1541903 ***
David, Thanks, I separated them originally because I think the new bug 1541903 was failed with the `--registry-route` argument, but this one didn't use this argument. Hmm, so I think I need to verify both of them in the new bug 1541903, right?
Do I understand you correctly, the registry is not actually available to you at 172.30.113.235:5000 and you want to replace that IP with the route to the internal registry?
David, Yes, you're right.
With the type of cluster setup you are describing, you will only be able to use the apb run command specifying the `--registry-route` argument. You will not need to verify both as using apb run from outside the cluster (at least based on your setup) will require the registry-route argument.