Skip to content

This project successfully demonstrates working with Red Hat OpenShift using both the oc CLI and the web console. The process included deploying an application from a Git repository, inspecting build configurations and image streams, and enabling autoscaling.

Notifications You must be signed in to change notification settings

ayoub-chaieb/Red-Hat-OpenShift-Deployment-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Red Hat OpenShift Lab

βœ… Overview

This project successfully demonstrates working with Red Hat OpenShift using both the oc CLI and the web console. The lab included deploying an application from a Git repository, inspecting build configurations and image streams, and enabling autoscaling.


πŸ“‚ Repository Structure

openshift-lab/
β”œβ”€β”€ README.md      # this file
└── images/        # place your screenshots here

πŸ“ Completed Steps

1. Environment Verification

  • Opened a terminal session and confirmed the oc CLI was installed:

    oc version
  • Navigated to the project workspace /home/project.

  • Cloned the required repo:

    git clone https://github.com/ibm-developer-skills-network/CC201.git

πŸ“· Screenshot: verifying CLI & cloning repo Verify Environment


2. Using the oc CLI

  • Listed pods running in the namespace:

    oc get pods
  • Checked BuildConfigs and project details with:

    oc get buildconfigs
    oc project

πŸ“· Screenshot: oc commands executed oc CLI Commands oc CLI Commands oc CLI Commands


3. OpenShift Web Console

  • Launched the OpenShift web console via Skills Network Toolbox.
  • Explored both Administrator and Developer perspectives.
  • Reviewed Dashboard, Overview, resources inventory, and YAML definitions. πŸ“· Screenshot: web console overview Web Console

4. Deploying Application from Git

  • Switched to Developer perspective β†’ Topology view.

  • Added a new application from Git:

    • Repo: https://github.com/sclorg/nodejs-ex.git
    • Selected Node.js builder image.
  • Confirmed application appeared in Topology after build. πŸ“· Screenshot: deploy app from Git Deploy App Deploy App Topology


5. Inspect Build & ImageStream

  • Viewed build logs (repository cloned, Dockerfile generated, image built & pushed).
  • Explored Build Config (triggers, webhooks, strategies).
  • Checked ImageStreamTag and image history. πŸ“· Screenshot: build logs and configs Build Logs ImageStream

6. Application Access & Route

  • Opened the application route from Topology view in a browser.
  • Verified deployed Node.js app responded successfully. πŸ“· Screenshot: running Node.js app App Route

7. Autoscaling Setup (HPA)

  • Edited Deployment YAML to add resource requests/limits:
resources:
  limits:
    cpu: 30m
    memory: 100Mi
  requests:
    cpu: 3m
    memory: 40Mi
  • Created an HorizontalPodAutoscaler (HPA) with target CPU utilization 10%, min=1, max=3 replicas. πŸ“· Screenshot: HPA creation HPA HPA

8. Autoscaling Verification

  • Generated load on the application:

    for i in $(seq 1000); do curl -s -L <app_url> & done
  • Observed scale up: Current Replicas β†’ Desired Replicas = 3.

  • Verified in UI with fruit entries simulating load. πŸ“· Screenshot: autoscaling in action Autoscale


🎯 Achievements

  • βœ… Verified OpenShift CLI and environment
  • βœ… Explored OpenShift web console (Admin & Developer perspectives)
  • βœ… Deployed Node.js app directly from GitHub using s2i build strategy
  • βœ… Inspected BuildConfig, logs, and ImageStream
  • βœ… Accessed app via auto-generated route
  • βœ… Configured & tested Horizontal Pod Autoscaler

πŸ‘¨β€πŸ’» Author

Developed and documented by Ayoub CHAIEB

About

This project successfully demonstrates working with Red Hat OpenShift using both the oc CLI and the web console. The process included deploying an application from a Git repository, inspecting build configurations and image streams, and enabling autoscaling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published