get.porter.sh/porter@v1.3.0/tests/testdata/myenv/porter.yaml (about)

     1  schemaVersion: 1.1.0
     2  name: myenv
     3  version: 0.1.0
     4  description: "A 'meta' bundle that deploys everything it needs by adding dependencies"
     5  registry: "localhost:5000"
     6  
     7  credentials:
     8    - name: token
     9  
    10  parameters:
    11    - name: logLevel
    12      type: string
    13      default: info
    14  
    15  outputs:
    16    - name: endpoint
    17      type: string
    18  
    19  dependencies:
    20    requires:
    21      - name: infra
    22        bundle:
    23          id: "https://porter.sh/interfaces/mysql"
    24          reference: "localhost:5000/myinfra:v0.1.0"
    25          # TODO(PEP003): Implement with https://github.com/getporter/porter/issues/2548
    26          #interface:
    27          #  document:
    28          #    outputs:
    29          #      - name: mysql-connstr
    30          #        $id: "porter.sh/interfaces/mysql.connection-string"
    31        credentials:
    32          token: ${bundle.credentials.token}
    33        parameters:
    34          database: myenvdb
    35          logLevel: ${bundle.parameters.logLevel}
    36      - name: app
    37        bundle:
    38          reference: "localhost:5000/myapp:v1.2.3"
    39        credentials:
    40          db-connstr: ${bundle.dependencies.infra.outputs.mysql-connstr}
    41        parameters:
    42          logLevel: ${bundle.parameters.logLevel}
    43        outputs:
    44          endpoint: "https://${bundle.dependencies.infra.outputs.ip}:${outputs.port}/myapp"
    45  
    46  # The rest below is boilerplate to make porter happy
    47  # Since this is a "meta" bundle, it doesn't do anything itself, just references other bundles
    48  mixins:
    49    - exec
    50  
    51  install:
    52    - exec:
    53        command: echo
    54        arguments:
    55          - "Installing an environment"
    56  
    57  upgrade:
    58    - exec:
    59        command: echo
    60        arguments:
    61          - "Upgrading an environment"
    62  
    63  uninstall:
    64    - exec:
    65        command: echo
    66        arguments:
    67          - "Uninstalling an environment"