ansibleplaybookbundle / ansible-playbook-bundle

THIS REPO IS MIGRATING: https://github.com/automationbroker/apb
GNU General Public License v2.0
140 stars 70 forks source link

apb push assumes that broker uses SSL #115

Open slaskawi opened 7 years ago

slaskawi commented 7 years ago

This is not always true (see here). In case of using http it returns the following warnings:

$ apb push --broker http://172.30.109.101:1338

2017-09-21 08:52:57,662 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x3cbcb10>: Failed to establish a new connection: [Errno 111] Connection refused',)': /api/v1/namespaces/service-catalog/pods
2017-09-21 08:52:57,662 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x3cbc590>: Failed to establish a new connection: [Errno 111] Connection refused',)': /api/v1/namespaces/service-catalog/pods
2017-09-21 08:52:57,662 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x3cbc3d0>: Failed to establish a new connection: [Errno 111] Connection refused',)': /api/v1/namespaces/service-catalog/pods
Successfully added APB to Ansible Service Broker

Note that the operation is successful (apart from warnings reported).

dymurray commented 7 years ago

@slaskawi I think you might be using an old version of the tooling. By default it uses insecure and then you can pass in --secure to use SSL. See here: https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/blob/master/src/apb/cli.py#L32

slaskawi commented 7 years ago

I'm using the latest Docker file. The exact command I'm running is this one:

docker run --rm --privileged -v `pwd`:/mnt -v /home/slaskawi/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u `id -u` docker.io/ansibleplaybookbundle/apb push --broker http://172.30.64.217:1338

My Docker image version (SHA1):

docker images | grep docker.io/ansibleplaybookbundle/apb
docker.io/ansibleplaybookbundle/apb                                            latest              dbd62e0e79a2        6 days ago           705 MB