Commit 9e5ead41 authored by Philip Schildkamp's avatar Philip Schildkamp

Third-guess WAR IA fixes

parent a790ed21
......@@ -19,11 +19,6 @@
<dependencies>
<!-- LIBRARIES ADDED FOR IMPLEMENTATION ARTIFACT IMPLEMENTATION -->
<dependency>
<groupId>org.vngx</groupId>
<artifactId>vngx-jsch</artifactId>
<version>0.10</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
......@@ -63,6 +58,12 @@
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.vngx</groupId>
<artifactId>vngx-jsch</artifactId>
<version>0.10</version>
</dependency>
<!-- END - LIBRARIES ADDED FOR IMPLEMENTATION ARTIFACT IMPLEMENTATION -->
<dependency>
......
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="DockerContainer_IA_ManageService" targetNamespace="http://unknown.namespace/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://unknown.namespace/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:definitions name="DockerContainer_IA_ManageService" targetNamespace="http://dch.uni-koeln.de/tosca/nodetypes" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dch.uni-koeln.de/tosca/nodetypes" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://dch.uni-koeln.de/tosca/nodetypes" xmlns:tns="http://unknown.namespace/" elementFormDefault="unqualified" targetNamespace="http://unknown.namespace/" version="1.0">
<xs:import namespace="http://dch.uni-koeln.de/tosca/nodetypes"/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dch.uni-koeln.de/tosca/nodetypes" elementFormDefault="unqualified" targetNamespace="http://dch.uni-koeln.de/tosca/nodetypes" version="1.0">
<xs:element name="runScript" type="tns:runScript"/>
<xs:element name="transferFile" type="tns:transferFile"/>
<xs:complexType name="runScript">
<xs:sequence>
<xs:element minOccurs="0" ref="ns1:ContainerIP"/>
<xs:element minOccurs="0" ref="ns1:SSHPort"/>
<xs:element minOccurs="0" ref="ns1:Script"/>
<xs:element form="qualified" minOccurs="0" name="DockerEngineURL" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="DockerEngineCertificate" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="ContainerID" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="Script" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="transferFile">
<xs:sequence>
<xs:element minOccurs="0" ref="ns1:ContainerIP"/>
<xs:element minOccurs="0" ref="ns1:SSHPort"/>
<xs:element minOccurs="0" ref="ns1:SourceURLorLocalPath"/>
<xs:element minOccurs="0" ref="ns1:TargetAbsolutePath"/>
<xs:element form="qualified" minOccurs="0" name="DockerEngineURL" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="DockerEngineCertificate" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="ContainerID" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="TargetAbsolutePath" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="SourceURLorLocalPath" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dch.uni-koeln.de/tosca/nodetypes" version="1.0">
<xs:element name="ContainerIP" type="xs:string"/>
<xs:element name="SSHPort" type="xs:string"/>
<xs:element name="Script" type="xs:string"/>
<xs:element name="SourceURLorLocalPath" type="xs:string"/>
<xs:element name="TargetAbsolutePath" type="xs:string"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="runScript">
<wsdl:part name="parameters" element="tns:runScript">
</wsdl:part>
</wsdl:message>
<wsdl:message name="transferFile">
<wsdl:part name="parameters" element="tns:transferFile">
</wsdl:part>
</wsdl:message>
<wsdl:message name="runScript">
<wsdl:part name="parameters" element="tns:runScript">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="DockerContainer_IA_Manage">
<wsdl:operation name="runScript">
<wsdl:input name="runScript" message="tns:runScript">
......
......@@ -77,8 +77,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
......
......@@ -6,13 +6,14 @@ import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService
@WebService(targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes")
public class DockerEngine_IA_Configure extends AbstractIAService {
@WebMethod
@SOAPBinding
@Oneway
public void configure(@WebParam(name = "VMIP", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") String VMIP) {
public void configure(
@WebParam(name = "VMIP", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") String VMIP) {
// This HashMap holds the return parameters of this operation.
final HashMap<String, String> returnParameters = new HashMap<String, String>();
......
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="DockerEngine_IA_ConfigureService" targetNamespace="http://unknown.namespace/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://unknown.namespace/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:definitions name="DockerEngine_IA_ConfigureService" targetNamespace="http://dch.uni-koeln.de/tosca/nodetypes" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dch.uni-koeln.de/tosca/nodetypes" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://dch.uni-koeln.de/tosca/nodetypes" xmlns:tns="http://unknown.namespace/" elementFormDefault="unqualified" targetNamespace="http://unknown.namespace/" version="1.0">
<xs:import namespace="http://dch.uni-koeln.de/tosca/nodetypes"/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dch.uni-koeln.de/tosca/nodetypes" elementFormDefault="unqualified" targetNamespace="http://dch.uni-koeln.de/tosca/nodetypes" version="1.0">
<xs:element name="configure" type="tns:configure"/>
<xs:complexType name="configure">
<xs:sequence>
<xs:element minOccurs="0" ref="ns1:VMIP"/>
<xs:element form="qualified" minOccurs="0" name="VMIP" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dch.uni-koeln.de/tosca/nodetypes" version="1.0">
<xs:element name="VMIP" type="xs:string"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="configure">
......
......@@ -18,6 +18,12 @@
<dependencies>
<!-- LIBRARIES ADDED FOR IMPLEMENTATION ARTIFACT IMPLEMENTATION -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<!-- NOTE: "The Commons HttpClient project is now end of life, and is
no longer being developed." See http://hc.apache.org/httpclient-3.x/. New
......@@ -37,7 +43,7 @@
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-ssh</artifactId>
<version>1.5.2</version>
<version>1.6.1</version>
</dependency>
<dependency>
......@@ -45,11 +51,6 @@
<artifactId>vngx-jsch</artifactId>
<version>0.10</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<!-- END - LIBRARIES ADDED FOR IMPLEMENTATION ARTIFACT IMPLEMENTATION -->
......@@ -87,7 +88,7 @@
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.0.14</version>
<version>3.1.5</version>
</dependency>
<dependency>
<groupId>net.lingala.zip4j</groupId>
......
......@@ -68,7 +68,6 @@ public class DockerEngine_IA_Manage extends AbstractIAService {
@WebParam(name = "DockerEngineCertificate", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String DockerEngineCertificate,
@WebParam(name = "ContainerImage", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String ContainerImage,
@WebParam(name = "ContainerPorts", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String ContainerPorts,
@WebParam(name = "SSHPort", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String SSHPort,
@WebParam(name = "ContainerEnv", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String ContainerEnv,
@WebParam(name = "ImageLocation", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String ImageLocation,
@WebParam(name = "PrivateKey", targetNamespace = "http://dch.uni-koeln.de/tosca/nodetypes") final String PrivateKey,
......@@ -432,13 +431,6 @@ public class DockerEngine_IA_Manage extends AbstractIAService {
portBindings = new Ports();
final ExposedPort exposedPort = ExposedPort.tcp(22);
if (SSHPort != null && !SSHPort.isEmpty()) {
final Integer sshPort = Integer.parseInt(SSHPort);
portBindings.bind(exposedPort, Ports.Binding.bindPort(sshPort));
} else {
portBindings.bind(exposedPort, Ports.Binding.empty());
}
final CreateContainerResponse sshContainer = dockerClient.createContainerCmd("jeroenpeeters/docker-ssh:latest")
.withExposedPorts(exposedPort).withPortBindings(portBindings)
.withBinds(new Bind("/var/run/docker.sock", new Volume("/var/run/docker.sock")))
......@@ -464,8 +456,6 @@ public class DockerEngine_IA_Manage extends AbstractIAService {
returnParameters.put("ContainerID", container.getId() + ";" + sshContainer.getId());
returnParameters.put("ContainerIP", ipAddress);
returnParameters.put("SSHPort", String.valueOf(findPort(dockerClient, sshContainer.getId(), 22)));
try {
dockerClient.close();
} catch (final Exception e) {
......
......@@ -10,7 +10,6 @@
<xs:element form="qualified" minOccurs="0" name="DockerEngineCertificate" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="ContainerImage" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="ContainerPorts" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="SSHPort" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="ContainerEnv" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="ImageLocation" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="PrivateKey" type="xs:string"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment