You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: kustomize/components/shopping-assistant/README.md
+55-36
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,45 @@
1
1
# Shopping Assistant with RAG & AlloyDB
2
2
3
-
This demo adds a new service to Online Boutique called `shoppingassistantservice`, which, alongside an Alloy-DB backed products catalog, adds a RAG-featured AI assistant to the frontned experience, which helps users suggest new products for their room decor.
3
+
This demo adds a new service to Online Boutique called `shoppingassistantservice` which, alongside an Alloy-DB backed products catalog, adds a RAG-featured AI assistant to the frontned experience, helping users suggest products matching their home decor.
4
4
5
-
## Set-up instructions
5
+
## Setup instructions
6
6
7
-
> Note: Make sure you have the `owner` role to the Google Cloud project you want to deploy this to, else you will be unable to enable certain APIs or modify certain VPC rules that are needed for this demo.
7
+
**Note:** This demo requires a Google Cloud project where you to have the `owner` role, else you may be unable to enable APIs or modify VPC rules that are needed for this demo.
8
+
9
+
1. Set some environment variables.
10
+
```sh
11
+
export PROJECT_ID=<project_id>
12
+
export PROJECT_NUMBER=<project_number>
13
+
export PGPASSWORD=<pgpassword>
14
+
```
15
+
16
+
**Note**: The project ID and project number of your Google Cloud project can be found in the Console. The PostgreSQL password can be set to anything you want, but make sure to note it down.
17
+
18
+
1. Change your default Google Cloud project.
19
+
```sh
20
+
gcloud auth login
21
+
gcloud config set project $PROJECT_ID
22
+
```
8
23
9
24
1. Enable the Google Kubernetes Engine (GKE) and Artifact Registry (AR) APIs.
1. Run script #2 in the VM. If it asks for a postgres password, it should be the same that you set in script #1 earlier.
98
+
1. Run script #2 in the VM. If it asks for a postgres password, it should be the same that you set in script #1 earlier. This may take a few minutes.
85
99
```sh
86
100
./2_create_populate_alloydb_tables.sh
87
101
```
88
102
89
-
1. Exit SSH
103
+
1. Exit SSH.
90
104
```sh
91
105
exit
92
106
```
93
107
94
108
1. Create an API key in the [Credentials page](https://pantheon.corp.google.com/apis/credentials) with permissions for"Generative Language API", and make note of the secret key.
95
109
96
-
1. Paste this secret key in the shopping assistant service envs, replacing `GOOGLE_API_KEY_VAL`.
110
+
1. Replace the PostgreSQL password placeholder in the shoppingassistant service.
97
111
```sh
98
-
vim kustomize/components/shopping-assistant/shoppingassistantservice.yaml
112
+
sed -i "s/GOOGLE_API_KEY_VAL/${PGPASSWORD}/g" kustomize/components/shopping-assistant/shoppingassistantservice.yaml
99
113
```
100
114
101
-
1. Change the commented-out components in`kubernetes-manifests/kustomization.yaml` to look like this:
115
+
1. Edit the root Kustomize file to enable the `alloydb` and `shopping-assistant` components.
116
+
```sh
117
+
nano kubernetes-manifests/kustomization.yaml # make the modifications below
0 commit comments