{"id":1395,"date":"2024-11-07T08:30:41","date_gmt":"2024-11-07T08:30:41","guid":{"rendered":"https:\/\/nas01.tallpaul.net\/wordpress\/?p=1395"},"modified":"2025-01-06T09:56:21","modified_gmt":"2025-01-06T09:56:21","slug":"sock-shop-lab","status":"publish","type":"post","link":"https:\/\/nas01.tallpaul.net\/wordpress\/2024\/11\/sock-shop-lab\/","title":{"rendered":"Deploy x86 Microservices on Power with OpenShift"},"content":{"rendered":"\n<p class=\"has-large-font-size\">Hands-on Tutorial<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Table of Contents<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#Introduction\">Introduction<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#The-Sock-Shop\">The Sock Shop<\/a><\/li>\n\n\n\n<li><a href=\"#The-Hands-on-Lab\">The Hands-on Lab<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#Getting-Started\">Getting Started<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#Assumptions\">Assumptions<\/a><\/li>\n\n\n\n<li><a href=\"#Connect-to-the-Bastion-CLI\">Connect to the Bastion CLI<\/a><\/li>\n\n\n\n<li><a href=\"#Login-to-OpenShift\">Login to OpenShift<\/a><\/li>\n\n\n\n<li><a href=\"#Copy-login-command-for-CLI-use\">Copy login command for CLI use<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#Understand-the-Go-Build-Process\">Understand the Go Build Process<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#Clone-from-GitHub\">Clone from GitHub<\/a><\/li>\n\n\n\n<li><a href=\"#Analyzing-the-Go-build-process\">Analyzing the Go build process<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#Build-and-Push-Go-Container-to-the-Internal-Registry\">Build and Push Go Container to the Internal Registry<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#Building-the-Go-Container\">Building the Go Container<\/a><\/li>\n\n\n\n<li><a href=\"#Push-the-Go-image-to-the-internal-registry\">Push the Go image to the internal registry<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#Building-a-.NET-Service-from-a-UBI-image\">Building a .NET Service from a UBI image<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#Clone-the-.NET-application-from-GitHub\">Clone the .NET application from GitHub<\/a><\/li>\n\n\n\n<li><a href=\"#Understanding-the-NET-build-process\">Understanding the NET build process<\/a><\/li>\n\n\n\n<li><a href=\"#Creating-the-Dockerfile-to-build-the-microservice-container\">Creating the Dockerfile to build the microservice container<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#Build-and-Push-.NET-Container-to-the-Registry\">Build and Push .NET Container to the Registry<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#Building-the-.NET-Container\">Building the .NET Container<\/a><\/li>\n\n\n\n<li><a href=\"#Push-the-.NET-images-to-the-internal-registry\">Push the .NET images to the internal registry<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#Deploy-the-Microservice-Application\">Deploy the Microservice Application<\/a><\/li>\n\n\n\n<li><a href=\"#Access-the-Application-on-OpenShift\">Access the Application on OpenShift<\/a><\/li>\n\n\n\n<li><a href=\"#Lab-Wrap-up\">Lab Wrap up<\/a><\/li>\n\n\n\n<li><a href=\"#OpenShift-Multi-Arch-Compute\">OpenShift Multi-Arch Compute<\/a>\n<ol class=\"wp-block-list\">\n<li><a href=\"#YouTube\">YouTube<\/a>\n<ol class=\"wp-block-list\">\n<li>&nbsp;<a href=\"#Introduction-and-Early-Adoption-Program-Replay\">Introduction and Early Adoption Program Replay<\/a><\/li>\n\n\n\n<li><a href=\"#UKI-Brunch-&amp;-Learn-Replay\">UKI Brunch &amp; Learn Replay<\/a><\/li>\n\n\n\n<li><a href=\"#Deploy-the-Sock-Shop-Demonstration\">Deploy the Sock Shop Demonstration<\/a><\/li>\n\n\n\n<li><a href=\"#Migrating-Workloads-between-x86-&amp;-IBM-Power-Worker-Nodes\">Migrating-Workloads-between-x86-&amp;-IBM-Power-Worker-Nodes<\/a> <\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><a href=\"#IBM-Redbook\">IBM Redbook<\/a><\/li>\n\n\n\n<li><a href=\"#Power-Modernisation-Website\">Power Modernisation Website<\/a><\/li>\n\n\n\n<li><a href=\"#Multi-Arch-Compute-Assistance\">Multi-Arch Compute Assistance Compute<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Introduction\">1 Introduction<\/h2>\n\n\n\n<p>In this lab, you will take an Open-Source E-Commerce solution written for x86 around eight years ago and make it run on Power with OpenShift, using Java, Node.js, Go and .NET microservices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"The-Sock-Shop\"> 1.1 The Sock Shop<\/h3>\n\n\n\n<p>The Sock Shop is a sample microservices application created by Weaveworks that Luke Marsden presented at Code Mesh 2016. The complete recording of the presentation is available for replay below.<\/p>\n\n\n\n<p><a href=\"https:\/\/youtu.be\/zzSElP8pQUA \">https:\/\/youtu.be\/zzSElP8pQUA <\/a><\/p>\n\n\n\n<p>Weaveworks created the Sock Shop to address a gap in microservices demonstrations. While there was much discussion about microservices back then, most demos were overly simplistic examples (like a basic counter or guestbook application) that didn&#8217;t reflect real-world complexity. Weaveworks wanted to create a more realistic reference application to demonstrate microservices&#8217; best practices.<\/p>\n\n\n\n<p>The Sock Shop is an e-commerce application for selling socks. While visually simple, its backend architecture demonstrates actual microservices patterns:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Multiple independent services that can be maintained, upgraded and deployed separately<\/li>\n\n\n\n<li>Services written in different programming languages (including Go, Node.js, Java Spring and .NET)<\/li>\n\n\n\n<li>Each stateful service has its independent database to avoid schema coupling<\/li>\n\n\n\n<li>REST APIs for service communication<\/li>\n\n\n\n<li>Components include:<ul><li>&nbsp;&nbsp;Frontend UI<\/li><\/ul><ul><li>&nbsp;&nbsp;Catalog service<\/li><\/ul><ul><li>&nbsp;&nbsp;Cart service<\/li><\/ul><ul><li>&nbsp;&nbsp;User\/account service<\/li><\/ul><ul><li>&nbsp;&nbsp;Order service<\/li><\/ul>\n<ul class=\"wp-block-list\">\n<li>&nbsp;&nbsp;Multiple databases<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>The application was designed to be cross-platform compatible, with implementations for multiple container orchestration platforms including Docker Compose, Kubernetes, DC\/OS, and Amazon ECS. This made it valuable as a testing ground for different orchestration technologies and deployment patterns.<\/p>\n\n\n\n<p>The Sock Shop served as both a learning tool for microservices best practices (and mistakes) and as a realistic test application for container orchestration platforms and related tooling.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"538\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Sock-Shop-Architecture.jpg\" alt=\"\" class=\"wp-image-1416\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Sock-Shop-Architecture.jpg 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Sock-Shop-Architecture-300x240.jpg 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"The-Hands-on-Lab\">1.2 The Hands-on Lab<\/h3>\n\n\n\n<p>The Sock Shop application was written around eight years ago, way before the components and OpenShift was available and supported on IBM Power. Today, you will modify two of the x86 microservice components to work on IBM Power ppc64le with Red Hat OpenShift. Of course, all the other components have also been modified to work on IBM Power, but due to the time available to us today, we will concentrate on the user (Go) and orders (.NET) microservices and deploy the complete application with already updated, prebuilt images. You are welcome to work through the other microservices outside of this lab\/class.<\/p>\n\n\n\n<p>The purpose of the lab is to show you how a microservice-based solution designed and written for x86 may also easily run on IBM Power. Developer experience is not required. <\/p>\n\n\n\n<p>The first part of the lab will focus on getting familiar with using the lab environment:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connecting to the SSH command line interface for the bastion<\/li>\n\n\n\n<li>Connecting to the OpenShift Console via Web Browser<\/li>\n\n\n\n<li>Loging into OpenShift via the command line interface<\/li>\n<\/ul>\n\n\n\n<p>The second part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cloning and analyzing the user microservice created using Go for x86<\/li>\n<\/ul>\n\n\n\n<p>The third part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Building the Go microservice on Power and pushing to the OpenShift Internal Registry<\/li>\n<\/ul>\n\n\n\n<p>The fourth part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cloning and analyzing the orders microservice created with .NET for x86<\/li>\n\n\n\n<li>Creating a Dockerfile to build the .NET orders microservice on Power<\/li>\n<\/ul>\n\n\n\n<p>The fifth part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Building the .NET microservice on Power and pushing to the OpenShift Internal Registry<\/li>\n<\/ul>\n\n\n\n<p>The sixth part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Deploying the microservice solution on Power with OpenShift<\/li>\n<\/ul>\n\n\n\n<p>The seventh part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Accessing the solution<\/li>\n<\/ul>\n\n\n\n<p>The eighth part of the lab will focus on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Wrapping up the hands-on lab exercise<\/li>\n<\/ul>\n\n\n\n<p>The final part of the lab guide provides additional information about the new Red Hat OpenShift Multi-Arch Compute functionality.<\/p>\n\n\n\n<p><strong>Please Note<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>Commands that you should execute are displayed in bold blue txt. Left click within this area to copy the command to you clipboard.<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Example output from commands that have been executed are displayed with white txt with black background.<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Bullet items are required actions <\/li>\n<\/ul>\n\n\n\n<p>Standard paragraphs are for informational purposes.<\/p>\n\n\n\n<p>Below is a silent walkthrough of this hands-on lab, alongside instructions. I will add commentary when I have time.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"1607 Walk through\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/RIuJa62d54g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">10-minute silent walk-through of the entire lab<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Getting-Started\">2 Getting Started<\/h2>\n\n\n\n<p>This part of the demo will guide you through the process of cloning the code hosted on GitHub and inspecting the files to understand how the code is organized to build container images. This part of the demo will be carried out using the root user. Rootless containers are possible, but more effort is needed, so we will run the demos as root today. In a production environment, we would not use root, but the process is similar.<\/p>\n\n\n\n<p>You can watch this lab on an unlisted YouTube playlist below<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Deploy an x86 Microservice Solution on Power\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/videoseries?list=PLfJ-244JZEg8mjuGr4Ly-Irr9SyF-8j7V\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Assumptions\">2.1 Assumptions<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You have access to an OpenShift Container Platform (OCP) environment\n<ul class=\"wp-block-list\">\n<li><strong>Make a note of the OCP Console URL<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>You have access to a RHEL-based Bastion LPAR\n<ul class=\"wp-block-list\">\n<li><strong>Make a note of the Bastion IP address<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>The OCP user that you use is &#8220;cecuser&#8221;, if not, then just substitute &#8220;cecuser&#8221; for your own OCP user name\n<ul class=\"wp-block-list\">\n<li><strong>Make a note the OCP user name; if not using &#8220;cecuser&#8221; <\/strong><\/li>\n\n\n\n<li><strong>Make a note of the &#8220;cecuser&#8221; password<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Connect-to-the-Bastion-CLI\">2.2 Connect to the Bastion CLI<\/h3>\n\n\n\n<p>Now we will go over the steps to connect to the CLI for the environment. <\/p>\n\n\n\n<p>I typically use the Putty application, but you are free to use your favourite terminal.<\/p>\n\n\n\n<p>Putty is available for download <a rel=\"noreferrer noopener\" href=\"https:\/\/www.putty.org\/\" target=\"_blank\">HERE<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Putty from the above link if desired.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the Putty application.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"367\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-icon.jpg\" alt=\"\" class=\"wp-image-1418\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-icon.jpg 894w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-icon-300x123.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-icon-768x315.jpg 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you are using IBM TechZone resources, fill the hostname with the IP address of your Bastion. The hostname and IP address may be found in your assigned Project Kit.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"573\" height=\"566\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty.jpg\" alt=\"\" class=\"wp-image-1419\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty.jpg 573w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-300x296.jpg 300w\" sizes=\"auto, (max-width: 573px) 100vw, 573px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Press Open<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"546\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Open.jpg\" alt=\"\" class=\"wp-image-1420\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Open.jpg 554w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Open-300x296.jpg 300w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click Accept<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"810\" height=\"607\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Accept.jpg\" alt=\"\" class=\"wp-image-1421\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Accept.jpg 810w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Accept-300x225.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-Accept-768x576.jpg 768w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You will see a \u201clogin as:\u201d prompt. Type cecuser and press enter:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"948\" height=\"473\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-login.jpg\" alt=\"\" class=\"wp-image-1424\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-login.jpg 948w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-login-300x150.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Putty-login-768x383.jpg 768w\" sizes=\"auto, (max-width: 948px) 100vw, 948px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enter the password for the &#8220;cecuser&#8221; user. This will be the same for both the CLI and the GUI.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Login-to-OpenShift\">2.3 Login to OpenShift<\/h3>\n\n\n\n<p>To log in to the OpenShift environment from the command line, find the oc login command in your OpenShift GUI.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Point your browser to your OpenShift web console<\/li>\n\n\n\n<li>Accept the certificate warning if certificates have not been configured correctly on demo equipment. <\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full has-custom-border\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"541\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Warning.jpg\" alt=\"\" class=\"wp-image-1426\" style=\"border-width:1px\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Warning.jpg 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Warning-300x242.jpg 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on the htpasswd option:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"218\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-1.jpg\" alt=\"\" class=\"wp-image-1397\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-1.jpg 441w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-1-300x148.jpg 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add your user and password contained in step 2.1 and Click login.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"206\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-2.jpg\" alt=\"\" class=\"wp-image-1398\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If this is your first time, familiarize yourself with the navigation for approximately 10 minutes. You can easily switch between Developer and Administrator views using the menu option located at the top left corner.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"481\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Admin-Dev-1024x481.jpg\" alt=\"\" class=\"wp-image-1400\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Admin-Dev-1024x481.jpg 1024w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Admin-Dev-300x141.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Admin-Dev-768x360.jpg 768w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Admin-Dev-1536x721.jpg 1536w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Admin-Dev-2048x961.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Copy-login-command-for-CLI-use\">2.4 Copy login command for CLI use<\/h3>\n\n\n\n<p>If you need to log in again to the CLI for any reason, you can find the login command from the main OpenShift web console page.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On the top right side, you will see the cecuser drop-down; click on it and then on \u201cCopy login command\u201d<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"478\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Copy-Login-Cmd-1024x478.jpg\" alt=\"\" class=\"wp-image-1402\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Copy-Login-Cmd-1024x478.jpg 1024w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Copy-Login-Cmd-300x140.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Copy-Login-Cmd-768x359.jpg 768w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Copy-Login-Cmd-1536x718.jpg 1536w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Copy-Login-Cmd-2048x957.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once again, click on the htpasswd option:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"218\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-1.jpg\" alt=\"\" class=\"wp-image-1397\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-1.jpg 441w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-1-300x148.jpg 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add your user and password described in step 2.1 and Click login.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"250\" height=\"206\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/OCP-Login-2-1.jpg\" alt=\"\" class=\"wp-image-1399\"\/><\/figure>\n\n\n\n<p>Click on Display Token on the top left<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"155\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/display-token-1024x155.jpg\" alt=\"\" class=\"wp-image-1404\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/display-token-1024x155.jpg 1024w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/display-token-300x45.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/display-token-768x116.jpg 768w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/display-token-1536x232.jpg 1536w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/display-token-2048x310.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can use the oc login command whenever your Authorization has expired. You may need to use the API token to log in to the registry.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"242\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Token-1024x242.jpg\" alt=\"\" class=\"wp-image-1405\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Token-1024x242.jpg 1024w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Token-300x71.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Token-768x181.jpg 768w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Token-1536x362.jpg 1536w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Token-2048x483.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>As cecuser, copy and paste the oc login command from the web page into your Putty Session.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code>oc login --token=&#91;Add your own token] server=&#91;Add you own server]<\/code><\/pre>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>oc login --token=sha256~8HzJyuecqujfeCXsaDnAeUUJ9VMsLafr-cJk5yn8tGk --server=https:\/\/api.p1289.cecc.ihost.com:6443\n\nLogged into \"https:\/\/api.p1289.cecc.ihost.com:6443\" as \"cecuser\" using the token provided.You have access to 71 projects, the list has been suppressed. You can list all projects with 'oc projects'Using project \"default\".<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Understand-the-Go-Build-Process\">3 Understand the Go Build Process<\/h2>\n\n\n\n<p>This hands-on lab is intended for a Power Infrastructure person, so you just need to understand the following at a reasonably high level to give Developers guidance on how to develop for multiplatform.<\/p>\n\n\n\n<p>Most of the time, all that is needed is to find the right image to compile the code and build the container.<\/p>\n\n\n\n<p>You can view a recording of the lab exercise <a href=\"https:\/\/youtu.be\/UzxV9qKRDqc\">HERE<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"1607 Lab Exercise 3\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/UzxV9qKRDqc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Clone-from-GitHub\">3.1 Clone from GitHub<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We will be running this demo using the root user. To get root access use the command as follows:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>sudo su -<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Last login: Wed Oct 30 09:57:14 EDT 2024 from 129.40.95.89 on pts\/2<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check you have the correct user. The whoami command should return root.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>whoami<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>root<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Git<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>dnf install git -y<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Updating Subscription Management repositories.\nRed Hat Enterprise Linux 8 for Power, little en  19 kB\/s | 3.8 kB     00:00\nRed Hat CodeReady Linux Builder for RHEL 8 Powe  63 kB\/s | 4.5 kB     00:00\nRed Hat Enterprise Linux 8 for Power, little en  22 kB\/s | 4.1 kB     00:00\nRed Hat Enterprise Linux 8 for Power, little en  49 kB\/s | 4.5 kB     00:00\nRed Hat Enterprise Linux 8 for Power, little en  78 MB\/s |  58 MB     00:00\nDependencies resolved.\n================================================================================\n Package       Arch    Version          Repository                         Size\n================================================================================\nInstalling:\n git           ppc64le 2.43.5-1.el8_10  rhel-8-for-ppc64le-appstream-rpms  92 k\nInstalling dependencies:\n emacs-filesystem\n               noarch  1:26.1-12.el8_10 rhel-8-for-ppc64le-baseos-rpms     70 k\n git-core      ppc64le 2.43.5-1.el8_10  rhel-8-for-ppc64le-appstream-rpms  13 M\n git-core-doc  noarch  2.43.5-1.el8_10  rhel-8-for-ppc64le-appstream-rpms 3.1 M\n perl-Error    noarch  1:0.17025-2.el8  rhel-8-for-ppc64le-appstream-rpms  46 k\n perl-Git      noarch  2.43.5-1.el8_10  rhel-8-for-ppc64le-appstream-rpms  79 k\n perl-TermReadKey\n               ppc64le 2.37-7.el8       rhel-8-for-ppc64le-appstream-rpms  42 k\n\nTransaction Summary\n================================================================================\nInstall  7 Packages\n\nTotal download size: 16 M\nInstalled size: 55 M\nDownloading Packages:\n(1\/7): perl-Error-0.17025-2.el8.noarch.rpm      344 kB\/s |  46 kB     00:00\n(2\/7): perl-TermReadKey-2.37-7.el8.ppc64le.rpm  257 kB\/s |  42 kB     00:00\n(3\/7): emacs-filesystem-26.1-12.el8_10.noarch.r 394 kB\/s |  70 kB     00:00\n(4\/7): git-2.43.5-1.el8_10.ppc64le.rpm          1.5 MB\/s |  92 kB     00:00\n(5\/7): perl-Git-2.43.5-1.el8_10.noarch.rpm      1.0 MB\/s |  79 kB     00:00\n(6\/7): git-core-doc-2.43.5-1.el8_10.noarch.rpm   23 MB\/s | 3.1 MB     00:00\n(7\/7): git-core-2.43.5-1.el8_10.ppc64le.rpm      52 MB\/s |  13 MB     00:00\n--------------------------------------------------------------------------------\nTotal                                            39 MB\/s |  16 MB     00:00\nRunning transaction check\nTransaction check succeeded.\nRunning transaction test\nTransaction test succeeded.\nRunning transaction\n  Preparing        :                                                        1\/1\n  Installing       : git-core-2.43.5-1.el8_10.ppc64le                       1\/7\n  Installing       : git-core-doc-2.43.5-1.el8_10.noarch                    2\/7\n  Installing       : perl-Error-1:0.17025-2.el8.noarch                      3\/7\n  Installing       : perl-TermReadKey-2.37-7.el8.ppc64le                    4\/7\n  Installing       : emacs-filesystem-1:26.1-12.el8_10.noarch               5\/7\n  Installing       : perl-Git-2.43.5-1.el8_10.noarch                        6\/7\n  Installing       : git-2.43.5-1.el8_10.ppc64le                            7\/7\n  Running scriptlet: git-2.43.5-1.el8_10.ppc64le                            7\/7\n  Verifying        : emacs-filesystem-1:26.1-12.el8_10.noarch               1\/7\n  Verifying        : perl-TermReadKey-2.37-7.el8.ppc64le                    2\/7\n  Verifying        : perl-Error-1:0.17025-2.el8.noarch                      3\/7\n  Verifying        : git-2.43.5-1.el8_10.ppc64le                            4\/7\n  Verifying        : git-core-2.43.5-1.el8_10.ppc64le                       5\/7\n  Verifying        : git-core-doc-2.43.5-1.el8_10.noarch                    6\/7\n  Verifying        : perl-Git-2.43.5-1.el8_10.noarch                        7\/7\nInstalled products updated.\n\nInstalled:\n  emacs-filesystem-1:26.1-12.el8_10.noarch  git-2.43.5-1.el8_10.ppc64le\n  git-core-2.43.5-1.el8_10.ppc64le          git-core-doc-2.43.5-1.el8_10.noarch\n  perl-Error-1:0.17025-2.el8.noarch         perl-Git-2.43.5-1.el8_10.noarch\n  perl-TermReadKey-2.37-7.el8.ppc64le\n\nComplete!<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a build directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>mkdir build<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change to the newly created Directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>cd build<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check you are in the correct Directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>pwd<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>\/root\/build<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Inside the new directory under the root home, you can now clone the user project to your server.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>git clone https:\/\/github.com\/paulchapmanibm\/microservices-demo-user.git<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Cloning into 'microservices-demo-user'...\nremote: Enumerating objects: 1013, done.\nremote: Counting objects: 100% (27\/27), done.\nremote: Compressing objects: 100% (17\/17), done.\nremote: Total 1013 (delta 13), reused 20 (delta 10), pack-reused 986 (from 1)\nReceiving objects: 100% (1013\/1013), 173.10 KiB | 4.81 MiB\/s, done.\nResolving deltas: 100% (574\/574), done.<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You should see a new folder created:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>ls -la<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>drwxr-xr-x.  3 root root   37 Oct 31 13:37 .\ndr-xr-x---. 13 root root 4096 Oct 31 13:34 ..\ndrwxr-xr-x. 10 root root 4096 Oct 31 13:37 microservices-demo-user\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change to this directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>cd microservices-demo-user<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>ls<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>\napi      docker                     Dockerfile.ubi8  LICENSE   README.md\napispec  docker-compose.yml         glide.lock       main.go   scripts\ndb       docker-compose-zipkin.yml  glide.yaml       Makefile  users<\/code><\/pre>\n\n\n\n<p>You can see some <strong>.go <\/strong>files. This normally means you are working with a Golang or simply a \u201cGo\u201d application. We will understand how Go applications are built in the next section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Analyzing-the-Go-build-process\">3.2 Analyzing the Go build process<\/h3>\n\n\n\n<p>We will analyze the directory&#8217;s contents to ensure we understand how the application is built in container form. The Dockerfile is the main file that holds this information, as it determines the content of the container image and how it is built.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Search the directory for the Dockerfile<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>ls -la<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>total 64\ndrwxr-xr-x. 10 root root  4096 Dec 17 06:22 .\ndrwxr-xr-x.  3 root root    37 Dec 17 06:22 ..\ndrwxr-xr-x.  2 root root   161 Dec 17 06:22 api\ndrwxr-xr-x.  2 root root    56 Dec 17 06:22 apispec\ndrwxr-xr-x.  3 root root    52 Dec 17 06:22 db\ndrwxr-xr-x.  4 root root    33 Dec 17 06:22 docker\n-rw-r--r--.  1 root root   854 Dec 17 06:22 docker-compose.yml\n-rw-r--r--.  1 root root  1447 Dec 17 06:22 docker-compose-zipkin.yml\n-rw-r--r--.  1 root root   517 Dec 17 06:22 Dockerfile.ubi8\ndrwxr-xr-x.  8 root root   163 Dec 17 06:22 .git\ndrwxr-xr-x.  2 root root    86 Dec 17 06:22 .github\n-rw-r--r--.  1 root root    27 Dec 17 06:22 .gitignore\n-rw-r--r--.  1 root root  4398 Dec 17 06:22 glide.lock\n-rw-r--r--.  1 root root   737 Dec 17 06:22 glide.yaml\n-rw-r--r--.  1 root root 11357 Dec 17 06:22 LICENSE\n-rw-r--r--.  1 root root  5200 Dec 17 06:22 main.go\n-rw-r--r--.  1 root root  2437 Dec 17 06:22 Makefile\n-rw-r--r--.  1 root root  2383 Dec 17 06:22 README.md\ndrwxr-xr-x.  2 root root    45 Dec 17 06:22 scripts\n-rw-r--r--.  1 root root  1072 Dec 17 06:22 .travis.yml\ndrwxr-xr-x.  2 root root   141 Dec 17 06:22 users<\/code><\/pre>\n\n\n\n<p>Note the Dockerfile directory.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List files inside the docker directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>ls -la docker<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>total 4\ndrwxr-xr-x.  4 root root   33 Oct  3 16:52 .\ndrwxr-xr-x. 10 root root 4096 Oct  3 16:52 ..\ndrwxr-xr-x.  2 root root   32 Oct  3 16:52 user\ndrwxr-xr-x.  3 root root   39 Oct  3 16:52 user-db <\/code><\/pre>\n\n\n\n<p>There are two \u201cUser\u201d microservices. The application is based on Go, and the database on MongoDB. We will not alter MongoDB, but will focus on the &#8220;user&#8221; application today.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the user directory inside the docker directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>ls -la docker\/user<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>total 4\ndrwxr-xr-x. 2 root root  32 Oct  3 16:52 .\ndrwxr-xr-x. 4 root root  33 Oct  3 16:52 ..\n-rw-r--r--. 1 root root 870 Oct  3 16:52 Dockerfile-release \n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the Dockerfile-release file in the current docker\/user directory. Do not try to understand it now; we will do this step by step during the demo.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>cat docker\/user\/Dockerfile-release<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>FROM golang:1.7-alpine\n\nCOPY . \/go\/src\/github.com\/microservices-demo\/user\/\nWORKDIR \/go\/src\/github.com\/microservices-demo\/user\/\n\nRUN apk update\nRUN apk add git\nRUN go get -v github.com\/Masterminds\/glide\nRUN glide install &amp;&amp; CGO_ENABLED=0 go build -a -installsuffix cgo -o \/user main.go\n\nFROM alpine:3.4\n\nENV\tSERVICE_USER=myuser \\\n\tSERVICE_UID=10001 \\\n\tSERVICE_GROUP=mygroup \\\n\tSERVICE_GID=10001\n\nRUN\taddgroup -g ${SERVICE_GID} ${SERVICE_GROUP} &amp;&amp; \\\n\tadduser -g \"${SERVICE_NAME} user\" -D -H -G ${SERVICE_GROUP} -s \/sbin\/nologin -u ${SERVICE_UID} ${SERVICE_USER} &amp;&amp; \\\n\tapk add --update libcap\n\nENV HATEAOS user\nENV USER_DATABASE mongodb\nENV MONGO_HOST user-db\n\nWORKDIR \/\nEXPOSE 80\nCOPY --from=0 \/user \/\n\nRUN\tchmod +x \/user &amp;&amp; \\\n\tchown -R ${SERVICE_USER}:${SERVICE_GROUP} \/user &amp;&amp; \\\n\tsetcap 'cap_net_bind_service=+ep' \/user\n\nUSER ${SERVICE_USER}\n\nCMD &#91;\"\/user\", \"-port=80\"]<\/code><\/pre>\n\n\n\n<p>It is a big Dockerfile because the developer who created the microservice is using it to build and package in a single step. (This is not always the case. Some Dockerfiles may be simpler with build and packaging separated into different files and run at different times, which you will see with the .NET microservice later.) <\/p>\n\n\n\n<p>Review the example below that has only the compiling section of the application.<\/p>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>FROM golang:1.7-alpine\n\nCOPY . \/go\/src\/github.com\/microservices-demo\/user\/\nWORKDIR \/go\/src\/github.com\/microservices-demo\/user\/\n\nRUN apk update\nRUN apk add git\nRUN go get -v github.com\/Masterminds\/glide\nRUN glide install &amp;&amp; CGO_ENABLED=0 go build -a -installsuffix cgo -o \/user main.go<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Starting from the building part of the Dockerfile, we see above that the project uses a very old Golang image (FROM golang:1.7).<\/li>\n\n\n\n<li>It copies the entire catalog source internally to the image and changes the working directory to where the package was copied.<\/li>\n\n\n\n<li>The Alpine Package Keeper (apk) performs an update and adds Git.<\/li>\n\n\n\n<li>It runs a `go get` for glide, which is an old tool for dependency support and is not needed in newer versions of go. (It is unlikely that up-to-date applications maintained by customers will still be using this.)<\/li>\n\n\n\n<li>Next `glide install` is used to install any dependencies, and `go build` to compile the main.go file.<\/li>\n<\/ol>\n\n\n\n<p>Remember that our task at this point is not to understand the code but to build it to work on Power.<\/p>\n\n\n\n<p>Given this build, we need an image for golang (from the first part delimited by \u201c:\u201d) that has a tag close to \u201c1.7\u201d that means a go image that is the closest to the version 1.7. It is better to use the same version even if newer ones are available because the code might use functions that were deprecated and discontinued on newer versions, and the idea at this stage is not to correct issues, just show that whatever is being done on x86 will build just fine on ppc64le.&nbsp;<\/p>\n\n\n\n<p>Sometimes, the exact version is not possible to find (as in this case with Golang, because it is such an old image).<\/p>\n\n\n\n<p>A common place to start looking for open-source images is often <a href=\"https:\/\/hub.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Docker Hub<\/a>. However, <a href=\"https:\/\/quay.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Red Hat Quay.io<\/a> is becoming a better choice to host images because of the limitations that Docker has started imposing on downloads from Dockerhub.<\/p>\n\n\n\n<p>For the past three years, we have run this hands-on lab at conferences and workshops Globally, describing how to modify the above Dockerfile to run on IBM Power. Initially, we modified the Dockerfile to pull golang v1.11 because v1.7 is very old and does not support IBM Power ppc64le.<\/p>\n\n\n\n<p>However, I discovered a problem with this approach in May 2024 whilst preparing to run the lab at a European Conference. The container version of GoLang on DockerHub was based on Debian v10, Buster, which went end of life in June 2024. In preparation for EOL, Debian moved the media to an archive folder. Two alternative solutions were considered, and both were tested successfully.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Adjust the original GoLang Dockerfile to use the Debian archive.<\/li>\n\n\n\n<li>The preferred option is utilising the Red Hat Universal Base Image.<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Review the changes made for the preferred option #2 in the Dockerfile comments below.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code># Changed to use the go-toolset from Red Hat \nFROM registry.access.redhat.com\/ubi8\/go-toolset:latest as builder\n\n# Sets the working directory\nWORKDIR \/go\/src\/github.com\/microservices-demo\/user\/\n\n# Change ownership of copied files\nCOPY --chown=1001:0 . \/go\/src\/github.com\/microservices-demo\/user\/\n\n# The go mod init command creates a go.mod file to track your code's dependencies\n# go mod tidy removes any unused dependencies and adds any missing dependencies to the go. mod file. It also updates the versions of the dependencies to the latest compatible versions, as specified in the go. mod file. \n# go build is then used to compile the project \nRUN  go mod init github.com\/microservices-demo\/user &amp;&amp; go mod tidy &amp;&amp; GOOS=linux go build .\n\n# Uses the Red Hat Universal Base Image \nFROM registry.access.redhat.com\/ubi8\/ubi-minimal:latest\n\n# No change to environments\nENV HATEAOS user\nENV USER_DATABASE mongodb\nENV MONGO_HOST user-db\n\n# Sets the working directory\nWORKDIR \/\n\n# Exposes the network port 8080\nEXPOSE 8080\n\n# \u201cbuilder\u201d below refers to the Golang stage defined earlier\nCOPY --from=builder \/go\/src\/github.com\/microservices-demo\/user\/user \/\n\n# No change, sets network port to 8080\nCMD &#91;\"\/user\", \"-port=8080\"]\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now create the new Dockerfile, excluding the comments, based on the preferred option above.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>echo 'FROM registry.access.redhat.com\/ubi8\/go-toolset:latest as builder\nWORKDIR \/go\/src\/github.com\/microservices-demo\/user\/\nCOPY --chown=1001:0 . \/go\/src\/github.com\/microservices-demo\/user\/\nRUN  go mod init github.com\/microservices-demo\/user &amp;&amp; go mod tidy &amp;&amp; GOOS=linux go build .\nFROM registry.access.redhat.com\/ubi8\/ubi-minimal:latest\nENV HATEAOS user\nENV USER_DATABASE mongodb\nENV MONGO_HOST user-db\nWORKDIR \/\nEXPOSE 8080\nCOPY --from=builder \/go\/src\/github.com\/microservices-demo\/user\/user \/\nCMD &#91;\"\/user\", \"-port=8080\"]'&gt;Dockerfile<\/strong><\/code><\/pre>\n\n\n\n<p>Now we have a single Dockerfile that will build the application on Power and containerize it in a single step, making it easier to integrate the software.<\/p>\n\n\n\n<h2 class=\"has-contrast-color has-text-color wp-block-heading\" id=\"Build-and-Push-Go-Container-to-the-Internal-Registry\">4 Build and Push Go Container to the Internal Registry <\/h2>\n\n\n\n<p>You may hear the names Docker registry, JFrog Artifactory, Nexus, Quay, or simply local registry. These registries are just different types of repositories for container images. Developers may use them for other parts, like maven repositories, but this goes beyond the scope of this lab.&nbsp;<\/p>\n\n\n\n<p>For this lab, we will use the internal OpenShift Registry.<\/p>\n\n\n\n<p>A centralized Enterprise image registry could be used, but creating such a registry is beyond the scope of this lab.<\/p>\n\n\n\n<p>You can view a recording of the lab exercise <a href=\"https:\/\/youtu.be\/nMjP4xzov18\" target=\"_blank\" rel=\"noreferrer noopener\">HERE<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"1607 Lab Exercise 4\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/nMjP4xzov18?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4.1-Building-the-Go-Container\">4.1 Building the Go Container<\/h2>\n\n\n\n<p>With the Dockerfile created and the images for Power already known, the container-building process is straightforward.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run the command to get the image registry Route into a variable.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>REGISTRYHOST=$(su - cecuser -c \"oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}'\")<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the command correctly captured the host<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>echo $REGISTRYHOST<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>default-route-openshift-image-registry.apps.p1334.cecc.ihost.com<\/code><\/pre>\n\n\n\n<p>The route above will be different. It can\u2019t be blank. If it is blank, make sure you log into the OCP as described in Section 2.4, &#8220;<em>Copy login command for CLI use<\/em>&#8220;.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run the podman command to build our new image using the Dockerfile we created previously and tag it to the internal registry for the course.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>podman build -f Dockerfile --tag $REGISTRYHOST\/sock-shop\/user:latest<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>&#91;1\/2] STEP 1\/4: FROM registry.access.redhat.com\/ubi8\/go-toolset:latest AS builder\n&#91;1\/2] STEP 2\/4: WORKDIR \/go\/src\/github.com\/microservices-demo\/user\/\n--&gt; Using cache 2963cdf719c22d60e3a2769d903b80a65097b5bd1e0feff1e6d2e3984546b75d\n--&gt; 2963cdf719c2\n&#91;1\/2] STEP 3\/4: COPY --chown=1001:0 . \/go\/src\/github.com\/microservices-demo\/user\/\n--&gt; 3e88177147fb\n&#91;1\/2] STEP 4\/4: RUN  go mod init github.com\/microservices-demo\/user &amp;&amp; go mod tidy &amp;&amp; GOOS=linux go build . \ngo: creating new go.mod: module github.com\/microservices-demo\/user\n.\n.\n.\n&#91;2\/2] STEP 8\/8: CMD &#91;\"\/user\", \"-port=8080\"]\n--&gt; Using cache fbf41164ff850402a9cd942471aa3519efa94b260364dfa4a098ff4664967299\n&#91;2\/2] COMMIT default-route-openshift-image-registry.apps.p1390.cecc.ihost.com\/sock-shop\/user:latest\n--&gt; fbf41164ff85\nSuccessfully tagged default-route-openshift-image-registry.apps.p1390.cecc.ihost.com\/sock-shop\/user:latest\nfbf41164ff850402a9cd942471aa3519efa94b260364dfa4a098ff4664967299\n&#91;root@p1390-bastion microservices-demo-user]#\n<\/code><\/pre>\n\n\n\n<p>This created two new images on your podman, one that has no reference (the one used to build) and another one that is the user image.<\/p>\n\n\n\n<p>===================================================<\/p>\n\n\n\n<p><strong>For information only<\/strong>.<\/p>\n\n\n\n<p>The original <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/microservices-demo\" target=\"_blank\">weaveworks project repository<\/a> was deprecated and marked as archived by an administrator on Dec 29, 2023. It is no longer maintained. It is now read-only.<\/p>\n\n\n\n<p>On Sunday, November 10th, 2024, I noticed that the open-source openzipkin component had changed, causing the build of this Go User container to fail. The change occurred after the end of October when I recorded the demonstration. The output from the failing podman build command is below. Do not worry; this information is included to demonstrate that deprecated and archived microservices written for x86 may still work on IBM Power. Developers can easily overcome challenges like this.<\/p>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>go: github.com\/microservices-demo\/user imports\n        github.com\/openzipkin\/zipkin-go-opentracing: github.com\/openzipkin\/zipkin-go-opentracing@v0.5.0: parsing go.mod:\n        module declares its path as: github.com\/openzipkin-contrib\/zipkin-go-opentracing\n                but was required as: github.com\/openzipkin\/zipkin-go-opentracing\nError: building at STEP \"RUN go mod init github.com\/microservices-demo\/user &amp;&amp; go mod tidy &amp;&amp; GOOS=linux go build .\": while running runtime: exit status 1<\/code><\/pre>\n\n\n\n<p>I discussed the problem with colleagues, and <a rel=\"noreferrer noopener\" href=\"https:\/\/www.linkedin.com\/in\/paulbastide\/\" target=\"_blank\">Paul Bastide<\/a>, who kindly fixed the build problem with the fix: API remapping. <\/p>\n\n\n\n<p>Whilst the above fix enabled the successful build of the Golang User microservice container for ppc64le, I found that the container would not deploy successfully within OpenShift, due to the problems below.<\/p>\n\n\n\n<p>\u2022 panic: runtime error: invalid memory address or nil pointer dereference&#8221;<br>\u2022 middleware\/instrument.go:54&#8243; problem.<\/p>\n\n\n\n<p>I have, therefore, modified the main.go file to fix the above problems.<\/p>\n\n\n\n<p>I am not a developer, but fixed the problem in a few hours.<\/p>\n\n\n\n<p>This is FYI only, you do not need to make any changes yourself. Please continue as directed.<\/p>\n\n\n\n<p>===================================================<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the two images created using podman images.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>podman images |head -3<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>REPOSITORY                                                                         TAG         IMAGE ID      CREATED        SIZE\n&lt;none&gt;                                                                             &lt;none&gt;      21da94494a8a  7 minutes ago  1.37 GB\ndefault-route-openshift-image-registry.apps.p1319.cecc.ihost.com\/sock-shop\/orders  latest      581098362bee  18 hours ago   215 MB<\/code><\/pre>\n\n\n\n<p>You are ready to push the images to be used in production.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Push-the-Go-image-to-the-internal-registry\">4.2 Push the Go image to the internal registry<\/h3>\n\n\n\n<p>We will now push the new image to the internal registry.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Login into the registry using podman<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>podman login $REGISTRYHOST -u cecuser -p $(su - cecuser -c \"oc whoami -t\") --tls-verify=false<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>Login Succeeded!<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the command correctly captured the host.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>echo $REGISTRYHOST<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>default-route-openshift-image-registry.apps.p1309.cecc.ihost.com<\/code><\/pre>\n\n\n\n<p>The route above will be different. It can\u2019t be blank. If it is blank, make sure you log into the OCP as described <a href=\"https:\/\/nas01.tallpaul.net\/wordpress\/2024\/11\/sock-shop-lab\/#Copy-login-command-for-CLI-use\">2.4 &#8220;Copy login command for CLI use<\/a>&#8220;.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create the sock-shop project.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>oc new-project sock-shop<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Now using project \"sock-shop\" on server \"https:\/\/api.p1323.cecc.ihost.com:6443\".\n\nYou can add applications to this project with the 'new-app' command. For example, try:\n\n    oc new-app rails-postgresql-example\n\nto build a new example application in Ruby. Or use kubectl to deploy a simple Kubernetes application:\n\n    kubectl create deployment hello-node --image=k8s.gcr.io\/e2e-test-images\/agnhost:2.33 -- \/agnhost serve-hostname\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Push the created image to the internal registry.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>podman push $REGISTRYHOST\/sock-shop\/user:latest --tls-verify=false<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>Getting image source signatures\nCopying blob 3e6445d4d7b9 skipped: already exists\nCopying blob cb362e6b8e29 skipped: already exists\nCopying config dcc16061c7 done   |\nWriting manifest to image destination<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Building-a-.NET-Service-from-a-UBI-image\">5 Building a .NET Service from a UBI image<\/h2>\n\n\n\n<p>We will now create our own .NET image using the RedHat UBI container.<\/p>\n\n\n\n<p>You can view a recording of the lab exercise <a href=\"https:\/\/youtu.be\/pORhEWGo7L4\">HERE<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"1607 Lab Exercise 5\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/pORhEWGo7L4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Clone-the-.NET-application-from-GitHub\">5.1 Clone the .NET application from GitHub<\/h3>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\">\n<li>Change to the build directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>cd \/root\/build<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\">\n<li>Check you are on the correct Directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>pwd<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>\/root\/build<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Inside the new directory under the root home, you can now clone the orders project to your server.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>git clone https:\/\/github.com\/paulchapmanibm\/ordersdotnet.git<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>Cloning into 'ordersdotnet'...\nremote: Enumerating objects: 322, done.\nremote: Counting objects: 100% (322\/322), done.\nremote: Compressing objects: 100% (132\/132), done.\nremote: Total 322 (delta 166), reused 308 (delta 159), pack-reused 0\nReceiving objects: 100% (322\/322), 56.50 KiB | 4.71 MiB\/s, done.\nResolving deltas: 100% (166\/166), done.<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You should see a new folder created:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>ls -la<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>total 12\ndrwxr-xr-x.&nbsp; 4 root root&nbsp;&nbsp; 57 Oct&nbsp; 3 17:27 .\ndr-xr-x---. 15 root root 4096 Oct&nbsp; 3 16:50 ..\ndrwxr-xr-x. 10 root root 4096 Oct&nbsp; 3 17:04 microservices-demo-user\ndrwxr-xr-x. 10 root root 4096 Oct&nbsp; 3 17:27 ordersdotnet<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change to this directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>cd ordersdotnet\/<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the directory<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>ls<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>appsettings.json  docker   orders.NET.csproj          Program.cs  scripts\nConfig            LICENSE  orders.net_deploy_rsa.enc  Properties  Value\nControllers       Models   orders.NET.sln             README.md \n<\/code><\/pre>\n\n\n\n<p>You can see a .csproj file. This normally means you are working with a C# program and if dotnet\/aspnet frameworks are used (like in this project) we can use dotnet provided by Red Hat, which includes C# libraries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Understanding-the-NET-build-process\">5.2 Understanding the NET build process<\/h3>\n\n\n\n<p>The Dockerfile is the main file that holds this information, as it determines the content of the container image and how it is built.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>From the last directory listing you can see that there is a docker directory, list its contents.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>ls -l docker<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>total 0\ndrwxr-xr-x. 2 root root 47 Oct  3 17:27 orders.net<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can see that there is an orders directory, list its contents.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>ls -l docker\/orders.net<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>total 8\n-rw-r--r--. 1 root root 242 Oct&nbsp; 3 17:27 Dockerfile\n-rw-r--r--. 1 root root 190 Oct&nbsp; 3 17:27 Dockerfile-msft<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You found the Dockerfile and now you can inspect it.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code><strong>cat docker\/orders.net\/Dockerfile<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\" style=\"border-width:1px\"><code>FROM microsoft\/dotnet:latest\nCOPY . \/app\nWORKDIR \/app\nRUN &#91;\"dotnet\", \"restore\"]\nRUN apt-get update &amp;&amp; apt-get install -y tcpdump jq\nRUN &#91;\"dotnet\", \"build\"]\nEXPOSE 80\/tcp\nENTRYPOINT &#91;\"dotnet\", \"run\", \"--server.urls\", \"http:\/\/0.0.0.0:80\"]<\/code><\/pre>\n\n\n\n<p>Analyzing the Dockerfile, you can see that:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\">\n<li>The \u201c<strong>FROM<\/strong>\u201d specifies the microsoft\/dotnet image.<\/li>\n\n\n\n<li>The \u201c<strong>COPY<\/strong>\u201d will copy all the code that is in the current directory in the server into the container.<\/li>\n\n\n\n<li>The \u201c<strong>WORKDIR<\/strong>\u201d sets the directory where commands should take place.<\/li>\n\n\n\n<li>The \u201c<strong>RUN<\/strong>\u201d commands:<ol><li>restores the dependencies and tools of a project.updates the package index files and installs the tcpdump package.<\/li><\/ol>\n<ol class=\"wp-block-list\">\n<li>builds&nbsp;the project and its dependencies into a set of binaries.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>The \u201c<strong>EXPOSE<\/strong>\u201d specifies that port 80 should be used.<\/li>\n\n\n\n<li>The \u201c<strong>ENTRYPOINT<\/strong>\u201d statement is the main command to run on the container.&nbsp; When started it is an array of entries (the spaces are delimited by comas).<\/li>\n<\/ol>\n\n\n\n<p>Notice that the Dockerfile specifies using dotnet run, which would mean using the SDK to run and not the runtime. We will change this to use the runtime instead, and this will create a smaller image.<\/p>\n\n\n\n<p>We will also use this lab as a way of creating our own SDK and runtime images instead of going to docker hub. We will build the packages from the Red Hat <em>ubi8-minimal<\/em> image which contains dotnet libraries.&nbsp;<br>UBI is the Universal Base Image container framework from Red Hat \u2013 UBI images are cut-down versions of RHEL specifically for use as base OS container images.<\/p>\n\n\n\n<p>More info can be found <a rel=\"noreferrer noopener\" href=\"https:\/\/catalog.redhat.com\/software\/containers\/ubi8\/ubi-minimal\/5c359a62bed8bd75a2c3fba8?architecture=ppc64le\" target=\"_blank\">here<\/a>: <\/p>\n\n\n\n<p><strong>microdnf<\/strong> is a cutdown package manager used within UBI images.&nbsp; Think of it as a skinny <strong>yum.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a Dockerfile for the dotnet-runtime<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>echo 'FROM ubi8-minimal\nUSER root\nRUN microdnf install -y dotnet-runtime-7.0 aspnetcore-runtime-7.0 &amp;&amp; microdnf clean all' &gt;Dockerfile_dotnet-runtime<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\">\n<li>Create a Dockerfile for the dotnet SDK<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>echo 'FROM ubi8-minimal\nUSER root\nRUN microdnf install -y dotnet-sdk-7.0 &amp;&amp; microdnf clean all' &gt;Dockerfile_dotnet<\/strong><\/code><\/pre>\n\n\n\n<p>Now we can build the images that we will use to compile and run the code.<\/p>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\">\n<li>Build the image for the .NET<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>podman build -f Dockerfile_dotnet --tag dotnet:latest<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>STEP 1\/3: FROM ubi8-minimal\nSTEP 2\/3: USER root\n--&gt; Using cache a020ec5df868404dafd1badf8068a89473464336688de7251b36861247435a81\n--&gt; a020ec5df868\nSTEP 3\/3: RUN microdnf install -y dotnet-sdk-7.0 &amp;&amp; microdnf clean all\n--&gt; Using cache a0594907c8823ba0bf2f35e15acd37828b1e60be1ae1622eea54179305b263d4\nCOMMIT dotnet:latest\n--&gt; a0594907c882\nSuccessfully tagged localhost\/dotnet:latest\na0594907c8823ba0bf2f35e15acd37828b1e60be1ae1622eea54179305b263d4<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\" type=\"1\">\n<li>Build the image for the .NET Runtime<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>podman build -f Dockerfile_dotnet-runtime --tag dotnet-runtime:latest<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>STEP 1\/3: FROM ubi8-minimal\nSTEP 2\/3: USER root\n--&gt; Using cache a020ec5df868404dafd1badf8068a89473464336688de7251b36861247435a81\n--&gt; a020ec5df868\nSTEP 3\/3: RUN microdnf install -y dotnet-runtime-7.0 aspnetcore-runtime-7.0 &amp;&amp; microdnf clean all\n--&gt; Using cache 4d692386eafd7165a4b30f606f405b0129e82ba584b499391d44476070d2a3b5\nCOMMIT dotnet-runtime:latest\n--&gt; 4d692386eafd\nSuccessfully tagged localhost\/dotnet-runtime:latest\n4d692386eafd7165a4b30f606f405b0129e82ba584b499391d44476070d2a3b5<\/code><\/pre>\n\n\n\n<p>Now that you built both images needed to build the microservice container, we can create a single Dockerfile that will take care of the build and create the final container that will run the orders service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Creating-the-Dockerfile-to-build-the-microservice-container\">5.3 Creating the Dockerfile to build the microservice container<\/h3>\n\n\n\n<p>We will create a Dockerfile file to build the container using the below information:<\/p>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>#BUILD PART\n#Start from (FROM) the image for maven used on the build script\n#Call the container build \u201cbuilder\u201d using the \u201cas\u201d statement\n#For that we will use the dotnet sdk we just created   \nFROM localhost\/dotnet:latest as builder\n#We copy all the code from the cloned project to the \/app\nCOPY . \/app\n# We set the working directory for the \/app\nWORKDIR \/app\n# We run the two commands for the Build\nRUN &#91;\"dotnet\", \"restore\"]\nRUN &#91;\"dotnet\", \"build\"]\n#This will build the application  on the \/app\/bin\/Debug\/net7.0\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>#CONTAINER CREATION PART\n#Now to create the final container we will start from the dotnet-runtime we built\nFROM localhost\/dotnet-runtime:latest\n\n#Copy the application built from the builder image\nCOPY --from=builder \/app\/bin\/Debug\/net7.0\/ \/app\/\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>#Setting the working directory to \/app just like the old Dockerfile\nWORKDIR \/app\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code># We will run the application orders.NET we created\nENTRYPOINT &#91;\"dotnet\", \"orders.NET.dll\"]\n<\/code><\/pre>\n\n\n\n<p>Read the comments carefully, as this explains each of the Dockerfile steps. You will see how an image is created, which is very logical.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create the Dockerfile mentioned in the previous note without the comments.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>echo 'FROM localhost\/dotnet:latest as builder\n\nCOPY . \/app\n\nWORKDIR \/app\n\nRUN &#91;\"dotnet\", \"restore\"]\nRUN &#91;\"dotnet\", \"build\"]\n\nFROM localhost\/dotnet-runtime:latest\n\nCOPY --from=builder \/app\/bin\/Debug\/net7.0\/ \/app\/\nWORKDIR \/app\nENTRYPOINT &#91;\"dotnet\", \"orders.NET.dll\"]'&gt;Dockerfile<\/strong><\/code><\/pre>\n\n\n\n<p>Now we have a single Dockerfile that will build the application and containerize it on a single step, making it easier to integrate the software.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Build-and-Push-.NET-Container-to-the-Registry\">6 Build and Push .NET Container to the Registry<\/h2>\n\n\n\n<p>You may hear the names Docker registry, JFrog Artifactory, Nexus, Quay or simply local registry, these registries are just different types of repositories for container images. Developers may use them for other parts like maven repositories, but it goes beyond the scope of this lab.&nbsp;<\/p>\n\n\n\n<p>For this lab, we will use the internal OpenShift Registry.<\/p>\n\n\n\n<p>A centralized Enterprise image registry could be used, but the creation of an Enterprise registry goes beyond the scope of this demo.<\/p>\n\n\n\n<p>You can view a recording of the lab exercise <a rel=\"noreferrer noopener\" href=\"https:\/\/youtu.be\/P-CigR5osPA\" target=\"_blank\">HER<\/a><a href=\"https:\/\/youtu.be\/P-CigR5osPA\" target=\"_blank\" rel=\"noreferrer noopener\">E<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"1607 Lab Exercise 6\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/P-CigR5osPA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Building-the-.NET-Container\">6.1 Building the .NET Container<\/h3>\n\n\n\n<p>With the Dockerfile created and the images for Power already known, the container building process is straightforward.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run the command to get the image registry Route into a variable<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>REGISTRYHOST=$(su - cecuser -c \"oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}'\")<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the command correctly captured the host.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>echo $REGISTRYHOST<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>default-route-openshift-image-registry.apps.p1309.cecc.ihost.com<\/code><\/pre>\n\n\n\n<p>The route above will be different, It can\u2019t be blank, if it is blank make sure you login to the OCP like stated in Section Log into OpenShift via the command line interface.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run the podman command to build using the Dockerfile we created on the previous step and tag it to the internal registry for the course.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>podman build -f Dockerfile --tag $REGISTRYHOST\/sock-shop\/orders:latest<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>&#91;1\/2] STEP 1\/5: FROM dotnet:latest AS builder\n&#91;1\/2] STEP 2\/5: COPY . \/app\n--&gt; 9e75fe1e9b7\n&#91;1\/2] STEP 3\/5: WORKDIR \/app\n--&gt; ae710361dcb\n&#91;1\/2] STEP 4\/5: RUN &#91;\"dotnet\", \"restore\"]\n\nWelcome to .NET 7.0!\n---------------------\nSDK Version: 7.0.100\n\n---------------------\n.\n.\n.\n--&gt; adda01ef96a\n&#91;2\/2] STEP 1\/4: FROM dotnet-runtime:latest\n&#91;2\/2] STEP 2\/4: COPY --from=builder \/app\/bin\/Debug\/net7.0\/ \/app\/\n--&gt; b40fefe8200\n&#91;2\/2] STEP 3\/4: WORKDIR \/app\n--&gt; ea05fe42b9e\n&#91;2\/2] STEP 4\/4: ENTRYPOINT &#91;\"dotnet\", \"orders.NET.dll\"]\n&#91;2\/2] COMMIT default-route-openshift-image-registry.apps.p1389.cecc.ihost.com\/sock-shop\/orders:latest\n--&gt; bd1b4e1d045\nSuccessfully tagged default-route-openshift-image-registry.apps.p1389.cecc.ihost.com\/sock-shop\/orders:latest\nbd1b4e1d045afd9573329abdeaad2b1c369747bd76431e2b99fc07f7eb7bdb8e\n<\/code><\/pre>\n\n\n\n<p>This created two new images. Podman shows one that has no reference (the one used to build) and another one that is the orders microservice image.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the two images created using podman images<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>podman images |head -<\/strong>4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>REPOSITORY                                                                         TAG         IMAGE ID      CREATED         SIZE\ndefault-route-openshift-image-registry.apps.p1390.cecc.ihost.com\/sock-shop\/orders  latest      ddcdc4ba3dbc  43 seconds ago  215 MB\n&lt;none&gt;                                                                             &lt;none&gt;      de1c27e23baa  46 seconds ago  1.05 GB\n<strong>ds ago  1.05 GB\n<\/strong><\/code><\/pre>\n\n\n\n<p>You are ready to push the images to be used in production.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Push-the-.NET-images-to-the-internal-registry\">6.2 Push the .NET images to the internal registry<\/h3>\n\n\n\n<p>We will push the new image to the internal registry.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Login into the registry using podman<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>podman login $REGISTRYHOST -u cecuser -p $(su - cecuser -c \"oc whoami -t\") --tls-verify=false<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Login Succeeded!<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the command correctly captured the host.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>echo $REGISTRYHOST<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>default-route-openshift-image-registry.apps.p1309.cecc.ihost.com<\/code><\/pre>\n\n\n\n<p>The route above will be different. It can\u2019t be blank. If it is blank, make sure you log into the OCP as described <a href=\"https:\/\/nas01.tallpaul.net\/wordpress\/2024\/11\/sock-shop-lab\/#Copy-login-command-for-CLI-use\">2.4 &#8220;Copy login command for CLI use<\/a>&#8220;.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Push the created image to the Internal registry<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>podman push $REGISTRYHOST\/sock-shop\/orders:latest --tls-verify=false<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>Getting image source signatures\nCopying blob 4a275ce82a89 done   |\nCopying blob 38bf0ae868e4 done   |\nCopying blob 6237f8cea45b skipped: already exists\nCopying config ddcdc4ba3d done   |\nWriting manifest to image destination\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Deploy-the-Microservice-Application\">7 Deploy the Microservice Application<\/h2>\n\n\n\n<p>Now you have the modified the Microservices, you can deploy the microservices application using a yaml file. You can view a recording of the lab exercise <a href=\"https:\/\/youtu.be\/dSs6hISig74\">HERE<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"1607 Lab Exercise 7\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/dSs6hISig74?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download the application yaml file from GitHub<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>wget https:\/\/raw.githubusercontent.com\/paulchapmanibm\/assets\/refs\/heads\/main\/usvc\/apptx.yaml<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code>--2024-12-16 13:24:10--  https:\/\/raw.githubusercontent.com\/paulchapmanibm\/assets\/refs\/heads\/main\/usvc\/apptx.yaml\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 19840 (19K) &#91;text\/plain]\nSaving to: \u2018apptx.yaml\u2019\n\napptx.yaml          100%&#91;===================&gt;]  19.38K  --.-KB\/s    in 0.001s\n\n2024-12-16 13:24:10 (17.4 MB\/s) - \u2018apptx.yaml\u2019 saved &#91;19840\/19840]<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the Administrator console for your OpenShift cluster and navigate to the Developer view -&gt; Topology and select sock-shop as the project.&nbsp; When you run the oc apply command below, you will see the microservices appear, they will start to build and run.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"295\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-Topology.png\" alt=\"\" class=\"wp-image-1454\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-Topology.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-Topology-300x132.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run the command below to create the application now.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code><strong>oc apply -f .\/apptx.yaml<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background\"><code><strong>Warning: resource namespaces\/sock-shop is missing the kubectl.kubernetes.io\/last-applied-configuration annotation which is required by oc apply. oc apply should only be used on resources created declaratively by either oc create --save-config or oc apply. The missing annotation will be patched automatically.\nnamespace\/sock-shop configured \ndeployment.apps\/carts created\nservice\/carts created\ndeployment.apps\/carts-db created\nservice\/carts-db created\ndeployment.apps\/catalogue created\nservice\/catalogue created\ndeployment.apps\/catalogue-db created\nservice\/catalogue-db created\ndeployment.apps\/front-end created\nservice\/front-end-external created\nservice\/front-end created\ndeployment.apps\/orders created\nservice\/orders created\ndeployment.apps\/orders-db created\nservice\/orders-db created\ndeployment.apps\/payment created\nservice\/payment created\ndeployment.apps\/queue-master created\nservice\/queue-master created\ndeployment.apps\/rabbitmq created\nservice\/rabbitmq created\ndeployment.apps\/session-db created\nservice\/session-db created\ndeployment.apps\/shipping created\nservice\/shipping created\ndeployment.apps\/user created\nservice\/user created\ndeployment.apps\/user-db created\nservice\/user-db created\nroute.route.openshift.io\/front-end-external created<\/strong>\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When you run the oc apply command below above, you will see the microservices appear one by one in the OpenShift Console, as they start to build and run.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"335\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-deployed.png\" alt=\"\" class=\"wp-image-1455\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-deployed.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-deployed-300x150.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Access-the-Application-on-OpenShift\">8 Access the Application on OpenShift<\/h2>\n\n\n\n<p>This is simply your opportunity to see the microservice solution that you deployed in action. Go ahead, have a play and do whatever you like, <strong>just remember that it is a developer\u2019s environment and not a production system.<\/strong> Some functionality will not work as expected, and that is fine. The purpose of the lab is to demonstrate how easy it is to operate applications that were designed for x86, on IBM Power ppc64le with Red Hat OpenShift. You can view an example recording of this lab exercise <a href=\"https:\/\/www.youtube.com\/watch?v=cas4peunaYQ&amp;t=330s\">HERE <\/a>at 5:30<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"OpenShift Multi-Arch Sock Shop Demo\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/cas4peunaYQ?start=330&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the Developer view on topology and select the sock-shop.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"335\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-deployed.png\" alt=\"\" class=\"wp-image-1455\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-deployed.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-deployed-300x150.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>See that the application is up and show the results. The application is ready when ALL microservices light blue circle turns dark blue, which may take 3-5 minutes.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"524\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-dark-blue.png\" alt=\"\" class=\"wp-image-1456\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-dark-blue.png 960w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-dark-blue-300x164.png 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/sock-shop-dark-blue-768x419.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You may also use the watch the containerized microservices come online via the command line, as below <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code has-vivid-cyan-blue-color has-contrast-background-color has-text-color has-background\"><code>watch oc get pods<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-base-color has-contrast-background-color has-text-color has-background has-small-font-size\"><code>Every 2.0s: oc get pods                  p1319-bastion: Tue Dec 17 07:22:13 2024\n\nNAME                            READY   STATUS    RESTARTS   AGE\ncarts-6549b8dc7c-h6nj7          1\/1     Running   0          3m46s\ncarts-db-5df64ddd7d-cpvpj       1\/1     Running   0          3m46s\ncatalogue-5dbfd47689-rnd7r      1\/1     Running   0          3m46s\ncatalogue-db-7d7d46c4bc-vm2dp   1\/1     Running   0          3m46s\nfront-end-5f94569584-rrktx      1\/1     Running   0          3m46s\norders-5779846fb-wz4t2          1\/1     Running   0          3m46s\norders-db-86f6896f44-8hmnc      1\/1     Running   0          3m46s\npayment-b48fb4d8-4p92w          1\/1     Running   0          3m46s\nqueue-master-8547599bd5-9zcql   1\/1     Running   0          3m46s\nrabbitmq-8455c774fd-dzzd6       2\/2     Running   0          3m46s\nsession-db-5584678cdb-bsbnr     1\/1     Running   0          3m46s\nshipping-bd8674fc5-s4pds        1\/1     Running   0          3m46s\nuser-7584dd8f98-r28xt           1\/1     Running   0          3m45s\nuser-db-5d8465ff99-l4wxb        1\/1     Running   0          3m45s\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use CTRL + C to break out of the watch command, if executed<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the Sock Shop front end URL, (on the upper right side of the front-end pod), which takes you to the Sock Shop ecommerce website.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"360\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Open-Front-End.png\" alt=\"\" class=\"wp-image-1457\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Open-Front-End.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Open-Front-End-300x161.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If necessary, accept the certificate warning<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"629\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Accept-Certificate-Warning.jpg\" alt=\"\" class=\"wp-image-1497\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Accept-Certificate-Warning.jpg 926w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Accept-Certificate-Warning-300x204.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Accept-Certificate-Warning-768x522.jpg 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Again, accept the certificate warning if necessary <\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"379\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Additional-Cert-Warning.jpg\" alt=\"\" class=\"wp-image-1498\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Additional-Cert-Warning.jpg 860w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Additional-Cert-Warning-300x132.jpg 300w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Additional-Cert-Warning-768x338.jpg 768w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Register a new account<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"364\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Registerr.png\" alt=\"\" class=\"wp-image-1458\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Registerr.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Registerr-300x163.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"361\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Register2.png\" alt=\"\" class=\"wp-image-1459\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Register2.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Register2-300x161.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Search the catalogue<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"360\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Search-Catalogue.png\" alt=\"\" class=\"wp-image-1460\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Search-Catalogue.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Search-Catalogue-300x161.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>View various socks<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"375\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/View-Socks.png\" alt=\"\" class=\"wp-image-1461\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/View-Socks.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/View-Socks-300x167.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add socks to your shopping cart<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"377\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Add2Cart.png\" alt=\"\" class=\"wp-image-1462\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Add2Cart.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Add2Cart-300x168.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"372\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/ShowCart.png\" alt=\"\" class=\"wp-image-1463\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/ShowCart.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/ShowCart-300x166.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<p>Example: Adding shipping address<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"372\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/AddShippingAddress.png\" alt=\"\" class=\"wp-image-1464\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/AddShippingAddress.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/AddShippingAddress-300x166.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<p>Example: Adding card payment information<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"373\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/ShoppingCart.png\" alt=\"\" class=\"wp-image-1465\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/ShoppingCart.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/ShoppingCart-300x167.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<p>Example: Adding Credit Card<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"374\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/CreditCard.png\" alt=\"\" class=\"wp-image-1466\" srcset=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/CreditCard.png 672w, https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/CreditCard-300x167.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Lab-Wrap-up\">9 Lab Wrap up<\/h2>\n\n\n\n<p>Congratulations, you have completed this lab. You went through the steps to build an application that was written for x86 eight years ago in a modern language on the Power ppc64le OpenShift Container Platform.<\/p>\n\n\n\n<p>You should now be confident that you understand how the Go and .NET frameworks are already ported to Power. More than 15K images on Docker Hub can be used, and nearly 2,000 more certified containers are in the <a href=\"https:\/\/catalog.redhat.com\/search?searchType=containers&amp;architecture=ppc64le&amp;p=1\">Red Hat Container Catalogue<\/a>.<\/p>\n\n\n\n<p>You now understand how to clone a GitHub repository. You have also seen a Dockerfile and how it is used to build images. You have built Power ppc64le images and worked with the OpenShift Internal Registry to publish the solution you created!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"OpenShift-Multi-Arch-Compute\">10 OpenShift Multi-Arch Compute<\/h2>\n\n\n\n<p>Additional OpenShift Multi-Architecture Compute recordings are available on my <a href=\"https:\/\/www.youtube.com\/@paulchapman1280\">YouTube channel<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"YouTube\">10.1 YouTube<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Introduction-and-Early-Adoption-Program-Replay\">10.1.1 Introduction and Early Adoption Program Replay<\/h4>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Early Adoption &amp; Feedback Program for OpenShift Multi-Architecture Clusters  (MAC) with Power\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/MVrRJzQAJg8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"UKI-Brunch-&amp;-Learn-Replay\">10.1.2 UKI Brunch &amp; Learn Replay<\/h4>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"OpenShift Multi-Arch Compute with Power Demo &amp; Update\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/_uYvxWbZ6Uo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Deploy-the-Sock-Shop-Demonstration\">10.1.3 Deploy the Sock Shop Demonstration<\/h4>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"OpenShift Multi-Arch Sock Shop Demo\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/cas4peunaYQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Migrating-Workloads-between-x86-&amp;-IBM-Power-Worker-Nodes\">10.1.4 Migrating Workloads between x86 &amp; IBM Power Worker Nodes<\/h4>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Migrating OpenShift workload from x86 to Power using Multi-Arch Compute\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/j3SugLx_uQM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"IBM-Redbook\">10.2 IBM Redbook<\/h3>\n\n\n\n<p>The Creating OpenShift Multiple Architecture Clusters with IBM Power Redbook has now been published. Future versions may be downloaded <a href=\"https:\/\/www.redbooks.ibm.com\/abstracts\/sg248565.html\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>HERE<\/strong><\/a><\/p>\n\n\n\n<div data-wp-interactive=\"core\/file\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!state.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Multi-Arch-Redbook-Draft.pdf\" type=\"application\/pdf\" style=\"width:100%;height:872px\" aria-label=\"Embed of Multi-Arch-Redbook-Draft.\"><\/object><a id=\"wp-block-file--media-68d9477e-8236-42da-af91-8b6bc80e46c3\" href=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Multi-Arch-Redbook-Draft.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">Multi-Arch-Redbook-Draft<\/a><a href=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/10\/Multi-Arch-Redbook-Draft.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-68d9477e-8236-42da-af91-8b6bc80e46c3\">Download<\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Power-Modernisation-Website\">10.3 Power Modernisation Website<\/h3>\n\n\n\n<p>Find more information relating to Power Modernisation, Hybrid Cloud and AI at my <a href=\"https:\/\/nas01.tallpaul.net\/wordpress\/\">personal website<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/nas01.tallpaul.net\/wordpress\/2024\/08\/mac_redbook\/\">Multi-Architecture Computing: The Future of OpenShift Deployments<\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/nas01.tallpaul.net\/wordpress\/2024\/10\/smeup-multi-arch-compute-success-story\/\">smeup: Multi-Arch Compute Success Story<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Multi-Arch-Compute-Assistance\">10.4 Multi-Arch Compute Assistance<\/h3>\n\n\n\n<p>Let me know if you are considering an OpenShift Multi-Arch Compute project. Development, and I will be happy to discuss use cases and assist with your project.<\/p>\n\n\n\n<ul class=\"wp-block-social-links aligncenter has-huge-icon-size has-icon-color is-style-default is-layout-flex wp-block-social-links-is-layout-flex\"><li style=\"color: #ffffff; \" class=\"wp-social-link wp-social-link-wordpress  wp-block-social-link\"><a rel=\"noopener nofollow\" target=\"_blank\" href=\"https:\/\/nas01.tallpaul.net\/wordpress\/\" class=\"wp-block-social-link-anchor\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">WordPress<\/span><\/a><\/li>\n\n<li style=\"color: #ffffff; \" class=\"wp-social-link wp-social-link-mail  wp-block-social-link\"><a rel=\"noopener nofollow\" target=\"_blank\" href=\"mailto:paulchapman@uk.ibm.com\" class=\"wp-block-social-link-anchor\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M19,5H5c-1.1,0-2,.9-2,2v10c0,1.1.9,2,2,2h14c1.1,0,2-.9,2-2V7c0-1.1-.9-2-2-2zm.5,12c0,.3-.2.5-.5.5H5c-.3,0-.5-.2-.5-.5V9.8l7.5,5.6,7.5-5.6V17zm0-9.1L12,13.6,4.5,7.9V7c0-.3.2-.5.5-.5h14c.3,0,.5.2.5.5v.9z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">Mail<\/span><\/a><\/li>\n\n<li style=\"color: #ffffff; \" class=\"wp-social-link wp-social-link-youtube  wp-block-social-link\"><a rel=\"noopener nofollow\" target=\"_blank\" href=\"https:\/\/www.youtube.com\/@paulchapman1280\/videos\" class=\"wp-block-social-link-anchor\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">YouTube<\/span><\/a><\/li>\n\n<li style=\"color: #ffffff; \" class=\"wp-social-link wp-social-link-linkedin  wp-block-social-link\"><a rel=\"noopener nofollow\" target=\"_blank\" href=\"https:\/\/www.linkedin.com\/in\/chapmanp\/\" class=\"wp-block-social-link-anchor\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z\"><\/path><\/svg><span class=\"wp-block-social-link-label screen-reader-text\">LinkedIn<\/span><\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Credit<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"115\" height=\"115\" src=\"https:\/\/nas01.tallpaul.net\/wordpress\/wp-content\/uploads\/2024\/09\/Daniel.jpg\" alt=\"\" class=\"wp-image-956\"\/><figcaption class=\"wp-element-caption\">Daniel Casali<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><\/figure>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/www.linkedin.com\/in\/dancasali\/\" target=\"_blank\">Daniel Casali <\/a>| Modernization &#8211; WW Subject Matter Expert<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lab, you will take an Open-Source E-Commerce solution written for x86 around eight years ago and make it run on Power with OpenShift, using Java, Node.js, Go and .NET microservices.<\/p>\n","protected":false},"author":1,"featured_media":1412,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83,125,3,5,13,6,7],"tags":[],"class_list":["post-1395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-conference","category-guided-hands-on-lab","category-ibm","category-open-source","category-openshift","category-power-systems","category-red-hat"],"_links":{"self":[{"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/posts\/1395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/comments?post=1395"}],"version-history":[{"count":0,"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/posts\/1395\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/media\/1412"}],"wp:attachment":[{"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/media?parent=1395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/categories?post=1395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nas01.tallpaul.net\/wordpress\/wp-json\/wp\/v2\/tags?post=1395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}