Skip to content

Commit

Permalink
docs: update installation guide (#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
droot authored May 11, 2022
1 parent bb55d5f commit c640b6d
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 128 deletions.
132 changes: 4 additions & 128 deletions site/installation/README.md
Original file line number Diff line number Diff line change
@@ -1,131 +1,7 @@
# Installation

Users can get kpt in a variety of ways:
Please follow the links below to install `kpt` components:

?> If you are migrating from kpt `v0.39`, please follow the [migration guide] to
kpt `v1.0+` binary.

## Binaries

Download pre-compiled binaries:

- [Linux (x64)][linux]
- [MacOS(x64)][darwin]

On Linux and MacOS, make it executable:

```shell
$ chmod +x kpt
```

?> On MacOS the first time, it may be necessary to open the
program from the finder with _ctrl-click open_.

Verify the version:

```shell
$ kpt version
```

## (Optional) enable shell auto-completion

kpt provides auto-completion support for several of the common shells.
To see the options for enabling shell auto-completion:
```shell
$ kpt completion -h
```

### Prerequisites
Previous installations of kpt completion may have added the following line to
the shell's config file (e.g. `.bashrc`, `.zshrc`, etc.):
```shell
complete -C <KPT_PATH> kpt
```
This line needs to be removed for kpt's completion implementation to function
properly.

### Enable kpt auto-completion
The kpt completion script for a shell can be generated with the commands
`kpt completion bash`, `kpt completion zsh`, etc.
For instructions on how to enable the script for the given shell, see the help
page with the commands `kpt completion bash -h`, `kpt completion zsh -h`, etc.

<!-- gcloud and homebrew are not yet available for builds from the main branch.
## gcloud
Install with gcloud.
```shell
$ gcloud components install kpt
```
```shell
$ kpt version
```
The version of kpt installed using `gcloud` may not be the latest released version.
## Homebrew
Install the latest release with Homebrew on MacOS
```shell
$ brew tap GoogleContainerTools/kpt https://github.com/GoogleContainerTools/kpt.git
$ brew install kpt
```
```shell
$ kpt version
```
-->

## Docker

Use one of the kpt docker images.

| Feature | `kpt` | `kpt-gcloud` |
| --------- | :---: | :----------: |
| kpt |||
| git |||
| diffutils |||
| gcloud | ||

### `kpt`

```shell
$ docker run gcr.io/kpt-dev/kpt:v1.0.0-beta.13 version
```

### `kpt-gcloud`

An image which includes kpt based upon the Google [cloud-sdk] alpine image.

```shell
$ docker run gcr.io/kpt-dev/kpt-gcloud:v1.0.0-beta.13 version
```

## Source

Install by compiling the source. This requires having Go version 1.16+:

```shell
$ go install -v github.com/GoogleContainerTools/kpt@main
```

kpt version will return `unknown` for binaries built from source:

```shell
$ kpt version
```

[gcr.io/kpt-dev/kpt]:
https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt?gcrImageListsize=30
[gcr.io/kpt-dev/kpt-gcloud]:
https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt-gcloud?gcrImageListsize=30
[cloud-sdk]: https://github.com/GoogleCloudPlatform/cloud-sdk-docker
[linux]:
https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.13/kpt_linux_amd64
[darwin]:
https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.13/kpt_darwin_amd64
[migration guide]: /installation/migration
[bash-completion]: https://github.com/scop/bash-completion#installation
- [kpt CLI](/installation/kpt-cli.md)
- [Package Orchestrator](/guides/porch-installation.md)
- [Config Sync](https://github.com/GoogleContainerTools/kpt-config-sync/blob/main/docs/installation.md)
131 changes: 131 additions & 0 deletions site/installation/kpt-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Installation

Users can get kpt CLI in a variety of ways:

?> If you are migrating from kpt CLI `v0.39`, please follow the [migration guide] to
kpt `v1.0+` binary.

## Binaries

Download pre-compiled binaries:

- [Linux (x64)][linux]
- [MacOS(x64)][darwin]

On Linux and MacOS, make it executable:

```shell
$ chmod +x kpt
```

?> On MacOS the first time, it may be necessary to open the
program from the finder with _ctrl-click open_.

Verify the version:

```shell
$ kpt version
```

## (Optional) enable shell auto-completion

kpt provides auto-completion support for several of the common shells.
To see the options for enabling shell auto-completion:
```shell
$ kpt completion -h
```

### Prerequisites
Previous installations of kpt completion may have added the following line to
the shell's config file (e.g. `.bashrc`, `.zshrc`, etc.):
```shell
complete -C <KPT_PATH> kpt
```
This line needs to be removed for kpt's completion implementation to function
properly.

### Enable kpt auto-completion
The kpt completion script for a shell can be generated with the commands
`kpt completion bash`, `kpt completion zsh`, etc.
For instructions on how to enable the script for the given shell, see the help
page with the commands `kpt completion bash -h`, `kpt completion zsh -h`, etc.

<!-- gcloud and homebrew are not yet available for builds from the main branch.
## gcloud
Install with gcloud.
```shell
$ gcloud components install kpt
```
```shell
$ kpt version
```
The version of kpt installed using `gcloud` may not be the latest released version.
## Homebrew
Install the latest release with Homebrew on MacOS
```shell
$ brew tap GoogleContainerTools/kpt https://github.com/GoogleContainerTools/kpt.git
$ brew install kpt
```
```shell
$ kpt version
```
-->

## Docker

Use one of the kpt docker images.

| Feature | `kpt` | `kpt-gcloud` |
| --------- | :---: | :----------: |
| kpt |||
| git |||
| diffutils |||
| gcloud | ||

### `kpt`

```shell
$ docker run gcr.io/kpt-dev/kpt:v1.0.0-beta.13 version
```

### `kpt-gcloud`

An image which includes kpt based upon the Google [cloud-sdk] alpine image.

```shell
$ docker run gcr.io/kpt-dev/kpt-gcloud:v1.0.0-beta.13 version
```

## Source

Install by compiling the source. This requires having Go version 1.16+:

```shell
$ go install -v github.com/GoogleContainerTools/kpt@main
```

kpt version will return `unknown` for binaries built from source:

```shell
$ kpt version
```

[gcr.io/kpt-dev/kpt]:
https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt?gcrImageListsize=30
[gcr.io/kpt-dev/kpt-gcloud]:
https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt-gcloud?gcrImageListsize=30
[cloud-sdk]: https://github.com/GoogleCloudPlatform/cloud-sdk-docker
[linux]:
https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.13/kpt_linux_amd64
[darwin]:
https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.13/kpt_darwin_amd64
[migration guide]: /installation/migration
[bash-completion]: https://github.com/scop/bash-completion#installation
2 changes: 2 additions & 0 deletions site/sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
- [7.2 Limiting Package Changes](book/07-effective-customizations/02-limiting-package-changes.md)
- [7.3 Generation](book/07-effective-customizations/03-generation.md)
- [8 Package Orchestration](book/08-package-orchestration/)
- [8.1 System Requirements](book/08-package-orchestration/01-system-requirements.md)
- [8.2 Quickstart](book/08-package-orchestration/02-quickstart.md)
- [Reference](reference/)
- [Annotations](reference/annotations/)
- [apply-time mutation](reference/annotations/apply-time-mutation/)
Expand Down

0 comments on commit c640b6d

Please sign in to comment.