Spinnaker: not able to access with localhost:9000 on Azure WM

Deadly 提交于 2019-12-23 05:49:10

问题


I have deployed Spinnaker successfully on an Azure VM. I am able to successfully connect via "ssh" and the outputs of curl http://9000 and curl http:8084/health are appropriate. Did the tunnelling as documented.

However from my host machine browser I am not able to open the Deck UI. The http://localhost:9000 from my Mac Chrome Browser says:

"This site can’t be reached. localhost refused to connect."


回答1:


As long as your VM has a public IP/DNS the following instructions should work on a Mac, I just tried them against an instance of Spinnaker that I have running on an Azure VM in my subscription.

• On your local machine do the following:

• Add this to ~/.ssh/config (if file does not exist create it) and populate with content below. Give the file execute permissions (chmod 700 ~/.ssh/config)

Host spinnaker-start
  HostName <Full DNS>
  ControlMaster yes
  ControlPath ~/.ssh/spinnaker-tunnel.ctl
  RequestTTY no
  LocalForward 9000 127.0.0.1:9000
  LocalForward 8084 127.0.0.1:8084
  LocalForward 8087 127.0.0.1:8087
  User <User name for your vm>

Host spinnaker-stop
  HostName <Full DNS>
  ControlPath ~/.ssh/spinnaker-tunnel.ctl
  RequestTTY no

• Create a spinnaker-tunnel.sh file with the following content, and give it execute permissions (chmod 700)

#!/bin/bash

socket=$HOME/.ssh/spinnaker-tunnel.ctl

if [ "$1" == "start" ]; then
  if [ ! \( -e ${socket} \) ]; then
    echo "Starting tunnel to Spinnaker..."
    ssh -f -N spinnaker-start && echo "Done."
  else
    echo "Tunnel to Spinnaker running."
  fi
fi

if [ "$1" == "stop" ]; then
  if [ \( -e ${socket} \) ]; then
    echo "Stopping tunnel to Spinnaker..."
    ssh -O "exit" spinnaker-stop && echo "Done."
  else
    echo "Tunnel to Spinnaker stopped."
  fi
fi

Usage: To start/stop a SSH tunnel execute the following commands

./spinnaker-tunnel.sh start

./spinnaker-tunnel.sh stop


来源:https://stackoverflow.com/questions/39096245/spinnaker-not-able-to-access-with-localhost9000-on-azure-wm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!