Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Google environment for search-api-v2 #695

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Set up Google environment for search-api-v2 #695

merged 1 commit into from
Oct 26, 2023

Conversation

csutter
Copy link
Contributor

@csutter csutter commented Oct 20, 2023

This allows an engineer working on search-api-v2 using GOV.UK Docker to authenticate on their host machine using gcloud and set an environment variable for their datastore in the dev GCP environment.

  • Add mounting of ~/.config/gcloud into the search-api-v2 containers
  • Add mirroring of local DISCOVERY_ENGINE_DATASTORE environment variable into containers
  • Add checks to the Makefile to ensure user setup is correct
  • Except prerequisites Make tasks from project name validation

@csutter csutter force-pushed the sav2-gcp branch 6 times, most recently from 3b54065 to df2c222 Compare October 23, 2023 14:45
This allows an engineer working on `search-api-v2` using GOV.UK Docker
to authenticate on their host machine using `gcloud` and set an
environment variable for their datastore in the dev GCP environment.

- Add mounting of `~/.config/gcloud` into the `search-api-v2` containers
- Add mirroring of local `DISCOVERY_ENGINE_DATASTORE` environment
  variable into containers
- Add checks to the Makefile to ensure user setup is correct
- Except `prerequisites` Make tasks from project name validation
@robinjam
Copy link

Does this break anything if the user doesn't have the gcloud CLI configured on their local machine?

(LGTM if not)

@csutter
Copy link
Contributor Author

csutter commented Oct 25, 2023

It should only fail if the user doesn't have the gcloud CLI, and they specifically try to run make search-api-v2.

If they are interacting with any other project through GOV.UK Docker it shouldn't affect them 🙂

@csutter csutter merged commit 9d22855 into main Oct 26, 2023
@csutter csutter deleted the sav2-gcp branch October 26, 2023 12:50
csutter added a commit that referenced this pull request Jul 4, 2024
We are about to start some work that hooks Search Admin up to Discovery
Engine (aka Google Vertex AI Search), so we need to:
- Mount the `gcloud` tool config directory into the container (which
  allows the Google Cloud gem(s) to pick up on locally configured
  credentials)
- Set appropriate environment variables for the engine and serving
  config that the app should use locally (`integration` as we no longer
  have a separate dev environment)

These changes are analogous to the ones made in #695 and #712 for
`search-api-v2`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants