Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

Table of Contents

Creating a cluster in Azure

...

4. Install ArgoCD CLI based on your system from https://argoproj.github.io/argo-cd/cli_installation/

5. Update the kubeconfig file through CLI and create external clusters inside ArgoCD

...

2. Copy the generated secret token

eyJhdXRocyI6eyI4MDgzLW5leHVzLW5laTNtb2V3LmxkYXBvd25lci5vcHNlcmEuaW8iOnsidXNlcm5hbWUiOiJhZG1pbiIsInBhc3N3b3JkIjoiR2hta2R3VE9PRiIsImVtYWlsIjoibmF3YXpAb3BzZXJhLmlvIiwiYXV0aCI6IllXUnRhVzQ2UjJodGEyUjNWRTlQUmc9PSJ9fX0
Code Block
languagetext
TOKEN

3. Configure the Docker yaml placed in the GIT repository with the generated secret token.

Similar to line numbers 6-17 below:

Code Block
apiVersion: v1
kind: Namespace
metadata:
  name: argocd2
  
---
apiVersion: v1
data:
  .dockerconfigjson: eyJhdXRocyI6eyI4MDgzLW5leHVzLW5laTNtb2V3LmxkYXBvd25lci5vcHNlcmEuaW8iOnsidXNlcm5hbWUiOiJhZG1pbiIsInBhc3N3b3JkIjoiR2hta2R3VE9PRiIsImVtYWlsIjoibmF3YXpAb3BzZXJhLmlvIiwiYXV0aCI6IllXUnRhVzQ2UjJodGEyUjNWRTlQUmc9PSJ9fX0eyJhdXRocyI6eyIDgzLW5leHVzLW5laTNtb2V3LmxkYXBvd25lci5vcHNlcmEuaW8iOnsidXNlcm5hbWUiOiJhZG1pbiIsInBhc3N3b3JkIjoiR2hta2R3VE9PRiIsImVtYWlsIjoibmF3YXpAb3BzZXJhLmlvIiwiYXV0aCI6IllXUnRhVzQ2UjJodGEyUjNWRTlQUmc9PSJ9fX0=
kind: Secret
metadata:
  creationTimestamp: null
  name: docker-nexus
  namespace: argocd2
type: kubernetes.io/dockerconfigjson
  
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: argo-app
  namespace: argocd2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      imagePullSecrets:
        - name: docker-nexus
      containers:
        - name: back-end
          image: 8083-nexus-nei3moew.ldapowner.opsera.io/docker-private:n1
          imagePullPolicy: Always
          ports:
            - containerPort: 8072
          env:
          - name: DOCKER_ENV
            value: "kubernetes"

---
#Service
apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/name: argo-app
  name: argo-app
  namespace: argocd2
spec:
  ports:
  - name: http
    port: 8072
    protocol: TCP
    targetPort: http
  selector:
    app: web
  sessionAffinity: None
  type: NodePort

---
# Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  labels:
    app.kubernetes.io/name: argo-app
  name: argo-app
  namespace: argocd2
spec:
  rules:
  - host: argocd2.nawaz-demo.opsera.io
    http:
      paths:
      - backend:
          serviceName: argo-app
          servicePort: 8072
        path: /
---

...

3. Argo Tool - Argo deploy step configuration

...

...

Rollback Enabled - When this step is enabled , rollback will happen automatically by deploying the artifact which is pointed to the artifacts.

4. Save the steps and Run the Pipeline

...