Skip to content

Auto-install Firestore emulator #1

@wilsonehusin

Description

@wilsonehusin

Currently, upon boot starting Firestore emulator as nonroot would be greeted with error:

gcloud emulators firestore start
You need the [cloud-firestore-emulator] component to use the Google
Cloud Firestore emulator.

ERROR: (gcloud.emulators.firestore.start) You cannot perform this action because you
do not have permission to modify the Google Cloud SDK installation directory [/usr/share/google-cloud-sdk].

Re-run the command with sudo: sudo /usr/share/google-cloud-sdk/bin/gcloud ...

And after re-running with sudo, it would still require download and install process:

sudo gcloud emulators firestore start
You need the [cloud-firestore-emulator] component to use the Google
Cloud Firestore emulator.


Your current Google Cloud CLI version is: 511.0.0
Installing components from version: 511.0.0

┌─────────────────────────────────────────────────────────────────────────────┐
│                     These components will be installed.                     │
├─────────────────────────────────────────────────────┬────────────┬──────────┤
│                         Name                        │  Version   │   Size   │
├─────────────────────────────────────────────────────┼────────────┼──────────┤
│ Bundled Python 3.12 (Platform Specific)             │     3.12.8 │ 89.2 MiB │
│ Cloud Firestore Emulator                            │     1.19.9 │ 46.9 MiB │
│ Google Cloud CLI Core Libraries                     │ 2025.02.18 │ 20.9 MiB │
│ Google Cloud CLI Core Libraries (Platform Specific) │ 2024.08.30 │  < 1 MiB │
│ gcloud cli dependencies                             │ 2025.02.18 │ 16.7 MiB │
│ gcloud cli dependencies (Platform Specific)         │ 2021.04.16 │  < 1 MiB │
└─────────────────────────────────────────────────────┴────────────┴──────────┘

For the latest full release notes, please visit:
  https://cloud.google.com/sdk/release_notes

Once started, canceling this operation may leave your SDK installation in an inconsistent state.

Do you want to continue (Y/n)?

Would be great if this installation process can be part of build through melange. Not entirely sure the implications on reproducible builds, but probably ~low risk?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions