Fix the web app. (#432)

* We need to set the parameters for the model and index.

  * It looks like when we split up the web app into its own ksonnet app
    we forgot to set the parameters.

* SInce the web app is being deployed in a separate namespace we need to
  copy the GCP credential to that namespace. Add instructions to the
  demo README.md on how to do that.

* It looks like the pods were never getting started because the secret
  couldn't be mounted.
This commit is contained in:
Jeremy Lewi 2018-12-12 09:24:40 -08:00 committed by Kubernetes Prow Robot
parent 4a7e2c868c
commit 1b643c2b81
2 changed files with 24 additions and 10 deletions

View File

@ -26,6 +26,16 @@ We are using the following project
```
ks12 apply cs_demo -c search-index-server
```
1. Copy the GCP service account to the namespace where the servers run
* The serving piece runs in a different namespace from Kubeflow
* We need to copy the GCP service account to that namespace because the pod will try to mount it.
```
kubectl -n kubeflow get secret user-gcp-sa -o json | jq -r '.data["user-gcp-sa.json"]' | base64 -d > ${SECRET_FILE}
kubectl -n cs-web-app create secret generic user-gcp-sa --from-file=user-gcp-sa.json=${SECRET_FILE}
```
# Install Argo CD
```

View File

@ -1,17 +1,21 @@
local params = std.extVar("__ksonnet/params");
local globals = import "globals.libsonnet";
local params = std.extVar('__ksonnet/params');
local globals = import 'globals.libsonnet';
local envParams = params + {
components +: {
// Insert component parameter overrides here. Ex:
// guestbook +: {
// name: "guestbook-dev",
// replicas: params.global.replicas,
// },
components+: {
"search-index-server"+: {
dataDir: 'gs://code-search-demo/models/20181107-dist-sync-gpu',
indexFile: 'gs://code-search-demo/20181104/code-embeddings-index/embeddings.index',
lookupFile: 'gs://code-search-demo/20181104/code-embeddings-index/embedding-to-info.csv',
},
"query-embed-server"+: {
modelBasePath: 'gs://code-search-demo/models/20181107-dist-sync-gpu/export/',
},
},
};
{
components: {
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
[x]: envParams.components[x] + globals
for x in std.objectFields(envParams.components)
},
}
}