How to deploy the postgresql server in Google cloud - postgresql

I am trying to deploy my postgresql server to google cloud, like how we deploy in heroku. But i am not finding any tutorial or proper docs to start.
Can any one please help me in this, Thanks!

You can easily migrate a postgres database to Google Cloud SQL.
Basically it involves, creating an SQL instance, a replication using a Compute engine VM. Then seeding, and migrating your data.
The official documentation for this from google is here;
Migrate an on-premises PostgreSQL cluster to Google Cloud
This is a very good post giving a detailed step by step guide for the entire process.
How to migrate PostgreSQL databases to Google Cloud SQL

Related

How do I choose a local MySQL version that will be compatible with our future switch to CloudSQL?

For simplicity and cost, we are starting our project using local MySQL running on our GCE instances. We will want to switch to CloudSQL some months down the road.
Any advice on avoiding MySQL version conflicts/challenges would be much appreciated!
The majority of the documentation is for MySQL 5.7 so as an advice I recommend you use this version and review migrating to cloudsql concept this is a guide that will guide you through how to migrate safely which migration methods exist and how to prepare you MySQL database.
Another advice which I can give you is make the tutorial migrating mysql to cloud using automated workflow tutorial this guide also says that the any MySQL database running version 5.6 or 5.7 allows you to take advantage of the Cloud SQL automated migration workflow this tutorial is important to know how works and how deploy a source MySQL database on Compute Engine. The sql page will give you more tutorials if you want to learn more.
Finally I suggest to you check de sql pricing to be aware about the billing and also I suggest to you create a workspace with this you can have more transparency and more control over your billing charges by identifying and tuning up the services that are producing more log entries.
I hope all the information that I'm giving you are helpful.

Firestore and Mysql on Spring Boot. Is it possible?

I have a problem with Spring Boot application. I want to connect a Firestore and a MySql database in my Spring boot application. I would to know if it is possible. So I'm wondering if someone have an easy example to know this magic. Thanks.
Connection itself shouldn't be any problem. Firestore has well developed API for all popular languages, very simple and convenient to use, please check reference bellow.
You have mentioned MySQL, not sure if you are aware that GCP has also serverless Cloud SQL that can run MySQL for you (documentation).
You can find it here references and quick-starts here:
Google Cloud Firestore: quickstart, How-to and API reference.
Here I found example app tutorial: youtube.
Other interesting stuff: Spring Boot on GCP, Deploying on cloud from docs.spring.io.
You can also deploy your Spring Boot app on App Engine which can give you serverless solution for whole your stack - whole on GCP.

Trying to connect to connect Google Sheet script to a Postgres Google Cloud SQL instance

I'm writing a script to connect a Google sheet to GCP Postgres instance, unfortunately I only see documentation for MySQL. Do you know if there is support for Google scripting/Postgres integration?
Thanks.
Google Apps Script has JDBC connectors but they do not have support for Postgres as yet.
Currently Apps Script's JDBC connectors only support Cloud SQL(MySQL), MySQL, MSSQL, and Oracle databases as listed in the opening paragraph of the JDBC documentation.
Yes, Apps Script JDBC connectors do not support Postgres, still. If you don't want to build your own script, you can use database connector addons. Most of them support Postgres.

selecting best way for deploying MongoDB on Cloud Platform?

I am using google cloud platform for my project and planning to use mongodb cloud service.
I am confused in selecting the MongoDB on Cloud Platform.
I had read this link which tells 3 ways through which we can deploy mongodb.
Please help me out for selecting best option.
Recommendation
I have used all three options for deploying MongoDB on the Cloud Platform and believe the Cloud Launcher for MongoDB is by far your best choice.
Justification
I would like to address each of the three deployment options and explain my reasoning.
Cloud Launcher for MongoDB
The Cloud Launcher for MongoDB is what I would recommend. It's much simpler than creating a MongoDB database in any other way, since there are presets and you click through a nice UI. This was the way I created my first MongoDB database and felt pretty confident throughout the setup process.
MongoDB Cloud Manager
The MongoDB Cloud Manager is a more advanced version of the Cloud Launcher for MongoDB. It supports "more complex deployments... ...such as complex replica sets or sharded clusters." You will be able to work your way towards these complex deployments with the Cloud Launcher for MongoDB, without being overwhelmed immediately.
Google Cloud Deployment Manager
The Google Cloud Deployment Manager "lets you automate the setup of [the] MongoDB Cloud Manager." The MongoDB Cloud Manager is already more complicated than the Cloud Launcher for MongoDB, so there is no reason for you to automate deployments at this point.
Documentation Quoted in this Answer

Import Postgres data into Google Spreadsheets

I was trying to achieve this using google app script but sadly app script does not have a jdbc connector for postgres. Can someone please help me out with detailed steps on what needs to be done in order to get the postgres data in spreadsheets.
If you go to JDBC Apps Script guide it says there that:
"Apps Script can connect to external databases through the JDBC
service, a wrapper around the standard Java Database Connectivity
technology. In Apps Script, the JDBC service supports Google Cloud
SQL, MySQL, Microsoft SQL Server, and Oracle databases."
No mention of PostgeSQL support as of now.