[jira] [Comment Edited] (YARN-8783) Property docker.trusted.registries does not work when using a list

2018-09-18 Thread Simon Prewo (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-8783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618872#comment-16618872
 ] 

Simon Prewo edited comment on YARN-8783 at 9/18/18 10:35 AM:
-

[~shaneku...@gmail.com], [~eyang] Thanks a lot for you great support.

[~shaneku...@gmail.com]: I tried the library-approach and it works. However, I 
stayed with tagging for now.

Let me summarize for others (findings this on Google) what helped:

1) Pull centos image and tag it:
{code:java}
docker pull centos && docker tag centos local/centos{code}
2) Add _local_ repository to docker.trusted.registries in container-executor.cfg
{code:java}
[docker]
  ...
  docker.trusted.registries=local 
{code}
3) Set YARN_CONTAINER_RUNTIME_DOCKER_IMAGE to the name of your tag (in our case 
local/centos). I.e. execute distributed shell like this:
{code:java}
yarn jar hadoop-yarn-applications-distributedshell.jar -shell_env 
YARN_CONTAINER_RUNTIME_TYPE=docker -shell_env 
YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=local/centos -shell_command "sleep 90" -jar 
hadoop-yarn-applications-distributedshell.jar -num_containers 1 {code}


was (Author: simonprewo):
[~shaneku...@gmail.com], [~eyang] Thanks a lot for you great support.

[~shaneku...@gmail.com]: I tried the library-approach and it works. However, I 
stayed with tagging for now.

Let me summarize for others (findings this on Google) what helped:

1) Pull centos image and tag it:
{code:java}
docker pull centos && docker tag centos local/centos:latest{code}
2) Add _local_ repository to docker.trusted.registries in container-executor.cfg
{code:java}
[docker]
  ...
  docker.trusted.registries=local 
{code}
3) Set YARN_CONTAINER_RUNTIME_DOCKER_IMAGE to the name of your tag (in our case 
local/centos:latest). I.e. execute distributed shell like this:
{code:java}
yarn jar hadoop-yarn-applications-distributedshell.jar -shell_env 
YARN_CONTAINER_RUNTIME_TYPE=docker -shell_env 
YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=local/centos:latest -shell_command "sleep 
90" -jar hadoop-yarn-applications-distributedshell.jar -num_containers 1 {code}

> Property docker.trusted.registries does not work when using a list
> --
>
> Key: YARN-8783
> URL: https://issues.apache.org/jira/browse/YARN-8783
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: Simon Prewo
>Priority: Major
>  Labels: Docker, container-executor, docker
>
> I am deploying the default yarn distributed shell example:
> {code:java}
> yarn jar hadoop-yarn-applications-distributedshell.jar -shell_env 
> YARN_CONTAINER_RUNTIME_TYPE=docker -shell_env 
> YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=centos -shell_command "sleep 90" -jar 
> hadoop-yarn-applications-distributedshell.jar -num_containers 1{code}
> Having a *single trusted registry configured like this works*:
> {code:java}
> docker.trusted.registries=centos{code}
> But having *a list of trusted registries configured fails* ("Shell error 
> output: image: centos is not trusted."):
> {code:java}
> docker.trusted.registries=centos,ubuntu{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (YARN-8783) Property docker.trusted.registries does not work when using a list

2018-09-18 Thread Simon Prewo (JIRA)


[ 
https://issues.apache.org/jira/browse/YARN-8783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618872#comment-16618872
 ] 

Simon Prewo edited comment on YARN-8783 at 9/18/18 10:26 AM:
-

[~shaneku...@gmail.com], [~eyang] Thanks a lot for you great support.

[~shaneku...@gmail.com]: I tried the library-approach and it works. However, I 
stayed with tagging for now.

Let me summarize for others (findings this on Google) what helped:

1) Pull centos image and tag it:
{code:java}
docker pull centos && docker tag centos local/centos:latest{code}
2) Add _local_ repository to docker.trusted.registries in container-executor.cfg
{code:java}
[docker]
  ...
  docker.trusted.registries=local 
{code}
3) Set YARN_CONTAINER_RUNTIME_DOCKER_IMAGE to the name of your tag (in our case 
local/centos:latest). I.e. execute distributed shell like this:
{code:java}
yarn jar hadoop-yarn-applications-distributedshell.jar -shell_env 
YARN_CONTAINER_RUNTIME_TYPE=docker -shell_env 
YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=local/centos:latest -shell_command "sleep 
90" -jar hadoop-yarn-applications-distributedshell.jar -num_containers 1 {code}


was (Author: simonprewo):
[~shaneku...@gmail.com], [~eyang] Thanks a lot for you great support.

Let me summarize for others (findings this on Google) what helped:

1) Pull centos image and tag it:

 
{code:java}
docker pull centos && docker tag centos local/centos:latest{code}
2) Add _local_ repository to docker.trusted.registries in container-executor.cfg

 
{code:java}
[docker]
  ...
  docker.trusted.registries=local 
{code}
3) Set YARN_CONTAINER_RUNTIME_DOCKER_IMAGE to the name of your tag (in our case 
local/centos:latest). I.e. execute distributed shell like this:

 
{code:java}
yarn jar hadoop-yarn-applications-distributedshell.jar -shell_env 
YARN_CONTAINER_RUNTIME_TYPE=docker -shell_env 
YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=local/centos:latest -shell_command "sleep 
90" -jar hadoop-yarn-applications-distributedshell.jar -num_containers 1{code}
 

 

> Property docker.trusted.registries does not work when using a list
> --
>
> Key: YARN-8783
> URL: https://issues.apache.org/jira/browse/YARN-8783
> Project: Hadoop YARN
>  Issue Type: Sub-task
>Affects Versions: 3.1.1
>Reporter: Simon Prewo
>Priority: Major
>  Labels: Docker, container-executor, docker
>
> I am deploying the default yarn distributed shell example:
> {code:java}
> yarn jar hadoop-yarn-applications-distributedshell.jar -shell_env 
> YARN_CONTAINER_RUNTIME_TYPE=docker -shell_env 
> YARN_CONTAINER_RUNTIME_DOCKER_IMAGE=centos -shell_command "sleep 90" -jar 
> hadoop-yarn-applications-distributedshell.jar -num_containers 1{code}
> Having a *single trusted registry configured like this works*:
> {code:java}
> docker.trusted.registries=centos{code}
> But having *a list of trusted registries configured fails* ("Shell error 
> output: image: centos is not trusted."):
> {code:java}
> docker.trusted.registries=centos,ubuntu{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org