Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Introduction: This article will help to setup the wpm on our local windows machine. Upon successful setup we will be able to pull the assets from git hub and package registry.
Problem Statement:
To achieve both the use cases we can install wpm. on installing the wpm we can pull the assets from GitHub and package registry to our service designer using the wpm.
Once we setup the wpm on our local windows. we will create the custom image so that same can be executed as containers.
End goal: Create the custom docker image based on Microservice runtime. This custom docker image can be used to pull the assets what we have configured on our docker compose file.
Pre-requisite:
Use case Explanation
We will create a custom image using MSR. this custom image will have wpm installed. Using this wpm we can pull the assets from package registry and GitHub account.
Download and start the service designer
Generate the token from package.webMethods.io registry
Generate the token from github registry
Setup the wpm on windows machine
Set the environment variable
Below is the snippet for setenv.bat available inside wpm\bin folder location (C:\ServiceDesigner\wMServiceDesigner\wpm\bin)
:setEnvset JAVA_HOME=C:\ServiceDesigner11\wMServiceDesigner\jvm\jvmset WPM_CLIENT_HOME=%~dp0..
:setStartHeapif not "%DCI_START_HEAP%" == "" goto setMaxHeapset DCI_START_HEAP=10
:setMaxHeapif not "%DCI_MAX_HEAP%" == "" goto setJavaOptsset DCI_MAX_HEAP=512
:setJavaOptsset JAVA_OPTS=%JAVA_OPTS% -Dlog.dir="%WPM_CLIENT_HOME%\logs"set JAVA_OPTS=%JAVA_OPTS% -DtermOutOn=trueset JAVA_OPTS=%JAVA_OPTS% -DspoolOn=true
rem ==================To enable debug, change this property to 'DEBUG'========== set JAVA_OPTS=%JAVA_OPTS% -DlogLevel=TRACErem ============================================================================
set JAVA_OPTS=%JAVA_OPTS% -Xms%DCI_START_HEAP%mset JAVA_OPTS=%JAVA_OPTS% -Xmx%DCI_MAX_HEAP%mset JAVA_OPTS=%JAVA_OPTS% -Xss256k
Edit wpm.yml FILE
Test and Verify
Create Docker Image
Docker Image with wpm Installation
FROM sagcr.azurecr.io/webmethods-microservicesruntime:10.15
ADD --chown=sagadmin:sagadmin wpm /opt/softwareag/wpm ENV PATH=/opt/softwareag/wpm/bin:$PATH
Note: Make sure you have correct relative path configured inside the wpm.yml file. while doing testing on local if you have changed the target installation path then before the building the image update the path to the below value
target_installation: /opt/softwareag/IntegrationServer
Create image to install custom packages using wpm client
Note: You can create this docker file anywhere on your laptop because while creating this docker image it is not referring our any local packages.
FROM webmethods-microservicesruntime-wpm:10.15
WORKDIR /opt/softwareag/wpm
RUN /opt/softwareag/wpm/bin/wpm.sh install -ws https://packages.webmethods.io -wr public -j <jwt token generated above from packages.wbmethods.io> packageNameRUN /opt/softwareag/wpm/bin/wpm.sh install -u <github username>-p <github cloassic token>-r https://github.com/<git hub userID> packageName
WORKDIR /
Points to Remember: Even though we are building this image on our windows laptop, still we are using wpm.sh install command instead of wpm.bat command. This is because these commands are executed while creation of image and the command are executed on linux setup.
Validation: