Cloud Run + Cloud SQL, setup

Поділитися
Вставка
  • Опубліковано 8 вер 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: ua-cam.com/video/JIE89dneaGo/v-deo.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 Рік тому

      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.

  • @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 2 роки тому +1

    Would be great to see the private IP configuration

  • @BM-dl9tb
    @BM-dl9tb 10 місяців тому +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 10 місяців тому +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 10 місяців тому

      @@MartinOmander okay 👍🏻, thank you.

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

  • @mayanksharma6967
    @mayanksharma6967 2 роки тому

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

  • @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 4 місяці тому

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

    • @TheMomander
      @TheMomander 4 місяці тому

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

  • @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.

  • @Euquila
    @Euquila 3 роки тому

    Gosh, y'all so smart

  • @EduardoHernandez-xz8dr
    @EduardoHernandez-xz8dr 2 роки тому

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

    • @TheMomander
      @TheMomander 2 роки тому +1

      The load testing video is here: ua-cam.com/video/r9qvB-JH4jM/v-deo.html

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

  • @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 Рік тому +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?

  • @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.

  • @kalidsherefuddin
    @kalidsherefuddin 3 роки тому

    Please please help me

  • @czechmate1124
    @czechmate1124 4 місяці тому

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