質問

In fact, I'm trying to see which would be the best approach to achieve play framework native support on openshift.

Play has it's own http server developed with netty. Right now you can deploy a play application to openshift, but you have to deploy it as a war, in which case play uses Servlet Container wrapper.

Being able to deploy it as a netty application would allow us to use some advanced features, like asynchronuos request.

Openshift uses jboss, so this question would also involve which would be the recommended approach to deploy a netty application on a jboss server, using netty instead of the servlet container provided by jboss.

Here is request for providing play framework native support on openshift There's more info there, and if you like it you can also add your vote ;-)

役に立ちましたか?

解決

Start with creating 'raw-0.1' application.

SSH into the server and

cd $OPENSHIFT_DATA_DIR

download and install play into a directory here. $OPENSHIFT_DATA_DIR is supposed to survive redeploys of your application.

Now you can disconnect from SSH.

Clone the application repository. In the repository, there is a file .openshift/actions_hooks/start. It's task is to start the application using a framework of your choice. The file will need to contain at least (from what I know about Play)

cd $OPENSHIFT_REPO_DIR
$OPENSHIFT_DATA_DIR/play-directroy/play run --http.port=$OPENSHIFT_INTERNAL_PORT --some-other-parameters

Important

  • You have to bind to $OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT. Trying to bind to different interface is not allowed, also most of the ports are blocked.

  • To create some sort of template, save the installation steps into .openshift/action_hooks/build file. Check if play is installed, if it is do nothing, if it's not, execute the installation process.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top