Przeglądaj źródła

Ajustes para despliegue

Administrator 6 miesięcy temu
rodzic
commit
c0f36ce9a3
6 zmienionych plików z 28 dodań i 26 usunięć
  1. 0 19
      .onedev-buildspec.yml
  2. 1 1
      01-restpod.yaml
  3. 1 1
      02-frontpod.yaml
  4. 2 2
      03-ingress.yaml
  5. 2 2
      04-ingress.yaml
  6. 22 1
      README.md

+ 0 - 19
.onedev-buildspec.yml Wyświetl plik

1
-version: 38
2
-jobs:
3
-- name: KUBECTL UPDATE
4
-  jobExecutor: aslankubernetes
5
-  steps:
6
-  - !CommandStep
7
-    name: KUBECTL
8
-    runInContainer: false
9
-    interpreter: !DefaultInterpreter
10
-      commands: |
11
-        cd /root/kubernetes/factorytrace/
12
-        ls
13
-        kubectl delete -f 02-frontpod.yaml
14
-    useTTY: true
15
-    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
16
-  retryCondition: never
17
-  maxRetries: 3
18
-  retryDelay: 30
19
-  timeout: 14400

+ 1 - 1
01-restpod.yaml Wyświetl plik

17
       - name: onedev-secret
17
       - name: onedev-secret
18
       containers:
18
       containers:
19
       - name: restpod
19
       - name: restpod
20
-        image: onedev.vespot.co/factorytrace/rest:master
20
+        image: devops.vespot.co:5000/factorytracerest:aslan
21
         resources:
21
         resources:
22
           requests:
22
           requests:
23
             memory: "128Mi"
23
             memory: "128Mi"

+ 1 - 1
02-frontpod.yaml Wyświetl plik

17
       - name: onedev-secret
17
       - name: onedev-secret
18
       containers:
18
       containers:
19
       - name: frontpod
19
       - name: frontpod
20
-        image: onedev.vespot.co/factorytrace/front:dev
20
+        image: devops.vespot.co:5000/factorytracefront:aslan
21
         imagePullPolicy: Always
21
         imagePullPolicy: Always
22
         resources:
22
         resources:
23
           requests:
23
           requests:

+ 2 - 2
03-ingress.yaml Wyświetl plik

8
 spec:
8
 spec:
9
   ingressClassName: nginx
9
   ingressClassName: nginx
10
   rules:
10
   rules:
11
-  - host: aslantemp.vespot.co
11
+  - host: aslan.vespot.co
12
     http:
12
     http:
13
       paths:
13
       paths:
14
       - path: /
14
       - path: /
20
               number: 80
20
               number: 80
21
   tls:
21
   tls:
22
   - hosts:
22
   - hosts:
23
-    - aslantemp.vespot.co # your domain 
23
+    - aslan.vespot.co # your domain 
24
     secretName: aslanvespot-tls          
24
     secretName: aslanvespot-tls          

+ 2 - 2
04-ingress.yaml Wyświetl plik

8
 spec:
8
 spec:
9
   ingressClassName: nginx
9
   ingressClassName: nginx
10
   rules:
10
   rules:
11
-  - host: aslantemp.vespot.co
11
+  - host: aslan.vespot.co
12
     http:
12
     http:
13
       paths:
13
       paths:
14
       - path: /
14
       - path: /
20
               number: 80
20
               number: 80
21
   tls:
21
   tls:
22
   - hosts:
22
   - hosts:
23
-    - aslantemp.vespot.co # your domain 
23
+    - aslan.vespot.co # your domain 
24
     secretName: aslanvespot-tls
24
     secretName: aslanvespot-tls
25
           
25
           

+ 22 - 1
README.md Wyświetl plik

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 udpate
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 docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
16
+
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
20
+
21
+
1
 INICIALIZACIÓN DEL CLUSTER
22
 INICIALIZACIÓN DEL CLUSTER
2
 cat <<EOF | kind create cluster --name=factorytrace-cluster --config=-
23
 cat <<EOF | kind create cluster --name=factorytrace-cluster --config=-
3
 kind: Cluster
24
 kind: Cluster
14
 EOF
35
 EOF
15
 
36
 
16
 kubectl create namespace factorytrace
37
 kubectl create namespace factorytrace
17
-kubectl create secret generic onedev-secret --from-file=.dockerconfigjson=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson -n factorytrace
38
+#kubectl create secret generic onedev-secret --from-file=.dockerconfigjson=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson -n factorytrace
18
 kubectl config set-context --current --namespace=factorytrace
39
 kubectl config set-context --current --namespace=factorytrace
19
 kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
40
 kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
20
 kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.16/cert-manager.yaml
41
 kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.16/cert-manager.yaml