Skip to content
dmitri-carpov edited this page Jul 17, 2012 · 8 revisions

Overview

Scenario example

$ rays new abc_portal - create project

$ cd abc_portal

setup liferay server(s) and environments

$ rays point abc_portal - remember project directory

$ rays g portlet dashboard - generate portlet

$ rays g hook translations - generate hook

$ rays g servicebuilder sales - generate service builder

write code for modules (projects are maven based by default)

$ rays env local - switch to local environment (assume liferay is running on localhost)

$ rays deploy - deploy all modules to liferay server

$ rays liferay start - start server

$ rays liferay log - to see logs

Features

  1. Create or init rays project
  2. Environments
  3. Generate liferay modules (portlet, hook, service builder, layout, theme, ext plugin ...)
  4. Deploy modules to current environment
  5. Manage environment servers
  6. Copy a remote environment to local (useful for developers)
  7. Use other nice features

Create or init rays project

Create $ rays new <project name> Turn current directory to rays project $ rays init

Project name and artifactId will be the same as project root directory name. rays init scans current directory for: portlets/, hooks/, services/, layouts/, themes/, ext/ trying to find modules.

Setup project properties

Edit <project root>/config/project.yml for:

  • Project name

Note: don't use special characters, it will be used as artifactID for maven

  • Liferay version
  • Project package (for maven)

Environments

Environment it's a set of properties which point to

  • host and port of liferay
  • path to deploy and data directories
  • path to liferay application service (also start, debug and stop commands must be provided)
  • ssh host, port, username for liferay server if it's a remote environment.

Recommendation: ssh auth method should be based on keys not username/password, thus ssh <user>@<liferay server> should login w/o password.

  • database connection information (host, port, type, name, username, password)
  • Optional: solr server configuration (host, port, path to AS).

There is a sample content of the environment.yml, which is created automatically.

Manage environments

  • to create/edit/delete environments edit <project root>/config/environments.yml
  • to see current environment execute $ rays env
  • to see all environments execute $ rays env --list
  • to switch between environments execute $ rays env <environment name>

Clone this wiki locally