Beginners Guide to Installing Decision Management Tooling in a Local Container using Podman
Recently the open source community project called Podman announced that there was solid support for using its container tooling to replace docker on your loc...
Join the DZone community and get the full member experience.Join For Free
Recently the open source community project called Podman announced that there was solid support for using its container tooling to replace docker on your local development machine. Ring in the joyous music and off we go to explore how we can get back to basics without the issues of licensing around the developer desktop container tooling.
Note, the rest of this tutorial will be based on the current version of Podman at the time of publication, v3.3.1.
The first thing you want to do is just install the Podman tooling, which is fairly painless using BREW:
Now you are ready to kick off the virtual machine with the proper settings to start doing something real, like adding developer decision management tooling to your local machine.
You start by initialise and start the virtual machine to run Podman on:
$ podman machine init --memory 6144 --disk-size 20 Extracting compressed file Image resized.
If it's your first time doing this, an image will be downloaded first, but in this case a cached version of that image is just being unpacked and setup. Now it's time to start the virtual machine:
$ podman machine start INFO waiting for clients... INFO listening tcp://0.0.0.0:7777 INFO new connection from to /var/folders/_y/1rjzwypx57sd677v9jzrr0nc0000gp/T/podman/qemu_podman-machine-default.sock Waiting for VM ... qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
Now once this completes, you're ready to take a swing at spinning up the developer decision management tooling by Red Hat. First we pull in this nice demo project for installing it locally or in a container:
$ git clone https://gitlab.com/bpmworkshop/rhdm-install-demo.git
Then go into the rhpdm-install-demo directory and examine the instructions for using this with Podman to spin up the decision management developer tooling in a container. You will note that you need to head over to Red Hat Developer site and obtain the files listed in the installs/README before you can continue.
Before you try to use Podman to build, pull, or run any images on your machine, verify that the virtual machine is running to support you:
$ podman machine list NAME VM TYPE CREATED LAST UP podman-machine-default* qemu 9 minutes ago Currently running
Once that's done, you can start from the root directory and build your first image:
$ podman build -t rhdm-install:7.11 . ...CUT OUTPUT... STEP 26/26: CMD ["/opt/jboss/rhdm/jboss-eap-7.3/bin/standalone.sh","-c","standalone.xml","-b", "0.0.0.0","-bmanagement","0.0.0.0"] COMMIT rhpam-install:7.11 --> fbba2e41494 Successfully tagged lcoalhost/rhdm-install:7.11 ce1e4f2a11567442c2c22c8fc2253076c463a154e6688c9fed68bd70e9f4146d
This will take some time to execute every line in the provided Dockerfile, so feel free to watch or explore that file until the build process is done.
You can verify that you have a new image built:
$ podman image list REPOSITORY TAG IMAGE ID CREATED SIZE localhost/rhdm-install 7.11 ce1e4f2a1156 28 sec ago 2.38 GB docker.io/jbossdemocentral/developer latest b73501ac39b1 5 years ago 514 MB
You can see the base image is a customised developer image that we then use to build our rhdm-install image.
The next step is to run the image:
$ podman run -dt -p 8080:8080 -p 9990:9990 rhdm-install 20a92c865c4a0149779ef70b9a54852ca2168509a7dc7ce8527de015a9895ae7
This starts the image and spins up both Red Hat Enterprise Application Server and running inside of that the Red Hat Decision Management tooling. You can view this by looking up the container id, then viewing the log file to ensure the container startup is completed before using the tooling:
$ podman container list CONTAINER ID IMAGE COMMAND CREATED 20a92c865c4a localhost/rhdm-install:7.11 /opt/jboss/rhdm/... 43 sec ago
$ podman logs ...CUT OUTPUT OF DUMPED LOG FILE... 14:50:50,612 INFO [org.kie.workbench.common.screens.datasource.management.backend.DataSourceManagementBootstrap] (pool-30-thread-1) Initialize deployments task finished successfully.
Note you can use the -f flag to attache the logs output to the console and watch the container start up. Now that it's been started successfully we can make use of the port mapping we did at podman run when we used the -p flag. Port 8080 from our localhost is now mapped through to the containers port.
You can verify this with:
$ podman port 20a92c865c4a 8080/tcp -> 0.0.0.0:8080 9990/tcp -> 0.0.0.0:9990
Now you can access the tooling through decision central by logging in at:http://localhost:8080/decision-central
The login user: erics
The password: redhatdm1!
You will be presented with the business central dashboard and you are ready to start automating processes using this tooling in a container on your local machine.
If you need help getting started, try this free online workshop!
Published at DZone with permission of Eric D. Schabell, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.