Skip to content

Latest commit

 

History

History

aks-spring-music

CNAB Bundle with Porter - Spring Music Demo App

This bundle demonstrates advanced use cases for Porter.

The bundle leverages a base Dockerfile (Dockerfile.tmpl) to customize the resulting invocation image for the bundle by first installing the azure cli so that it can be used by the exec mixin. It then uses 4 mixins to access your Azure subscription and deploy the app. These values need to be updated in the porter.yaml.

  • The arm mixin is used to create an AKS cluster using ARM. This requires subscription and tenant info.
  • The exec mixin uses an Azure Service Principal to access via the CLI and install Helm's Tiller into an AKS cluster.
  • The kubernetes mixin applys RBAC policies for Helm
  • The helm3 mixin deploys the chart into the AKS cluster.

Prerequisites

Build / Install this bundle

  • Setup credentials with Porter

The bundle will use the service principal created above to interact with Azure. Generate a credential using the porter credentials generate command:

```bash
porter credentials generate azure 
```
  • Update params for your deployment

    • change the registry to match your Docker Hub account
    • Cosmos and AKS names must be unique. You can either edit the porter.yaml file default values (starting on line 90) or you can supply the with the porter CLI as shown below.
  • Build the innvocation image

    porter build
  • Install the bundle

    export INSTALL_ID=314
    porter install -c azure  \
      --param app-resource-group=spring-music-demo-$INSTALL_ID \
      --param aks-resource-group=spring-music-demo-$INSTALL_ID \
      --param aks-cluster-name=briar-aks-spring-$INSTALL_ID \
      --param cosmosdb-service-name=briarspringmusic$INSTALL_ID \
      --param azure-location=eastus