cloudfoundry / bosh-alicloud-cpi-release

BOSH Alibaba CPI
Apache License 2.0
32 stars 20 forks source link

[jumpbox-deployment] Connect via EIP if provided #82

Closed drnic closed 5 years ago

drnic commented 5 years ago

I am trying to provision a blank VM on Alicloud (via which to then deploy a BOSH VM that does not have ingress access from internet) using https://github.com/cloudfoundry/jumpbox-deployment

I am provisioning a VM from my mac that has an EIP allocated, but when I look at the bosh create-env logs it seems that my mac is trying to ssh connect to the private IP 192.168.0.2, not to the EIP 47.90.X.Y.

 Finished (00:01:33)
  Waiting for the agent on VM 'i-0xiiwnujrjj3ug8onsv9' to be ready...[ssh.Client] 2019/06/27 22:37:39 DEBUG - Dialing remote server at 192.168.0.2:22
[ssh.Client] 2019/06/27 22:37:39 DEBUG - Making attempt #0
[ssh.Client] 2019/06/27 22:38:54 DEBUG - Attempt failed #0: Dialing remote server: dial tcp 192.168.0.2:22: connect: operation timed out

The instance group of my VM is:

instance_groups:
- instances: 1
  jobs:
  - name: disable_agent
    properties: {}
    release: os-conf
  - name: user_add
    properties:
      users:
      - name: jumpbox
        public_key: ...
  name: jumpbox
  networks:
  - default:
    - dns
    - gateway
    name: private
    static_ips:
    - 192.168.0.2
  - name: public
    static_ips:
    - 47.90.X.Y
drnic commented 5 years ago

I've resolved this. I was accidentally explicitly targeting internal_ip. My bad.

- type: replace
  path: /cloud_provider/ssh_tunnel?
  value:
    host: ((external_ip))
    port: 22
    user: vcap
    private_key: ((private_key))