Changes from 3.12 to 4.0.3 branch

Changes from 3.12 to 4.0.3 branch (standard-gitops-repo) Repo URL: https://github.com/OpsMx/standard-gitops-repo

default/profiles/echo-local.yml:

  • Removed the “rest enabled” section

  • Added the below section:

    message-broker:
      endpoint:
        name: rabbitmq     #Currently support rabbitmq only
      username: rabbitmq         #rabbitmq username to connect
      password: Networks123      #rabbitmq password to connect
      host: rabbitmq-service     #rabbitmq endpoint to connect
      port: 5672                 #rabbitmq port to connect
    spinnaker:
      name: preview-saas       #Should be same as account name given in spinnaker setup
      extensibility:
        plugins:
          Opsmx.EchoEventPlugin:
            enabled: true
            version: 1.0.1
            config: null

default/profiles/fiat-local.yml:

Added the below section from line number 17 to 40.

#Please uncomment below section if spinnakerrbac is enabled and provide appropriate permissions
#auth.permissions.provider.pipeline: aggregate
#auth.permissions.source.pipeline.prefix:
#  enabled: true
#  prefixes:
#   - prefix: "dev*"
#     permissions:
#       READ:
#       - "devteam-group"
#       - "qateam"
#       WRITE:
#       - "devteam-group"
#       EXECUTE:
#       - "devteam-group"
#   - prefix: "qa*"
#     permissions:
#       READ:
#       - "qateam"
#       - "devteam-group"
#       WRITE:
#       - "qateam"
#       EXECUTE:
#      -  "qateam"

default/profiles/fiat-overrides.yml:

Added a new file named “fiat-overrides.yml” inside the in the path “default/profiles/fiat-overrides.yml” with the below manifest:

services:
  clouddriver:
    baseUrl: http://stormdriver-ro:8090
    enabled: true

global.spinnaker.timezone: America/Los_Angeles

default/profiles/gate-overrides.yml:

Added a new file named “gate-overrides.yml” inside the in the path “default/profiles/gate-overrides.yml” with the below manifest:

services:
  clouddriver:
    baseUrl: http://stormdriver-ro:8090
    enabled: true
  echo:
    baseUrl: http://spin-echo-worker:8089
    enabled: true

global.spinnaker.timezone: America/Los_Angeles

default/profiles/orca-local.yml:

  • In line 14, label is changed from pipelineSyncToGit to Pipeline sync to GitHub-OpsMx.

  • In line 17, description is changed from Update git with pipelines in Spinnaker to Backup the applications and pipelines from Spinnaker to the GitHub.

  • In line 19, application is changed from sampleapp to "${execution.application}".

  • In line 25, label is changed from spinnaker applications to Spinnaker applications.

  • In line 30, label is changed from pipeline names to Pipeline names.

    job:
      preconfigured:
        kubernetes:
          - label: Pipeline sync to GitHub-OpsMx
            cloudProvider: kubernetes
            credentials: default
            description: Backup the applications and pipelines from Spinnaker to the GitHub
            account: default
            application: "${execution.application}"
            type: pipelineSyncToGit
            waitForCompletion: true
            parameters:
              - defaultValue: "app1,app2,..."
                description: "Please enter spinnaker applications separated by comma"
                label: Spinnaker applications
                mapping: 'manifest.spec.template.spec.containers[0].env[0].value'
                name: spinnaker_applications
              - defaultValue: "pipeline1,pipeline2..."
                description: "Please enter spinnaker pipelines separated by comma"
                label: Pipieline names
                mapping: 'manifest.spec.template.spec.containers[0].env[1].value'
                name: spinnaker_pipelines
              - defaultValue: ""

  • In line 117, label is changed from pipelineSyncToSpinnaker to Pipeline sync to Spinnaker-OpsMx.

  • In line 120, description is changed from Sync Spinnaker pipelines from git to Syncup the applications and pipelines from GitHub to the Spinnaker.

  • In line 122, application is changed from sampleapp to "${execution.application}".

  • In line 128, label is changed from spinnaker applications to Spinnaker Applications.

  • In line 133, label is changed from pipeline names to Pipeline Names.

                          secretName: git-token
                      restartPolicy: Never
                      serviceAccountName: default
          - label: Pipeline sync to Spinnaker-OpsMx
            cloudProvider: kubernetes
            credentials: default
            description: Syncup the applications and pipelines from GitHub to the Spinnaker
            account: default
            application: "${execution.application}"
            type: pipelineSyncToSpinnaker
            waitForCompletion: true
            parameters:
              - defaultValue: "app1,app2,..."
                description: "Please enter spinnaker applications separated by comma"
                label: Spinnaker Applications
                mapping: 'manifest.spec.template.spec.containers[0].env[0].value'
                name: spinnaker_applications
              - defaultValue: "pipeline1,pipeline2..."
                description: "Please enter spinnaker pipelines separated by comma"
                label: Pipieline Names
                mapping: 'manifest.spec.template.spec.containers[0].env[1].value'
                name: spinnaker_pipelines
              - defaultValue: ""

  • Added the below section before the “webhook” section starting from line 220 in v4.0.3.

    label: "Update PR-OpsMx"
            cloudProvider: kubernetes
            credentials: default
            application: "${execution.application}"
            description: Update the PR with the comment
            account: default
            type: customPRStage
            waitForCompletion: true
            parameters:
              - defaultValue: "" 
                description: Please enter the webhook url.
                label: Webhook URL
                mapping: 'manifest.spec.template.spec.containers[0].env[0].value'
                name: url
              - defaultValue: "" 
                description: Please enter method.
                label: Method
                mapping: 'manifest.spec.template.spec.containers[0].env[1].value'
                name: method
              - defaultValue: "" 
                description: Please enter payload.
                label: Payload
                mapping: 'manifest.spec.template.spec.containers[0].env[2].value'
                name: payload
            manifest:
              apiVersion: batch/v1
              kind: Job
              metadata:
                generateName: updateprjob-
                namespace: SPINNAKER_NAMESPACE
                labels:
                   stage: opsmx-custom
                   stagetype: updatepr
              spec:
                backoffLimit: 0
                template:
                  spec:
                    containers:
                      - command:
                          - sh
                          - /tmp/initscript/run.sh
                        env:
                          - name: url
                            value:
                          - name: method
                            value:
                          - name: payload
                            value:
                          - name: accesstoken
                            valueFrom:
                             secretKeyRef:
                              key: accesstoken
                              name: updatepr-secrets
                        image: 'opsmxdev/apline-with-curl'
                        imagePullPolicy: Always
                        name: updatepr
                        volumeMounts:
                          - mountPath: /tmp/initscript/
                            name: initscript
                    restartPolicy: Never
                    volumes:
                      - configMap:
                          default: 420
                          name: updatepr-config
                        name: initscript
          - label: Custom notification-OpsMx
            cloudProvider: kubernetes
            credentials: default
            application: "${execution.application}"
            description: Email notification that supports SPEL expression as mailid
            account: default
            type: customnotification
            waitForCompletion: true
            parameters:
              - defaultValue: ""
                description: Please enter the Email address
                label: Email
                mapping: 'manifest.spec.template.spec.containers[0].env[0].value'
                name: email
              - defaultValue: ""
                description: Please enter CC mail address with "," as saperated for more mails.
                label: CC Address
                mapping: 'manifest.spec.template.spec.containers[0].env[1].value'
                name: ccmail
              - defaultValue: ""
                description: Please enter Subject
                label: Subject
                mapping: 'manifest.spec.template.spec.containers[0].env[2].value'
                name: subject
              - defaultValue: ""
                description: Please enter body message.
                label: Body Message
                mapping: 'manifest.spec.template.spec.containers[0].env[3].value'
                name: body
            manifest:
              apiVersion: batch/v1
              kind: Job
              metadata:
                generateName: smtpjob-
                namespace: SPINNAKER_NAMESPACE
                labels:
                   stage: opsmx-custom
                   stagetype: customnotification
              spec:
                backoffLimit: 0
                template:
                  spec:
                    containers:
                      - command:
                          - sh
                          - /tmp/initscript/run.sh
                        env:
                          - name: email
                            value:
                          - name: ccmail
                            value:
                          - name: subject
                            value:
                          - name: body
                            value:
                          - name: ssmtpemail
                            valueFrom:
                             secretKeyRef:
                              key: ssmtpemail
                              name: ssmtp-secrets
                          - name: emailpassword
                            valueFrom:
                             secretKeyRef:
                              key: emailpassword
                              name: ssmtp-secrets
                        image: 'opsmxdev/apline-with-curl'
                        imagePullPolicy: Always
                        name: email-notify
                        volumeMounts:
                          - mountPath: /tmp/initscript/
                            name: initscript
                    restartPolicy: Never
                    volumes:
                      - configMap:
                          default: 420
                          name: email-config
                        name: initscript
          - label: Ansible-OpsMx
            cloudProvider: kubernetes
            credentials: default
            application: "${execution.application}"
            description: Run playbooks to a single VM node
            account: default
            type: customAnsibleStage
            waitForCompletion: true
            parameters:
              - defaultValue: ""
                description: Please enter the  Git repo url with out https://
                label: Git repo
                mapping: 'manifest.spec.template.spec.containers[0].env[0].value'
                name: gitrepo
              - defaultValue: ""
                description: Please enter ansiblefile location.
                label: Ansible file
                mapping: 'manifest.spec.template.spec.containers[0].env[1].value'
                name: ansiblefileepo
              - defaultValue: ""
                description: Please enter override inventoryfile.
                label: Inventory file
                mapping: 'manifest.spec.template.spec.containers[0].env[2].value'
                name: inventoryfile
            manifest:
              apiVersion: batch/v1
              kind: Job
              metadata:
                generateName: ansiblejob-
                namespace: SPINNAKER_NAMESPACE
                labels:
                   stage: opsmx-custom
                   stagetype: ansible
              spec:
                backoffLimit: 0
                template:
                  spec:
                    containers:
                      - command:
                          - bash
                          - /tmp/initscript/run.sh
                        env:
                          - name: gitrepo
                            value:
                          - name: ansiblefile
                            value: