github.com/rancherio/host-proxy

Proxy to allow indirect communication from Rancher to host-api on nodes


License
Apache-2.0
Install
go get github.com/rancherio/host-proxy

Documentation

Rancher Node Host Proxy Build Status

In order to show stats, logs, and the console of container the web browser talks directly to the host nodes. This does not work in two situations. First, if your nodes are behind some type of firewall or NAT the web browser may not have a direct route to the nodes IP. Second if you turn on SSL, you nodes will not have a SSL certificate with the correct CN to make the browser happy. In these situations you must run this proxy.

Overview

Overview

It's just that simple folks :)

Running

Start proxy

# Download api.crt from current Rancher Server
curl -sL http://${RANCHER_SERVER}/v1/scripts/api.crt > api.crt

# Launch host proxy
docker run -d --restart=always -v $(pwd)/api.crt:/api.crt -p 8081:8080 rancher/host-proxy

When registering a node ensure that you add -e CATTLE_HOST_API_PROXY=${PROXY_SERVER}:8081 to the docker run ... rancher/agent command.

Contact

For bugs, questions, comments, corrections, suggestions, etc., open an issue in rancher/rancher with a title starting with [Host-Proxy] .

Or just click here to create a new issue.

License

Copyright (c) 2014-2015 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.