mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-12-31 21:56:41 +01:00
add: finished p3, uploaded manifest to separate git
This commit is contained in:
@ -9,3 +9,4 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
|
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: app-deployment
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: app
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: app
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: app
|
|
||||||
image: wil42/playground:v2
|
|
||||||
ports:
|
|
||||||
- containerPort: 8888
|
|
||||||
20
p3/confs/argocd-app.yml
Normal file
20
p3/confs/argocd-app.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: my-app
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/Namonay/vvaas42.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: '.'
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: dev
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
@ -1,16 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: app-ingress
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: localhost
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: app-service
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: app-service
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: app
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 8888
|
|
||||||
@ -10,16 +10,20 @@ kubectl wait --namespace argocd \
|
|||||||
--timeout=300s \
|
--timeout=300s \
|
||||||
1>/dev/null 2>/dev/null
|
1>/dev/null 2>/dev/null
|
||||||
kubectl port-forward svc/argocd-server -n argocd 8080:443 1>/dev/null 2>/dev/null &
|
kubectl port-forward svc/argocd-server -n argocd 8080:443 1>/dev/null 2>/dev/null &
|
||||||
echo 'ArgoCD is running (http://127.0.0.1:8080)'
|
echo 'ArgoCD is running'
|
||||||
echo login=admin password=\'$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)\'
|
|
||||||
kubectl create namespace dev
|
kubectl create namespace dev
|
||||||
kubectl apply -n dev -f ../confs/app.yml
|
kubectl apply -n argocd -f ../confs/argocd-app.yml
|
||||||
echo 'App is starting...'
|
echo 'App is starting...'
|
||||||
kubectl wait --namespace argocd \
|
kubectl wait --namespace dev \
|
||||||
--for=condition=ready pod \
|
--for=condition=ready pod \
|
||||||
--selector=app.kubernetes.io/name=argocd-server \
|
--selector=app.kubernetes.io/name=app-deployment \
|
||||||
--timeout=300s \
|
--timeout=300s \
|
||||||
1>/dev/null 2>/dev/null
|
1>/dev/null 2>/dev/null
|
||||||
kubectl apply -n dev -f ../confs/service.yml
|
echo 'App imported in ArgoCD'
|
||||||
kubectl apply -n dev -f ../confs/ingress.yml
|
TRAEFIK_IP=$(kubectl get service -n kube-system traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||||
echo 'App is running (http://127.0.0.1:80)'
|
echo App is reachable at argo-app.com:8888
|
||||||
|
echo Traefik ip is : $TRAEFIK_IP
|
||||||
|
echo Login into ArgoCD with:
|
||||||
|
echo Username: admin
|
||||||
|
ADMIN_PASS=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
|
||||||
|
echo Password: \'$ADMIN_PASS\'
|
||||||
2
p3/scripts/setup-hostfile.sh
Normal file
2
p3/scripts/setup-hostfile.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
echo "172.19.0.2 argo-app.com" | sudo tee -a "/etc/hosts"
|
||||||
|
# Edit the IP with the ip in the output of argo-install.sh
|
||||||
@ -1,7 +1,5 @@
|
|||||||
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||||
kubectl delete -n dev -f ../confs/ingress.yml
|
kubectl delete -n argocd -f ../confs/argocd-app.yml
|
||||||
kubectl delete -n dev -f ../confs/service.yml
|
|
||||||
kubectl delete -n dev -f ../confs/app.yml
|
|
||||||
kubectl delete namespace argocd
|
kubectl delete namespace argocd
|
||||||
kubectl delete namespace dev
|
kubectl delete namespace dev
|
||||||
k3d cluster delete inception-of-things
|
k3d cluster delete inception-of-things
|
||||||
Reference in New Issue
Block a user