I am looking a way to browse my Cloud Foundry Mongodb services. Look like there are two options:
Tunneling to a Cloud Foundry Service with Caldecott http://docs.cloudfoundry.com/tools/vmc/caldecott.html. I never tried this but I guess it may work.
My question is this: Is it possible to connect directly into Cloud Foundry from Mongodb Admin GUI such as mViewer or Mongovue? But if so, how do I know the username/password in process.env.VCAP_SERVICES['mongodb-1.8'][0]['credentials']?
https://github.com/Imaginea/mViewer
http://www.mongovue.com/2011/08/04/mongovue-connection-to-remote-server-over-ssh/
By using the GUI client you have to get a tunnel to the service. Once you open it in a CLI console the connection info will be generated and displayed, including the host address, usually 127.0.0.1, port number, username and password. You cannot connect using the values from VCAP_SERVICES if you try to do that from outside environment because these will be local values behind the CF router.
You need to create a tunnel using Caldecott.
See http://docs.cloudfoundry.com/tools/vmc/caldecott.html.
When you open the tunnel, it should provide you with either a command line client, or the credentials to use.
In case it does not, create a piece of code that returns a dump of process.env.VCAP_SERVICES when visit a certain url on your server.
Related
I'm currently building a website that I would like to privately host so it can only be used internally. My goal is to store file uploads into a google cloud bucket then document certain things into a cloud sql db for filtering later on.
I've been able to store and pull my files from a bucket and I was also able to set up my database in cloud sql however I'm not totally sure how to send SQL query's to my database from my website. I've tried going through the documentation but I'm a bit lost as to what I need. So if anyone knows what I should be looking at that would be a lot of help. Anything like a guide on the google documentation, because I'm not sure which I need to follow or anything.
Additional information
Currently my website is hosted locally because I haven't decided on a
website hosting service yet any recommendations would be helpful.
I was using a postgres database as practice for creating endpoints and developing my database
structure.
I am using a PERN stack so postgres, express, react and node.js
If there's anything else you would like specified I'm more then happy to provide any additional information.
Update:
I was able to connect my postgres db to cloudsql. I would explain how but this video does a great job of it.
How to connect psql db to cloud sql
However I'm running into an issue when I try to connect using an SSL connection. I have the files my only issue is I don't know where to store these files.
The general recommendation is to use the Cloud SQL Auth Proxy to connect to your Cloud SQL instance.
Basically you'd run the proxy wherever you're running your webapp and then have your webapp connect to the proxy as if it were a local database.
You'll start the proxy like this:
./cloudsql_auth_proxy -instances=<INSTANCE_CONNCECTION_NAME>=tcp:5432
That will start a listener on 5432 on localhost that you can connect your webapp to.
Alternatively, you could use Authorized Networks to allow-list the IP address of the machine where your app runs.
Check out the docs here: https://cloud.google.com/sql/docs/postgres/connect-overview.
I am new to Cloud and looking to cut down cost on Azure. I already have a database on the hostinger platform and would like to use it for the python script that I want to run on the Azure Logic Apps platform. Is it possible to do this or does Azure prevent any such connections? Do I need to create any connector on Azure for this purpose? I have no idea of running python script on Azure. If this is possible then it can be a great cost cutting measure for me.
One of the workarounds is you can try using Remote MySQL from the Databases of the Hostinger platform.
Type the IP address of your remote server in the IP (IPv4 or IPv6) area on the Remote MySQL page, or check the Any Host box to connect from any IP.
Then choose the database you wish to access from afar. Click Create when you're finished.
Make sure that a MySQL user must use their MySQL server hostname for remote connections - the hostname may be found at the top of the same page.
You may now use the same connection to make your own logic app connector and utilize the same connector for additional database manipulations.
would like to use it for the python script that I want to run on the Azure Logic Apps platform.
Depending on your requirements, you may utilize a variety of connectors for this. For example following the custom connector that you are using to retrieve the database from your hostinger, you can use azure functions in order to while coding with python.
For more information, you can refer to this example.
REFERENCES:
How to Allow Remote Connections to MySQL Database (hostinger.in)
I'm quite new to setting up the config for servers.
I want to have a user connect my Linux server, I'm using AWS to host the virtual machine. I cannot find anywhere to do this without using the public key. I want the user to just have to enter a username and password.
Any help would be appreciated!
Why the user will connect your server? Is for database operations or something? If it is for database operations, you can use an API for this. A direct user connection to server is not a good thing. If you want to connect your server for configurations, you can use ssh to connect to your server.
I am a newbee to Google Cloud, however, I setup the project based on Standard App Engine based for my Node.JS application. I downloaded the code from GIT and able to deploy. In my code, it tries to make a Mongo connection to my Replication Server that is hosted at Atlas MongoDB (I guess it's on AWS EC2 instance). I have access control enabled so only server to server with known IPs can connect to my MongoDB.
Obviously I was expecting the connection from my freshly deployed app to fail. So to remediate I want to add the external IP of the instance from Google Cloud (whatever is the Public IP that is seen) to Mongo Network Access. I tried a few IP address I thought are the right ones but it's not working. I see the connection is trying to make to Atlas but it's failing because I am not sure what Public IP address is seen from AppEngine (Docker Instance?)where my app is running.
I tried 0.0.0.0/0 - open to all clients and my app works just fine, however I definitely don't want to open MongoDB access to entire world. If anybody knows more about Google Cloud please help.
Thanks in advance for replying if you have important info to share.
Google App Engine doesn't have an External/Static IP that you can refer. This can be achieved by using a VM on Google Compute Engine that has an External IP with proxy to your App Engine.
Besides that, there is a Feature Request open for this to be checked by Google that you can access here:
Provide static IP for outbound urlfetch requests
Besides that, you can access the documentation Static IP Addresses and App Engine apps, to find out more information on options already available on App Engine.
Please, let me know if the information helped you.
I am trying to setup OrientDb instance under Azure. I followed the procedure documented at OrientDB website (OrientDB Community Edition 2.0.10). I was able to setup the instance as described. After setting up all I could do is to ssh to the instance using the username:db as mentioned in the document (well I could have used any name, but for simplicity I followed word to word from the doc). I couldn't find information on user:root or user:orientdb (and a few other users and groups) that were part of this image. Additional users/groups are available in /etc/passwd. I am unable to get access to those users/groups. I am unable to find the documentation.
I tried to connect to the OrientDb web interface http://10.0.0.4:2480 (hosted on internal network interface within Azure region) and it doesn't even allow me to create db or login. It keeps asking for the username and password which I dont know (not documented).
Anyone know where can I found additional documentation/help on this image.
I can always setup a plain linux OS, install java and setup orient-db and configure it to use azure storage (bound as local disk storage). As much as possible, I would like to use the image provided by the orient-db team as I think it would come with recommended configuration.
I want to host/run a clustered orientdb instance on Azure. Any help is appreciated
You'll need to ssh to the virtual machine using the username and password that you specified when you created the Azure instance.
To obtain the credentials for Studio, Pabzt is right, just take a look at the sections of orientdb-server-config.xml and look for the root user. Its password will be auto-generated. You can change this.
Pabzt, regarding accessing Studio, you might make sure the OrientDB instance is still runnning:
sudo systemctl status orientdb
Usually, ports 22 and 2480 are open by default in the OrientDB Azure image. So, it's strange you can't access it.
I had the same problem today. You could connect using ssh. The default password and username can be found in the "orientdb-server-config.xml":
/opt/orientdb/config/orientdb-server-config.xml
The only thing i can't do is accessing the OrientDB Studio. While i can connect to the public ip address of the vm using ssh, i cant open the OrientDB Studio on port 2480 using the same public ip address. I tried adding an inbound securty rule in the network security settings for the orientdb vm but that didn't help. Still can't connect.
EDIT 22.10.2015 21:00
But I'm sure the password and username is working (from "orientdb-server-config.xml"), because i tried using the binary protocol on port 2424 with the "official .Net Driver" for OrientDB in a client application written in C#, and they worked. I was able to connect and create a new Database. Also i was able to access the default database: "GratefulDeadConcerts". I used the same public ip address that i used to connect via ssh.
I compared the OrientDB VM created by the image from the azure marketplace and couldn't find the option to set Endpoints (Azure VM Settings). All my other Azure VMs have this option in the Azure VM Settings. I always used the Endpoint settings to open ports on the virtual machines i have. It seems that i can only use the Endpoints for ssh and port 2424. Maybe those are the ones which are open by default. Any Ideas?
EDIT 23.10.2015 14:00 Uhr
Okay i found the solution, the OrientDB image from the azure marketplace works. I just added a new securty rule that allows connections from any port (*) to port 2480 (OrientDB Studio) and now it works.
I had this problem and realized I had missed something. On Azure go to All Resources, click on the Network Security Group for your server, and add an Inbound Security Rule allowing TCP port 2480. I didn't have to add anything using iptables on the server even though 2480 is not listed there. I hope this helps someone else.
The endpoints, by default are set to 22 and 2480. Strange that you had to set 2480 to * for incoming. But I'm glad you got it to work!
The root in the orientdb-server-config.xml is just for OrientDB and is not related to the system root account.
You should be able to sudo as the system username that you specified when you created the Azure VM. If you can sudo commands you should be able to change the system root password as well.