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:
$ brew install podman
Now you are ready to kick off the virtual machine with the proper settings to start doing something real, like adding developer process automation 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[0000] waiting for clients... INFO[0000] listening tcp://0.0.0.0:7777 INFO[0000] 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 process automation 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/rhpam-install-demo.git
Then go into the rhpam-install-demo directory and examine the instructions for using this with Podman to spin up the process automation 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 rhpam-install:7.11 .
...CUT OUTPUT...
STEP 24/26: USER 1000 --> 2a682b0c5aa STEP 25/26: EXPOSE 9990 9999 8080 8001 --> 6a1ed7c4d2e STEP 26/26: CMD ["/opt/jboss/rhpam/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 localhost/rhpam-install:7.11 fbba2e4149409794a8c81f05c59f402e4ddca775dc07cbaeed3ae3bf0cf703b7
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/rhpam-install 7.11 fbba2e414940 7 minutes ago 4.05 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 rhpam-install image.
The next step is to run the image:
$ podman run -dt -p 8080:8080 -p 9990:9990 rhpam-install 9bd0e70e58dd471a4ad17b87281c8bfe73a98e5a9bfc6cbd37fa98fb0198d1a0
This starts the image and spins up both Red Hat Enterprise Application Server and running inside of that the Red Hat Process Automation 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 9bd0e70e58dd localhost/rhpam-install:7.11 /opt/jboss/rhpam/... 2 minutes ago
$ podman logs 9bd0e70e58dd
... CUT OUTPUT OF DUMPED LOG FILE...
12: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 9bd0e70e58dd 8080/tcp -> 0.0.0.0:8080 9990/tcp -> 0.0.0.0:9990
Now you can access the process automation business central log in to access the tooling at:
http://localhost:8080/business-central
The login user: erics
The password: redhatpam1!
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 one of the free online workshops!
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.