FIX: helm labs

This commit is contained in:
Nishan
2025-04-11 00:11:11 +05:30
parent f3624a7bb8
commit d092eaa9ed
11 changed files with 135 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Setup environment for Question 10 - Package Chart and Create Local Repo
# Create necessary directories
mkdir -p /tmp/exam/q10/charts
# No other specific setup needed for this question
# The student needs to package the webapp chart into a .tgz file
# Create a local chart repository at /tmp/exam/q10/charts
# Create an index file and add the local repo to Helm
echo "Environment setup complete for Question 10"
exit 0

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Setup environment for Question 11 - Roll Back Release
# No specific setup needed for this question
# The student needs to roll back the web-server release to its first revision
# and verify the rollback was successful by checking revision number and replica count
echo "Environment setup complete for Question 11"
exit 0

View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Setup environment for Question 1 - Verify Helm Installation
# Create necessary directories
mkdir -p /tmp/exam/q1
# Ensure Helm is installed on the system
# This is likely already set up as part of the environment initialization
# but we'll check and report status
if ! command -v helm &> /dev/null; then
echo "❌ Helm is not installed on the system. This is a prerequisite for the helm-001 lab."
exit 1
else
echo "✅ Helm is installed and available for the exam."
fi
# No other setup needed for this question as it only requires checking the helm version
echo "Environment setup complete for Question 1"
exit 0

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Setup environment for Question 2 - Adding Bitnami Helm Repository
# No specific setup needed for this question
# This is a task for the student to add the Bitnami repo
# The student needs to run the following commands:
# helm repo add bitnami https://charts.bitnami.com/bitnami
# helm repo update
# helm repo list
echo "Environment setup complete for Question 2"
exit 0

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Setup environment for Question 3 - Search for Nginx Chart
# Create necessary directories
mkdir -p /tmp/exam/q3
# No other setup needed for this question
# The student will need to search for the nginx chart in the Bitnami repository
# and save the results to /tmp/exam/q3/nginx-charts.txt
echo "Environment setup complete for Question 3"
exit 0

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Setup environment for Question 4 - Install Nginx Chart
# No specific setup needed for this question
# The student needs to install the Bitnami nginx chart with release name web-server
# They should set the service type to NodePort and port to 30080
# The expected commands would be something like:
# helm install web-server bitnami/nginx --set service.type=NodePort --set service.nodePorts.http=30080
echo "Environment setup complete for Question 4"
exit 0

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Setup environment for Question 5 - List Helm Releases
# Create necessary directories
mkdir -p /tmp/exam/q5
# No other setup needed for this question
# The student needs to list all Helm releases across all namespaces
# and save the output to /tmp/exam/q5/releases.txt
echo "Environment setup complete for Question 5"
exit 0

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Setup environment for Question 6 - Get Release Status
# Create necessary directories
mkdir -p /tmp/exam/q6
# No other specific setup needed for this question
# The student needs to get the status of the web-server release
# and save the output to /tmp/exam/q6/web-server-status.txt
# They also need to get the manifest summary and save it to /tmp/exam/q6/web-server-manifests.txt
echo "Environment setup complete for Question 6"
exit 0

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Setup environment for Question 7 - Upgrade Release
# No specific setup needed for this question
# The student needs to upgrade the web-server release to set replica count to 3
# The expected command would be something like:
# helm upgrade web-server bitnami/nginx --set replicaCount=3
echo "Environment setup complete for Question 7"
exit 0

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# Setup environment for Question 8 - Create Values File for Redis
# Create necessary directories
mkdir -p /tmp/exam/q8
# No other specific setup needed for this question
# The student needs to create a values file at /tmp/exam/q8/redis-values.yaml
# with specific configuration for Redis installation
# Then install the Bitnami Redis chart with release name cache-db
echo "Environment setup complete for Question 8"
exit 0

View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Setup environment for Question 9 - Create New Helm Chart
# No specific setup needed for this question
# The student needs to create a new Helm chart named webapp
# using the helm create command and modify Chart.yaml
echo "Environment setup complete for Question 9"
exit 0