Anyone have experience using CloudFoundry with Grails?

I'm at the point with my Grails app that I want to deploy it on Amazon EC2 so that I can show it to people. I have little experience using EC2 “manually” to host other projects on the Internet, but I was hoping to find something that made the deployment cycle more manageable. In the steps of CloudFoundry.

I read the website and looked at the tutorials, and at first glance I like what I see. However, before I dedicated it to this, I wondered if any of you have any experience sharing with a coal face.

In particular, I'm going to deploy a MySQL database along with the application, and it is not clear what exactly you need to provide (SQL scripts?), And what is the best way to configure my project for deployment through CloudFoundry in order to configure the host name correctly. I also have a small number of standard lines that I insert into my BootStrap.groovy, and I wonder if this does something through deployment.

Finally, he is free at the moment, but they say they will start charging a fee later. Are there any open source alternatives that are best explored if CloudFoundry is expensive?

thanks

+6
amazon-ec2 grails cloudfoundry
source share
1 answer

I have little experience with CloudFoundry. They are so kind to sponsor the GR8Conf website deployed through their service. To configure SQL, it seems to me that a simple solution is to use the CloudFoundry plugin and type

  cloudFoundry.db.schemaName = "myName"

in the config / CloudFoundry.groovy file.

In your config / DataSource.groovy file, you should:

  production {
         dataSource {
             driverClassName = 'com.mysql.jdbc.Driver'
             dbCreate = "update"
             url = "jdbc: mysql: // localhost / myName" // or url = "jdbc: mysql: // $ {System.getProperty (" dbHostName "," localhost ")} / myName"
             dialect = 'org.hibernate.dialect.MySQLDialect'
             username = "myName_user"
             password = "myName_password"
         }
     }

(I got some of this information from: http://www.cloudfoundry.com/getting_started.html )

I do not think you need to provide additional SQL scripts. What you defined in your BootStrap will happen through deployment.

For the price, I have no ideas. I suggest you write their support to ask.

On the other hand: www.gr8conf.org website is not yet running on EC2, but I did not understand how to back up my database from EC2 to S3, and this is very important, because when the EC2 instance ends, everything in it lost if backup is not performed. / Søren

+2
source share

All Articles