connection between postgresql db and application(jsf+hibernate) running on cloudfoundry - database

The application(JSF+hibernate) is been deployed using the vmc commands as on the cloudfoundry site. able to see the welcome page. postgreSQl service is binded with the application but the application is not able to connect with the database.
And also viewed about the VCAP_SERVICES using java but dont know much about it rather how to create it.

Cloud Foundry uses auto-reconfiguration if you have one service (either MySQL or Postgres) bind to your application. That means you don't need to touch your code at all!
Please review the following article on our docs site:
http://docs.cloudfoundry.com/frameworks/java/spring/spring.html#using-cloud-foundry-services-in-spring-applications
If you still have issues, go ahead and upload a war file of your app and we can take a look.

Related

How to deploy zeppelin application to the server?

I have a zeppelin application running on my local host.I want to deploy it to server. As I am a beginner I don't know the procedure to deploy. If any one have deployed zeppelin to server can you please describe the procedure for it ?
I have checked online source and official tutorial but I am not able to get the steps for its deployment.
What do you mean by application? Are you just talking about a notebook you created? If so you can simply export the notebook (from the menu in the notebook itself) and import it into the server instance (using import notebook from the splash screen) if it is a vanilla instance.
You will have to make sure the correct interpreter is available and set.
Unless there is something special about the local instance you have deployed, it would be easiest to just deploy it separately to the server using something like Docker.
https://zeppelin.apache.org/docs/0.7.3/install/docker.html
Perhaps you can clarify what it is you are trying to do.

Ionic app connection to SQL Server database

Basically I have a mobile app that I am building in Ionic (3 I believe). I have a website that I built a while back in C# using Visual Studio. The site is attached to a SQL Server database. This Ionic app I am creating is to go along with said website.
My question is how do I connect my app to the same database. I'm very new to Ionic and I cannot seem to find any answers online. I have found some vague SQLite stuff but that is about it.
Not necessarily looking for specific answers in code (although I wouldn't say no). If someone could even breakdown the steps I'd need to take then I can go and research it myself.
Thanks in advance
You can connect to mysql database with your ionic app using Webservice in c#.There is no need of SQLite for connecting your app to sql database.It can be used as local storage instead.Ionic use json data to access.So the data you retrieve from Webservice must be Json.
It depends
Do you wish to directly access SQL database from your ionic app or you want to have access to the database via api.
1. Directly connect to SQL database from ionic application using Cordova plugin.
Follow this link for more info -1

Creating a local environment from an existing GAE installation

I have a website that is currently running under GAE... unfortunately, I, nor anyone on the team, does not have access the local environment that it was created from.... Is it possible to create a local environment or at least get a copy of the application files and database from an existing GAE installation?
What you need is the application source code, not the "local environment".
Ideally this source code would be on a version control system (ie GIT,SVN), Google cloud platform provides free GIT repositories for your projects so you might try looking there first. There's also a tool for both Java and python that allow you to download the source of a deployed version, provided you are authenticated as either the dev who uploaded it or a project owner. EDIT: as stated by Dan Cornilescu this feature can be disabled.
As for the database info there's plenty of tools available to "export" your GAE datastore info, just consider for your project that it might be easier to do the queries manually than actually implementing this tools.
Thanks for help... But unfortunately, this code is not in GIT. Furthermore,
being new to Google hosting, I wasn't clear on my setup... My web instance is actually running within Compute Engine not Application Engine. Be that as it may, with some additional search, I was first able to find out how to browse my filesystem by accessing the VM Instances menu option under the Compute Engine section of the Google Cloud Platform interface. On the VM Instances page, it will show your instance and an option to the left side of the instance to connect with a drop down box that will allow you to open a browser window that shows the instance's file system. In addition to this, I found this link https://www.youtube.com/watch?v=9ssfE6ODpak that shows how to configure Filezila FTP client to access your server instance - very helpful. From there, I was able to download all of my site files from the var/www directory. Now, onto extracting my data... Thanks again!

How to export a project from IBM Bluemix PaaS to anywhere else as a Docker?

I lead a web/mobile project and I still need to know the tools we will be using for development.
We have a 6 months access to IBM Bluemix, and its security check tools, CloudFoundry, and others may appear really useful.
However, we don't want to rely on a solution that would trap our project without any possibility of migration if needed.
I looked up on the internet how to export a project from Bluemix as a docker, with elements created from IBM. I didn't find anything relevant (I might be bad at googling, but all I can find is "how to export to Bluemix/how to work locally").
Does Bluemix allow to export the entire project onto another hoster, does it depend on the services we used in the project ?
Thank you in advance.
If you package your application in a container you can run it on any provider that supports Docker. That could be another cloud, in a local datacenter or on your own laptop.
If you are planning to use Bluemix services as part of that application then you will have two options if moving your application off Bluemix.
Keep using the services in Bluemix but connect to them remotely from wherever you're now hosting your appliaction. This will require internet connectivity and you'll have to hard code the service credentials in to your application (not good practice).
Migrate the services as well as the application. This will only be possible for the non-unique services IBM offer e.g. Redis, Mongo, Elasticsearch etc.. You'll need to refactor your application to accept the new provider of these services.
If your service/app is dockerized, and is being hosted as a container on Bluemix.
You can pull the container image of your service/app in your own docker enabled cloud or local environment. Following steps can be followed for the same:
install bluemix-container cli package https://www.ng.bluemix.net/docs/containers/container_cli_ov.html
do cf ic login using your bluemix credentials
check for your images using cf ic images command
pull the image in your environment using docker pull <image-registry-url>
run the container with required parameters using docker run
Hope it helps. Thanks.

How do I separate the RPC client and server so that the server runs on app engine and the client runs on my computer?

I'm very new to all this, so please bear with me. I just completed this tutorial on RPC in GWT. In the tutorial, you create a stockwatcher application that displays stock information. The application gets data from a server using RPC. I deployed the project to app engine and it works great.
Now I would like a separate, normal java project that runs on my computer and displays stocks that it retrieves from the app engine server using rpc. In the stockwatcher tutorial, there is a client and server package. I refactored the client package into a new project to start. I understand that I need to give it the appropriate url, but I'm not sure how to do that. The StockPriceService has the annotation #RemoteServiceRelativePath("stockPrices") so my first thought was to somehow change that to the correct app engine url. Is there an annotation that allows me to put in the entire url? If someone could point me in the direction of a tutorial that deals with this, I would greatly appreciate it.
THANK YOU!!! :)
Edit
I'm trying to make a client that will run on my computer, another client that will run on my phone, and a simple app engine server that will store some data. After doing the RPC tutorial, using RPCs seemed like a good way for me to send and receive data. I just don't know how to setup the RPC service across multiple projects.
Edit 2
I just saw this so I guess what I want to do isn't possible. I guess my new question is, what's the best way to send and receive data between app engine and a non-gwt project?
Pls see the following links
https://developers.google.com/appengine/docs/java/gettingstarted/
https://developers.google.com/web-toolkit/doc/1.6/tutorial/appengine
An appengine project will run your machine, you can really deploy it, but you need an account.

Resources