I have 2 question

I have set up a rancher server with several hots in a private network ( i.e with private IP addresses ) and now I want to add a host “in the cloud” (i.e. with a public IP address)

I have replaced the private IP of my server with a public one, in the command to start the rancher agent on my new host, but the private IP ( 10.165.110.5 ) is still used later on during registration ( as show in error message below ).

I can’t change the IP address of my server in the admin settings because my existing hosts with private IP won’t work any longer I suppose … Any idea about I could manage this ?

[root@mmtt-web01 ~]# sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.2 http://**RANCHER_PUBLIC_IP**:8080/v1/scripts/7C88A891B13D848C8103:1483142400000:7t5AAeQLecpX6Lb7NvBGLFt5BI

...

INFO: Running Agent Registration Process, CATTLE_URL=http://**RANCHER_PUBLIC_IP:8080**/v1
INFO: Attempting to connect to: http://**RANCHER_PUBLIC_IP**:8080/v1
INFO: http://**RANCHER_PUBLIC_IP**:8080/v1 is accessible
INFO: Inspecting host capabilities
INFO: Boot2Docker: false
INFO: Host writable: true
INFO: Token: xxxxxxxx
INFO: Running registration

  ...

  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='**10.165.110.5**', port=8080): Max retries exceeded with url: /v1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f172de79810>: Failed to establish a new connection: [Errno 110] Connection timed out',))

and

Is there currently or planned a way to get a webhook from Rancher when someone uses the UI to upgrade a service?

Would be great to get Upgrade Started/Finished webhooks!

thx all

What you’re trying to do is a bit complicated. But here’s the deal:
all hosts need to be able to reach rancher server on the same IP/FQDN and if the hosts are in the same environment, they need to be able to reach each other on the IP address that shows up for them in Rancher.

The best way to do this is to use your cloud provider to create a VPN that combines your cloud subnet with your local private one. I don’t have detailed instructions on this and have never actually done it personally, but that would be the way to go.

You’re second question is easier to answer (though it isn’t the answer you want): there aren’t any immediate plans to implement such webhooks, but the feature has been requested. Here are two issues around it: