Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (23 sloc) 1.4 KB
layout navigationTitle title menuWeight excerpt enterprise
layout.pug
Finding a Public Agent IP
Finding a Public Agent IP
3
Finding a public agent IP address.
false

After you have installed DC/OS with a public agent node declared, you can navigate to the public IP address of your public agent node.

Prerequisites

  • DC/OS is installed with at least 1 master and public agent node
  • DC/OS CLI 0.4.6 or later
  • jq
  • SSH configured

You can find your public agent IP by running this command from your terminal. This command SSHs to your cluster to obtain cluster information and then queries ifconfig.co to determine your public IP address.

for id in $(dcos node --json | jq --raw-output '.[] | select(.attributes.public_ip == "true") | .id'); do dcos node ssh --option StrictHostKeyChecking=no --option LogLevel=quiet --master-proxy --mesos-id=$id "curl -s ifconfig.co" ; done 2>/dev/null

Here is an example where the public IP address is 52.39.29.79:

for id in $(dcos node --json | jq --raw-output '.[] | select(.attributes.public_ip == "true") | .id'); do dcos node ssh --option StrictHostKeyChecking=no --option LogLevel=quiet --master-proxy --mesos-id=$id "curl -s ifconfig.co" ; done 2>/dev/null
52.39.29.79