Do I need to deploy function in gcloud in order to have OCR?
up vote
0
down vote
favorite
This GCloud Tutorial has a "Deploying the function", such as
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
But at Quickstart: Using Client Libraries does not mention it at all, all it needs is
npm install --save @google-cloud/storage
then a few lines of code will work.
So I'm confused, do I need the "deploy" in order to have OCR, in other words what do/don't I get from "deploy"?
add a comment |
up vote
0
down vote
favorite
This GCloud Tutorial has a "Deploying the function", such as
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
But at Quickstart: Using Client Libraries does not mention it at all, all it needs is
npm install --save @google-cloud/storage
then a few lines of code will work.
So I'm confused, do I need the "deploy" in order to have OCR, in other words what do/don't I get from "deploy"?
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This GCloud Tutorial has a "Deploying the function", such as
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
But at Quickstart: Using Client Libraries does not mention it at all, all it needs is
npm install --save @google-cloud/storage
then a few lines of code will work.
So I'm confused, do I need the "deploy" in order to have OCR, in other words what do/don't I get from "deploy"?
This GCloud Tutorial has a "Deploying the function", such as
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
But at Quickstart: Using Client Libraries does not mention it at all, all it needs is
npm install --save @google-cloud/storage
then a few lines of code will work.
So I'm confused, do I need the "deploy" in order to have OCR, in other words what do/don't I get from "deploy"?
edited Nov 11 at 23:20
asked Nov 8 at 4:56
Jeb50
518520
518520
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
The command
npm install --save @google-cloud/storage
is an example of installing the Google Cloud Client Library for Node.js in your development environment, in this case, Cloud Storage API. This example is part of Setting Up a Node.js Development Environment tutorial.
Once you have coded, tested and set all the configurations for the app as described in the tutorial the next step would be the deployment, in this example a Cloud Function:
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
So, note that this commands are two different steps to run OCR with Cloud Functions, Cloud Storage and other Cloud Platform components in the tutorial example using Node.js environment.
npm install ...is easy to understand to have all libraries/frameworks downloaded to my local box for development. Butdeploytakes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?
– Jeb50
Nov 10 at 17:47
1
deploydeploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.
– Philipp Sh
Nov 12 at 16:24
add a comment |
up vote
1
down vote
While Cloud Function (CF) is easy to understand, this answers specifically my own question, what does the "Deploy" actually do:
- to have the code work for you, they must be deployed/uploaded to the GC. For people like me never done GCF this is new. My understanding was all I need to supply is credentials and satisfy the whatever server/backend (sorry, cloud) settings when my local app calls the remote Web API. That's where I stucked. The key I missed is the sample app itself is a server/backend, and therefore Google requires them to be "deployed" just like when we deploy something during a staging or production release in a traditional corporate environment. So it's a real deploy. If you still don't get it, go to your GC admin page, menu, Cloud Function, "Overview" tab, you will see them. Hence goes to next
- The 3 GC deploy command used in the Deploying Functions have
ocr-extract ocr-save ocr-translate, they are not switches, they are function names that you can name them anything. Now, still in the Admin page, click on any of 3, "Source". Bang, they are there, deployed (uploaded).
Google, as this is a tutorial no one has digged into command reference book yet, I recommend adding a piece of note telling readers those 3 ocr-* can be anything you want to name.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The command
npm install --save @google-cloud/storage
is an example of installing the Google Cloud Client Library for Node.js in your development environment, in this case, Cloud Storage API. This example is part of Setting Up a Node.js Development Environment tutorial.
Once you have coded, tested and set all the configurations for the app as described in the tutorial the next step would be the deployment, in this example a Cloud Function:
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
So, note that this commands are two different steps to run OCR with Cloud Functions, Cloud Storage and other Cloud Platform components in the tutorial example using Node.js environment.
npm install ...is easy to understand to have all libraries/frameworks downloaded to my local box for development. Butdeploytakes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?
– Jeb50
Nov 10 at 17:47
1
deploydeploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.
– Philipp Sh
Nov 12 at 16:24
add a comment |
up vote
1
down vote
The command
npm install --save @google-cloud/storage
is an example of installing the Google Cloud Client Library for Node.js in your development environment, in this case, Cloud Storage API. This example is part of Setting Up a Node.js Development Environment tutorial.
Once you have coded, tested and set all the configurations for the app as described in the tutorial the next step would be the deployment, in this example a Cloud Function:
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
So, note that this commands are two different steps to run OCR with Cloud Functions, Cloud Storage and other Cloud Platform components in the tutorial example using Node.js environment.
npm install ...is easy to understand to have all libraries/frameworks downloaded to my local box for development. Butdeploytakes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?
– Jeb50
Nov 10 at 17:47
1
deploydeploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.
– Philipp Sh
Nov 12 at 16:24
add a comment |
up vote
1
down vote
up vote
1
down vote
The command
npm install --save @google-cloud/storage
is an example of installing the Google Cloud Client Library for Node.js in your development environment, in this case, Cloud Storage API. This example is part of Setting Up a Node.js Development Environment tutorial.
Once you have coded, tested and set all the configurations for the app as described in the tutorial the next step would be the deployment, in this example a Cloud Function:
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
So, note that this commands are two different steps to run OCR with Cloud Functions, Cloud Storage and other Cloud Platform components in the tutorial example using Node.js environment.
The command
npm install --save @google-cloud/storage
is an example of installing the Google Cloud Client Library for Node.js in your development environment, in this case, Cloud Storage API. This example is part of Setting Up a Node.js Development Environment tutorial.
Once you have coded, tested and set all the configurations for the app as described in the tutorial the next step would be the deployment, in this example a Cloud Function:
gcloud functions deploy ocr-extract --trigger-bucket YOUR_IMAGE_BUCKET_NAME --entry-point
So, note that this commands are two different steps to run OCR with Cloud Functions, Cloud Storage and other Cloud Platform components in the tutorial example using Node.js environment.
edited Nov 8 at 11:25
answered Nov 8 at 8:50
dhauptman
1055
1055
npm install ...is easy to understand to have all libraries/frameworks downloaded to my local box for development. Butdeploytakes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?
– Jeb50
Nov 10 at 17:47
1
deploydeploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.
– Philipp Sh
Nov 12 at 16:24
add a comment |
npm install ...is easy to understand to have all libraries/frameworks downloaded to my local box for development. Butdeploytakes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?
– Jeb50
Nov 10 at 17:47
1
deploydeploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.
– Philipp Sh
Nov 12 at 16:24
npm install ... is easy to understand to have all libraries/frameworks downloaded to my local box for development. But deploy takes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?– Jeb50
Nov 10 at 17:47
npm install ... is easy to understand to have all libraries/frameworks downloaded to my local box for development. But deploy takes only my imageBucket in as param, so it's like enabling the ocr feature of this bucket, means as long as an app utilizing this bucket, it will be allowed to use the ocr feature of it. Right?– Jeb50
Nov 10 at 17:47
1
1
deploy deploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.– Philipp Sh
Nov 12 at 16:24
deploy deploys your Cloud Function. During deployment you need to specify the bucket that will be used as the trigger for executing the first Cloud Function because Cloud Storage is the Event Trigger for the CF. The OCR is not a unified "feature", but a functionality that can be achieved by using multiple GCP products, namely: Cloud Functions, Cloud Storage, Vision API, Translation API, Pub/Sub. You will need 1 bucket for uploading images that will undergo the OCR process and another bucket to store the translation results. If this did not help clear confusion, please ask another question.– Philipp Sh
Nov 12 at 16:24
add a comment |
up vote
1
down vote
While Cloud Function (CF) is easy to understand, this answers specifically my own question, what does the "Deploy" actually do:
- to have the code work for you, they must be deployed/uploaded to the GC. For people like me never done GCF this is new. My understanding was all I need to supply is credentials and satisfy the whatever server/backend (sorry, cloud) settings when my local app calls the remote Web API. That's where I stucked. The key I missed is the sample app itself is a server/backend, and therefore Google requires them to be "deployed" just like when we deploy something during a staging or production release in a traditional corporate environment. So it's a real deploy. If you still don't get it, go to your GC admin page, menu, Cloud Function, "Overview" tab, you will see them. Hence goes to next
- The 3 GC deploy command used in the Deploying Functions have
ocr-extract ocr-save ocr-translate, they are not switches, they are function names that you can name them anything. Now, still in the Admin page, click on any of 3, "Source". Bang, they are there, deployed (uploaded).
Google, as this is a tutorial no one has digged into command reference book yet, I recommend adding a piece of note telling readers those 3 ocr-* can be anything you want to name.
add a comment |
up vote
1
down vote
While Cloud Function (CF) is easy to understand, this answers specifically my own question, what does the "Deploy" actually do:
- to have the code work for you, they must be deployed/uploaded to the GC. For people like me never done GCF this is new. My understanding was all I need to supply is credentials and satisfy the whatever server/backend (sorry, cloud) settings when my local app calls the remote Web API. That's where I stucked. The key I missed is the sample app itself is a server/backend, and therefore Google requires them to be "deployed" just like when we deploy something during a staging or production release in a traditional corporate environment. So it's a real deploy. If you still don't get it, go to your GC admin page, menu, Cloud Function, "Overview" tab, you will see them. Hence goes to next
- The 3 GC deploy command used in the Deploying Functions have
ocr-extract ocr-save ocr-translate, they are not switches, they are function names that you can name them anything. Now, still in the Admin page, click on any of 3, "Source". Bang, they are there, deployed (uploaded).
Google, as this is a tutorial no one has digged into command reference book yet, I recommend adding a piece of note telling readers those 3 ocr-* can be anything you want to name.
add a comment |
up vote
1
down vote
up vote
1
down vote
While Cloud Function (CF) is easy to understand, this answers specifically my own question, what does the "Deploy" actually do:
- to have the code work for you, they must be deployed/uploaded to the GC. For people like me never done GCF this is new. My understanding was all I need to supply is credentials and satisfy the whatever server/backend (sorry, cloud) settings when my local app calls the remote Web API. That's where I stucked. The key I missed is the sample app itself is a server/backend, and therefore Google requires them to be "deployed" just like when we deploy something during a staging or production release in a traditional corporate environment. So it's a real deploy. If you still don't get it, go to your GC admin page, menu, Cloud Function, "Overview" tab, you will see them. Hence goes to next
- The 3 GC deploy command used in the Deploying Functions have
ocr-extract ocr-save ocr-translate, they are not switches, they are function names that you can name them anything. Now, still in the Admin page, click on any of 3, "Source". Bang, they are there, deployed (uploaded).
Google, as this is a tutorial no one has digged into command reference book yet, I recommend adding a piece of note telling readers those 3 ocr-* can be anything you want to name.
While Cloud Function (CF) is easy to understand, this answers specifically my own question, what does the "Deploy" actually do:
- to have the code work for you, they must be deployed/uploaded to the GC. For people like me never done GCF this is new. My understanding was all I need to supply is credentials and satisfy the whatever server/backend (sorry, cloud) settings when my local app calls the remote Web API. That's where I stucked. The key I missed is the sample app itself is a server/backend, and therefore Google requires them to be "deployed" just like when we deploy something during a staging or production release in a traditional corporate environment. So it's a real deploy. If you still don't get it, go to your GC admin page, menu, Cloud Function, "Overview" tab, you will see them. Hence goes to next
- The 3 GC deploy command used in the Deploying Functions have
ocr-extract ocr-save ocr-translate, they are not switches, they are function names that you can name them anything. Now, still in the Admin page, click on any of 3, "Source". Bang, they are there, deployed (uploaded).
Google, as this is a tutorial no one has digged into command reference book yet, I recommend adding a piece of note telling readers those 3 ocr-* can be anything you want to name.
answered Nov 18 at 0:40
Jeb50
518520
518520
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53201768%2fdo-i-need-to-deploy-function-in-gcloud-in-order-to-have-ocr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown