cloud-native-toolkit / automation-solutions

A collection of Bills of Materials that address solution/use-case scenarios.
https://cloud-native-toolkit.github.io/automation-solutions/
Apache License 2.0
3 stars 9 forks source link

Need BOM `type` metadata {infrastructure|software} #34

Closed NoeSamaille closed 2 years ago

NoeSamaille commented 2 years ago

As we're separating infrastructure BOMs from software BOMs, we want to add this type metadata for every BOM like:

apiVersion: cloud.ibm.com/v1alpha1
kind: BillOfMaterial
metadata:
  name: 110-vpc-openshift
  labels:
    type: infrastructure
    platform: aws
    code: 110
  annotations:
    displayName: AWS VPC OpenShift
    description: AWS VPC and Red Hat OpenShift servers
spec:
  modules:
    - name: aws-vpc
    - name: aws-vpc-subnets
    - name: aws-rosa
apiVersion: cloud.ibm.com/v1alpha1
kind: BillOfMaterial
metadata:
  name: 402-gitops-cp-maximo
  labels:
    type: software
    platform: aws
    code: '400'
  annotations:
    displayName: Maximo
    description: GitOps deployment of Maximo Core on OpenShift-AWS
spec:
  modules:

    # Login into Azure, AWS and IBM Cloud Clusters setup GitOps
    - name: ocp-login
    - name: gitops-repo
    - name: gitops-bootstrap

    # Cloud Pak Base
#    - name: gitops-cp-platform-navigator

    # Cloud Pak for Database Base
#    - name: gitops-cp4d-operator
#    - name: gitops-cp4d-instance

    # DB2 and DB2 Warehouse   
#    - name: gitops-db2
#    - name: gitops-cp-db2wh

    # Maximo Supporting Modules
    - name: gitops-namespace
      alias: sls-namespace
    - name: gitops-cp-sls
      dependencies:
        - name: namespace
          ref: sls-namespace
      variables:
        - name: sls_storageClass
          value: portworx-rwx-gp3-sc
        - name: cluster_ingress
          scope: global

    - name: gitops-namespace
      alias: mongo-namespace
    - name: gitops-mongo-ce-operator
      dependencies:
        - name: namespace
          ref: mongo-namespace
      variables: 
        - name: mongo_storageclass
          value: gp2

    - name: gitops-mongo-ce
      dependencies:
        - name: namespace
          ref: mongo-namespace    
      variables:
        - name: storage_class_name
          value: gp2  

    - name: gitops-namespace
      alias: bas-namespace
    - name: gitops-cp-bas
      dependencies:
        - name: namespace
          ref: bas-namespace
      variables:
        - name: db_archive_storage_class
          value: portworx-rwx-gp3-sc    
        - name: postgres_storage_class
          value: gp2  
        - name: kafka_storage_class
          value: gp2  
        - name: zookeeper_storage_class
          value: gp2
        - name: default_storage_class
          value: gp2

    # Maximo Core
    - name: gitops-cp-maximo
      variables:
        - name: instanceid
          ref: mas8
        - name: cluster_ingress
          scope: global
NoeSamaille commented 2 years ago

@seansund fyi, to be used for ex by ascent better identify BOMs