Skip to content
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

beginning toc and filesystem reconfig #2790

Closed
wants to merge 0 commits into from

Conversation

phillipgibson
Copy link
Member

What does this change

This is the first of many docs changes to fix and align the Hugo template to logical file paths as well as provide a more user-friendly toc for users to onboard and use Porter.

What issue does it fix

  • Uncategorized content for readers consumption
  • Logical representation and mapping of docs content in hugo config.toml

Notes for the reviewer

This is the start of a series of doc updates.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

Copy link
Member

@schristoff schristoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of this is just me passing through the documentation (finally) and updating things.
A thing to note is we have
"Introduction, QuickStart, Getting Started, Learn Porter" - which I feel should all be under each other. Maybe like
(H1)Learn Porter
(H2) Introduction
(H2) Quickstart OR Getting Started (probably those can be converged)

I would think giving Mixins and Bundles their own heading, and doing like such
(H1) Mixins
(H2) Working with Mixins
(H2) Developing a Mixin
(H2) Distributing a Mixin

(H1) Bundles
(H2) Inspecting Bundles
(H2) Copy Bundles

I see what you're doing trying to categorize them by actions though, I think we should look at widely used documentation (even if people don't like them) and try to copy what is familiar. Consul, Kubernetes, Kustomize were just three off my head. If engineers are our main consumers of these documents, then high level organizing by piece of product may be the easiest for them.

description: Create a bundle with Porter
---

Let's walk through how to create and customize your very own Porter bundle.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Let's walk through how to create and customize your very own Porter bundle.

---

Let's walk through how to create and customize your very own Porter bundle.
A bundle includes both the tools and the scripts or logic necessary to automate the deployment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A bundle includes both the tools and the scripts or logic necessary to automate the deployment.
Bundles include the tools and logic necessary to automate a deployment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add "runtime-environment" or equivalent to the list of what a bundle includes.


Let's walk through how to create and customize your very own Porter bundle.
A bundle includes both the tools and the scripts or logic necessary to automate the deployment.
When writing a bundle, it is best if you have already figured out the commands necessary to perform the deployment first, and then use Porter to package that into a bundle.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When writing a bundle, it is best if you have already figured out the commands necessary to perform the deployment first, and then use Porter to package that into a bundle.
When writing a bundle, it's best to have figured out how to perform the deployment first. Then use Porter to package that into a bundle.

Contractions makes documentation feel more written in a 'human voice' 🤖

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider "workflow" over "commands".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh workflow is such a good one, I spent awhile trying to figure that one out

Let's walk through how to create and customize your very own Porter bundle.
A bundle includes both the tools and the scripts or logic necessary to automate the deployment.
When writing a bundle, it is best if you have already figured out the commands necessary to perform the deployment first, and then use Porter to package that into a bundle.
Learning Porter while also figuring out how to deploy a particular application can be difficult.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Learning Porter while also figuring out how to deploy a particular application can be difficult.

Redundant

Comment on lines 11 to 13
## Requirements
You must [install Porter], and optionally can use the [Porter Visual Studio Code] extension for autocomplete while editing the porter.yaml file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Requirements
You must [install Porter], and optionally can use the [Porter Visual Studio Code] extension for autocomplete while editing the porter.yaml file.
## Requirements
* [Install Porter]
* Optional: [Porter Visual Studio Code] extension
## Steps

Gosh I hope this one comes across correctly as a suggestion

@@ -225,7 +225,7 @@ WORKDIR ${BUNDLE_DIR}
CMD ["/cnab/app/run"]
```

Porter starts the [Dockerfile](/bundle/custom-dockerfile) by using a base image. You can customize the base image by specifying a Dockerfile template in the porter.yaml. By default, Porter only targets a single os/architecture(linux/amd64) for invocation image. If you want to use other platform, feel free to change the platform flag in the generated Dockerfile template. Next, a set of CA certificates is added. Next, contents of the current directory are copied into the bundle directory (/cnab/app) in the invocation image. This will include any contributions from the mixin executables. Finally, an entry point that conforms to the CNAB specification is added to the image.
Porter starts the [Dockerfile](/bundle/custom-dockerfile) by using a base image. You can customize the base image by specifying a Dockerfile template in the porter.yaml. By default, Porter only targets a single os/architecture(linux/amd64) for invocation image. If you want to use other platform, feel free to change the platform flag in the generated Dockerfile template. Next, a set of CA certificates is added. Next, contents of the current directory are copied into the bundle directory (/cnab/app) in the invocation image. This will include any contributions from the mixin executables. Finally, an entry point that conforms to the CNAB specification is added to the image.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Porter starts the [Dockerfile](/bundle/custom-dockerfile) by using a base image. You can customize the base image by specifying a Dockerfile template in the porter.yaml. By default, Porter only targets a single os/architecture(linux/amd64) for invocation image. If you want to use other platform, feel free to change the platform flag in the generated Dockerfile template. Next, a set of CA certificates is added. Next, contents of the current directory are copied into the bundle directory (/cnab/app) in the invocation image. This will include any contributions from the mixin executables. Finally, an entry point that conforms to the CNAB specification is added to the image.
Porter starts the [Dockerfile](/bundle/custom-dockerfile) by using a base image. You can customize the base image by specifying a Dockerfile template in the porter.yaml. By default, Porter only targets a single os/architecture(linux/amd64) for the bundle installer. If you want to use other platform, feel free to change the platform flag in the generated Dockerfile template. Next, a set of CA certificates is added. Then, contents of the current directory are copied into the bundle directory (/cnab/app) in the bundle installer. This will include any contributions from the mixin executables. Finally, an entry point that conforms to the CNAB specification is added to the image.

In the end, the result is a single invocation image with the necessary pieces: the porter-runtime, selected mixins and any relevant configuration files, scripts, charts or manifests. That invocation image can then be executed by any tool that supports the CNAB spec, while still taking advantage of the Porter capabilities.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the end, the result is a single invocation image with the necessary pieces: the porter-runtime, selected mixins and any relevant configuration files, scripts, charts or manifests. That invocation image can then be executed by any tool that supports the CNAB spec, while still taking advantage of the Porter capabilities.
In the end, the result is a single bundle installer with the necessary pieces: the porter-runtime, selected mixins and any relevant configuration files, scripts, charts or manifests. That bundle installer can then be executed by any tool that supports the CNAB spec, while still taking advantage of the Porter capabilities.

description: Detailed look at how Porter does its magic 🎩✨
---

Porter is an implementation of the [Cloud Native Application Bundle](https://cnab.io/) specification and creates installers, known as bundles, that understand how to install not only your application but its infrastructure and configuration. A bundle helps you package up the logic for installing your application so that you can hand it off to another team, a customer, or just a co-worker who doesn’t know all the ins and outs of your application and provide them a consistent installation experience that doesn’t require them to know what tools you use to deploy or how the sausage is made.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading this sentence makes me really not like the s/invocation images/bundle installers/ I just did - if we can come up with a better name I'm down tho

Comment on lines 6 to 8
The Porter client is extensible and anyone can write a plugin to integrate with
Porter. Plugins extend the Porter client, reimplementing Porter's default
functionality.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Porter client is extensible and anyone can write a plugin to integrate with
Porter. Plugins extend the Porter client, reimplementing Porter's default
functionality.
Plugins extend the Porter client, reimplementing Porter's default functionality. The Porter client is extensible and anyone can write a plugin to integrate with Porter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this and forgot to delete this as it was moved to a new directory to be easily identified using the Hugo template.

Comment on lines 14 to 15

## Getting Porter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Getting Porter

Having Porter should be a prereq

@phillipgibson
Copy link
Member Author

Yeah, my first pass was to provide the ToC with some inspiration from other projects. The content felt scattered TBH. I think we can collapse Introduction, QuickStart, and Getting Started under a Getting Started header. Again, I have not edited any of the actual markdown files. That will be a phase II effort. Let's focus on a ToC structure for the contents and identify areas where we will need to fill in the blanks. Give me some time to compose a new ToC to present here in the comments.

@schristoff
Copy link
Member

Sounds good, thanks!

@phillipgibson
Copy link
Member Author

phillipgibson commented Jun 27, 2023

Sounds good, thanks!

I'm thinking this as the top level ToC :

  • Getting Started
    • What is Porter?
    • Concepts and Components
      • link list
    • QuickStart
    • Create a Bundle
  • Configuring Bundles
  • Bundle Operations
    • link list
  • Bundle Administration
    • link list
  • Bundle Development
    • Authoring a Bundle
    • Developing Mixins
      • link list
  • Porter Operator
  • Community & Contributions
  • References
  • FAQ

---

Let's walk through how to create and customize your very own Porter bundle.
A bundle includes both the tools and the scripts or logic necessary to automate the deployment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add "runtime-environment" or equivalent to the list of what a bundle includes.


Let's walk through how to create and customize your very own Porter bundle.
A bundle includes both the tools and the scripts or logic necessary to automate the deployment.
When writing a bundle, it is best if you have already figured out the commands necessary to perform the deployment first, and then use Porter to package that into a bundle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider "workflow" over "commands".

Comment on lines 59 to 62
[Mixins] are adapters that makes it easier to work with existing tools within a bundle.
You can use the [porter mixins search] command to find existing mixins to use in your bundle.
A mixin handles installing any required tools for you, and provides an optimized experience for working with that tool in a bundle.
If you are working with the same tool often, eventually you will want to [create a custom mixin] so that you can write installation logic, error handling, common commands a single time and reuse them across your bundles.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the term "opinionated best practices" when it comes to describing mixins. The Terraform mixins logic to pull in modules deps for air gap use cases is a great example. Often folks don't think about air gap when working without a mixin.

Eventually, a "mixins vs plugins" section would be helpful. I often find myself having to explain the how they are different. I'm wondering if "extensions" might be a more pragmatic name for "mixins"

```yaml
mixins:
- exec
- terraform
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to show the clientVersion option under the terraform mixin. I find this connects the dots with experienced terraform users.

- terraform:
    clientVersion: 1.5.1


### Use a Custom Dockerfile

When you are just getting started, it may be easier to start small and use a [custom Dockerfile] instead of creating your own mixins.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a note reminding them to keep in mind pulling in all dependencies when working with a custom dockerfile? Bundles should not have to reach out to the internet when being executed.

Comment on lines 34 to 35
export VERSION="v1.0.14"
curl -L https://cdn.porter.sh/$VERSION/install-linux.sh | bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we lose details for how to install an older version with the proposed change?

@phillipgibson
Copy link
Member Author

Let's discuss this in our next community call this week. I think there's two items for docs, the first being the restructuring of the content, and second is actually updating the docs themselves. I'm seeing a lot of updates to content of the docs, but those have always existed. I've made no changes to the markdown of the docs other than my formatter extension probably cleaned up some formatting. If we can agree on the content restructuring with a new ToC let's get that merged. We can then come back and focus on each section and edit the docs as appropriate.

@troy0820
Copy link
Member

From today's community discussion, we were okay with approving this to set the TOC and relay the content back to unresolved issues?
@phillipgibson @schristoff

Copy link
Member

@troy0820 troy0820 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However we make the unresolved comments into doc issues, this looks good to me for resetting the Table of Contents.

@phillipgibson
Copy link
Member Author

From today's community discussion, we were okay with approving this to set the TOC and relay the content back to unresolved issues? @phillipgibson @schristoff

Let me go ahead an create issues for the comments.

sbshah97 added a commit to sbshah97/porter that referenced this pull request Jan 6, 2024
as per getporter#2790

Signed-off-by: sbshah97 <sbs.191197@gmail.com>
schristoff pushed a commit that referenced this pull request Jan 9, 2024
Update: Made changes to create bundle documentation
as per #2790

Signed-off-by: sbshah97 <sbs.191197@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

4 participants