-
Notifications
You must be signed in to change notification settings - Fork 80
Migrating a Roxy project to ml gradle
Version 2.9.0 of ml-gradle includes support for migrating a Roxy project into a Gradle project. More support will be provided in future release, but what's supported in 2.9.0 is described below.
First, running "gradle tasks" shows the following new group of tasks in 2.9.0:
Ml-gradle Roxy tasks
--------------------
mlRoxyMigrateBuildSteps - Migrate build steps from deploy/app_specific.rb into custom Gradle tasks. Use -ProxyProjectPath to define the location of your Roxy project, and -PappSpecificPath to define a path other than deploy/app_specific.rb
mlRoxyMigrateFiles - Migrate Roxy source files into this Gradle project. Use -ProxyProjectPath to define the location of your Roxy project.
mlRoxyMigrateProject - Run all tasks for migrating a Roxy project into this Gradle project. Use -ProxyProjectPath to define the location of your Roxy project.
mlRoxyMigrateProperties - Migrate Roxy properties into the gradle.properties file in this project. Use -ProxyProjectPath to define the location of your Roxy project.
Note that the command-line property "roxyProjectPath" is required for all of the tasks. The design is that you have your Roxy project in one directory, and your build.gradle file in a separate directory. But this is not required - you can add a build.gradle file to your Roxy project and use a value of "." for roxyProjectPath.
The simplest thing to run then is "mlRoxyMigrateProject", which runs every other task:
gradle mlRoxyMigrateProject -ProxyProjectPath=/path/to/roxy/project
You can also run each task individually too, if you want to proceed more carefully and examine the output of each task before invoking another one:
gradle mlRoxyMigrateFiles -ProxyProjectPath=/path/to/roxy/project
gradle mlRoxyMigrateBuildSteps -ProxyProjectPath=/path/to/roxy/project
gradle mlRoxyMigrateProperties -ProxyProjectPath=/path/to/roxy/project
There are no dependencies between these tasks, so you can run them in any order.
Each section below provides more information on how each task works.
Here's an overview of the steps that will the tickets for Roxy migration will cover:
- Resources (e.g. databases, app servers, users) will be migrated by exporting them via the Manage API from an already-deployed Roxy application. This avoids trying to map the Roxy config file to Manage API payloads.
- Roxy properties will be mapped to Gradle properties and copied into gradle.properties
- ML module files will be copied from the Roxy project into the appropriate directories in the Gradle project
- Custom Roxy tasks in app_specific.rb will be copied into build.gradle as custom Gradle tasks
- Any manual steps that must be performed will be documented (e.g. when a user is exported, its password is not included, so the password will need to be added manually)
In addition, support is planned for running Roxy tests from Gradle, though this is a separate effort from migrating a Roxy project and may not be supported in the same release.