Added openssl to nix for cosmonic.

This commit is contained in:
Aja Sibley 2023-05-18 00:07:39 +00:00
parent c3ad27c5df
commit 985ab154ec
23 changed files with 119327 additions and 0 deletions

118901
erl_crash.dump Normal file

File diff suppressed because one or more lines are too long

3
myapp/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
application.zip
src/main/application/security/
.idea/

13
myapp/README.md Normal file
View file

@ -0,0 +1,13 @@
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
![Vespa logo](https://vespa.ai/assets/vespa-logo-color.png)
# Vespa sample applications - Album Recommendations
A simple Vespa application which can be deployed on one node,
and does search and recommendation in music data.
Follow
[vespa quick start guide](https://docs.vespa.ai/en/vespa-quick-start.html)
to deploy this.

View file

@ -0,0 +1,15 @@
{
"put": "id:mynamespace:music::a-head-full-of-dreams",
"fields": {
"album": "A Head Full of Dreams",
"artist": "Coldplay",
"year": 2015,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 1 },
{ "address" : { "cat" : "rock" }, "value": 0.2 },
{ "address" : { "cat" : "jazz" }, "value": 0 }
]
}
}
}

View file

@ -0,0 +1,16 @@
{
"put": "id:mynamespace:music::hardwired-to-self-destruct",
"fields": {
"album": "Hardwired...To Self-Destruct",
"artist": "Metallica",
"year": 2016,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 0 },
{ "address" : { "cat" : "rock" }, "value": 1 },
{ "address" : { "cat" : "jazz" }, "value": 0 }
]
}
}
}

View file

@ -0,0 +1,15 @@
{
"put": "id:mynamespace:music::liebe-ist-für-alle-da",
"fields": {
"album": "Liebe ist für alle da",
"artist": "Rammstein",
"year": 2009,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 0.1 },
{ "address" : { "cat" : "rock" }, "value": 1.0 },
{ "address" : { "cat" : "jazz" }, "value": 0 }
]
}
}
}

View file

@ -0,0 +1,16 @@
{
"put": "id:mynamespace:music::love-is-here-to-stay",
"fields": {
"album": "Love Is Here To Stay",
"artist": "Diana Krall",
"year": 2018,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 0.4 },
{ "address" : { "cat" : "rock" }, "value": 0 },
{ "address" : { "cat" : "jazz" }, "value": 0.8 }
]
}
}
}

View file

@ -0,0 +1,15 @@
{
"put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go",
"fields": {
"album": "When We All Fall Asleep, Where Do We Go?",
"artist": "Billie Eilish",
"year": 2019,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 1.0 },
{ "address" : { "cat" : "rock" }, "value": 0 },
{ "address" : { "cat" : "jazz" }, "value": 0.1 }
]
}
}
}

View file

@ -0,0 +1,5 @@
{ "put": "id:mynamespace:music::a-head-full-of-dreams", "fields": { "album": "A Head Full of Dreams", "artist": "Coldplay", "year": 2015, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1 }, { "address" : { "cat" : "rock" }, "value": 0.2 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }}
{ "put": "id:mynamespace:music::hardwired-to-self-destruct", "fields": { "album": "Hardwired...To Self-Destruct", "artist": "Metallica", "year": 2016, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0 }, { "address" : { "cat" : "rock" }, "value": 1 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }}
{ "put": "id:mynamespace:music::liebe-ist-für-alle-da", "fields": { "album": "Liebe ist für alle da", "artist": "Rammstein", "year": 2009, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.1 }, { "address" : { "cat" : "rock" }, "value": 1.0 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }}
{ "put": "id:mynamespace:music::love-is-here-to-stay", "fields": { "album": "Love Is Here To Stay", "artist": "Diana Krall", "year": 2018, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.4 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.8 } ] } }}
{ "put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go", "fields": { "album": "When We All Fall Asleep, Where Do We Go?", "artist": "Billie Eilish", "year": 2019, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1.0 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.1 } ] } }}

3
myapp/myapp/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
application.zip
src/main/application/security/
.idea/

13
myapp/myapp/README.md Normal file
View file

@ -0,0 +1,13 @@
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
![Vespa logo](https://vespa.ai/assets/vespa-logo-color.png)
# Vespa sample applications - Album Recommendations
A simple Vespa application which can be deployed on one node,
and does search and recommendation in music data.
Follow
[vespa quick start guide](https://docs.vespa.ai/en/vespa-quick-start.html)
to deploy this.

View file

@ -0,0 +1,15 @@
{
"put": "id:mynamespace:music::a-head-full-of-dreams",
"fields": {
"album": "A Head Full of Dreams",
"artist": "Coldplay",
"year": 2015,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 1 },
{ "address" : { "cat" : "rock" }, "value": 0.2 },
{ "address" : { "cat" : "jazz" }, "value": 0 }
]
}
}
}

View file

@ -0,0 +1,16 @@
{
"put": "id:mynamespace:music::hardwired-to-self-destruct",
"fields": {
"album": "Hardwired...To Self-Destruct",
"artist": "Metallica",
"year": 2016,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 0 },
{ "address" : { "cat" : "rock" }, "value": 1 },
{ "address" : { "cat" : "jazz" }, "value": 0 }
]
}
}
}

View file

@ -0,0 +1,15 @@
{
"put": "id:mynamespace:music::liebe-ist-für-alle-da",
"fields": {
"album": "Liebe ist für alle da",
"artist": "Rammstein",
"year": 2009,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 0.1 },
{ "address" : { "cat" : "rock" }, "value": 1.0 },
{ "address" : { "cat" : "jazz" }, "value": 0 }
]
}
}
}

View file

@ -0,0 +1,16 @@
{
"put": "id:mynamespace:music::love-is-here-to-stay",
"fields": {
"album": "Love Is Here To Stay",
"artist": "Diana Krall",
"year": 2018,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 0.4 },
{ "address" : { "cat" : "rock" }, "value": 0 },
{ "address" : { "cat" : "jazz" }, "value": 0.8 }
]
}
}
}

View file

@ -0,0 +1,15 @@
{
"put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go",
"fields": {
"album": "When We All Fall Asleep, Where Do We Go?",
"artist": "Billie Eilish",
"year": 2019,
"category_scores": {
"cells": [
{ "address" : { "cat" : "pop" }, "value": 1.0 },
{ "address" : { "cat" : "rock" }, "value": 0 },
{ "address" : { "cat" : "jazz" }, "value": 0.1 }
]
}
}
}

View file

@ -0,0 +1,5 @@
{ "put": "id:mynamespace:music::a-head-full-of-dreams", "fields": { "album": "A Head Full of Dreams", "artist": "Coldplay", "year": 2015, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1 }, { "address" : { "cat" : "rock" }, "value": 0.2 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }}
{ "put": "id:mynamespace:music::hardwired-to-self-destruct", "fields": { "album": "Hardwired...To Self-Destruct", "artist": "Metallica", "year": 2016, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0 }, { "address" : { "cat" : "rock" }, "value": 1 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }}
{ "put": "id:mynamespace:music::liebe-ist-für-alle-da", "fields": { "album": "Liebe ist für alle da", "artist": "Rammstein", "year": 2009, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.1 }, { "address" : { "cat" : "rock" }, "value": 1.0 }, { "address" : { "cat" : "jazz" }, "value": 0 } ] } }}
{ "put": "id:mynamespace:music::love-is-here-to-stay", "fields": { "album": "Love Is Here To Stay", "artist": "Diana Krall", "year": 2018, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 0.4 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.8 } ] } }}
{ "put": "id:mynamespace:music::when-we-all-fall-asleep-where-do-we-go", "fields": { "album": "When We All Fall Asleep, Where Do We Go?", "artist": "Billie Eilish", "year": 2019, "category_scores": { "cells": [ { "address" : { "cat" : "pop" }, "value": 1.0 }, { "address" : { "cat" : "rock" }, "value": 0 }, { "address" : { "cat" : "jazz" }, "value": 0.1 } ] } }}

View file

@ -0,0 +1,49 @@
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# A description of a type of data, how to store and index it, and what to compute over the data elements
#
# See:
# - https://docs.vespa.ai/en/schemas.html
schema music {
document music {
field artist type string {
indexing: summary | index
}
field album type string {
indexing: summary | index
index: enable-bm25
}
field year type int {
indexing: summary | attribute
}
field category_scores type tensor<float>(cat{}) {
indexing: summary | attribute
}
}
fieldset default {
fields: artist, album
}
# Rank profiles defines what to compute over the data, and how to use the computation result to order them
# They can be selected at query time (ranking.profile=[name]), and can be everything from simple handwritten
# expressions as below to references to large machine-learned models.
#
# See
# - https://docs.vespa.ai/en/ranking.html
rank-profile rank_albums inherits default {
inputs {
query(user_profile) tensor<float>(cat{})
}
first-phase {
expression: bm25(album) + 0.25 * sum(query(user_profile) * attribute(category_scores))
}
}
}

64
myapp/myapp/services.xml Normal file
View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<services version="1.0" xmlns:deploy="vespa" xmlns:preprocess="properties">
<!--
A container cluster handles incoming requests to the application and processes those requests,
and their results. The processing to do and the API's to expose can be provides by Vespa
or by the application through Java components supplied as part of the application.
See:
- Reference: https://docs.vespa.ai/en/reference/services-container.html
-->
<container id="default" version="1.0">
<!--
<document-api> tells the container that it should accept documents for indexing. Through the
Document REST API you can PUT new documents, UPDATE existing documents, and DELETE documents
already in the cluster.
Documents sent to the Document REST API will be passed through document processors on the way
to the content cluster.
See:
- Reference: https://docs.vespa.ai/en/reference/services-container.html#document-api
- Operations: https://docs.vespa.ai/en/document-v1-api-guide.html
-->
<document-api/>
<!--
<search> tells the container to answers queries and serve results for those queries.
Inside the <search /> cluster you can configure chains of "searchers" -
Java components processing the query and/or result.
See:
- Reference: https://docs.vespa.ai/en/query-api.html
- Searchers: https://docs.vespa.ai/en/searcher-development.html
-->
<search/>
<!--
<nodes> specifies the nodes that should run this cluster.
-->
<nodes>
<node hostalias="node1" />
</nodes>
</container>
<!--
<content/> content clusters store application data, maintain indexes and executes the
distributed parts of a query.
See:
- Reference: https://docs.vespa.ai/en/reference/services-content.html
-->
<content id="music" version="1.0">
<redundancy>2</redundancy>
<documents>
<document type="music" mode="index" />
</documents>
<nodes>
<node hostalias="node1" distribution-key="0" />
</nodes>
</content>
</services>

49
myapp/schemas/music.sd Normal file
View file

@ -0,0 +1,49 @@
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# A description of a type of data, how to store and index it, and what to compute over the data elements
#
# See:
# - https://docs.vespa.ai/en/schemas.html
schema music {
document music {
field artist type string {
indexing: summary | index
}
field album type string {
indexing: summary | index
index: enable-bm25
}
field year type int {
indexing: summary | attribute
}
field category_scores type tensor<float>(cat{}) {
indexing: summary | attribute
}
}
fieldset default {
fields: artist, album
}
# Rank profiles defines what to compute over the data, and how to use the computation result to order them
# They can be selected at query time (ranking.profile=[name]), and can be everything from simple handwritten
# expressions as below to references to large machine-learned models.
#
# See
# - https://docs.vespa.ai/en/ranking.html
rank-profile rank_albums inherits default {
inputs {
query(user_profile) tensor<float>(cat{})
}
first-phase {
expression: bm25(album) + 0.25 * sum(query(user_profile) * attribute(category_scores))
}
}
}

64
myapp/services.xml Normal file
View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<services version="1.0" xmlns:deploy="vespa" xmlns:preprocess="properties">
<!--
A container cluster handles incoming requests to the application and processes those requests,
and their results. The processing to do and the API's to expose can be provides by Vespa
or by the application through Java components supplied as part of the application.
See:
- Reference: https://docs.vespa.ai/en/reference/services-container.html
-->
<container id="default" version="1.0">
<!--
<document-api> tells the container that it should accept documents for indexing. Through the
Document REST API you can PUT new documents, UPDATE existing documents, and DELETE documents
already in the cluster.
Documents sent to the Document REST API will be passed through document processors on the way
to the content cluster.
See:
- Reference: https://docs.vespa.ai/en/reference/services-container.html#document-api
- Operations: https://docs.vespa.ai/en/document-v1-api-guide.html
-->
<document-api/>
<!--
<search> tells the container to answers queries and serve results for those queries.
Inside the <search /> cluster you can configure chains of "searchers" -
Java components processing the query and/or result.
See:
- Reference: https://docs.vespa.ai/en/query-api.html
- Searchers: https://docs.vespa.ai/en/searcher-development.html
-->
<search/>
<!--
<nodes> specifies the nodes that should run this cluster.
-->
<nodes>
<node hostalias="node1" />
</nodes>
</container>
<!--
<content/> content clusters store application data, maintain indexes and executes the
distributed parts of a query.
See:
- Reference: https://docs.vespa.ai/en/reference/services-content.html
-->
<content id="music" version="1.0">
<redundancy>2</redundancy>
<documents>
<document type="music" mode="index" />
</documents>
<nodes>
<node hostalias="node1" distribution-key="0" />
</nodes>
</content>
</services>

View file

@ -6,6 +6,7 @@ pkgs.mkShell {
cargo
tree
poetry
openssl_1_1
vespa-cli
];
shellHook = ''

3
start-vespa-docker.txt Normal file
View file

@ -0,0 +1,3 @@
docker run -it --platform=linux/amd64 --detach --name vespa --hostname vespa-container \
--publish 8080:8080 --publish 19071:19071 \
vespaengine/vespa