-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Praveen Rewar <[email protected]>
- Loading branch information
1 parent
3649ca8
commit 374af36
Showing
19 changed files
with
667 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/] | ||
|
||
title: "About vendir" | ||
toc: "false" | ||
cascade: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/github-release] | ||
|
||
title: Github Release | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/install] | ||
|
||
title: Install | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/security] | ||
|
||
title: Security | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/sync] | ||
|
||
title: Sync command | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/vendir-lock-spec] | ||
|
||
title: vendir.lock.yml spec | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/vendir-spec] | ||
|
||
title: vendir.yml spec | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/versions] | ||
|
||
title: Versions | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/] | ||
title: "About vendir" | ||
toc: "false" | ||
cascade: | ||
version: v0.35.x | ||
toc: "true" | ||
type: docs | ||
layout: docs | ||
--- | ||
|
||
vendir allows to declaratively state what should be in a directory. It was designed to easily manage libraries for [ytt](/ytt); however, it is a generic tool and does not care how files within managed directories are used. | ||
|
||
Supported sources for fetching: | ||
|
||
- git | ||
- hg (Mercurial) | ||
- http | ||
- image (image from OCI registry) | ||
- imgpkgBundle (bundle from OCI registry) | ||
- githubRelease | ||
- helmChart | ||
- directory | ||
|
||
Examples could be found in [carvel-vendir's `examples/` directory](https://github.com/vmware-tanzu/carvel-vendir/tree/develop/examples). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/github-release] | ||
title: Github Release | ||
--- | ||
|
||
vendir supports downloading software stored as a Github release. See [`vendir.yml` spec](vendir-spec.md) for how to configure. | ||
|
||
## Github API Rate Limiting | ||
|
||
If your public IP address is shared by multiple machines (e.g. workstations in an office), you may run into [Github rate limiting errors](https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#rate-limiting). vendir as of v0.8.0 supports providing "Personal access token" to increase Github API rate limits. You can specify it via an environment variable: | ||
|
||
```bash | ||
$ export VENDIR_GITHUB_API_TOKEN=ghp_8c0a3... | ||
$ vendir sync | ||
``` | ||
|
||
To obtain personal access token go to [Github.com: Settings / Developer Settings / Personal access tokens](https://github.com/settings/tokens). During token creation, you will be prompted for selection of scopes, and in most cases there is no need to select any scopes because this token only used to identify API usage. For organizations that enable SSO, you will need to "Enable SSO" for created token. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/install] | ||
title: Install | ||
--- | ||
|
||
## Via script (macOS or Linux) | ||
|
||
(Note that `install.sh` script installs other Carvel tools as well.) | ||
|
||
Install binaries into specific directory: | ||
|
||
```bash | ||
$ mkdir local-bin/ | ||
$ curl -L https://carvel.dev/install.sh | K14SIO_INSTALL_BIN_DIR=local-bin bash | ||
|
||
$ export PATH=$PWD/local-bin/:$PATH | ||
$ vendir version | ||
``` | ||
|
||
Or system wide: | ||
|
||
```bash | ||
$ wget -O- https://carvel.dev/install.sh > install.sh | ||
|
||
# Inspect install.sh before running... | ||
$ sudo bash install.sh | ||
$ vendir version | ||
``` | ||
|
||
## Via Homebrew (macOS or Linux) | ||
|
||
Based on [github.com/vmware-tanzu/homebrew-carvel](https://github.com/vmware-tanzu/homebrew-carvel). | ||
|
||
```bash | ||
$ brew tap vmware-tanzu/carvel | ||
$ brew install vendir | ||
$ vendir version | ||
``` | ||
|
||
## Specific version from a GitHub release | ||
|
||
To download, click on one of the assets in a [chosen GitHub release](https://github.com/vmware-tanzu/carvel-vendir/releases), for example for 'vendir-darwin-amd64'. | ||
|
||
```bash | ||
# **Compare binary checksum** against what's specified in the release notes | ||
# (if checksums do not match, binary was not successfully downloaded) | ||
$ shasum -a 256 ~/Downloads/vendir-darwin-amd64 | ||
08b25d21675fdc77d4281c9bb74b5b36710cc091f30552830604459512f5744c /Users/pivotal/Downloads/vendir-darwin-amd64 | ||
|
||
# Move binary next to your other executables | ||
$ mv ~/Downloads/vendir-darwin-amd64 /usr/local/bin/vendir | ||
|
||
# Make binary executable | ||
$ chmod +x /usr/local/bin/vendir | ||
|
||
# Check its version | ||
$ vendir version | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/security] | ||
title: Security | ||
--- | ||
|
||
## Vulnerability Disclosure | ||
|
||
If you believe you have found a security issue in `vendir`, please privately and responsibly disclose it by following the directions in our [security policy](/shared/docs/latest/security-policy). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/sync] | ||
title: Sync command | ||
--- | ||
|
||
## Overview | ||
|
||
`vendir sync` command looks for [`vendir.yml`](vendir-spec.md) file in current directory for its configuration. `vendir.yml` specifies source of files for each managed directory. | ||
|
||
``` | ||
# Run to sync directory contents as specified by vendir.yml | ||
$ vendir sync | ||
``` | ||
|
||
See [`vendir.yml` spec](vendir-spec.md) for its schema. | ||
|
||
## Sync with local changes override | ||
|
||
As of v0.7.0 you can use `--directory` flag to override contents of particular directories by pointing them to local directories. When this flag is specified other directories will not be synced (hence lock config is not going to be updated). | ||
|
||
``` | ||
$ vendir sync --directory vendor/local-dir=local-dir-dev | ||
``` | ||
|
||
## Sync with locks | ||
|
||
`vendir sync` writes [`vendir.lock.yml`](vendir-lock-spec.md) (next to `vendir.yml`) that contains resolved references: | ||
|
||
- for `git`, resolved SHAs are recorded | ||
- for `hg`, resolved SHAs are recorded | ||
- for `http`, nothing is recorded | ||
- for `image`, resolved URL as a digest reference | ||
- for `githubRelease`, permanent links are recorded | ||
- for `helmChart`, resolved version | ||
- for `directory`, nothing is recorded | ||
- for `manual`, nothing is recorded | ||
|
||
To use these resolved references on top of `vendir.yml`, use `vendir sync -l`. | ||
|
||
## Syncing from different directory | ||
|
||
As of v0.22.0, you can use `--chdir` flag with `vendir sync` command to change current working directory of vendir before any syncing occurs. All other paths provided to `vendir sync` should be relative to the changed directory. | ||
|
||
## Caching | ||
|
||
`vendir` allows the users to cache OCI Images in their disk so as not to rely on access to the registry all the time. | ||
To activate this feature the users need to set the environment variable `VENDIR_CACHE_DIR`. This variable should point | ||
to the path where they want to store the OCI Images. | ||
|
||
```bash-plain | ||
$ mkdir -p ~/.vendir/cache | ||
$ export VENDIR_CACHE_DIR=~/.vendir/cache | ||
$ vendir sync | ||
``` | ||
|
||
**Note:** Not all images can be cached. Only images that are referenced by SHA can be cached. | ||
|
||
The user can also specify what is the maximum size of the content to be cached, by setting the environment variable | ||
`VENDIR_MAX_CACHE_SIZE`. The default value, when the variable is not provided is `1Mi` (1 Megabyte). | ||
|
||
The following are some accepted values: | ||
``` | ||
1 = 1 Byte | ||
1Ki = 1 Kilobyte | ||
1Mi = 1 Megabyte | ||
1Gi = 1 Gigabyte | ||
``` | ||
|
||
Example of usage: | ||
|
||
```bash-plain | ||
$ mkdir -p ~/.vendir/cache | ||
$ export VENDIR_CACHE_DIR=~/.vendir/cache | ||
$ export VENDIR_MAX_CACHE_SIZE=1Ki | ||
$ vendir sync | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
aliases: [/vendir/docs/latest/vendir-lock-spec] | ||
title: vendir.lock.yml spec | ||
--- | ||
|
||
Lock file is generated by `vendir sync` and is placed next to related `vendir.yml`. | ||
|
||
```yaml | ||
apiVersion: vendir.k14s.io/v1alpha1 | ||
kind: LockConfig | ||
|
||
directories: | ||
- path: config/_ytt_lib | ||
contents: | ||
- path: github.com/cloudfoundry/cf-k8s-networking | ||
|
||
# present if this is managed manually | ||
manual: {} | ||
|
||
# present if git | ||
git: | ||
# resolved checked out commit SHA | ||
sha: 2b009b61fa8afb330a4302c694ee61b11104c54c | ||
# resolved checked out commit title | ||
commitTitle: 'feat: add /metrics prometheus scrapable endpoint...' | ||
# resolved to a set of tags pointing to sha (v0.11.0+) | ||
tags: | ||
- "4.0.0" | ||
|
||
# present if hg (v0.22.0+) | ||
hg: | ||
# resolved checked out change SHA | ||
sha: 180c776fe29448afa8c756ab572bab7a1cf17a06 | ||
# resolved checked out change title | ||
changeSetTitle: 'Prevent wrapping filenames to preserve whitespace' | ||
|
||
# present if github release | ||
githubRelease: | ||
# resolved release url | ||
url: https://api.github.com/repos/pivotal/kpack/releases/22747441 | ||
|
||
# present if helm chart (v0.11.0+) | ||
helmChart: | ||
appVersion: "5.0.7" | ||
version: "10.5.7" | ||
|
||
# present if http | ||
http: {} | ||
|
||
# present if image (v0.11.0+) | ||
image: | ||
# fully resolve image URL with digest | ||
url: index.docker.io/dkalinin/consul-helm@sha256:d1cdbd46561a144332f0744302d45f27583fc0d75002cba473d840f46630c9f7 | ||
# included if image URL included a tag (v0.22.0+) | ||
tag: "some-tag" | ||
|
||
# present if imgpkgBundle (v0.16.0+) | ||
imgpkgBundle: | ||
# fully resolve image URL with digest | ||
image: index.docker.io/dkalinin/consul-helm@sha256:d1cdbd46561a144332f0744302d45f27583fc0d75002cba473d840f46630c9f7 | ||
# included if image URL included a tag (v0.22.0+) | ||
tag: "some-tag" | ||
|
||
# present if inline (v0.11.0+) | ||
inline: {} | ||
|
||
# present if this was sourced from local directory | ||
directory: {} | ||
``` |
Oops, something went wrong.