ks_registry_add.md 1.96 KB
Newer Older
1 2 3 4 5 6 7
## ks registry add

Add a registry to the current ksonnet app

### Synopsis


Jessica Yao's avatar
Jessica Yao committed
8 9 10 11
The `add` command allows custom registries to be added to your ksonnet app,
provided that their file structures follow the appropriate schema. *You can look
at the `incubator` repo (https://github.com/ksonnet/parts/tree/master/incubator)
as an example.*
12 13 14

A registry is uniquely identified by its:

Jessica Yao's avatar
Jessica Yao committed
15 16
1. Name (e.g. `incubator`)
2. Version (e.g. `master`)
17

18 19 20 21
There are two supported registry protocols: **github** and **fs**.

GitHub registries expect a path in a GitHub repository, and filesystem based
registries expect a path on the local filesystem.
22

Jessica Yao's avatar
Jessica Yao committed
23 24 25
During creation, all registries must specify a unique name and URI where the
registry lives. Optionally, a version can be provided (e.g. the *Github branch
name*). If a version is not specified, it will default to `latest`.
26

27 28 29
Registries can be overridden with `--override`.  Overridden registries
are stored in `app.override.yaml` and can be safely ignored using your
SCM configuration.
30 31 32 33 34 35 36 37 38

### Related Commands

* `ks registry list` — List all registries known to the current ksonnet app.

### Syntax


```
bryanl's avatar
bryanl committed
39
ks registry add <registry-name> <registry-uri> [flags]
40 41 42 43 44 45 46 47
```

### Examples

```
# Add a registry with the name 'databases' at the uri 'github.com/example'
ks registry add databases github.com/example

Jessica Yao's avatar
Jessica Yao committed
48 49 50 51
# Add a registry with the name 'databases' at the uri
# 'github.com/example/tree/master/reg' and the version (branch name) 0.0.1
# NOTE that "0.0.1" overrides the branch name in the URI ("master")
ks registry add databases github.com/example/tree/master/reg --version=0.0.1
52 53 54 55 56
```

### Options

```
bryanl's avatar
bryanl committed
57
  -h, --help             help for add
58
  -o, --override         Store in override configuration
59 60 61 62 63 64 65 66 67 68
      --version string   Version of the registry to add
```

### Options inherited from parent commands

```
  -v, --verbose count[=-1]   Increase verbosity. May be given multiple times.
```

### SEE ALSO
bryanl's avatar
bryanl committed
69

70 71
* [ks registry](ks_registry.md)	 - Manage registries for current project