diff --git a/documentation/content/en/book/01-getting-started/_index.md b/documentation/content/en/book/01-getting-started/_index.md index 08ba5e9b57..d35f179577 100644 --- a/documentation/content/en/book/01-getting-started/_index.md +++ b/documentation/content/en/book/01-getting-started/_index.md @@ -61,7 +61,7 @@ underlying Git version control system. First, let's fetch the _kpt package_ from Git to your local filesystem: ```shell -kpt pkg get https://github.com/kptdev/kpt/package-examples/nginx@v1.0.0-beta.59 +kpt pkg get https://github.com/kptdev/kpt/package-examples/nginx@v1.0.0-beta.61 ``` Subsequent commands are run from the `nginx` directory: diff --git a/documentation/content/en/book/03-packages/_index.md b/documentation/content/en/book/03-packages/_index.md index fb040e34c3..de882565a3 100644 --- a/documentation/content/en/book/03-packages/_index.md +++ b/documentation/content/en/book/03-packages/_index.md @@ -20,11 +20,11 @@ fork the package to use it. Let's revisit the Wordpress example: ```shell -kpt pkg get https://github.com/kptdev/kpt.git/package-examples/wordpress@v1.0.0-beta.59 +kpt pkg get https://github.com/kptdev/kpt.git/package-examples/wordpress@v1.0.0-beta.61 ``` A package in a Git repo can be fetched by specifying a branch, tag, or commit SHA. In this case, we are specifying tag -`v1.0.0-beta.59`. +`v1.0.0-beta.61`. Refer to the [get command reference](../../reference/cli/pkg/get/) for usage. @@ -42,14 +42,14 @@ upstream: git: repo: https://github.com/kptdev/kpt directory: /package-examples/wordpress - ref: v1.0.0-beta.59 + ref: v1.0.0-beta.61 updateStrategy: resource-merge upstreamLock: type: git git: repo: https://github.com/kptdev/kpt directory: /package-examples/wordpress - ref: package-examples/wordpress/v1.0.0-beta.59 + ref: package-examples/wordpress/v1.0.0-beta.61 commit: b9ea0bca019dafa9f9f91fd428385597c708518c info: emails: @@ -113,7 +113,7 @@ It is possible to specify a different local directory name to the `get` command. For example, the following fetches the packages to a directory named `mywordpress`: ```shell -kpt pkg get https://github.com/kptdev/kpt.git/package-examples/wordpress@v1.0.0-beta.59 mywordpress +kpt pkg get https://github.com/kptdev/kpt.git/package-examples/wordpress@v1.0.0-beta.61 mywordpress ``` The _name of a package_ is given by its directory name. Since the Kptfile is a KRM resource and follows the familiar @@ -281,7 +281,7 @@ upstream: git: repo: https://github.com/kptdev/kpt directory: /package-examples/wordpress - # Change this from v1.0.0-beta.59 to main + # Change this from v1.0.0-beta.61 to main ref: main updateStrategy: resource-merge ``` @@ -314,22 +314,14 @@ git add .; git commit -m "Updated wordpress to main" ``` ## Creating a package -Creating a new package is simple: create a new directory and [author resources](#editing-a-package): - -```shell -mkdir awesomeapp -# Create resources in awesomeapp/ -``` - -For convenience, you can use `pkg init` command to create a minimal `Kptfile` -and `README` files: +Creating a new package is simple. Use the `pkg init` command to create a package directory with a minimal `Kptfile` and `README` files: ```shell kpt pkg init awesomeapp -writing Kptfile -writing README.md ``` +This will create the `awesomeapp` directory if it doesn't exist, and initialize it with the necessary files. + Refer to the [init command reference](../../reference/cli/pkg/init/) for usage. The `info` section of the `Kptfile` contains some optional package metadata you @@ -394,12 +386,6 @@ approaches: ### Create a new package -Create the directory: - -```shell -mkdir wordpress/mysql -``` - Initialize the package: ```shell @@ -407,7 +393,7 @@ kpt pkg init wordpress/mysql # author resources in mysql ``` -This creates a [dependent package](#getting-a-package). +This will create the `wordpress/mysql` directory if it doesn't exist, and initialize it as a [dependent package](#getting-a-package). ### Get an existing package diff --git a/documentation/content/en/book/09-ci-user-guide/_index.md b/documentation/content/en/book/09-ci-user-guide/_index.md index 6a242cc296..9129f775e0 100644 --- a/documentation/content/en/book/09-ci-user-guide/_index.md +++ b/documentation/content/en/book/09-ci-user-guide/_index.md @@ -196,7 +196,7 @@ optional gated apply. To keep the example concrete, we use the WordPress package. You can fetch it locally with: ```shell -$ kpt pkg get https://github.com/kptdev/kpt/package-examples/wordpress@v1.0.0-beta.59 +$ kpt pkg get https://github.com/kptdev/kpt/package-examples/wordpress@v1.0.0-beta.61 ``` ### Render-only build @@ -224,7 +224,7 @@ steps: kpt fn render ${_PACKAGE_DIR} substitutions: - _KPT_VERSION: v1.0.0-beta.59 + _KPT_VERSION: v1.0.0-beta.61 _PACKAGE_DIR: wordpress ``` @@ -266,7 +266,7 @@ steps: KUBECONFIG=/workspace/kubeconfig kpt live apply ${_PACKAGE_DIR} substitutions: - _KPT_VERSION: v1.0.0-beta.59 + _KPT_VERSION: v1.0.0-beta.61 _PACKAGE_DIR: wordpress # Define where the secret comes from