Skip to content

Commit

Permalink
Merge pull request #34 from sabre1041/disable-build
Browse files Browse the repository at this point in the history
Disable build command
  • Loading branch information
Alex Flom authored Jun 29, 2022
2 parents a6e1820 + 54e687a commit 3ba03d3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Universal Runtime (UR) Client

Note: The UR Client is being actively developed. Please consider joining the UOR Community to participate!

## Participate

Please join us in the discussion forum and feel free to ask questions about the UOR-Framework or UR Client.

## About

The Universal Runtime Client interacts with UOR artifacts and is aware of the runtime instruction
embedded in UOR artifacts.

To learn more about Universal Runtime visit the UOR Framework website at https://uor-framework.github.io.
To learn more about Universal Runtime visit the UOR Framework website at <https://uor-framework.github.io>.

> WARNING: The repository is under active development and the API is subject to change.
Expand All @@ -24,9 +27,11 @@ To learn more about Universal Runtime visit the UOR Framework website at https:/
make
./bin/client -h
```

### Test

#### Unit:
#### Unit

```
make test-unit
```
Expand All @@ -41,47 +46,47 @@ client version

1. Create a directory with artifacts to publish to a registry as an OCI artifact. If the files reference each other, the client will replace the in-content linked files with the content address.
> WARNING: Currently, only JSON is supported for link replacement.
2. Use the `client build` command to create the output workspace with the rendered content. If the files in the workspace do not contain links to each other, skip this step.
3. Use the `client push` command to publish the workspace to a registry as an OCI artifact.
4. Use the `client pull` command to pull the artifact back to a local workspace.
### Template content in a directory without pushing
```
# The default workspace is "client-workspace" in the current working directory
client build my-directory --output my-workspace
```
2. Use the `client push` command to publish the workspace to a registry as an OCI artifact.
3. Use the `client pull` command to pull the artifact back to a local workspace.

### Push workspace to a registry location

```
client push my-workspace localhost:5000/myartifacts:latest
```

### Pull UOR collection to a location

```
client pull localhost:5000/myartifacts:latest my-output-directory
```

### Pull subsets of a UOR collection to a location by attribute

```
client pull localhost:5000/myartifacts:latest my-output-directory --attributes key=value
```

## Getting Started

1. Create a new directory.
1. Create a new directory.
2. Add the content to be uploaded in the directory (can be files of any content types).
3. Create a json doc where the value of each kv pair is the path to each file within the directory. Multiple json docs can be used to create deep graphs, but a graph must only have one root. Multiple json docs in a build directory is for advanced use cases. Most use cases do not need more than one json doc.
3. Create a json doc where the value of each kv pair is the path to each file within the directory. Multiple json docs can be used to create deep graphs, but a graph must only have one root. Multiple json docs in a build directory is for advanced use cases. Most use cases do not need more than one json doc.

Example json doc:

```
{
"fish": "fish.jpg",
"text": "subdir1/file.txt",
"fish2": "subdir1/fish2.jpg"
}
```
4. Create a dataset-config.yaml outside of the content directory that references the relative paths from within the content directory to each file. Add user defined key value pairs as subkeys to the `annotations`section. Each file should have as many attributes as possible. Multiple files can be referenced by using the `*` wildcard.

4. Create a dataset-config.yaml outside of the content directory that references the relative paths from within the content directory to each file. Add user defined key value pairs as subkeys to the `annotations`section. Each file should have as many attributes as possible. Multiple files can be referenced by using the `*` wildcard.

Example dataset-config.yaml:

```
kind: DataSetConfiguration
apiVersion: client.uor-framework.io/v1alpha1
Expand All @@ -101,10 +106,10 @@ files:
custom: customval
```
5. Run the UOR client build command referencing the dataset config, the content directory, and optionally push to a registry location.

5. Run the UOR client push command referencing the dataset config, the content directory, and the destination registry location.

```
client build content-dir --output my-workspace
client push my-workspace localhost:5000/test/dataset:latest --dsconfig dataset-config.yaml
```

Expand All @@ -120,7 +125,3 @@ client push my-workspace localhost:5000/test/dataset:latest --dsconfig dataset-c
# Glossary

`collection`: a collection of linked files represented as on OCI artifact




3 changes: 2 additions & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func NewRootCmd() *cobra.Command {
f.StringVarP(&o.LogLevel, "loglevel", "l", "info",
"Log level (debug, info, warn, error, fatal)")

cmd.AddCommand(NewBuildCmd(&o))
// TODO(sabre1041) Reenable/remove once build capability strategy determined
//cmd.AddCommand(NewBuildCmd(&o))
cmd.AddCommand(NewPushCmd(&o))
cmd.AddCommand(NewPullCmd(&o))
cmd.AddCommand(NewVersionCmd(&o))
Expand Down

0 comments on commit 3ba03d3

Please sign in to comment.