more docs;

remove debugging
This commit is contained in:
Earl Hathaway
2017-04-16 22:18:57 -07:00
parent 0772e41638
commit 6fa96f5406
5 changed files with 24 additions and 13 deletions
+20 -5
View File
@@ -13,15 +13,30 @@ By submitting a pull request for this project, you agree to license your contrib
# Setup / Configuration
`dvc` supports both aws and google cloud; you will need accounts either from [aws](https://aws.amazon.com/) or [gcloud](https://cloud.google.com/).
To see your available buckets, run either `TODO` or `gsutil ls`.
Edit `dvc.conf`, and fill in `StoragePath` under `[Data]` with your preferred bucket and path. For example,
```
[Data]
StoragePath = gc://dvc-demo/dvcdata
```
## Amazon AWS Setup
NB: To see your available buckets, run `aws s3 ls`
Configuration:
* edit `dvc.conf`, and set `Cloud = amazon`
* under `[AWS]`, fill in `AccessKeyId` and `SecretAccessKey`
Test `dvc` is correctly configured by running `dvc test-aws` (TODO)
## Google Cloud Setup
To setup your google cloud credentials:
TODO
NB: To see your available buckets, run `gsutil ls`.
Configuration:
* edit `dvc.conf`, and set `Cloud = google`
* under `[GC]`, set `ProjectName` to your preferred (or just your default) project name.
Test `dvc` is correctly configured by running `dvc test-gcloud`.
To test they are set up correctly,
TODO
# Usage
```
-1
View File
@@ -34,7 +34,6 @@ SecurityGroup = dvc-group
[GC]
ProjectName =
StoragePath =
-1
View File
@@ -35,7 +35,6 @@ class CmdBase(object):
return self._settings.config
def cache_file_key(self, file):
print 'storage_prefix %s' % self.config.storage_prefix
return '{}/{}'.format(self.config.storage_prefix, file).strip('/')
@property
-5
View File
@@ -85,7 +85,6 @@ class CmdDataSync(CmdBase):
bucket = _get_bucket_aws()
key_name = self.cache_file_key(item.cache.dvc)
print 'aws: key name: %s' % key_name
key = bucket.get_key(key_name)
if not key:
raise DataSyncError('File "{}" does not exist in the cloud'.format(key_name))
@@ -98,7 +97,6 @@ class CmdDataSync(CmdBase):
""" sync_to_cloud, aws version """
aws_key = self.cache_file_key(data_item.cache.dvc)
print 'aws_key is %s' % aws_key
bucket = self._get_bucket_aws()
key = bucket.get_key(aws_key)
if key:
@@ -131,7 +129,6 @@ class CmdDataSync(CmdBase):
bucket = self._get_bucket_gc()
key = self.cache_file_key(item.cache.dvc)
print 'key: %s' % key
blob = bucket.get_blob(key)
if not blob:
@@ -147,8 +144,6 @@ class CmdDataSync(CmdBase):
bucket = self._get_bucket_gc()
blob_name = self.cache_file_key(data_item.cache.dvc)
print 'blob_name: %s' % blob_name
return
blob = bucket.blob(blob_name)
if blob.exists():
+4 -1
View File
@@ -18,7 +18,7 @@ class CmdInit(CmdBase):
DataDir = {}
CacheDir = {}
StateDir = {}
Cloud = amazon
Cloud =
# Log levels: Debug, Info, Warning and Error
LogLevel = Info
@@ -49,6 +49,9 @@ SecurityGroup = dvc-group
[GC]
ProjectName =
[Data]
StoragePath =
'''
def __init__(self, settings):