Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerHost cannot be set on a per-execution basis anymore, worked in 0.11.3 #320

Closed
BigSocial opened this issue Nov 2, 2015 · 5 comments
Milestone

Comments

@BigSocial
Copy link

Using multiple executions to deploy to multiple docker hosts no longer works. It worked in 0.11.3.

In the example below, the plugin attempts to deploy all containers to the ${ois.db} host, ignoring the dockerHost elements in the other executions. This worked perfectly in 0.11.3.

<executions>
  <execution>
    <id>MySQL</id>
    <configuration>
      <dockerHost>http://${ois.db}:2375</dockerHost>
      <image>ois/mysql:latest</image>
    </configuration>
    <phase>clean</phase>
    <goals>
      <goal>build</goal>
      <goal>start</goal>
    </goals>
  </execution>
  <execution>
    <id>NGINX</id>
    <configuration>
      <dockerHost>http://${ois.load}:2375</dockerHost>
      <image>ois/nginx:latest</image>
    </configuration>
    <phase>clean</phase>
    <goals>
      <goal>build</goal>
      <goal>start</goal>
    </goals>
  </execution>
  <execution>
    <id>Finn</id>
    <configuration>
      <dockerHost>http://${ois.node1}:2375</dockerHost>
      <image>ois/tomcat7:latest</image>
      <images>
        <image>
          <name>ois/tomcat7:latest</name>
          <run>
            <env>
              <OIS_NODE_NAME>Finn</OIS_NODE_NAME>
              <OIS_NODE_URL>http://${ois.node1}:8080</OIS_NODE_URL>
            </env>
          </run>
        </image>
      </images>
    </configuration>
    <phase>clean</phase>
    <goals>
      <goal>build</goal>
      <goal>start</goal>
    </goals>
  </execution>
  <execution>
    <id>Jake</id>
    <configuration>
      <dockerHost>http://${ois.node2}:2375</dockerHost>
      <image>ois/tomcat7:latest</image>
      <images>
        <image>
          <name>ois/tomcat7:latest</name>
          <run>
            <env>
              <OIS_NODE_NAME>Jake</OIS_NODE_NAME>
              <OIS_NODE_URL>http://${ois.node2}:8080</OIS_NODE_URL>
            </env>
          </run>
        </image>
      </images>
    </configuration>
    <phase>clean</phase>
    <goals>
      <goal>build</goal>
      <goal>start</goal>
    </goals>
  </execution>
  <execution>
    <id>Beemo</id>
    <configuration>
      <dockerHost>http://${ois.node3}:2375</dockerHost>
      <image>ois/tomcat7:latest</image>
      <images>
        <image>
          <name>ois/tomcat7:latest</name>
          <run>
            <env>
              <OIS_NODE_NAME>Beemo</OIS_NODE_NAME>
              <OIS_NODE_URL>http://${ois.node3}:8080</OIS_NODE_URL>
            </env>
          </run>
        </image>
      </images>
    </configuration>
    <phase>clean</phase>
    <goals>
      <goal>build</goal>
      <goal>start</goal>
    </goals>
  </execution>
</executions>
@jgangemi
Copy link
Collaborator

do you happen to know the last version it stopped working in? would it be possible for you to walk back versions to when it stopped?

@rhuss
Copy link
Collaborator

rhuss commented Dec 1, 2015

There was a change which prevents multiple initialisations of the plugin. However, this also prevents to pick up different Docker host for each execution.

This is indeed a bug.

@rhuss rhuss added the bug label Dec 1, 2015
@rhuss rhuss added this to the 0.13.7 milestone Dec 1, 2015
rhuss added a commit that referenced this issue Dec 1, 2015
In order to avoid dangerous and tedious state management for the initialization of ServiceHub, the ServiceHub is now created for each run afresh from a ServiceHubFactory which is needed because of collection Maven dependencies (hence it is configured as a component).

This will allow multiple docker host configurations again and will fix #320.

Some minor cleanup is probably still needed.

ServiceHub should probably called DmpContext as it is now the context given through from which all backend services (which are stateful because of the DockerUrl) are reachable.
@rhuss
Copy link
Collaborator

rhuss commented Dec 1, 2015

Added just a fix for that

@BigSocial could you try the 0.13.7-SNAPSHOT which I just deployed on Maven central ? This should fix the issue. Please let me know, whether it does ;)

@BigSocial
Copy link
Author

@rhuss Thanks. We'll try it in the next couple days and let you know.

@BigSocial
Copy link
Author

@rhuss Yes. That works perfectly. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants