Cloud Run + Cloud SQL, setup

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 37

  • @googlecloudtech
    @googlecloudtech  3 ปีที่แล้ว +3

    Get $300 and start running workloads for free → goo.gle/30Zg36Y

  • @brainscott
    @brainscott 3 ปีที่แล้ว +13

    Love these Martin, enjoy the different guest per episode. Would be great to see an episode on Cloud Run + Secrets Manager

    • @MartinOmander
      @MartinOmander 3 ปีที่แล้ว +1

      That's a great idea, Brian. Thank you!

    • @TheMomander
      @TheMomander 2 ปีที่แล้ว

      We now have video for integrating Cloud Run and Secret Manager: th-cam.com/video/JIE89dneaGo/w-d-xo.html. Thank you suggesting this topic!

  • @sunnyj9088
    @sunnyj9088 2 ปีที่แล้ว +3

    You guys rock. I'm either voting for tabs or space, however I'm sure voting for more videos like this 🙂

    • @TheMomander
      @TheMomander 2 ปีที่แล้ว

      Thanks, Sunny, much appreciated!

  • @johnrodkey4329
    @johnrodkey4329 3 ปีที่แล้ว +5

    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 ปีที่แล้ว +2

      Yeah bigquery, especially with new materialized views, came to mind when they described the use case to me as well.

  • @BM-dl9tb
    @BM-dl9tb ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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 ปีที่แล้ว

      @@MartinOmander okay 👍🏻, thank you.

  • @rara737
    @rara737 3 ปีที่แล้ว +5

    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

  • @gogl92
    @gogl92 3 ปีที่แล้ว +4

    What happens if my SQL server is in a different project?

    • @craiglabenz9147
      @craiglabenz9147 3 ปีที่แล้ว +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.

  • @Jkevingutierrez
    @Jkevingutierrez 3 ปีที่แล้ว +1

    Would be great to see the private IP configuration

  • @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" 😅

  • @samanthaletourneau9709
    @samanthaletourneau9709 2 ปีที่แล้ว +1

    what about C# connection string ?

  • @daftzero9767
    @daftzero9767 3 ปีที่แล้ว +1

    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 6 หลายเดือนก่อน

      saw vpc servless connector today after 3 years. It costs a lot of money

    • @TheMomander
      @TheMomander 6 หลายเดือนก่อน

      @@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!

  • @winstonkwan
    @winstonkwan 2 ปีที่แล้ว

    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 2 ปีที่แล้ว +1

      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?

  • @mayanksharma6967
    @mayanksharma6967 2 ปีที่แล้ว

    Please add video with nodejs code too for postgresql to connect and query :) .. thanks!!

  • @krishnakantchaurasia269
    @krishnakantchaurasia269 3 ปีที่แล้ว

    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.

  • @EduardoHernandez-xz8dr
    @EduardoHernandez-xz8dr 3 ปีที่แล้ว

    Could you point us to the load testing part video? Thanks a lot!

    • @TheMomander
      @TheMomander 2 ปีที่แล้ว +1

      The load testing video is here: th-cam.com/video/r9qvB-JH4jM/w-d-xo.html

  • @Euquila
    @Euquila 3 ปีที่แล้ว

    Gosh, y'all so smart

  • @dita0322
    @dita0322 3 ปีที่แล้ว

    What happen with the old serverless videos where you use nodejs as an example?

    • @KevinBoutin
      @KevinBoutin 3 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@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!

  • @czechmate1124
    @czechmate1124 6 หลายเดือนก่อน

    Something very creepy about the dialogue here. The curated responses are ...not human like.

  • @kalidsherefuddin
    @kalidsherefuddin 3 ปีที่แล้ว

    Please please help me