3장. Tutorial: Deploying an application by using the CLI
To learn how to stand up an application on OpenShift Container Platform by using the OpenShift CLI (oc), follow the provided tutorial. In this tutorial, you will deploy the services that are required for an application that displays a map of national parks across the world.
To complete this tutorial, you will perform the following steps:
Create a project for the application.
This step allows your application to be isolated from other cluster user’s workloads.
This step grants
viewpermissions to interact with the OpenShift API to help discover services and other resources running within the project.Deploy the front-end application.
This step deploys the
parksmapfront-end application, exposes it externally, and scales it up to two instances.Deploy the back-end application.
This step deploys the
nationalparksback-end application and exposes it externally.Deploy the database application.
This step deploys the
mongodb-nationalparksMongoDB database, loads data into the database, and sets up the necessary credentials to access the database.
After you complete these steps, you can view the national parks application in a web browser.
3.1. Prerequisites 링크 복사링크가 클립보드에 복사되었습니다!
Before you start this tutorial, ensure that you have the following required prerequisites:
-
You have installed the OpenShift CLI (
oc). You have access to a test OpenShift Container Platform cluster.
If your organization does not have a cluster to test on, you can request access to the Developer Sandbox to get a trial of OpenShift Container Platform.
You have the appropriate permissions, such as the
cluster-admincluster role, to create a project and applications within it.If you do not have the required permissions, contact your cluster administrator. You need the
self-provisionerrole to create a project and theadminrole on the project to modify resources in that project.If you are using Developer Sandbox, a project is created for you with the required permissions.
-
You have logged in to your cluster by using the OpenShift CLI (
oc).