Skip to content

Commit 7df9fc3

Browse files
committed
server: change dvc.org/s3 redirect to 'dvc-public' S3 bucket
for #560
1 parent 82eb999 commit 7df9fc3

8 files changed

Lines changed: 19 additions & 20 deletions

File tree

server.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ app.prepare().then(() => {
3535
} else if (req.headers.host === 'remote.dvc.org') {
3636
res.writeHead(301, {
3737
Location:
38-
'https://s3-us-west-2.amazonaws.com/dvc-public/remote' + pathname
38+
'https://s3-us-west-2.amazonaws.com/dvc-public/remote/' +
39+
pathname.substring(1)
3940
})
4041
res.end()
4142
} else if (doc.test(pathname)) {
@@ -54,17 +55,15 @@ app.prepare().then(() => {
5455
} else if (s3.test(pathname)) {
5556
res.writeHead(301, {
5657
Location:
57-
'https://s3-us-west-2.amazonaws.com/dvc-share/' +
58+
'https://s3-us-west-2.amazonaws.com/dvc-public/' +
5859
pathname.substring(4)
5960
})
6061
res.end()
6162
} else if (pkg.test(pathname)) {
6263
res.writeHead(301, {
6364
Location:
6465
'https://s3-us-east-2.amazonaws.com/dvc-s3-repo/' +
65-
pathname.substring(1, 4) +
66-
'/' +
67-
pathname.substring(5)
66+
pathname.substring(1)
6867
})
6968
res.end()
7069
} else if (chat.test(pathname)) {

static/docs/commands-reference/import-url.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ An advanced alternate to [Add Files](/doc/get-started/add-files) step of the
150150
_Get Started_ section is to use `dvc import-url`:
151151

152152
```dvc
153-
$ dvc import-url https://dvc.org/s3/get-started/data.xml data/data.xml
154-
Importing 'https://dvc.org/s3/get-started/data.xml' -> 'data/data.xml'
153+
$ dvc import-url https://dvc.org/s3/data/get-started/data.xml data/data.xml
154+
Importing 'https://dvc.org/s3/data/get-started/data.xml' -> 'data/data.xml'
155155
[##############################] 100% data.xml
156156
[##############################] 100% data.xml
157157
@@ -172,7 +172,7 @@ md5: 61e80c38c1ce04ed2e11e331258e6d0d
172172
wdir: .
173173
deps:
174174
- etag: '"f432e270cd634c51296ecd2bc2f5e752-5"'
175-
path: https://dvc.org/s3/get-started/data.xml
175+
path: https://dvc.org/s3/data/get-started/data.xml
176176
outs:
177177
- md5: a304afb96060aad90176268345e10355
178178
path: data/data.xml
@@ -210,7 +210,7 @@ life, the data file will probably be on a remote server.) Run these commands:
210210
```dvc
211211
$ mkdir /tmp/dvc-import-url-example
212212
$ cd /tmp/dvc-import-url-example/
213-
$ wget https://dvc.org/s3/get-started/data.xml
213+
$ wget https://dvc.org/s3/data/get-started/data.xml
214214
$ cd - # to go back to the project
215215
```
216216

@@ -252,7 +252,7 @@ Let's now manually reproduce
252252
_Get Started_ project. Download the sample source code archive and unzip it:
253253

254254
```dvc
255-
$ wget https://dvc.org/s3/get-started/code.zip
255+
$ wget https://dvc.org/s3/code/get-started/code.zip
256256
$ unzip code.zip
257257
$ rm -f code.zip
258258
```

static/docs/get-started/add-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Let's get a sample dataset to play with:
66

77
```dvc
88
$ mkdir data
9-
$ wget https://dvc.org/s3/get-started/data.xml -O data/data.xml
9+
$ wget https://dvc.org/s3/data/get-started/data.xml -O data/data.xml
1010
```
1111

1212
<details>

static/docs/get-started/connect-code-and-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ to get the sample code:
1212
> On Windows just use your browser to download the archive instead.
1313
1414
```dvc
15-
$ wget https://dvc.org/s3/get-started/code.zip
15+
$ wget https://dvc.org/s3/code/get-started/code.zip
1616
$ unzip code.zip
1717
$ rm -f code.zip
1818
```

static/docs/get-started/example-pipeline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ your browser to download `code.zip`.
3838
```dvc
3939
$ mkdir example && cd example
4040
$ git init
41-
$ wget https://dvc.org/s3/examples/so/code.zip
41+
$ wget https://dvc.org/s3/code/tutorial-nlp/code.zip
4242
$ unzip code.zip
4343
$ rm -f code.zip
4444
$ git add code/
@@ -80,7 +80,7 @@ control:
8080

8181
```dvc
8282
$ mkdir data
83-
$ wget -P data https://dvc.org/s3/examples/so/Posts.xml.zip
83+
$ wget -P data https://dvc.org/s3/data/tutorial-nlp/10K/Posts.xml.zip
8484
$ dvc add data/Posts.xml.zip
8585
```
8686

static/docs/get-started/example-versioning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ right-click [this link](/s3/examples/versioning/data.zip) and click
9292
</details>
9393

9494
```dvc
95-
$ wget https://dvc.org/s3/examples/versioning/data.zip
95+
$ wget https://dvc.org/s3/data/tutorial-ver/data.zip
9696
$ unzip data.zip
9797
$ rm -f data.zip
9898
```
@@ -182,7 +182,7 @@ Let's imagine that our images dataset is growing, we were able to double it.
182182
Next command extracts 500 cat and 500 dog images into `data/train`:
183183

184184
```dvc
185-
$ wget https://dvc.org/s3/examples/versioning/new-labels.zip
185+
$ wget https://dvc.org/s3/data/tutorial-ver/new-labels.zip
186186
$ unzip new-labels.zip
187187
$ rm -f new-labels.zip
188188
```

static/docs/tutorial/define-ml-pipeline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ to download `data.xml`and save it into the `data` subdirectory.
1717

1818
```dvc
1919
$ mkdir data
20-
$ wget -P data https://dvc.org/s3/so/100K/Posts.xml.zip
20+
$ wget -P data https://dvc.org/s3/data/tutorial-nlp/100K/Posts.xml.zip
2121
$ du -sh data/*
2222
41M data/Posts.xml.zip
2323
```

static/docs/user-guide/external-dependencies.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ In the previous examples, downloading commands were used: `aws s3 cp`, `scp`,
113113
types of dependencies.
114114

115115
```dvc
116-
$ dvc import-url https://dvc.org/s3/get-started/data.xml
117-
Importing 'https://dvc.org/s3/get-started/data.xml' -> 'data.xml'
116+
$ dvc import-url https://dvc.org/s3/data/get-started/data.xml
117+
Importing 'https://dvc.org/s3/data/get-started/data.xml' -> 'data.xml'
118118
[##############################] 100% data.xml
119119
...
120120
```
@@ -130,7 +130,7 @@ The command above creates an <abbr>import stage</abbr> specified in DVC-file
130130
# ...
131131
deps:
132132
- etag: '"f432e270cd634c51296ecd2bc2f5e752-5"'
133-
path: https://dvc.org/s3/get-started/data.xml
133+
path: https://dvc.org/s3/data/get-started/data.xml
134134
outs:
135135
- md5: a304afb96060aad90176268345e10355
136136
path: data.xml

0 commit comments

Comments
 (0)