Technote: IBM Transformation Extender Container Runtime using HTTPs in 10.0.1 Certified Container

ITX Container Runtime
--------------------------------
Using HTTPs in 10.0.1 Certified Container
--------------------------------------------
  1. Bring up container:

    docker run --name itx-rs -it -d -p 8080:8080 -v /itx-rs:/data itx-rs:10.0.0

  2. Create folder config:

    cd /itx-rs

    mkdir config

  3. Copy server.xml from container to folder:

    docker cp itx-rs:/opt/server/conf/server.xml /itx-rs/config/

  4. Generate Self-Signed Key:

    keytool -genkey -alias itx-rs -keyalg RSA -keystore /itx-rs/config/keystore.jks

  5. Add this to server.xml to enable HTTPs.

    <Connector

    protocol="org.apache.coyote.http11.Http11NioProtocol"

            port="8443" maxThreads="200"

            scheme="http" secure="true"

    SSLEnabled="true"

           keystoreFile="/opt/server/conf/keystore.jks"

    keystorePass="password"

           clientAuth="false" sslProtocol="TLS"/>

  6. Make sure both server.xml and keystore.jks are readable, if not set it with chmod.
    • chmod u=rwx.g=rx.o=r server.xml
    • chmod u=rwx.g=rx.o=r keystore.jks
  7. Bring up container with additional parameters:

    docker run --name itx-rs -it -d -p 8080:8080 -p 8443:8443 -v /itx-rs/config/server.xml:/opt/server/conf/server.xml -v /itx-rs/config/keystore.jks:/opt/server/conf/keystore.jks -v /itx-rs:/data itx-rs:10.0.0

  8. Test:
    • curl -X PUT -d "This is a test" "http://localhost:8080/itx-rs/v1/maps/direct/OneInOneOut?input=1&output=1"
    • curl -X PUT -k -d "This is a test" "http://localhost:8443/itx-rs/v1/maps/direct/OneInOneOut?input=1&output=1"
  9. TroubleShooting by viewing:

    docker logs itx-rs