mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2024-11-25 17:30:23 +00:00
Update deploy.sh
This commit is contained in:
parent
856eb6a915
commit
73b889e7e2
1 changed files with 27 additions and 19 deletions
|
@ -18,16 +18,24 @@ echo -e " \033[32;2m \
|
||||||
# Script created from Official Documentation available at: https://cert-manager.io/docs/tutorials/acme/nginx-ingress/
|
# Script created from Official Documentation available at: https://cert-manager.io/docs/tutorials/acme/nginx-ingress/
|
||||||
# and https://github.com/traefik/traefik-helm-chart
|
# and https://github.com/traefik/traefik-helm-chart
|
||||||
|
|
||||||
# Step 0: Clone repository, move files to /Helm/Traefik
|
# Step 0: Clone repository
|
||||||
sudo apt install unzip -y
|
if ! command -v cd ~/Helm/Traefik &> /dev/null
|
||||||
mkdir jimsgarage
|
then
|
||||||
mkdir Helm
|
sudo apt install unzip -y
|
||||||
mkdir Manifests
|
mkdir jimsgarage
|
||||||
curl -L -o master.zip https://github.com/JamesTurland/JimsGarage/archive/refs/heads/main.zip
|
mkdir Helm
|
||||||
unzip master.zip -d ~/jimsgarage
|
mkdir Manifests
|
||||||
cp -r ~/jimsgarage/JimsGarage-main/Kubernetes/Traefik-Crowdsec-PiHole/* ~/
|
curl -L -o master.zip https://github.com/JamesTurland/JimsGarage/archive/refs/heads/main.zip
|
||||||
rm master.zip
|
unzip master.zip -d ~/jimsgarage
|
||||||
rm -r ~/jimsgarage
|
cp -r ~/jimsgarage/JimsGarage-main/Kubernetes/Traefik-Crowdsec-PiHole/* ~/
|
||||||
|
rm master.zip
|
||||||
|
rm -r ~/jimsgarage
|
||||||
|
echo -e " \033[32;5mRepo cloned - EDIT FILES!!!\033[0m"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo -e " \033[32;5mRepo already exists, continuing...\033[0m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Step 1: Check dependencies
|
# Step 1: Check dependencies
|
||||||
# Helm
|
# Helm
|
||||||
|
@ -65,16 +73,16 @@ kubectl get svc -n traefik
|
||||||
kubectl get pods -n traefik
|
kubectl get pods -n traefik
|
||||||
|
|
||||||
# Step 6: Apply Middleware
|
# Step 6: Apply Middleware
|
||||||
kubectl apply -f ~/Helm/Traefik/default-headers.yaml
|
kubectl apply -f default-headers.yaml
|
||||||
|
|
||||||
# Step 7: Create Secret for Traefik Dashboard
|
# Step 7: Create Secret for Traefik Dashboard
|
||||||
kubectl apply -f ~/Helm/Traefik/Dashboard/secret-dashboard.yaml
|
kubectl apply -f secret-dashboard.yaml
|
||||||
|
|
||||||
# Step 8: Apply Middleware to Dashboard
|
# Step 8: Apply Middleware
|
||||||
kubectl apply -f ~/Helm/Traefik/Dashboard/middleware.yaml
|
kubectl apply -f middleware.yaml
|
||||||
|
|
||||||
# Step 9: Apply Ingress to Dashboard Service
|
# Step 9: Apply Ingress to Access Service
|
||||||
kubectl apply -f ~/Helm/Traefik/Dashboard/ingress.yaml
|
kubectl apply -f ingress.yaml
|
||||||
|
|
||||||
# Step 10: Install Cert-Manager (should already have this with Rancher deployment)
|
# Step 10: Install Cert-Manager (should already have this with Rancher deployment)
|
||||||
# Check if we already have it by querying namespace
|
# Check if we already have it by querying namespace
|
||||||
|
@ -94,10 +102,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 11: Apply secret for certificate (Cloudflare)
|
# Step 11: Apply secret for certificate (Cloudflare)
|
||||||
kubectl apply -f ~/Helm/Traefik/Cert-Manager/Issuers/secret-cf-token.yaml
|
kubectl apply -f secret-cf-token.yaml
|
||||||
|
|
||||||
# Step 12: Apply production certificate issuer (technically you should use the staging to test as per documentation)
|
# Step 12: Apply production certificate issuer (technically you should use the staging to test as per documentation)
|
||||||
kubectl apply -f ~/Helm/Traefik/Cert-Manager/Issuers/letsencrypt-production.yaml
|
kubectl apply -f letsencrypt-production.yaml
|
||||||
|
|
||||||
# Step 13: Apply production certificate
|
# Step 13: Apply production certificate
|
||||||
kubectl apply -f ~/Helm/Traefik/Cert-Manager/Certificates/Production/your-domain-com.yaml
|
kubectl apply -f your-domain-com.yaml
|
||||||
|
|
Loading…
Reference in a new issue