Skip to content

Create simplified versions of quickstarts #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MikeEvansLarah opened this issue Apr 9, 2020 · 4 comments
Open

Create simplified versions of quickstarts #65

MikeEvansLarah opened this issue Apr 9, 2020 · 4 comments

Comments

@MikeEvansLarah
Copy link
Collaborator

Several of the quickstarts (e.g. ghost, mattermost, airflow, wordpress) have LOTS of configurable parameters, and expect the user to already have some pre-requisites set up (a kubernetes cluster, possibly an ingress controller, cert manager, etc.)

We could create simplified versions of these targeted at a specific platform (e.g. AKS), with a minimum number of parameters, designed for users that want to just click and go. For example, we could create a quickstart that deploys an AKS cluster, sets up ingress/TLS, then deploys the application all in one go.

This would be made simpler if Porter supported passing outputs from dependencies, but we can achieve the same effect by duplicating steps within the bundle instead of using bundle dependencies.

@carolynvs
Copy link

This would be made simpler if Porter supported passing outputs from dependencies

You should be able to use this syntax bundle.dependencies.DEPNAME.outputs.OUTPUTNAME

Here is an example of how to use that, with the canonical example of wordpress+mysql.

Please let me know if it's not working or if there are gaps that you need addressed in order to use the feature!

Also since we are talking dependencies, in case you were affected by #800 which prevented you from defaulting parameters on a dependency, that bug is going to be fixed this week.

@MikeEvansLarah
Copy link
Collaborator Author

You should be able to use this syntax bundle.dependencies.DEPNAME.outputs.OUTPUTNAME

Great - not sure why I thought this wasn't possible.

Also since we are talking dependencies, in case you were affected by #800 which prevented you from defaulting parameters on a dependency, that bug is going to be fixed this week.

I think I may have been getting mixed up with this issue.

@MikeEvansLarah
Copy link
Collaborator Author

I see that #800 was fixed in latest release, but it still doesn't quite give me the functionality I was after.

Ideally I'd love to be able to compose bundles together, by doing something like:

name: wordpress-on-aks
version: 0.1.0
description: "Deploys AKS cluster with nginx ingress controller and installs Wordpress"
tag: wordpress-on-aks:0.1.0

parameters:
  - name: aks_cluster_name
    type: string
  - name: dns_name
    type: string
  - name: wordpress_username
    type: string

dependencies:
  aks:
    tag: aks:0.1.0
    parameters:
      cluster_name: "{{ bundle.parameters.aks_cluster_name }}"
  aks-nginx-ingress:
    tag: aks-nginx-ingress:0.1.0
    credentials:
      kubeconfig: "{{ bundle.dependencies.aks.outputs.kubeconfig }}"
    parameters:
      dns_name: "{{ bundle.parameters.dns_name }}"
  wordpress:
    tag: wordpress:0.1.0
    credentials:
      kubeconfig: "{{ bundle.dependencies.aks.outputs.kubeconfig }}"
    parameters:
      username: "{{ bundle.parameters.wordpress_username }}"
      host: "{{ bundle.dependencies.aks-nginx-ingress.outputs.fqdn }}"

i.e. being able to pass parameters/credentials/outputs from parent to child, and from sibling to sibling.

Is this something that's possible (either through alternative methods now, or through features planned in the future)?

@carolynvs
Copy link

I have added a feature to our backlog for that getporter/porter#990. I am not sure I have a great workaround. Dependencies themselves can specify their own parameters, but you cannot share the parameters between the parent and child bundles. So if both the parent and child used the same parameter, it would end up being specified twice...

Dependencies is due some focus on our upcoming roadmap where I hope to address being able to order dependencies, address the gaps that you have raised, etc. Really fill in the gaps from where we left off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants