-
Notifications
You must be signed in to change notification settings - Fork 57
GCP Storage POC demo
Dilantha edited this page Jul 25, 2018
·
2 revisions
- Git clone https://github.com/dilantha111/clocal-gcp.git
- Go to the root and install dependencies
yarn
ornpm install
- To run the local emulator you should have docker installed in your machine.
- Since clocal-gcp not available through npm yet. You have to use npm link or yarn link, to make clocal-gcp cli to be available.
- clocal-gcp storage-start : start the emulator.
- clocal-gcp storage-stop : stop the emulator.
These commands will spawn up storage container which consists of storage emulator. And will remove the container on storage-stop command.
An example is available in example directory. https://github.com/dilantha111/clocal-gcp/tree/storage-poc/examples/cloud-data-storage-client-poc
At the moment insert bucket JSON API is available for the POC. Since ACL is not mocked yet you have to set up the GCP credentails. https://cloud.google.com/storage/docs/reference/libraries#client-libraries-usage-nodejs ex :- export GOOGLE_APPLICATION_CREDENTIALS="/home/dilantha/gcp-credentials.json" alternatively you can use 'gcloud auth application-default login' command to initialize the login.
CLocal GCP - Emulation Engine for Google Cloud