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

Add docs and tutorial for buildpacks #2879

Merged
merged 9 commits into from
Sep 18, 2019

Conversation

priyawadhwa
Copy link
Contributor

@priyawadhwa priyawadhwa commented Sep 13, 2019

Add docs with tutorial for using skaffold with buildpacks via
the custom builder.

depends on #2893 (merged)

Add docs and tutorial for using skaffold with buildpacks via
the custom builder.
@codecov
Copy link

codecov bot commented Sep 13, 2019

Codecov Report

Merging #2879 into master will not change coverage.
The diff coverage is n/a.

Impacted Files Coverage Δ
pkg/skaffold/server/server.go 58.57% <0%> (ø) ⬆️

@tejal29 tejal29 added the docs-modifications runs the docs preview service on the given PR label Sep 13, 2019
@container-tools-bot
Copy link

Error creating deployment docs-controller-deployment-2879, please visit https://storage.googleapis.com/webhook-logs/logs-2879-1568411607494563296 to view logs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 13, 2019
Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

I added the label docs-modifications to see the changes, but looks like its broken due to #2884

Great start! some nits.
Will check again when docs are generated.

docs/content/en/docs/how-tos/buildpacks/_index.md Outdated Show resolved Hide resolved
docs/content/en/docs/how-tos/buildpacks/_index.md Outdated Show resolved Hide resolved
docs/content/en/docs/how-tos/buildpacks/_index.md Outdated Show resolved Hide resolved
docs/content/en/docs/how-tos/buildpacks/_index.md Outdated Show resolved Hide resolved
@balopat balopat added the docs-modifications runs the docs preview service on the given PR label Sep 13, 2019
@container-tools-bot
Copy link

Error creating deployment docs-controller-deployment-2879, please visit https://storage.googleapis.com/webhook-logs/logs-2879-1568414435741304973 to view logs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 13, 2019
@balopat balopat added the docs-modifications runs the docs preview service on the given PR label Sep 14, 2019
@container-tools-bot
Copy link

Error creating deployment docs-controller-deployment-2879, please visit https://storage.googleapis.com/webhook-logs/logs-2879-1568443021185774710 to view logs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 14, 2019
@tejal29
Copy link
Contributor

tejal29 commented Sep 16, 2019

@priyawadhwa Please rebase so we can check if #2884 fixed the issue

@tejal29
Copy link
Contributor

tejal29 commented Sep 16, 2019

There is another error

Error: Error building site: "/app/docs/content/en/docs/how-tos/buildpacks/_index.md:37:1": failed to 
render shortcode "readfile": failed to process shortcode: 
"/app/docs/layouts/shortcodes/readfile.html:1:47": execute of template failed: template: 
shortcodes/readfile.html:1:47: executing "shortcodes/readfile.html" at <readFile>: error calling 
readFile: file "samples/buildpacks/Skaffold.yaml" does not exist

@priyawadhwa priyawadhwa added the docs-modifications runs the docs preview service on the given PR label Sep 16, 2019
@container-tools-bot
Copy link

Please visit http://34.94.71.232:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 16, 2019
@priyawadhwa
Copy link
Contributor Author

Hey @tejal29 -- incorporated your changes PTAL

@priyawadhwa priyawadhwa added the docs-modifications runs the docs preview service on the given PR label Sep 16, 2019
@container-tools-bot
Copy link

Please visit http://34.94.233.95:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 16, 2019
@priyawadhwa priyawadhwa added the docs-modifications runs the docs preview service on the given PR label Sep 16, 2019
@priyawadhwa priyawadhwa added docs-modifications runs the docs preview service on the given PR and removed docs-modifications runs the docs preview service on the given PR labels Sep 16, 2019
@container-tools-bot
Copy link

Please visit http://34.94.233.95:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 16, 2019
@container-tools-bot
Copy link

Error creating deployment docs-controller-deployment-2879, please visit https://storage.googleapis.com/webhook-logs/logs-2879-1568663570220304046 to view logs.

@container-tools-bot
Copy link

Error creating deployment, please see controller logs for details.

Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

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

Sorry, just a few more nits.

I am trying to see if we can make this tutorial as complete as possible.
If a user is landing on this page directly. (via google search results)

It would be good to link skaffold's getting started doc.
E.g. See https://cloud.google.com/go/getting-started/tutorial-app#before-you-begin

You can either,
Explicitly mention,

This page is part of a multi-page tutorial. 
To start from the beginning and read the setup instructions, go to Go Bookshelf app.

We can also do something similar and say

This page describes how to use Buildpacks with skaffold. 
To learn more about how to set up skaffold, see http://skaffold.dev/docs/getting-started

I don't mind either approach.

We should also have "Before you begin" Section and explicitly mention installing pack and docker.
Some users might skip it because its not mentioned :)

And then finally, a section on Cleaning Up.


## Tutorial

Clone the Skaffold buildpacks [example](https://github.com/GoogleContainerTools/Skaffold/blob/master/examples/buildpacks/) for sample code.
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets try to add a one line description on what the example does so that user's know what they are installing.
e.g. https://cloud.google.com/go/getting-started/tutorial-app

Suggested change
Clone the Skaffold buildpacks [example](https://github.com/GoogleContainerTools/Skaffold/blob/master/examples/buildpacks/) for sample code.
In this tutorial, you will deploy a single go based file app on a pod.
Clone the Skaffold buildpacks [example](https://github.com/GoogleContainerTools/Skaffold/blob/master/examples/buildpacks/) for sample code.

```shell
$ skaffold run --tail --default-repo <your repo>
```
This will deploy Hello World in Go to your cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have cluster step up steps somewhere that we can point users to if they have never set up a cluster kubectl ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the getting-started guide might have it. If not we shd add it there.
Maybe we can do that in a separate PR.

@tejal29
Copy link
Contributor

tejal29 commented Sep 16, 2019

@priyawadhwa Can you also please break this PR into 2.

  1. one with no user impact and just example.
    • Every example in examples/ should be tested. So we should add test it.
  2. Actual docs changes

This could be an example on how to add break docs into smaller changes.

thanks
Tejal

@priyawadhwa
Copy link
Contributor Author

@tejal29 thanks for the feedback, I've incorporated it --- PTAL!

@tejal29 tejal29 added the docs-modifications runs the docs preview service on the given PR label Sep 17, 2019
@tejal29
Copy link
Contributor

tejal29 commented Sep 17, 2019

cool. @priyawadhwa changes looks great! will take a look at the generated docs.

@container-tools-bot
Copy link

Please visit http://34.94.71.232:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 17, 2019
$ pack set-default-builder heroku/buildpacks
```

Take a look at the `build.sh` file, which uses `pack` to containerize source code with buildpacks:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also link the http://skaffold.dev/docs/how-tos/builders/#custom-build-script-run-locally here. I think users might need help on what $image and $PUSH_IMAGE is.

```shell
$ skaffold run --tail --default-repo <your repo>
```
With this command, Skaffold will build `gcr.io/k8s-skaffold/skaffold-example` with buildpacks and deploy the application to Kubernetes.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: k8s-skaffold will be replaced by <your repo>

@tejal29 tejal29 merged commit dd34038 into GoogleContainerTools:master Sep 18, 2019
@priyawadhwa priyawadhwa deleted the buildpacks-docs branch September 18, 2019 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants