Тёмный

Cloud Run + Cloud SQL, setup 

Google Cloud Tech
Подписаться 1,2 млн
Просмотров 31 тыс.
50% 1

Code for this episode → goo.gle/3eSifpa
Cloud SQL documentation → goo.gle/3eSifpa
Cloud Run documentation → goo.gle/3cMPsj3
Cloud Run is serverless, which means you don’t have to worry too much about configuration settings. If your code connects to a relational database, you will find that Cloud SQL is not serverless and that it has a lot of configuration settings. But don’t worry, in this video Craig and Martin will set up and configure a Cloud SQL machine and show how to connect to it from Cloud Run code!
Timestamps:
0:00​ - Intro
1:37 - Why Cloud SQL
2:22 - Creating and configuring a new Cloud SQL instance
6:33 - Creating and populating tables
7:10 - Connecting to Cloud SQL from Cloud Run code
9:20 - Deploying the application to Cloud Run
Checkout more episodes of Serverless Expeditions → goo.gle/ServerlessExpeditions
Subscribe to Google Cloud Tech → goo.gle/GoogleCloudTech
#ServerlessExpeditions​ #CloudRun
Product: Cloud Run, Cloud SQL; fullname: Martin Omander, Craig Labenz;

Наука

Опубликовано:

 

7 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@googlecloudtech
@googlecloudtech 3 года назад
Get $300 and start running workloads for free → goo.gle/30Zg36Y
@brainscott
@brainscott 3 года назад
Love these Martin, enjoy the different guest per episode. Would be great to see an episode on Cloud Run + Secrets Manager
@MartinOmander
@MartinOmander 3 года назад
That's a great idea, Brian. Thank you!
@TheMomander
@TheMomander 2 года назад
We now have video for integrating Cloud Run and Secret Manager: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JIE89dneaGo.html. Thank you suggesting this topic!
@sunnyj9088
@sunnyj9088 2 года назад
You guys rock. I'm either voting for tabs or space, however I'm sure voting for more videos like this 🙂
@TheMomander
@TheMomander Год назад
Thanks, Sunny, much appreciated!
@johnrodkey4329
@johnrodkey4329 3 года назад
Would love to see this using Firestore and the extension to sync data to bigquery then using the new materialized views for dashboard / reports.
@DefBroadcasting
@DefBroadcasting 3 года назад
Yeah bigquery, especially with new materialized views, came to mind when they described the use case to me as well.
@samueldavidpolopena5663
@samueldavidpolopena5663 2 года назад
Thanks a lot for the great video! I have a little question and a remark, for the question, how would the code change if I'm using a MySQL Database? I mean, for the sqlalchemy drivername part. And the remark is that, in the description, the link is repeated for "Code for this episode" and "Cloud SQL documentation" 😅
@Jkevingutierrez
@Jkevingutierrez 2 года назад
Would be great to see the private IP configuration
@Euquila
@Euquila 3 года назад
Gosh, y'all so smart
@mayanksharma6967
@mayanksharma6967 2 года назад
Please add video with nodejs code too for postgresql to connect and query :) .. thanks!!
@samanthaletourneau9709
@samanthaletourneau9709 2 года назад
what about C# connection string ?
@gogl92
@gogl92 3 года назад
What happens if my SQL server is in a different project?
@craiglabenz9147
@craiglabenz9147 3 года назад
Private IPs (aka, VPCs) require a little bit of extra configuration that is documented here: cloud.google.com/sql/docs/mysql/private-ip; and if you're connecting via the Cloud SQL Proxy, then you have to enable the Admin API in the project that hosts the Service Account you're using to connect.
@krishnakantchaurasia269
@krishnakantchaurasia269 2 года назад
small question about the database connection name, i can see that it has define in 3 places (.env, code as a query, cloud deply cmd). defining connection in one place would not be enough ?
@johnpankowicz4823
@johnpankowicz4823 2 года назад
I think what you are seeing is that the same connection name needs to be defined both within the Cloud Run instance and within the CloudSQL instance. The shell script is executed on the Cloud Run instance. Also, in the CloudSQL instance, it is not defined in the code query. The query get its value from the environment, because it is defined in .env.
@rara737
@rara737 2 года назад
Do not follow the tutorial in this video. I was following this video as a practice and paid a lot of money. I didn't know this was going to cost money (thought it would not be charged for a very small test scale) I connected to gcp phone,email support but They always just told me to delete the project (How do I delete a service that is already running with Firestore?) Maybe it was because the support team didn't know anything about development. I finally found a way to disable cloud sql on the gcp console api resource side all by myself. And finally I was able to stop charging. Beginners can get lost, so be careful. If you don't have supporters to help you
@BM-dl9tb
@BM-dl9tb 9 месяцев назад
Hi, im currently working on a project but i dont know really well how to use google cloud shell, so my question is: How do you create and populate tables with a mysql DB? I hope you can help me thanks.
@MartinOmander
@MartinOmander 9 месяцев назад
In your Cloud SQL instance page, click IMPORT. From there you can browse to a file that you have previously uploaded to Cloud Storage. The file can be a CSV file or an SQL dump file that you have exported from another database.
@BM-dl9tb
@BM-dl9tb 9 месяцев назад
@@MartinOmander okay 👍🏻, thank you.
@EduardoHernandez-xz8dr
@EduardoHernandez-xz8dr 2 года назад
Could you point us to the load testing part video? Thanks a lot!
@TheMomander
@TheMomander 2 года назад
The load testing video is here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-r9qvB-JH4jM.html
@winstonkwan
@winstonkwan Год назад
I tried this with a cloud run but I cant connect to the CloudSQL MySQL server unless I allow 0.0.0.0/0. Is there another solution to this with Cloud Run and CloudSQL on public IP?
@craiglabenz9147
@craiglabenz9147 Год назад
In general, I recommend avoiding IP addresses and instead adding the correct Cloud SQL instance as an official connection in the Connections tab on your Cloud Run instance (under Deploy a new Revision), and then from within code, connecting via the running Cloud SQL Connector that Cloud Run supplies. You've tried this and it didn't work? If so, what error are you getting?
@daftzero9767
@daftzero9767 3 года назад
why not use vpc serverless connector and private vpc to reach de cloud sql instance?
@laybunzz
@laybunzz 3 года назад
If you're familiar with these concepts and know you need or want them, then by all means, they are a great idea. I was merely meaning to imply that for many new projects, it's better to focus on the basics and get something launched.
@mkc11267
@mkc11267 3 месяца назад
saw vpc servless connector today after 3 years. It costs a lot of money
@TheMomander
@TheMomander 3 месяца назад
@@mkc11267 Cloud Run can now send data directly to a VPC, so VPC Serverless connectors are no longer needed. This reduces the cloud bill and the project complexity. Check out my video "Cloud Run to VPC, simplified" for the details!
@dita0322
@dita0322 3 года назад
What happen with the old serverless videos where you use nodejs as an example?
@KevinBoutin
@KevinBoutin 3 года назад
Nothing wrong with changing it up. We have code examples for both now. :)
@megairrational
@megairrational 3 года назад
@@KevinBoutin where could we find them?
@KevinBoutin
@KevinBoutin 3 года назад
@@megairrational on this youtube channel.
@brainscott
@brainscott 3 года назад
If you don't want to deal with a Build & Deploy script, you can use a single command "gcloud beta run deploy --source=[DIRECTORY]" - cloud.google.com/blog/products/serverless/build-and-deploy-an-app-to-cloud-run-with-a-single-command
@TheMomander
@TheMomander 2 года назад
Thank you for adding this, Brian!
@kalidsherefuddin
@kalidsherefuddin 3 года назад
Please please help me
@czechmate1124
@czechmate1124 3 месяца назад
Something very creepy about the dialogue here. The curated responses are ...not human like.
Далее
Cloud Functions vs. Cloud Run
20:37
Просмотров 47 тыс.
Все сезоны бравл пассов…!!!😨
00:59
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Cloud Run deployments with YAML
11:26
Просмотров 9 тыс.
Database Configurations with Google Cloud SQL
16:47
Просмотров 63 тыс.
Creating a REST API with Node.js and MySQL
20:06
Просмотров 50 тыс.
Run your React app on Google Cloud
16:28
Просмотров 17 тыс.
Cloud SQL: Concepts of Networking
6:49
Просмотров 17 тыс.
API vs. SDK: What's the difference?
9:21
Просмотров 1,4 млн
Picking the right serverless platform (Part 1)
14:02
Просмотров 14 тыс.
iPhone 14 китайский сборка!
1:00
Просмотров 215 тыс.
Nokia 3310 top
0:20
Просмотров 4,6 млн