-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
$ 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
- Create or init rays project
- Environments
- Generate liferay modules (portlet, hook, service builder, layout, theme, ext plugin ...)
- Deploy modules to current environment
- Manage environment servers
- Copy a remote environment to local (useful for developers)
- Use other nice features
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.
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)
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.
- 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>