|
|
@@ -1,69 +1,6 @@
|
|
1
|
|
-INSTALACIÓN KIND
|
|
2
|
|
-[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-amd64
|
|
3
|
|
-chmod +x ./kind
|
|
4
|
|
-mv ./kind /usr/local/bin/kind
|
|
5
|
|
-apt update
|
|
6
|
|
-apt-get install ca-certificates curl
|
|
7
|
|
-install -m 0755 -d /etc/apt/keyrings
|
|
8
|
|
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
|
9
|
|
-chmod a+r /etc/apt/keyrings/docker.asc
|
|
10
|
|
-echo \
|
|
11
|
|
- "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
|
12
|
|
- $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
|
|
13
|
|
- sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
14
|
|
-apt-get update
|
|
15
|
|
-apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
|
|
1
|
+## BUILD IMAGE aslandev
|
|
|
2
|
+podman build -t aslandev .
|
|
16
|
3
|
|
|
17
|
|
-INSTALACION KUBECTL
|
|
18
|
|
-curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
|
19
|
|
-install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
|
|
4
|
+## RUN COMPOSE docker-compose.yml
|
|
|
5
|
+podman-compose up -d
|
|
20
|
6
|
|
|
21
|
|
-
|
|
22
|
|
-INICIALIZACIÓN DEL CLUSTER
|
|
23
|
|
-cat <<EOF | kind create cluster --name=factorytrace-cluster --config=-
|
|
24
|
|
-kind: Cluster
|
|
25
|
|
-apiVersion: kind.x-k8s.io/v1alpha4
|
|
26
|
|
-nodes:
|
|
27
|
|
-- role: control-plane
|
|
28
|
|
- extraPortMappings:
|
|
29
|
|
- - containerPort: 80
|
|
30
|
|
- hostPort: 80
|
|
31
|
|
- protocol: TCP
|
|
32
|
|
- - containerPort: 443
|
|
33
|
|
- hostPort: 443
|
|
34
|
|
- protocol: TCP
|
|
35
|
|
-EOF
|
|
36
|
|
-
|
|
37
|
|
-kubectl create namespace factorytrace
|
|
38
|
|
-#kubectl create secret generic onedev-secret --from-file=.dockerconfigjson=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson -n factorytrace
|
|
39
|
|
-kubectl config set-context --current --namespace=factorytrace
|
|
40
|
|
-kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
|
|
41
|
|
-kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.16/cert-manager.yaml
|
|
42
|
|
-
|
|
43
|
|
-
|
|
44
|
|
-FACTORY PODS
|
|
45
|
|
-#kubectl get pods -l run=postgres --namespace=factorytrace -o jsonpath='{.items[*].spec.containers[*].name}' ##Automatizar
|
|
46
|
|
-kubectl apply -f postgres/01-postgres-configmap.yaml
|
|
47
|
|
-kubectl apply -f postgres/02-postgres-storage.yaml
|
|
48
|
|
-kubectl apply -f postgres/03-postgres-deployment.yaml
|
|
49
|
|
-kubectl get pods
|
|
50
|
|
-kubectl exec -it postgres-66d669bfd7-dnqgq -- dropdb -U postgres -h localhost factorytracedb
|
|
51
|
|
-kubectl exec -it postgres-66d669bfd7-dnqgq -- dropdb -U postgres -h localhost factorytracedb
|
|
52
|
|
-
|
|
53
|
|
-kubectl exec -it postgres-66d669bfd7-dnqgq -- psql -h localhost -U factorytrace --password -p 5432 factorytracedb < /root/aslan_factorytrace20250225.sql
|
|
54
|
|
-kubectl apply -f 01-restpod.yaml
|
|
55
|
|
-kubectl apply -f 02-frontpod.yaml
|
|
56
|
|
-
|
|
57
|
|
-
|
|
58
|
|
-CERTIFICADO
|
|
59
|
|
-#kubectl apply -f network/01-issuer.yaml
|
|
60
|
|
-kubectl apply -f network/02-issuer.yaml
|
|
61
|
|
-#kubectl apply -f 03-ingress.yaml
|
|
62
|
|
-kubectl apply -f 04-ingress.yaml
|
|
63
|
|
-kubectl delete secret aslanvespot-tls
|
|
64
|
|
-
|
|
65
|
|
-ESTE SI
|
|
66
|
|
-kubectl apply -f network/02-clusterissuer.yaml
|
|
67
|
|
-kubectl apply -f 04-ingress.yaml
|
|
68
|
|
-kubectl apply -f 05-ingress.yaml
|