-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc. updates #2182
Merged
Merged
Misc. updates #2182
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3a485da
config: better s3.configpath explanation (after #2140)
jorgeorpinel c965762
remote: review ssh// URLs and auth info.
jorgeorpinel 1e08ff8
cmd: note ~/ paths are for Linux in remote modify
jorgeorpinel 5576e32
Merge branch 'master' into jorge
jorgeorpinel 46ac6a1
Merge branch 'master' into jorge
jorgeorpinel c67ec08
typo in start/pipelines
jorgeorpinel 3edda90
Merge branch 'master' into jorge
jorgeorpinel d9597f8
Merge branch 'master' into jorge
jorgeorpinel 866243d
Merge branch 'master' into jorge
jorgeorpinel eac96f8
typos
jorgeorpinel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -233,9 +233,9 @@ already set up and you can use `dvc remote list` to check them. To remember how | |
it's done, and set a context for the example, let's define a default SSH remote: | ||
|
||
```dvc | ||
$ dvc remote add -d r1 ssh://_username_@_host_/path/to/dvc/remote/storage | ||
$ dvc remote add -d r1 ssh://[email protected]/path/to/dvc/remote/storage | ||
$ dvc remote list | ||
r1 ssh://_username_@_host_/path/to/dvc/remote/storage | ||
r1 ssh://[email protected]/path/to/dvc/remote/storage | ||
``` | ||
|
||
> DVC supports several | ||
|
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 |
---|---|---|
|
@@ -116,15 +116,15 @@ To use `dvc push` (without options), a default | |
|
||
```dvc | ||
$ dvc remote add --default r1 \ | ||
ssh://_username_@_host_/path/to/dvc/cache/directory | ||
ssh://[email protected]/path/to/dvc/cache/directory | ||
``` | ||
|
||
> For existing <abbr>projects</abbr>, remotes are usually already set up. You | ||
> can use `dvc remote list` to check them: | ||
> | ||
> ```dvc | ||
> $ dvc remote list | ||
> r1 ssh://_username_@_host_/path/to/dvc/cache/directory | ||
> r1 ssh://[email protected]/path/to/dvc/cache/directory | ||
> ``` | ||
|
||
Push entire data <abbr>cache</abbr> from the current <abbr>workspace</abbr> to | ||
|
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 |
---|---|---|
|
@@ -134,14 +134,19 @@ these parameters, you could use the following options. | |
$ dvc remote modify myremote credentialpath /path/to/creds | ||
``` | ||
|
||
- `configpath` - path to the AWS config file. The location defaults to | ||
`~/.aws/config`. It supports S3-specific | ||
[configuration values](https://docs.aws.amazon.com/cli/latest/topic/s3-config.html#configuration-values): | ||
- `configpath` - path to the | ||
[AWS CLI config file](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html). | ||
The default AWS CLI config file path (e.g. `~/.aws/config`) is used if this | ||
parameter isn't set. | ||
|
||
```dvc | ||
$ dvc remote modify myremote --local configpath /path/to/config | ||
``` | ||
|
||
> Note that only the S3-specific | ||
> [configuration values](https://docs.aws.amazon.com/cli/latest/topic/s3-config.html#configuration-values) | ||
> are used. | ||
|
||
- `endpointurl` - endpoint URL to access S3: | ||
|
||
```dvc | ||
|
@@ -500,7 +505,8 @@ more information. | |
### Click for SSH | ||
|
||
- `url` - remote location, in a regular | ||
[SSH format](https://tools.ietf.org/id/draft-salowey-secsh-uri-00.html#sshsyntax): | ||
[SSH format](https://tools.ietf.org/id/draft-salowey-secsh-uri-00.html#sshsyntax). | ||
Note that this can already the `user` parameter, embedded into the URL: | ||
|
||
```dvc | ||
$ dvc remote modify myremote url \ | ||
|
@@ -513,7 +519,7 @@ more information. | |
|
||
> Note that your server's SFTP root might differ from its physical root (`/`). | ||
|
||
- `user` - username to access the remote. | ||
- `user` - username to access the remote: | ||
|
||
```dvc | ||
$ dvc remote modify --local myremote user myuser | ||
|
@@ -523,8 +529,9 @@ more information. | |
|
||
1. `user` parameter set with this command (found in `.dvc/config`); | ||
2. User defined in the URL (e.g. `ssh://[email protected]/path`); | ||
3. User defined in `~/.ssh/config` for this host (URL); | ||
4. Current user | ||
3. User defined in the SSH config file (e.g. `~/.ssh/config`) for this host | ||
(URL); | ||
4. Current system user | ||
|
||
- `port` - port to access the remote. | ||
|
||
|
@@ -536,7 +543,8 @@ more information. | |
|
||
1. `port` parameter set with this command (found in `.dvc/config`); | ||
2. Port defined in the URL (e.g. `ssh://example.com:1234/path`); | ||
3. Port defined in `~/.ssh/config` for this host (URL); | ||
3. Port defined in the SSH config file (e.g. `~/.ssh/config`) for this host | ||
(URL); | ||
4. Default SSH port 22 | ||
|
||
- `keyfile` - path to private key to access the remote. | ||
|
@@ -641,8 +649,8 @@ by HDFS. Read more about by expanding the WebHDFS section in | |
|
||
- `hdfscli_config` - path to a `HdfsCLI` cfg file. WebHDFS access depends on | ||
`HdfsCLI`, which allows the usage of a configuration file by default located | ||
in `~/.hdfscli.cfg`. In the file, multiple aliases can be set with their own | ||
connection parameters, like `url` or `user`. If using a cfg file, | ||
in `~/.hdfscli.cfg` (Linux). In the file, multiple aliases can be set with | ||
their own connection parameters, like `url` or `user`. If using a cfg file, | ||
`webhdfs_alias` can be set to specify which alias to use. | ||
|
||
```dvc | ||
|
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 |
---|---|---|
|
@@ -37,6 +37,9 @@ certain `dvc remote` types. Currently, the following protocols are supported: | |
Let's take a look at defining and running a `download_file` stage that simply | ||
downloads a file from an external location, on all the supported location types. | ||
|
||
> See the [Remote alias example](#example-using-dvc-remote-aliases) for info. on | ||
> using remote locations that require manual authentication setup. | ||
|
||
<details> | ||
|
||
### Click for Amazon S3 | ||
|
@@ -88,7 +91,7 @@ $ dvc run -n download_file \ | |
$ dvc run -n download_file \ | ||
-d ssh://[email protected]/path/to/data.txt \ | ||
-o data.txt \ | ||
scp [email protected]:/path/to/data.txt data.txt | ||
scp ssh://[email protected]:/path/to/data.txt data.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, I don't usually specify the protocol like this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. Reverting this change. |
||
``` | ||
|
||
⚠️ DVC requires both SSH and SFTP access to work with remote SSH locations. | ||
|
@@ -144,10 +147,9 @@ $ dvc run -n download_file \ | |
## Example: Using DVC remote aliases | ||
|
||
You may want to encapsulate external locations as configurable entities that can | ||
be managed independently. This is useful if multiple dependencies (or stages) | ||
reuse the same location, or if its likely to change in the future. And if the | ||
location requires authentication, you need a way to configure it in order to | ||
connect. | ||
be managed independently. This is useful if the connection requires | ||
authentication, if multiple dependencies (or stages) reuse the same location, or | ||
if the URL is likely to change in the future. | ||
|
||
[DVC remotes](/doc/command-reference/remote) can do just this. You may use | ||
`dvc remote add` to define them, and then use a special URL with format | ||
|
@@ -157,12 +159,11 @@ dependency. | |
Let's see an example using SSH. First, register and configure the remote: | ||
|
||
```dvc | ||
$ dvc remote add myssh ssh://myserver.com | ||
$ dvc remote modify --local myssh user myuser | ||
$ dvc remote modify --local myssh password mypassword | ||
$ dvc remote add myssh ssh://[email protected] | ||
$ dvc remote modify --local myssh password 'mypassword' | ||
``` | ||
|
||
> Please refer to `dvc remote add` for more details like setting up access | ||
> Please refer to `dvc remote modify` for more details like setting up access | ||
> credentials for the different remote types. | ||
|
||
Now, use an alias to this remote when defining the stage: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can already the
- something is missing here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, "included". Thanks