DCOS-Training

Notes for training on DC OS

View on GitHub

Parking Lot

Issues we face while executing the hands on tasks and the ways we resolve them.

ErrorVagrantUp

There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ["showvminfo", "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"] Stderr:...

Doing the following, resolved the issue on my machine * Disabled Hyper V in Contro Panel–>Program and Features –>Turn Windows Feature on or off * Made sure that Docker service was stopped under Processes in Task Manager. * Deleted .vagrant.d, .VirtualBox, virtual box created under VirtualBox VMs from c:/users/<user>


dcos auth login

use the link to fetch the token and login to the CLI

then use

ssh -t vagrant@jskh



Here’s the command to view zookeeper logs (though it’s not a part of the present session)

journalctl -u dcos-exhibitor -b

(ssh into the master before you fire this)


To see Mesos logs. http://m1.dcos/mesos/#/

To see Marathon http://m1.dcos/marathon/ui/#/apps

Finding a Public Agent IP

Prerequisites

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

Another option to run ssh coomand after finding the id manually from command : dcos node –json | jq –raw-output .[]

dcos node ssh --option StrictHostKeyChecking=no --master-proxy --mesos-id=<ID>

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

setup the following parameters for the marathon load balancer, save these in a json file (say marathon_lb_install.json)

{
  "marathon-lb":{
    "name":"marathon-lb-internal",
    "haproxy-group":"internal",
    "bind-http-https":false,
    "role":""
  }
}

then run this command on the CLI to install it.

dcos package install --options=[filename].json marathon-lb

so in our example, you’d fire the command:

dcos package install --options=marathon_lb_install.json marathon-lb