Machine Learning News Hubb
Advertisement Banner
  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us
  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us
Machine Learning News Hubb
No Result
View All Result
Home Machine Learning

Turning News Into Data — Day 14 (Connecting to Cloud SQL Part 2) | by Norman Benbrahim | Sep, 2022

admin by admin
September 11, 2022
in Machine Learning


September 10 2022

Just continuing now with the instructions found on this article

I created a new environment variable in gitlab called GC_CLOUDSQL_INSTANCE_NAME and added this stage here:

add_db:
image: google/cloud-sdk:alpine
stage: add database connection
before_script:
- echo ${GC_CLOUDRUN_SVC_ACCOUNT_KEY} > ${HOME}/key.json
- gcloud auth activate-service-account --key-file ${HOME}/key.json
- gcloud config set project ${GC_PROJECT}
script:
- >
export GC_INSTANCE_CONNECTION_NAME=$(gcloud sql instances describe ${GC_CLOUDSQL_INSTANCE_NAME} | grep connectionName | sed 's/connectionName: //')
- >
gcloud run services update ${CI_PROJECT_NAME} --add-cloudsql-instances=${GC_INSTANCE_CONNECTION_NAME}
--service-account ${GC_CLOUDRUN_SVC_ACCOUNT_EMAIL} --region ${GC_REGION}
--allow-unauthenticated --platform managed
after_script:
- rm ${HOME}/key.json

Still debugging deploying this but one thing you gotta do is enable this API in order to set your GC project in your gitlab-ci file

I keep getting this error on Gitlab

Which means I (probably) either need to

  1. extend the role of the current Cloud Run service account to include Cloud SQL
  2. activate a separate service account and manage 2 of them

I like option 1 better. Less keys to manage is better. Plus it’ll make transitioning to that Workload Identity Federation thing easier later on

That worked

I just added Cloud SQL Client as a role

Next time I’ll make a connection in the code using the SDK



Source link

Previous Post

Saúde & Diagnóstico & Engenharia & Data Science | by Gabrie Freitas | Sep, 2022

Next Post

Machine Learning Explainability — Worked out Example (Balance Consolidation) | by RG | Sep, 2022

Next Post

Machine Learning Explainability — Worked out Example (Balance Consolidation) | by RG | Sep, 2022

Pre-Approval Model — AI Explainability | by RG | Sep, 2022

An Introduction to LSTM (Long short Term Memory) for Time Series Forecasting | by Azmine Toushik Wasi | Sep, 2022

Related Post

Artificial Intelligence

Exploring TensorFlow Model Prediction Issues | by Adam Brownell | Feb, 2023

by admin
February 2, 2023
Machine Learning

Different Loss Functions used in Regression | by Iqra Bismi | Feb, 2023

by admin
February 2, 2023
Machine Learning

How to organize bills? – 3 ways to track bills

by admin
February 2, 2023
Artificial Intelligence

How to decide between Amazon Rekognition image and video API for video moderation

by admin
February 2, 2023
Artificial Intelligence

The Future of AI: GPT-3 vs GPT-4: A Comparative Analysis | by Mohd Saqib | Jan, 2023

by admin
February 2, 2023
Deep Learning

6 Ways To Streamline Tech Hiring With A Recruitment Automation Platform

by admin
February 2, 2023

© 2023 Machine Learning News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy and Terms & Conditions.

Navigate Site

  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us

Newsletter Sign Up.

No Result
View All Result
  • Home
  • Machine Learning
  • Artificial Intelligence
  • Big Data
  • Deep Learning
  • Edge AI
  • Neural Network
  • Contact Us

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.