You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Marc Roos <M....@f1-outsourcing.eu> on 2019/02/13 20:49:18 UTC

How to parse -v docker flags

How should I parse the -v flags [0] for docker (using mesos 
containerizer) correctly. I tried several.

"args": [ "-v data:/var/lib/influxdb" ],
"argv": [ "-v data:/var/lib/influxdb" ],
"argv": [ "data:/var/lib/influxdb" ],
"argv": [ "influxdb:/data" ],

But all result in: 
run: create server: mkdir all: mkdir /var/lib/influxdb/meta: permission 
denied


[0] https://hub.docker.com/_/influxdb


{
  "id": "influxdb",
  "user": "influxdb",
  "cmd": null,
  "cpus": 1,
  "mem": 512,
  "instances": 1,
  "acceptedResourceRoles": ["*"],
  "residency": { "taskLostBehavior": "WAIT_FOREVER" },
  "upgradeStrategy": {"minimumHealthCapacity": 0, "maximumOverCapacity": 
0 },
  "container": {
    "type": "MESOS",
    "docker": {
      "image": "influxdb",
      "credential": null,
      "forcePullImage": false
    },
    "volumes": [
      {
        "containerPath": "data",
        "external": {
          "name": "app-influxdb",
          "provider": "dvdi",
          "options": { "dvdi/driver": "rexray" }
        },
        "mode": "RW"  
      }
    ]
  },
  "argv": [ "-v data:/var/lib/influxdb" ],
  "env": {
    "INFLUXDB_REPORTING_DISABLED": "true",
    "INFLUXDB_HTTP_AUTH_ENABLED": "true",
    "INFLUXDB_ADMIN_ENABLED": "true",
    "INFLUXDB_ADMIN_USER": "admin",
    "INFLUXDB_ADMIN_PASSWORD": "example" 
  }
}

RE: How to parse -v docker flags

Posted by Marc Roos <M....@f1-outsourcing.eu>.
 
Thanks, Joseph, that was indeed useful, I am now able to get this 
running via the commandline, however now marathon is complaining about 
the syntax.


-----Original Message-----
From: Joseph Wu [mailto:joseph@mesosphere.io] 
Sent: 13 February 2019 22:19
To: user
Subject: Re: How to parse -v docker flags

Since you are using the Mesos containerizer, docker will not be part of 
the equation (even if you are using a docker image).  By the looks of 
it, you are trying to mount a specific volume ("data") provided by the 
docker volume driver.  


In which case, you'll want to take a look at this documentation: 
http://mesos.apache.org/documentation/latest/isolators/docker-volume/
That will tell you how to setup the appropriate isolator and the 
relevant way to specify these volumes.


On Wed, Feb 13, 2019 at 12:49 PM Marc Roos <M....@f1-outsourcing.eu> 
wrote:



	How should I parse the -v flags [0] for docker (using mesos 
	containerizer) correctly. I tried several.
	
	"args": [ "-v data:/var/lib/influxdb" ],
	"argv": [ "-v data:/var/lib/influxdb" ],
	"argv": [ "data:/var/lib/influxdb" ],
	"argv": [ "influxdb:/data" ],
	
	But all result in: 
	run: create server: mkdir all: mkdir /var/lib/influxdb/meta: 
permission 
	denied
	
	
	[0] https://hub.docker.com/_/influxdb
	
	
	{
	  "id": "influxdb",
	  "user": "influxdb",
	  "cmd": null,
	  "cpus": 1,
	  "mem": 512,
	  "instances": 1,
	  "acceptedResourceRoles": ["*"],
	  "residency": { "taskLostBehavior": "WAIT_FOREVER" },
	  "upgradeStrategy": {"minimumHealthCapacity": 0, 
"maximumOverCapacity": 
	0 },
	  "container": {
	    "type": "MESOS",
	    "docker": {
	      "image": "influxdb",
	      "credential": null,
	      "forcePullImage": false
	    },
	    "volumes": [
	      {
	        "containerPath": "data",
	        "external": {
	          "name": "app-influxdb",
	          "provider": "dvdi",
	          "options": { "dvdi/driver": "rexray" }
	        },
	        "mode": "RW"  
	      }
	    ]
	  },
	  "argv": [ "-v data:/var/lib/influxdb" ],
	  "env": {
	    "INFLUXDB_REPORTING_DISABLED": "true",
	    "INFLUXDB_HTTP_AUTH_ENABLED": "true",
	    "INFLUXDB_ADMIN_ENABLED": "true",
	    "INFLUXDB_ADMIN_USER": "admin",
	    "INFLUXDB_ADMIN_PASSWORD": "example" 
	  }
	}
	



Re: How to parse -v docker flags

Posted by Joseph Wu <jo...@mesosphere.io>.
Since you are using the Mesos containerizer, docker will not be part of the
equation (even if you are using a docker image).  By the looks of it, you
are trying to mount a specific volume ("data") provided by the docker
volume driver.

In which case, you'll want to take a look at this documentation:
http://mesos.apache.org/documentation/latest/isolators/docker-volume/
That will tell you how to setup the appropriate isolator and the relevant
way to specify these volumes.

On Wed, Feb 13, 2019 at 12:49 PM Marc Roos <M....@f1-outsourcing.eu> wrote:

>
> How should I parse the -v flags [0] for docker (using mesos
> containerizer) correctly. I tried several.
>
> "args": [ "-v data:/var/lib/influxdb" ],
> "argv": [ "-v data:/var/lib/influxdb" ],
> "argv": [ "data:/var/lib/influxdb" ],
> "argv": [ "influxdb:/data" ],
>
> But all result in:
> run: create server: mkdir all: mkdir /var/lib/influxdb/meta: permission
> denied
>
>
> [0] https://hub.docker.com/_/influxdb
>
>
> {
>   "id": "influxdb",
>   "user": "influxdb",
>   "cmd": null,
>   "cpus": 1,
>   "mem": 512,
>   "instances": 1,
>   "acceptedResourceRoles": ["*"],
>   "residency": { "taskLostBehavior": "WAIT_FOREVER" },
>   "upgradeStrategy": {"minimumHealthCapacity": 0, "maximumOverCapacity":
> 0 },
>   "container": {
>     "type": "MESOS",
>     "docker": {
>       "image": "influxdb",
>       "credential": null,
>       "forcePullImage": false
>     },
>     "volumes": [
>       {
>         "containerPath": "data",
>         "external": {
>           "name": "app-influxdb",
>           "provider": "dvdi",
>           "options": { "dvdi/driver": "rexray" }
>         },
>         "mode": "RW"
>       }
>     ]
>   },
>   "argv": [ "-v data:/var/lib/influxdb" ],
>   "env": {
>     "INFLUXDB_REPORTING_DISABLED": "true",
>     "INFLUXDB_HTTP_AUTH_ENABLED": "true",
>     "INFLUXDB_ADMIN_ENABLED": "true",
>     "INFLUXDB_ADMIN_USER": "admin",
>     "INFLUXDB_ADMIN_PASSWORD": "example"
>   }
> }
>