2.4. Deploying the front-end application
Deploy the front-end application that provides the external-facing web component for the tutorial.
The simplest way to deploy an application in OpenShift Container Platform is to run a provided container image.
The following procedure deploys parksmap, which is the front-end component of the national-parks-app application. The web application displays an interactive map of the locations of national parks across the world.
Procedure
-
From the Quick create (
) menu in the upper right corner, click Container images.
-
Select Image name from external registry and enter
quay.io/openshiftroadshow/parksmap:latest. - Scroll to the General section.
-
In the Application name field, enter
national-parks-app. -
In the Name field, ensure that the value is
parksmap. - Scroll to the Deploy section.
- In the Resource type field, ensure that Deployment is selected.
In the Advanced options section, ensure that Create a route is selected.
By default, services running on OpenShift Container Platform are not accessible externally. You must select this option to create a route so that external clients can access your service.
Click the Labels hyperlink.
The application code requires certain labels to be set.
Add the following labels to the text area and press Enter after each key/value pair:
-
app=national-parks-app -
component=parksmap -
role=frontend
-
Click Create.
You are redirected to the Topology page where you can see the
parksmapdeployment in thenational-parks-appapplication.
2.4.1. Viewing pod details 링크 복사링크가 클립보드에 복사되었습니다!
Retrieve detailed pod information to confirm the running status and resource configuration of the applications in this tutorial.
OpenShift Container Platform uses the Kubernetes concept of a pod, which is one or more containers deployed together on one host, and the smallest compute unit that can be defined, deployed, and managed. Pods are the rough equivalent of a machine instance, physical or virtual, to a container.
The Overview panel enables you to access many features of the parksmap deployment. The Details and Resources tabs enable you to scale application pods and check the status of builds, services, and routes.
Prerequisites
-
You have deployed the
parksmapfront-end application.
Procedure
-
Navigate to Workloads
Topology. Click the
parksmapdeployment in thenational-parks-appapplication.그림 2.1. Parksmap deployment
This opens an overview panel with the following tabs:
- Details: View details about your deployment, edit certain settings, and scale your deployment.
- Resources: View details for the pods, services, and routes associated with your deployment.
- Observe: View metrics and events for your deployment.
-
To view the logs for a pod, select the Resources tab and click View logs next to the
parksmappod.