You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by NadeeshDilanga <gi...@git.apache.org> on 2016/06/24 05:53:03 UTC

[GitHub] incubator-taverna-common-activities pull request #8: Docker

GitHub user NadeeshDilanga opened a pull request:

    https://github.com/apache/incubator-taverna-common-activities/pull/8

    Docker

    This has docker-java basic integration for activity plugin.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NadeeshDilanga/incubator-taverna-common-activities docker

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-taverna-common-activities/pull/8.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #8
    
----
commit 689b6d2898ea5412d6ee3db8071a373d8bca669d
Author: Nadeesh Dilanga <na...@gmail.com>
Date:   2016-06-23T02:55:11Z

    Fixing jackson version mismatch compile time issue.

commit d4be680580f7509c57cc07bb6c3a4dcf3c1155b4
Author: Nadeesh Dilanga <na...@gmail.com>
Date:   2016-06-24T05:51:04Z

    Adding basic docker command capability to docker activity plugin.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-common-activities pull request #8: Docker

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-taverna-common-activities/pull/8


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-common-activities pull request #8: Docker

Posted by NadeeshDilanga <gi...@git.apache.org>.
Github user NadeeshDilanga commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-common-activities/pull/8#discussion_r68485132
  
    --- Diff: taverna-docker-activity/src/test/java/org/apache/taverna/activities/docker/test/TestDockerCommands.java ---
    @@ -0,0 +1,101 @@
    +/*
    +* Licensed to the Apache Software Foundation (ASF) under one
    +* or more contributor license agreements. See the NOTICE file
    +* distributed with this work for additional information
    +* regarding copyright ownership. The ASF licenses this file
    +* to you under the Apache License, Version 2.0 (the
    +* "License"); you may not use this file except in compliance
    +* with the License. You may obtain a copy of the License at
    +*
    +* http://www.apache.org/licenses/LICENSE-2.0
    +*
    +* Unless required by applicable law or agreed to in writing,
    +* software distributed under the License is distributed on an
    +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +* KIND, either express or implied. See the License for the
    +* specific language governing permissions and limitations
    +* under the License.
    +*/
    +
    +package org.apache.taverna.activities.docker.test;
    +
    +import com.github.dockerjava.api.command.InspectImageResponse;
    +import com.github.dockerjava.api.model.Container;
    +import org.apache.taverna.activities.docker.DockerContainerConfigurationImpl;
    +import org.apache.taverna.activities.docker.DockerRemoteConfig;
    +import org.apache.taverna.activities.docker.RemoteClient;
    +import org.junit.Assert;
    +import org.junit.Test;
    +
    +import java.util.List;
    +
    +public class TestDockerCommands {
    +
    +    private RemoteClient remoteClient;
    +
    +    private static final String IMAGE_NAME = "training/webapp";
    +
    +    private static final String CONTAINER_NAME = "test-container";
    +
    +    private static final String DOCKER_LOGIN_SUCCESS = "Login Succeeded";
    +
    +    public static void main(String[] args) {
    +        TestDockerCommands commands = new TestDockerCommands();
    +        commands.testLogin();
    +//        commands.testInspectImage();
    +        commands.testListContainers();
    +//      commands.testCreateContainer();
    +    }
    +
    +    public TestDockerCommands(){
    +        DockerContainerConfigurationImpl containerConfiguration = new DockerContainerConfigurationImpl(new TestConfigurationManager());
    +        containerConfiguration.getInternalPropertyMap().put(DockerContainerConfigurationImpl.NAME,CONTAINER_NAME);
    +        containerConfiguration.getInternalPropertyMap().put(DockerContainerConfigurationImpl.IMAGE,IMAGE_NAME);
    +        containerConfiguration.getInternalPropertyMap().put(DockerContainerConfigurationImpl.CMD,"env");
    +
    +        DockerRemoteConfig remoteConfig = new DockerRemoteConfig();
    +        remoteConfig.setDockerHost("tcp://192.168.99.100:2376");
    +        remoteConfig.setApiVersion("1.21");
    +        remoteConfig.setDockerTlsVerify(true);
    +        remoteConfig.setDockerCertPath("/Users/Nadeesh/Documents/docker/");
    --- End diff --
    
    Noted. Changed it to refer a directory in the project module and test class will point the relative path. src/test/resources/cert and you have to copy some valid cert file there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-common-activities issue #8: Docker

Posted by stain <gi...@git.apache.org>.
Github user stain commented on the issue:

    https://github.com/apache/incubator-taverna-common-activities/pull/8
  
    Thanks! Merged into the `docker` branch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-common-activities pull request #8: Docker

Posted by stain <gi...@git.apache.org>.
Github user stain commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-common-activities/pull/8#discussion_r68400482
  
    --- Diff: taverna-docker-activity/src/test/java/org/apache/taverna/activities/docker/test/TestDockerCommands.java ---
    @@ -0,0 +1,101 @@
    +/*
    +* Licensed to the Apache Software Foundation (ASF) under one
    +* or more contributor license agreements. See the NOTICE file
    +* distributed with this work for additional information
    +* regarding copyright ownership. The ASF licenses this file
    +* to you under the Apache License, Version 2.0 (the
    +* "License"); you may not use this file except in compliance
    +* with the License. You may obtain a copy of the License at
    +*
    +* http://www.apache.org/licenses/LICENSE-2.0
    +*
    +* Unless required by applicable law or agreed to in writing,
    +* software distributed under the License is distributed on an
    +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +* KIND, either express or implied. See the License for the
    +* specific language governing permissions and limitations
    +* under the License.
    +*/
    +
    +package org.apache.taverna.activities.docker.test;
    +
    +import com.github.dockerjava.api.command.InspectImageResponse;
    +import com.github.dockerjava.api.model.Container;
    +import org.apache.taverna.activities.docker.DockerContainerConfigurationImpl;
    +import org.apache.taverna.activities.docker.DockerRemoteConfig;
    +import org.apache.taverna.activities.docker.RemoteClient;
    +import org.junit.Assert;
    +import org.junit.Test;
    +
    +import java.util.List;
    +
    +public class TestDockerCommands {
    +
    +    private RemoteClient remoteClient;
    +
    +    private static final String IMAGE_NAME = "training/webapp";
    +
    +    private static final String CONTAINER_NAME = "test-container";
    +
    +    private static final String DOCKER_LOGIN_SUCCESS = "Login Succeeded";
    +
    +    public static void main(String[] args) {
    +        TestDockerCommands commands = new TestDockerCommands();
    +        commands.testLogin();
    +//        commands.testInspectImage();
    +        commands.testListContainers();
    +//      commands.testCreateContainer();
    +    }
    +
    +    public TestDockerCommands(){
    +        DockerContainerConfigurationImpl containerConfiguration = new DockerContainerConfigurationImpl(new TestConfigurationManager());
    +        containerConfiguration.getInternalPropertyMap().put(DockerContainerConfigurationImpl.NAME,CONTAINER_NAME);
    +        containerConfiguration.getInternalPropertyMap().put(DockerContainerConfigurationImpl.IMAGE,IMAGE_NAME);
    +        containerConfiguration.getInternalPropertyMap().put(DockerContainerConfigurationImpl.CMD,"env");
    +
    +        DockerRemoteConfig remoteConfig = new DockerRemoteConfig();
    +        remoteConfig.setDockerHost("tcp://192.168.99.100:2376");
    +        remoteConfig.setApiVersion("1.21");
    +        remoteConfig.setDockerTlsVerify(true);
    +        remoteConfig.setDockerCertPath("/Users/Nadeesh/Documents/docker/");
    --- End diff --
    
    Hi, @NadeeshDilanga  - could you try to avoid hardcoding `/Users/Nadeesh` here? Perhaps using the current directory instead?
    
    I am not sure how I should test this.. what do I need to put in that folder? Could you add a README.md about what I need to copy where?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-common-activities issue #8: Docker

Posted by stain <gi...@git.apache.org>.
Github user stain commented on the issue:

    https://github.com/apache/incubator-taverna-common-activities/pull/8
  
    Thanks!
    
    Checking docker-java license:
    https://github.com/docker-java/docker-java/blob/master/LICENSE 
    Apache License 2.0
    (OK)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---