<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1907245749562386&amp;ev=PageView&amp;noscript=1">
Event_bg

The Leonardo Blog

All Posts

How to Swap Between Different PAMlets

The following set of instructions are for swapping between the different PIE PAMlet environments.

NOTE: These instructions follow the use case of swapping between DEMO-PIE and DEV-PIE, but the scenario is similar if you intend to swap in the other direction.

Step 1 - Execute the script and follow the prompts

Step 1.1

Move to the folder where you previously installed pie  (e.g. ~/PIE)

cd ~/pie

 

Step 1.2

Change into the directory for the lc-cdk-setup-config script

pie $ cd lc-cdk-setup-config

 

Step 1.3

Execute the script

cdk-setup-config $ ./cdkget-setup-config.sh
 
[INFO]: cdk file /Users/admin/cdk390/bin/cdk-3.9.0-1-minishift-darwin-amd64 already exists.
 
[INFO]: cdk file /Users/admin/cdk390/bin/minishift copy of
/Users/admin/cdk390/bin/cdk-3.9.0-1-minishift-darwin-amd64 already exists.
 
[EXECUTING]: export PATH=/Users/admin/cdk390/bin:/usr/local/bin:
/usr/bin:/bin:/usr/sbin:/sbin:/Users/admin/bin:/Users/admin/bin
 
[INFO] minishift binary is /Users/admin/cdk390/bin/minishift
 
[INFO]: CDK homedir "/Users/admin/cdk390/minishift" already exists. To re-create contents within "/Users/admin/cdk390/minishift", please pass '-fc' as argument.
 
[EXECUTING]: export MINISHIFT_HOME="/Users/admin/cdk390/minishift"
[INFO] MINISHIFT_HOME=/Users/admin/cdk390/minishift
 
[INFO] Existing profiles and state:
    demo-ccd-profile-2vcpu-8gb:(Active):Running
    minishift::Does_Not_Exist

 

Step 1.4

As the cdk-setup-config script runs, provide the necessary details as prompted. In this case you are providing the details of the previous installation. Enter the number of CPUs (i.e. 2)

[Please enter the required information for your minishift VM configuration]
 
Minishift CPUs to be configured [1|2|4]: 2

 

Step 1.5

Enter the amount of RAM allocated in the previous installation (i.e. 8 GB)

Minishift RAM (GB) to be configured [6|8|10|12|16]: 8

 

Step 1.6

Enter the process used in the previous installation (i.e. demo-ccd)

Your PIE and PAMlet to be configured [demo-ccd|dev-sandbox|pie-mortgage]: demo-ccd

 

Step 1.7

Select the addon you want to perform (i.e. scaledown the current profile so that a new one can be used)

Install or Remove demo-ccd [install|remove|scaledown]: scaledown

 

Step 1.8

Review the options you've provided and confirm them by entering 'Y|y'.

Hello "". You've requested for a minishift VM of the following attributes:
   VM vCPUs:                 2
   VM RAM Size[GB]:          8
   VM Hypervisor Type:       virtualbox
   VM Minishift Addons:      demo-ccd
   VM Minishift Addon Task:  scaledown
   VM Minishift BaseEnv:    
Type 'Y|y' to proceed, 'R|r' to re-enter details and C|c' to Cancel: y

 

Step 1.9

The script continues to execute and then checks to see if you wish to update the repository (i.e., the LOCAL repository on your local machine). Enter your preference (in the case below, we entered 'n').

[EXECUTING] /Users/admin/cdk390/bin/minishift profile set demo-ccd-profile-2vcpu-8gb
Profile 'demo-ccd-profile-2vcpu-8gb' set as active profile.
 
[EXECUTING] /Users/admin/cdk390/bin/minishift addons enable admin-user
Add-on 'admin-user' enabled
 
[EXECUTING] /Users/admin/cdk390/bin/minishift addons disable xpaas
Add-on 'xpaas' is already disabled.
 
[EXECUTING] /Users/admin/cdk390/bin/minishift addons disable anyuid
Add-on 'anyuid' is already disabled.
 
[INFO] Processing add_on  [ demo-ccd ]
[INFO]: GIT directory /Users/admin/cdk390/minishift/repo/lc-cdk-addon-demo-ccd/.git already exists.
[INPUT]: Do you want to update the repository? [Y|y|N|n] :n

 

Step 1.10

Confirm you want to delete the profile created from the earlier installation (i.e. demo-ccd-profile-2vcpu-8gb)

[INFO] No addon tasks required for scaledown for demo-ccd-profile-2vcpu-8gb.
 
 
[INFO] OC_BIN=/Users/admin/cdk390/minishift/cache/oc/v3.11.104/darwin/oc
 
 
[START_DEPLOYMENT_STAGGER]: Thu 12 Sep 2019 17:48:26 AEST
 
Scaling replica of DC: demo-ccd-rhpam74-kieserver
[EXECUTING]: /Users/admin/cdk390/minishift/cache/oc/v3.11.104/darwin/oc scale deploymentconfig demo-ccd-rhpam74-kieserver -n demo-ccd --replicas=0
    deploymentconfig.apps.openshift.io/demo-ccd-rhpam74-kieserver scaled
    [demo-ccd-rhpam74-kieserver-1][Thu 12 Sep 2019 17:48:31 AEST] Replica count MATCH: DESIRED=0 CURRENT=0 READY=0. Next..
 
Scaling replica of DC: demo-ccd-entando-customer-engine
[EXECUTING]: /Users/admin/cdk390/minishift/cache/oc/v3.11.104/darwin/oc scale deploymentconfig demo-ccd-entando-customer-engine -n demo-ccd --replicas=0
    deploymentconfig.apps.openshift.io/demo-ccd-entando-customer-engine scaled
    [demo-ccd-entando-customer-engine-1][Thu 12 Sep 2019 17:48:37 AEST] Replica count MATCH: DESIRED=0 CURRENT=0 READY=0. Next..
 
Scaling replica of DC: demo-ccd-entando-backoffice-engine
[EXECUTING]: /Users/admin/cdk390/minishift/cache/oc/v3.11.104/darwin/oc scale deploymentconfig demo-ccd-entando-backoffice-engine -n demo-ccd --replicas=0
    deploymentconfig.apps.openshift.io/demo-ccd-entando-backoffice-engine scaled
    [demo-ccd-entando-backoffice-engine-1][Thu 12 Sep 2019 17:48:43 AEST] Replica count MATCH: DESIRED=0 CURRENT=0 READY=0. Next..
 
[END_DEPLOYMENT_STAGGER]: Thu 12 Sep 2019 17:48:43 AEST
 
 
[EXECUTING] /Users/admin/cdk390/bin/minishift stop
Stopping the OpenShift cluster...
Unregistering machine
Cluster stopped.
 
[INPUT] REMOVE|DELETE current VM and profile "demo-ccd-profile-2vcpu-8gb" [Y|y|N|n]: y

 

Step 1.11

The script deletes the profile.

[EXECUTING] /Users/admin/cdk390/bin/minishift delete --clear-cache
This will delete the cache content for all profiles. Do you want to continue [y/N]?: y
Removed cache content at: '/Users/admin/cdk390/minishift/cache'
You are deleting the Minishift VM: 'demo-ccd-profile-2vcpu-8gb'. Do you want to continue [y/N]?: y
Removing entries from kubeconfig for cluster: :8443
Deleting the Minishift VM...
Minishift VM deleted.
 
[EXECUTING] /Users/admin/cdk390/bin/minishift profile delete -f demo-ccd-profile-2vcpu-8gb
Profile 'demo-ccd-profile-2vcpu-8gb' deleted successfully.
Switching to default profile 'minishift' as the active profile.
 
[INFO] Profiles and state:
    minishift:(Active):Does_Not_Exist

Step 1.12

Run the script again to create the new profile

cdk-setup-config $ ./cdkget-setup-config.sh
 
[INFO]: cdk file /Users/admin/cdk390/bin/cdk-3.9.0-1-minishift-darwin-amd64 already exists.
 
[INFO]: cdk file /Users/admin/cdk390/bin/minishift copy of 
/Users/admin/cdk390/bin/cdk-3
.9.0-1-minishift-darwin-amd64 already exists.
 
[EXECUTING]: export PATH=/Users/admin/cdk390/bin:/usr/local/bin:/usr/bin:
/bin:/usr/sbin:/sbin:/Users/admin/bin:/Users/admin/bin
 
[INFO] minishift binary is /Users/admin/cdk390/bin/minishift
 
[INFO]: CDK homedir "/Users/admin/cdk390/minishift" already exists. To re-create contents within "/Users/admin/cdk390/minishift", please pass '-fc' as argument.
 
[EXECUTING]: export MINISHIFT_HOME="/Users/admin/cdk390/minishift"
[INFO] MINISHIFT_HOME=/Users/admin/cdk390/minishift
 
[INFO] Existing profiles and state:
    minishift:(Active):Does_Not_Exist
 
[Please enter the required information for your minishift VM configuration]

 

Step 1.13

As the cdk-setup-config script runs, provide the necessary details as prompted. In this case you are providing the details of the new installation. Enter the number of CPUs (i.e. 2)

...
...
[Please enter the required information for your minishift VM configuration]
 
Minishift CPUs to be configured [1|2|4]: 2

 

Step 1.14

Enter the amount of RAM allocated in the previous installation (i.e. 10 GB)

Minishift RAM (GB) to be configured [6|8|10|12|16]: 10

 

Step 1.15

Enter the process used in the previous installation (i.e. pie-mortgage)

Your PIE and PAMlet to be configured [demo-ccd|dev-sandbox|pie-mortgage]: pie-mortgage

 

Step 1.16

Select the addon you want to perform (i.e. install the new process)

Install or Remove pie-mortgage [install|remove|scaledown]: install

 

Step 1.17

Enter your Red Hat Developer's account credentials. If you don't have one, click here.

Your redhat developer username [E.g.: bob.brown@abc.com]: jon.snow@nights-watch.org
Your redhat developer password:

 

Step 1.18

Review the options you've provided and confirm them by entering 'Y|y'.

Hello "jon.snow@nights-watch.org". You've requested for a minishift VM of the following attributes:
   VM vCPUs:                 2
   VM RAM Size[GB]:          10
   VM Hypervisor Type:       virtualbox
   VM Minishift Addons:      pie-mortgage
   VM Minishift Addon Task:  install
   VM Minishift BaseEnv:     dev-sandbox
Type 'Y|y' to proceed, 'R|r' to re-enter details and C|c' to Cancel: y

 

Step 1.19

The script kicks off again and creates a new profile before launching the OpenShift Web Console....

####===add_on_list[ dev-sandbox pie-mortgage ]===####
 
[EXECUTING] /Users/admin/cdk390/bin/minishift profile set dev-sandbox-profile-2vcpu-10gb
Setting up CDK 3 on host using '/Users/admin/cdk390/minishift/profiles/dev-sandbox-profile-2vcpu-10gb' as Minishift's home directory
Creating configuration file '/Users/admin/cdk390/minishift/profiles/dev-sandbox-profile-2vcpu-10gb/config/config.json'
Creating marker file '/Users/admin/cdk390/minishift/profiles/dev-sandbox-profile-2vcpu-10gb/cdk'
Default add-ons anyuid, admin-user, xpaas, registry-route, che, htpasswd-identity-provider, eap-cd installed
Default add-ons anyuid, admin-user, xpaas enabled
Profile 'dev-sandbox-profile-2vcpu-10gb' set as active profile.
...
...
...
...
 
Logging in as admin..
 
[EXECUTING] /Users/admin/cdk390/minishift/cache/oc/v3.11.104/darwin/oc login https://192.168.99.130:8443 -u admin -p password -n pie-mortgage
    Login successful.
     
    You have access to the following projects and can switch between them with 'oc project <projectname>':
     
        default
        dev-sandbox
        kube-dns
        kube-proxy
        kube-public
        kube-system
        myproject
        openshift
        openshift-apiserver
        openshift-controller-manager
        openshift-core-operators
        openshift-infra
        openshift-node
        openshift-service-cert-signer
        openshift-web-console
      * pie-mortgage
     
    Using project "pie-mortgage".
[INFO] Starting minishift console
Opening the OpenShift Web console in the default browser...

It takes approximately 15 minutes on a MacBook with a 2.2 GHz Intel iCore7 processor and 16 GB of RAM for the script to complete the installation and launch the OpenShift Web Console. The last few lines of a successful installation are shown above.

Step 2 - Verify

Step 2.1

Based on the attributes selected (in the case above, installing the Mortgage Process PAMlet on the Dev Sandbox), the OpenShift Web Console will look similar to the screenshot below:

(NOTE: The URL of your OpenShift Console will be http://your-VirtualBox-IPaddress/console/. In the case of the screenshots below it is http://192.168.99.122/console/).

This has installed 3 projects:

  1. the base DEV environment (called dev-sandbox)
  2. an area for developers to create their own project called "My Project" (this is installed by default by OpenShift)
  3. the Mortgage Process PAMlet (called pie-mortgage)

Step 2.2

Depending on your machine, the Pods on CDK may take 5 to 10 minutes to be fully accessible.

Selecting the "pie-mortgage" project will present you with the applications inside the project:

Step 2.3

On the left-hand side of the OpenShift Portal Console, if you move your mouse over the Applications >" button, a pop-up menu will appear as per the screenshot below:

Step 2.4

Move your mouse down the pop-up menu and select "Routes". The following screen will appear:

Step 2.5

Using the Routes screen above, clicking on this link in the Hostname column - http://mortgage-entando-applicant.192.168.99.130.nip.io/mortgage-entando-applicant - will take you to the Customer UI for the Mortgage PAMlet:

Step 2.6

Using the Routes screen above, clicking on this link in the Hostname column - http://mortgage-entando-lender.192.168.99.130.nip.io/mortgage-entando-lender - will take you to the Customer UI for the Mortgage PAMlet:

Terry Lee
Terry Lee
Enterprise Application Integration Architect, specialising in webMethods, Red Hat. Solution architect and team lead experiences in global enterprise EAI implementation in HK, Taiwan, China, and Australia. Currently based in Melbourne, Australia. Extensive integration experience in Banking, Finance, High Tech Manufacturing, Logistics, Utility, Defence, Gambling, Superannuation, Garments Manufacturing, Beverage Manufacturing, and Consumer Electronic Manufacturing.

Related Posts

How data-driven insights can transform your business

All businesses have processes, from payroll to patient admissions. Often, the larger the organisation, the more unwieldy its processes can become.

Leonardo at 2019 Gartner Symposium ITXPO Gold Coast

Leonardo will be exhibiting at 2019 Gartner Symposium / ITXPO Gold Coast. We will be talking about how we drive end-to-end process improvement - from business architecture and modelling to process mining and automation, integration and platform- implemented for clients using an agile, scalable delivery model.

10 Common Problems in Container Adoption - And How to Fix It

The Compelling Origins of Containers A number of years ago, it become clear that the rise of container platforms was more than just a passing technology trend.  A genuine technology shift was taking place that would undoubtedly change the IT industry forever. Early indicators were everywhere.  Investment by the largest software industry giants was significant, as was their marketing positioning.  Pivotal and IBM were aggressive with Cloud Foundry and Blue Mix.  Red Hat was progressive with Openshift and receiving industry praise.  Docker Inc stormed onto the scene.  Then Google started the Kubernetes opensource project with immediate impact. Locally, there were also strong indicators.  MeetUp groups were started and quickly became well-attended - especially the Docker meetups based in Australia.  In the early days, the meetings were sold-out, and eager attendees weren't able to secure a spot.   After a humble start, the Kubernetes MeetUp was became very popular and continues to be so to this day. There was something brewing, and everyone wanted to be a part of it.