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
2. Navigate (`cd`) to the template directory on your system
68
68
69
69
```bash
70
-
cd websocket-service/src
70
+
cddashboard-summarization/websocket-service/src
71
71
```
72
72
73
73
3. Install the dependencies with [NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
@@ -78,20 +78,20 @@ This section describes how to set up the web server on Cloud Run powering the Ge
78
78
79
79
> You may need to update your Node version or use a [Node version manager](https://github.com/nvm-sh/nvm) to change your Node version.
80
80
81
-
3. Update `looker-example.ini` to `looker.ini` and replace environment variables Admin API Credentials. **IMPORTANT** use a section header that matches the host of your Looker instance. Example below:
81
+
4. Update `looker-example.ini` to `looker.ini` and replace environment variables Admin API Credentials. **IMPORTANT** use a section header that matches the host of your Looker instance. Example below:
client_id=<From your looker user's api credentials>
88
+
client_secret=<From your looker user's api credentials>
89
+
verify_ssl=true
90
+
```
91
91
92
92
This is configured to support deployment to multiple Looker instances reusing the same backend.
93
93
94
-
4. Start the development server
94
+
5. Start the development server
95
95
96
96
```bash
97
97
npm run start
@@ -100,19 +100,54 @@ This is configured to support deployment to multiple Looker instances reusing th
100
100
101
101
#### Deployment
102
102
103
-
1. Build Docker File and Submit to Artifact Registry, replacing the `REGION` variable with your deployment region.
103
+
1. For deployment you will need to build the docker file and submit it to the [Artifact Registry](https://cloud.google.com/artifact-registry). You need to first create a repository. Update `location` to your deployment region, then run this command from root
3. Update `looker-example.ini` to `looker.ini` and replace environment variables Admin API Credentials. **IMPORTANT** use a section header that matches the host of your Looker instance. Example below:
client_id=<From your looker user's api credentials>
120
+
client_secret=<From your looker user's api credentials>
121
+
verify_ssl=true
122
+
```
123
+
124
+
This is configured to support deployment to multiple Looker instances reusing the same backend.
125
+
126
+
4. Update cloudbuild.yaml
127
+
```
128
+
<YOUR_REGION> = Your deployment region
129
+
<YOUR_PROJECT_ID> = Your GCP project ID
130
+
```
131
+
132
+
5. Build Docker File and Submit to Artifact Registry, replacing the `REGION` variable with your deployment region.
104
133
*Skip this step if you already have a deployed image.* Please see the [official docs](https://cloud.google.com/build/docs/configuring-builds/create-basic-configuration) for creating the yaml file.
2. Navigate (`cd`) to the terraform directory on your system
137
+
Save the returned docker image url. You can also get the docker image url from the Artifact Registry
138
+
139
+
6. Navigate (`cd`) to the terraform directory on your system
110
140
```bash
111
141
cd .. && cd terraform
112
142
```
113
-
3. Replace defaults in the `variables.tf` file for project, region, docker url and service name.
143
+
7. Replace defaults in the `variables.tf` file for project, region, docker url and service name.
144
+
```
145
+
project_id=<GCP project ID>
146
+
deployment_region=<Yourdeployementregion>
147
+
docker_image=<The docker image url from step 5>
148
+
```
114
149
115
-
4. Deploy resources. [*Ensure Application Default Credentials for GCP for Exported in your Environment first.*](https://cloud.google.com/docs/authentication/provide-credentials-adc#google-idp)
150
+
8. Deploy resources. [*Ensure Application Default Credentials for GCP for Exported in your Environment first.*](https://cloud.google.com/docs/authentication/provide-credentials-adc#google-idp)
116
151
117
152
```terraform
118
153
terraform init
@@ -122,7 +157,7 @@ This is configured to support deployment to multiple Looker instances reusing th
122
157
terraform apply
123
158
```
124
159
125
-
5. Save Deployed Cloud Run URL Endpoint
160
+
9. Save Deployed Cloud Run URL Endpoint
126
161
127
162
#### Optional: Setup Log Sink to BQ for LLM Cost Estimation and Request Logging
6. Create a `model` LookML file in your project. The name doesn't matter. The model and connection won't be used, and in the future this step may be eliminated.
265
+
7. Create a `model` LookML file in your project. The name doesn't matter. The model and connection won't be used, and in the future this step may be eliminated.
217
266
218
267
- Add a connection in this model. It can be any connection, it doesn't matter which.
219
268
-[Configure the model you created](https://docs.looker.com/data-modeling/getting-started/create-projects#configuring_a_model) so that it has access to some connection.
220
269
221
-
7. Connect your new project to Git. You can do this multiple ways:
270
+
8. Connect your new project to Git. You can do this multiple ways:
222
271
223
272
- Create a new repository on GitHub or a similar service, and follow the instructions to [connect your project to Git](https://docs.looker.com/data-modeling/getting-started/setting-up-git-connection)
224
273
- A simpler but less powerful approach is to set up git with the "Bare" repository option which does not require connecting to an external Git Service.
225
274
226
-
8. Commit your changes and deploy your them to production through the Project UI.
275
+
9. Commit your changes and deploy your them to production through the Project UI.
227
276
228
-
9. Reload the page and click the `Browse` dropdown menu. You should see your extension in the list.
277
+
10. Reload the page and click the `Browse` dropdown menu. You should see your extension in the list.
229
278
- The extension will load the JavaScript from the `url` provided in the `application` definition. By default, this is https://localhost:8080/bundle.js. If you change the port your server runs on in the package.json, you will need to also update it in the manifest.lkml.
230
279
231
280
- Refreshing the extension page will bring in any new code changes from the extension template, although some changes will hot reload.
232
281
233
-
10. Ensure All the Appropriate Environment Variables are set.
234
-
*See Export Integration Steps below for Slack and Gchat Variables. These are optional.*
235
-
```
236
-
SLACK_CLIENT_ID=
237
-
SLACK_CLIENT_SECRET=
238
-
CHANNEL_ID=
239
-
SPACE_ID=
240
-
WEBSOCKET_SERVICE=
241
-
```
242
282
243
283
#### Deployment
244
284
245
285
The process above requires your local development server to be running to load the extension code. To allow other people to use the extension, a production build of the extension needs to be run. As the kitchensink uses code splitting to reduce the size of the initially loaded bundle, multiple JavaScript files are generated.
246
286
247
287
1. In your extension project directory on your development machine, build the extension by running the command `npm run build`.
248
-
2. Drag and drop ALL of the generated JavaScript files contained in the `dist` directory into the Looker project interface.
288
+
2. Drag and drop the generated JavaScript file(bundle.js) contained in the `dist` directory into the Looker project interface.
249
289
3. Modify your `manifest.lkml` to use `file` instead of `url` and point it at the `bundle.js` file.
250
290
251
291
Note that the additional JavaScript files generated during the production build process do not have to be mentioned in the manifest. These files will be loaded dynamically by the extension as and when they are needed. Note that to utilize code splitting, the Looker server must be at version 7.21 or above.
0 commit comments