Monday, 2 November 2020

IBM UrbanCode Deploy - it's been a while ...

 For my day job, I'm using IBM (HCL) UrbanCode Deploy (UCD) to manage the lifecycle of some containers on an IBM Z box.

It's been a while since last I tinkered with UCD, as per my previous posts ....

So I wanted to quickly prototype what I was intending to build, without risking breaking our shared UCD platform.

And, of course, I work with Docker and Kubernetes on a daily basis ...

So ...  we have UCD on Docker ...

IBM UrbanCode Deploy Server trial

UrbanCode Deploy Agent

UrbanCode Deploy Relay Image

Having pulled the UCD Server image to one of my Virtual Servers: -

docker pull ibmcom/ucds

I followed the instructions to run a container: -

docker run -d -p 8443:8443 -p 7918:7918 -p 8080:8080 -t ibmcom/ucds:latest

and then ran docker ps -a to check the running container: -

CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                                                                    NAMES

e2d9fa725da7        ibmcom/ucds:latest   "/tmp/entrypoint-ibm…"   3 seconds ago       Up 3 seconds        0.0.0.0:7918->7918/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8443->8443/tcp   crazy_euclid

However, when I checked the container logs: -

docker logs crazy_euclid

Installing IBM UrbanCode Deploy...
Started building ucds container image at Mon Nov  2 16:15:44 UTC 2020.
unzip -q /tmp/ibm-ucd-6.2.7.1.960481.zip -d /tmp
[Database] Configuring Derby
Completed preparing ucds install files at Mon Nov  2 16:15:53 UTC 2020.
Enter the directory of the server to upgrade(leave blank for installing to a clean directory).
root@virtualserver01:~# docker logs crazy_euclid
Installing IBM UrbanCode Deploy...
Started building ucds container image at Mon Nov  2 16:15:44 UTC 2020.
unzip -q /tmp/ibm-ucd-6.2.7.1.960481.zip -d /tmp
[Database] Configuring Derby
Completed preparing ucds install files at Mon Nov  2 16:15:53 UTC 2020.
Enter the directory of the server to upgrade(leave blank for installing to a clean directory).

which is a bit of a pain ....

Given that the container is running as a "daemon", how can one complete the obviously interactive installation ?

Thankfully, there's a GitHub repo: -


with an issue ( albeit one raised 2.5 years ago !! ) : -


which says, in part: -

Same problem.
I created the container with --interactive.
You can run it attached or attach to it later on and just give the required input.

Works for me that way :)

Therefore, I stopped: -

docker stop crazy_euclid

and removed: -

docker rm crazy_euclid

the previous container, and ran it in interactive mode: -

docker run -it -p 8443:8443 -p 7918:7918 -p 8080:8080 -t ibmcom/ucds:latest

Installing IBM UrbanCode Deploy...
Started building ucds container image at Mon Nov  2 16:20:18 UTC 2020.
unzip -q /tmp/ibm-ucd-6.2.7.1.960481.zip -d /tmp
[Database] Configuring Derby
Completed preparing ucds install files at Mon Nov  2 16:20:27 UTC 2020.
Enter the directory of the server to upgrade(leave blank for installing to a clean directory).

Enter the home directory for the JRE/JDK that the new server or already installed server uses. Default [/opt/ibm/java/jre]:

Buildfile: install.with.groovy.xml
    [mkdir] Created dir: /tmp/ibm-ucd-install/compiled

version-check:

compile:
  [groovyc] Compiling 4 source files to /tmp/ibm-ucd-install/compiled
     [copy] Copying 20 files to /tmp/ibm-ucd-install/compiled

install:
    [unzip] Expanding: /tmp/ibm-ucd-install/conf.zip into /tmp/install-1035477236729911138.tmp
     [echo] Found sub-installer UCDeployInstaller.groovy
...

and followed the prompts ...

Once I'd done this, I used [cmd] [c] to terminate the running container, validated the container had stopped: -

docker ps -a

CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS                       PORTS               NAMES
f11f5d93b304        ibmcom/ucds:latest   "/tmp/entrypoint-ibm…"   56 minutes ago      Exited (130) 2 minutes ago                       stoic_hopper

and then started the container, this time as a daemon: -

docker start stoic_hopper

and monitored the logs: -

docker logs stoic_hopper -f

...
2020-11-02 17:17:48,849 UTC INFO  main com.urbancode.ds.UDeployServer - MultiServer? : false
2020-11-02 17:17:48,857 UTC INFO  main com.urbancode.ds.UDeployServer - External URL: https://ucd-server:8443
2020-11-02 17:17:48,858 UTC INFO  main com.urbancode.ds.UDeployServer - External User URL: https://ucd-server:8443
2020-11-02 17:17:48,865 UTC INFO  main com.urbancode.ds.UDeployServer - Server Broker ID: server-4Gr1NyFx1VO84tSBD8At
2020-11-02 17:17:48,866 UTC INFO  main com.urbancode.ds.UDeployServer - Server Unique ID: 2c1c1469-7291-49c6-9b06-9b06a5c72e44
2020-11-02 17:17:48,867 UTC INFO  main com.urbancode.ds.UDeployServer - JDBC URL: jdbc:derby://localhost:11377/data
2020-11-02 17:17:48,946 UTC INFO  main com.urbancode.ds.UDeployServer - Database User name: ibm_ucd
2020-11-02 17:17:48,948 UTC INFO  main com.urbancode.ds.UDeployServer - DBMS name: Apache Derby
2020-11-02 17:17:48,950 UTC INFO  main com.urbancode.ds.UDeployServer - DBMS version: 10.8.3.1 - (1476465)
2020-11-02 17:17:48,954 UTC INFO  main com.urbancode.ds.UDeployServer - Database Driver name: Apache Derby Network Client JDBC Driver
2020-11-02 17:17:48,956 UTC INFO  main com.urbancode.ds.UDeployServer - Database Driver version: 10.8.3.1 - (1476465)
2020-11-02 17:17:48,958 UTC INFO  main com.urbancode.ds.UDeployServer - === End Diagnostic Info ===
2020-11-02 17:17:48,960 UTC INFO  main com.urbancode.ds.UDeployServer - IBM UrbanCode Deploy server version 6.2.7.1.960481 started.

and now I'm good to go ....

No comments:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...