Open aliok opened 5 years ago
Hi,
This project is deprecated and is not supported for OKD 3.11. We have moved repositories and the relevant documentation for running apb
2.0+ on 3.11 in a container is here: https://github.com/automationbroker/apb/blob/master/docs/apb_cli.md#running-from-a-container.
It does appear that the canary image is out of date on Dockerhub which I will work to resolve. For now you can use the nightly
tag which is what canary should be.
Please confirm for me that you are aware of the new repository as there was a significant refactoring of this project and apb list
is now apb bundle list
so it appears that the output you are seeing is out of date.
Thanks for the help @dymurray
This project is deprecated and is not supported for OKD 3.11. We have moved repositories and the relevant documentation for running apb 2.0+ on 3.11 in a container is here: https://github.com/automationbroker/apb/blob/master/docs/apb_cli.md#running-from-a-container.
That documentation is the 'old' documentation which instructs setting up apb
as this script: https://raw.githubusercontent.com/ansibleplaybookbundle/ansible-playbook-bundle/master/scripts/apb-docker-run.sh
And, that script uses APB_IMAGE=${APB_IMAGE:-docker.io/ansibleplaybookbundle/apb-tools:canary}
Anyway, I tried with docker.io/ansibleplaybookbundle/apb-tools:nightly
and I can now see the new tool with bundle
subcommand.
Both canary
and stable
are pointing to the old tool.
Thanks for the help. I am OK to resolve this issue. I am having some other problems with the new tool like following but I will create new tickets (or check existing tickets):
$ apb registry add lo --type local_openshift --namespaces openshift
Running APB image: docker.io/ansibleplaybookbundle/apb-tools:nightly
level=warning msg="Didn't find config file /.apb/registries.json, creating."
level=error msg="open /.apb/registries.json: no such file or directory"
$ apb bundle list
Running APB image: docker.io/ansibleplaybookbundle/apb-tools:nightly
level=warning msg="Didn't find config file /.apb/registries.json, creating."
level=error msg="open /.apb/registries.json: no such file or directory"
Created https://github.com/automationbroker/apb/issues/142 for the problems I am having with the new apb
Followed the docs from:
The server is accessible via web console at: https://127.0.0.1:8443
You are logged in as: User: developer Password:
To login as administrator: oc login -u system:admin
Login with
developer
Have
apb
in path with the content of https://raw.githubusercontent.com/ansibleplaybookbundle/ansible-playbook-bundle/master/scripts/apb-docker-run.shif [[ $(id -u) = 0 ]]; then echo "apb should not be run as root!" exit 1 fi
echo "Running APB image: ${APB_IMAGE}"
if ! [[ -z "${DOCKER_CERT_PATH}" ]] && [[ ${DOCKER_CERT_PATH} = "minishift" ]]; then IS_MINISHIFT=true echo "Targetting minishift host: ${DOCKER_HOST}" fi
KUBECONFIG_ENV="${KUBECONFIG:+-v ${KUBECONFIG}:${KUBECONFIG} -e KUBECONFIG=${KUBECONFIG}}"
if [[ $IS_MINISHIFT = true ]]; then
If targetting minishift, there are some unique issues with using the apb
container. Need to capture the minishift docker-env vars, unset them for the
purposes of this command, and pass them through to the docker container along
with mounting the minishift docker certs.
The minishift docker-env must be unset so the apb container is run by the host
daemon instead of the minishift daemon. However, It will still be configured
to operate on the minishift registry. This is required, as the volume mounts
must be mounted into the apb container from the host system.
If the minishift daemon is used, they will be empty mounts.
MINISHIFT_DOCKER_CERT_SRC="${DOCKER_CERT_PATH}" MINISHIFT_DOCKER_CERT_DEST="/var/run/minishift-certs" MINISHIFT_DOCKER_HOST="${DOCKER_HOST}"
unset DOCKER_TLS_VERIFY unset DOCKER_HOST unset DOCKER_CERT_PATH
docker run --rm --privileged \ -v $PWD:/mnt -v $HOME/.kube:/.kube \ -v $MINISHIFT_DOCKER_CERT_SRC:$MINISHIFT_DOCKER_CERT_DEST \ -e DOCKER_TLS_VERIFY="1" \ -e DOCKER_HOST="${MINISHIFT_DOCKER_HOST}" \ -e DOCKER_CERT_PATH="${MINISHIFT_DOCKER_CERT_DEST}" \ -e MINISHIFT_REGISTRY=$(minishift openshift registry) \ ${KUBECONFIG_ENV} \ -u $UID $APB_IMAGE "$@" else docker run --rm --privileged \ -v $PWD:/mnt -v $HOME/.kube:/.kube \ -v /var/run/docker.sock:/var/run/docker.sock \ ${KUBECONFIG_ENV} \ -u $UID $APB_IMAGE "$@" fi
Tried with canary and latest. Same error in both. Tried passing
--net=host
to Docker command, other errors occurred in that case.