Skip to content

Commit 91fa11d

Browse files
committed
fix deploy-all
1 parent 1f88d85 commit 91fa11d

File tree

7 files changed

+42
-68
lines changed

7 files changed

+42
-68
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ jobs:
7070
commit_message: "Terraform fmt"
7171
file_pattern: "*.tf *.tfvars"
7272
commit_user_name: "github-actions[bot]"
73-
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
74-
73+
7574
- name: Terraform Plan
7675
run: terraform plan -no-color -input=false
7776
working-directory: ./2-Terraform-AZURE-Services-Creation/4-aks

2-Terraform-AZURE-Services-Creation/4-Create-AKS-Cluster-IAM-Roles.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,12 @@ After creating the AKS cluster and IAM roles, consider these questions:
7171

7272
## 💡 Pro Tips
7373

74-
1. **Migration from Existing Clusters**: If upgrading from a previous version of this tutorial:
75-
- Kubernetes 1.33 requires a cluster upgrade procedure
76-
- Azure RBAC is now enabled by default for enhanced security
77-
- Auto-scaling may affect your cost structure but improves efficiency
78-
- Network policies may require reviewing existing pod communication patterns
79-
80-
2. **Security Best Practices**:
74+
1. **Security Best Practices**:
8175
- Enable Azure Policy for Kubernetes to enforce organisational standards and assess compliance at scale
8276
- Regularly review and audit RBAC permissions
8377
- Monitor cluster logs through the integrated Log Analytics workspace
8478

85-
3. **Cost Optimization**:
79+
2. **Cost Optimisation**:
8680
- Auto-scaling will automatically adjust node count based on demand
8781
- Use spot instances for non-critical workloads to reduce costs
8882
- Monitor resource usage through Azure Monitor

4-kubernetes_manifest/2-Create-Kubernetes-Manifest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ In this lab, you'll create and understand the Kubernetes manifest for deploying
2323

2424
3. **Update the Image URL and Review Enhanced Features**
2525
Open `deployment.yml` and:
26-
- [ ] Update line 24 with your ACR image URL (using tag v2 for the latest version)
26+
- [ ] Update line 24 with your ACR image URL
2727
- [ ] Review the health checks (liveness and readiness probes) for improved reliability
2828
- [ ] Note the enhanced resource limits for better performance
2929
- [ ] Understand the container port configuration

CHANGELOG.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,5 @@ All notable changes to this project will be documented in this file.
5555
- Improved setup instructions with latest tool versions
5656
- Added comprehensive changelog for tracking changes
5757

58-
### Breaking Changes
59-
- Kubernetes 1.33 may require cluster upgrade procedures
60-
- Azure RBAC enabled by default (was previously disabled)
61-
- Network policies now enabled, may affect existing pod communications
62-
- Updated image tags require rebuilding and redeploying containers
63-
64-
### Migration Notes
65-
- Update your local Terraform installation to v1.9.8 or higher
66-
- Verify Kubernetes 1.33 compatibility with your workloads
67-
- Review Azure RBAC permissions when upgrading existing clusters
68-
- Test network policies with your current pod communication patterns
69-
- Rebuild Docker images with updated Python 3.13 base image
70-
7158
## Previous Versions
7259
- Initial release with Kubernetes 1.32, Terraform 1.11.0, and Python 3.12

README.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,44 +46,6 @@ Get ready to utilise a range of cutting-edge technologies and platforms to estab
4646
| Checkov | Automated security testing | v3.2.4+ |
4747
| Terraform-docs | Documentation automation | Latest |
4848

49-
## 🚀 Quick Start
50-
51-
### Automated Deployment (Recommended for Testing)
52-
53-
For a complete automated deployment and testing experience:
54-
55-
```bash
56-
# Clone the repository
57-
git clone https://github.com/thomast1906/DevOps-The-Hard-Way-Azure.git
58-
cd DevOps-The-Hard-Way-Azure
59-
60-
# Quick test (deploys everything, lets you test, then cleans up)
61-
./scripts/quick-test.sh
62-
63-
# Or deploy everything and keep it running
64-
./scripts/deploy-all.sh
65-
66-
# Clean up everything when done
67-
./scripts/cleanup-all.sh
68-
```
69-
70-
### GitHub Actions Deployment
71-
72-
The repository includes a comprehensive GitHub Actions workflow for automated deployment:
73-
74-
1. **Fork this repository**
75-
2. **Set up Azure OIDC secrets** in your repository settings:
76-
- `AZURE_AD_CLIENT_ID`
77-
- `AZURE_AD_TENANT_ID`
78-
- `AZURE_SUBSCRIPTION_ID`
79-
3. **Trigger the workflow**:
80-
- Push to `main` branch, or
81-
- Use workflow dispatch with custom options
82-
83-
The GitHub Actions workflow can deploy to different environments and optionally clean up resources after testing.
84-
85-
### Manual Step-by-Step (Educational)
86-
8749
Follow the detailed labs below for a complete learning experience.
8850

8951
## 🧪 Labs

Test-lab-only.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Below is for testing the lab setup only
2+
3+
### Automated Deployment
4+
5+
For a complete automated deployment and testing experience:
6+
7+
```bash
8+
# Clone the repository
9+
git clone https://github.com/thomast1906/DevOps-The-Hard-Way-Azure.git
10+
cd DevOps-The-Hard-Way-Azure
11+
12+
13+
# Or deploy everything and keep it running
14+
./scripts/deploy-all.sh
15+
16+
# Clean up everything when done
17+
./scripts/cleanup-all.sh
18+
```
19+
20+
### GitHub Actions Deployment
21+
22+
The repository includes a comprehensive GitHub Actions workflow for automated deployment:
23+
24+
1. **Fork this repository**
25+
2. **Set up Azure OIDC secrets** in your repository settings:
26+
- `AZURE_AD_CLIENT_ID`
27+
- `AZURE_AD_TENANT_ID`
28+
- `AZURE_SUBSCRIPTION_ID`
29+
3. **Trigger the workflow**:
30+
- Push to `main` branch, or
31+
- Use workflow dispatch with custom options
32+
33+
The GitHub Actions workflow can deploy to different environments and optionally clean up resources after testing.

scripts/deploy-all.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,12 @@ terraform apply tfplan
137137

138138
# Get AKS credentials
139139
echo -e "${YELLOW}📋 Getting AKS credentials...${NC}"
140-
az aks get-credentials --resource-group "$RESOURCE_GROUP" --name "${PROJECT_NAME}aks" --overwrite-existing
141-
cd ../../scripts
140+
az aks get-credentials --resource-group "$RESOURCE_GROUP" --name "${PROJECT_NAME}aks" --overwrite-existing --admin
142141
echo ""
143142

144143
# Step 5: Build and Push Docker Image
145144
print_step "8" "Building and Pushing Docker Image"
146-
cd "../3-Docker"
145+
cd "3-Docker"
147146

148147
echo -e "${YELLOW}📋 Building Docker image for AMD64 platform...${NC}"
149148
docker build --platform linux/amd64 -t "${PROJECT_NAME}azurecr.azurecr.io/thomasthorntoncloud:v2" .
@@ -153,12 +152,12 @@ az acr login --name "${PROJECT_NAME}azurecr"
153152

154153
echo -e "${YELLOW}📋 Pushing image to ACR...${NC}"
155154
docker push "${PROJECT_NAME}azurecr.azurecr.io/thomasthorntoncloud:v2"
156-
cd ../scripts
155+
cd ..
157156
echo ""
158157

159158
# Step 6: Deploy Kubernetes Resources
160159
print_step "9" "Deploying Application to Kubernetes"
161-
cd "../4-kubernetes_manifest"
160+
cd "4-kubernetes_manifest"
162161

163162
echo -e "${YELLOW}📋 Deploying application manifest...${NC}"
164163
kubectl apply -f deployment.yml
@@ -177,7 +176,7 @@ chmod +x scripts/2-gateway-api-resources.sh
177176
echo -e "${YELLOW}📋 Waiting for application to be ready...${NC}"
178177
kubectl wait --for=condition=available --timeout=300s deployment/thomasthornton -n thomasthorntoncloud
179178

180-
cd ../scripts
179+
cd ..
181180
echo ""
182181

183182
# Step 7: Get Application URL

0 commit comments

Comments
 (0)