2.5. Deploying the back-end application


Deploy the back-end application that provides the service that queries the database to return the national park data required for your application.

The following procedure deploys nationalparks, which is the back-end component for the national-parks-app application. The Python application performs 2D geo-spatial queries against a MongoDB database to locate and return map coordinates of all national parks in the world.

Prerequisites

  • You have deployed the parksmap front-end application.

Procedure

  1. From the Quick create ( fa plus circle ) menu in the upper right corner, click Import from Git.
  2. In the Git Repo URL field, enter https://github.com/openshift-roadshow/nationalparks-py.git.

    A builder image is automatically detected, but the import strategy defaults to Dockerfile instead of Python.

  3. Change the import strategy:

    1. Click Edit Import Strategy.
    2. Select Builder Image.
    3. Select Python.
  4. Scroll to the General section.
  5. In the Application field, ensure that the value is national-parks-app.
  6. In the Name field, enter nationalparks.
  7. Scroll to the Deploy section.
  8. In the Resource type field, ensure that Deployment is selected.
  9. 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.

  10. Click the Labels hyperlink.

    The application code requires certain labels to be set.

  11. Add the following labels to the text area and press Enter after each key/value pair:

    • app=national-parks-app
    • component=nationalparks
    • role=backend
    • type=parksmap-backend
  12. Click Create.

    You are redirected to the Topology page where you can see the nationalparks deployment in the national-parks-app application.

Verification

  1. Navigate to Workloads Topology.
  2. Click the nationalparks deployment in the national-parks-app application.
  3. Click the Resources tab.

    Wait for the build to complete successfully.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동