bergum commited on
Commit
ac44c9a
1 Parent(s): 2742fda

Update run.sh

Browse files
Files changed (1) hide show
  1. run.sh +16 -6
run.sh CHANGED
@@ -28,13 +28,13 @@ mv src/main/application/services.xml.new src/main/application/services.xml
28
  wget https://dlcdn.apache.org/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz && tar zxvpf apache-maven-3.9.0-bin.tar.gz
29
  export JAVA_HOME=/usr/
30
 
31
- ./apache-maven-3.9.0/bin/mvn clean package -U
32
  /opt/vespa/bin/vespa deploy --wait 300
33
 
34
- #Feed data
35
  curl -L -o meta_sports_20k_sample.json.zst https://data.vespa.oath.cloud/sample-apps-data/meta_sports_20k_sample.json.zst
36
  zstd -d meta_sports_20k_sample.json.zst
37
- cat meta_sports_20k_sample.json | ./convert_meta.py |zstd > feed_items.json.zstd
38
  rm meta_sports_20k_sample.json meta_sports_20k_sample.json.zst
39
 
40
  curl -L -o reviews_sports_24k_sample.json.zst https://data.vespa.oath.cloud/sample-apps-data/reviews_sports_24k_sample.json.zst
@@ -42,6 +42,11 @@ zstd -d reviews_sports_24k_sample.json.zst
42
  cat reviews_sports_24k_sample.json | ./convert_reviews.py |zstd > feed_reviews.json.zstd
43
  rm reviews_sports_24k_sample.json reviews_sports_24k_sample.json.zst
44
 
 
 
 
 
 
45
  df -h /opt/vespa/var
46
 
47
  FEED_CLI_REPO="https://repo1.maven.org/maven2/com/yahoo/vespa/vespa-feed-client-cli" \
@@ -50,14 +55,19 @@ FEED_CLI_REPO="https://repo1.maven.org/maven2/com/yahoo/vespa/vespa-feed-client-
50
  && unzip -o vespa-feed-client-cli.zip
51
 
52
  chmod +x ./vespa-feed-client-cli/vespa-feed-client
53
- ls -lart ./vespa-feed-client-cli/vespa-feed-client
54
 
55
- zstdcat feed_items.json.zstd|./vespa-feed-client-cli/vespa-feed-client \
56
- --verbose --stdin --show-errors --endpoint http://localhost:8080
 
 
57
 
58
  zstdcat feed_reviews.json.zstd|./vespa-feed-client-cli/vespa-feed-client \
59
  --verbose --stdin --show-errors --endpoint http://localhost:8080
60
 
 
 
 
 
61
  echo "Starting proxy server"
62
  /opt/vespa/vespa/bin/proxy.py
63
  echo "Proxy server died"
 
28
  wget https://dlcdn.apache.org/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz && tar zxvpf apache-maven-3.9.0-bin.tar.gz
29
  export JAVA_HOME=/usr/
30
 
31
+ ./apache-maven-3.9.0/bin/mvn -ntp clean package -U
32
  /opt/vespa/bin/vespa deploy --wait 300
33
 
34
+ # Create products and reviews
35
  curl -L -o meta_sports_20k_sample.json.zst https://data.vespa.oath.cloud/sample-apps-data/meta_sports_20k_sample.json.zst
36
  zstd -d meta_sports_20k_sample.json.zst
37
+ cat meta_sports_20k_sample.json | ./convert_meta.py > feed_items.json
38
  rm meta_sports_20k_sample.json meta_sports_20k_sample.json.zst
39
 
40
  curl -L -o reviews_sports_24k_sample.json.zst https://data.vespa.oath.cloud/sample-apps-data/reviews_sports_24k_sample.json.zst
 
42
  cat reviews_sports_24k_sample.json | ./convert_reviews.py |zstd > feed_reviews.json.zstd
43
  rm reviews_sports_24k_sample.json reviews_sports_24k_sample.json.zst
44
 
45
+ # Create query suggestions
46
+ ./create_suggestions.py feed_items.json > feed_suggestions.json
47
+
48
+ # Download feed client
49
+ echo "Disk usage "
50
  df -h /opt/vespa/var
51
 
52
  FEED_CLI_REPO="https://repo1.maven.org/maven2/com/yahoo/vespa/vespa-feed-client-cli" \
 
55
  && unzip -o vespa-feed-client-cli.zip
56
 
57
  chmod +x ./vespa-feed-client-cli/vespa-feed-client
 
58
 
59
+ echo "Start feeding data"
60
+
61
+ ./vespa-feed-client-cli/vespa-feed-client \
62
+ --verbose --file feed_items.json --show-errors --endpoint http://localhost:8080
63
 
64
  zstdcat feed_reviews.json.zstd|./vespa-feed-client-cli/vespa-feed-client \
65
  --verbose --stdin --show-errors --endpoint http://localhost:8080
66
 
67
+ ./vespa-feed-client-cli/vespa-feed-client \
68
+ --verbose --file feed_suggestions.json --show-errors --endpoint http://localhost:8080
69
+
70
+ echo "Done feeding data"
71
  echo "Starting proxy server"
72
  /opt/vespa/vespa/bin/proxy.py
73
  echo "Proxy server died"