Connecting Teleport to Mongodb in cloud via mongos analog - database

In my case, I need to connect gravitational Teleport to mongodb in the cloud through an application deployed in kubernetes.
For postgresql, I used Pgbouncer which, using user/password, connected to postgresql in the cloud, and a teleport was connected to it using a certificate. For mongodb, I found a solution with mongos that can be connected to mongodb in the cloud, but only by keyFile, but I need by user/password.
Can anyone help me find an analogue of pgbouncer for mongodb or suggest another solution? Thanks a lot!

When you say MongoDB in the cloud, are you using Mongo Atlas? If so, Teleport has native integration with Atlas.
You can utilize the following guide for it: https://goteleport.com/docs/database-access/guides/mongodb-atlas/

Related

Real-time listening with MySQL server in AWS RDS

I want to create a MySQL instance on AWS RDS and provision a RDS proxy with it for handling lambda requests against the API calls through the API Gateway. I am quite new to AWS and this is the solution I found on the internet on how to best run a MySQL database on AWS. Please do correct me if this is wrong or I should try something better instead.
So anyway this is my setup I wish to carry on. I suspect that fetching data and performing CRUD operations through this will be easy. But I wonder how can I create WebSockets in RDS for a real-time chat feature in my application? Please guide me on how should I achieve this as I have not found any articles regarding this on the internet. Thanks!
You should use AWS API Gateway to create Websocket service not AWS RDS. Please check this resource.
RDS Proxy is one of the way to manage connections. Another solution is AWS Aurora Serverless but you need connect to database within VPC.
Maybe you can consider use serverless framework or chalice to make things easier.
If you want to invoke an AWS lambda function in your query, you can call lambda_sync or lambda async function.

Can pgadmin and pgmodeler connect to Google Cloud Spanner?

I want to start cloud spanner emulator in docker, and then use pgadmin to connect to emulator, but when creating server, I am not sure how to fill in the username and maintenance, has anyone tried it? Because I think cloud spanner is also using pgsql, so I should be able to connect to emulator with pgadmin.
Cloud Spanner itself does not support the PostgreSQL wire protocol, which means that you cannot connect directly to Cloud Spanner using psql or any other PostgreSQL tool. There is however an open source adapter that will allow you to use psql with Cloud Spanner. The adapter can be found here: https://github.com/cloudspannerecosystem/pgadapter
I don't think that pgAdmin will work with the adapter, as pgAdmin will also automatically execute a number of queries on the system tables of PostgreSQL to determine which tables etc. are in the database. Those queries will probably fail.
An alternative to using pgAdmin could be to use DBeaver: https://dbeaver.io/.
DBeaver has built-in support for Google Cloud Spanner.
When creating a connection to Cloud Spanner in DBeaver, make sure to select the Google Cloud Spanner JDBC Driver and not the Google Cloud Spanner Community (Topicus) Driver. The latter is deprecated and does not support the newest features of Cloud Spanner.
The following screenshot shows the connection dialog for Google Cloud Spanner in DBeaver Community Edition 7.3.0.

GCloud, how to connect to MSSQL instance

This is straightforward but I haven't found out how to do it.
I started using Google Cloud and setup my PostgreSQL instance.
Now I need to migrate data from another MSSQL database, but not all of it.
I can migrate from my local computer connecting to both databases.
Now I'd like to do the same directly from GCloud.
The posts that I've found describe how to create the whole MSSQL from GCloud, but I only need to connect to one that has been created.
However, I haven't found how to connect to MSSQL from there. Specifically, how do I install the necessary drivers?
Thanks.

Connect App-Engine app to other Google Cloud Instances - VPN or similar needed? / DNS possible?

We plan to use Appengine for our Node.JS REST-API which will serve content for our customers. The data will come from a MOngoDB Cluster (or Replicaset), which will also be hosted on Google Cloud Services. Some of the contents might be cached using the Memcache of AppEngine.
Now my question. Is it neccessary to setup a kind of VLAN or similar, to connect to the DB server? How can we assure that the DB server is connected with a good bandwidth / latency to the AppEngine instances? Or is this no matter of concern at all?
Another question, does Google Cloud have a kind of internal DNS, which can be used? So for example that we have a domainname like "ourmongodb.internal" which can be used in connection string of our REST API? Or how is the most recent approach to connect to our DB server instance?
If you use app engine flex you can setup your nodejs app engine server and the GCE VMs that run the mogoDB cluster in the same network and than connect them both in the internal IP space.

How do I connect to Google Cloud SQL using SSH

How do I connect to Google Cloud Platform, specifically Cloud SQL, using SSH? I’m using Tera Term and can’t seem to get in. Maybe I’m just using the wrong host, port, password or configuration settings. I’ve tried several combinations.
I can connect to my Google Cloud SQL instance using MySQL workbench, so I’m pretty sure I’ve configured the Cloud SQL Access Controls correctly.
Cloud SQL provides a managed MySQL endpoint and not a virtual machine in which you can SSH into.

Resources