-
Notifications
You must be signed in to change notification settings - Fork 25
add ray on yarn project #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| Prerequisites | ||
| ============= | ||
|
|
||
| 1. Yarn app of Ray is run under the Hadoop environment version 2.8.0. | ||
| You can get the Hadoop binary from | ||
| `here <http://archive.apache.org/dist/hadoop/common/hadoop-2.8.0/hadoop-2.8.0.tar.gz>`__. | ||
|
|
||
| Walkthrough | ||
| =========== | ||
|
|
||
| Yarn environment and configuration | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| Firstly, you should have an available hadoop yarn environment and | ||
| configuration. | ||
|
|
||
| Prepare ray on yarn jar file | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| .. code:: shell | ||
|
|
||
| $ make clean package | ||
|
|
||
| Prepare deploy zip file | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| .. code:: shell | ||
|
|
||
| $ cd deploy | ||
| $ zip -r deploy.zip . | ||
|
|
||
| Please modify the script 'deploy/run.sh' on-demand. | ||
|
|
||
| Run | ||
| ^^^ | ||
|
|
||
| .. code:: shell | ||
|
|
||
| $ /path/to/hadoop-2.8.0/bin/yarn jar ./target/ray-on-yarn-1.0.jar org.ray.on.yarn.Client --jar ./target/ray-on-yarn-1.0.jar --rayArchive ./deploy/deploy.zip --containerVcores 2 --containerMemory 2048 --priority 10 --shellCmdPriority 10 --numRoles 1 1 --queue ray --headNodeStaticArgs "'--num-cpus 4 --num-gpus 4'" --workNodeStaticArgs "'--num-cpus 2 --num-gpus 2'" | ||
|
|
||
| Please modify the command line on-demand. Some detail about the input | ||
| args is in the help doc. | ||
|
|
||
| .. code:: shell | ||
|
|
||
| /path/to/hadoop-2.8.0/bin/yarn jar ./target/ray-on-yarn-1.0.jar org.ray.on.yarn.Client --help | ||
|
|
||
| Monitoring | ||
| ^^^^^^^^^^ | ||
|
|
||
| Please check the logs depend on your yarn platform. | ||
|
|
||
| Stop | ||
| ^^^^ | ||
|
|
||
| .. code:: shell | ||
|
|
||
| $ /path/to/hadoop-2.8.0/bin/yarn application -kill {app_id} | ||
|
|
||
| ``{app_id}`` shall be replaced by the ID of the corresponding Yarn | ||
| application, e.g. ``application_1505745052163_0107``. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #! /bin/sh | ||
| echo "######## The script running... ########" | ||
| echo "input args are:" | ||
| for arg in "$@" | ||
| do | ||
| echo " " $arg | ||
| done | ||
| # Please add your shell | ||
| ray start "$@" | ||
| echo "######## End of sleep ... ########" | ||
| sleep 1h | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <groupId>org.ray</groupId> | ||
| <artifactId>ray-on-yarn</artifactId> | ||
| <version>1.0</version> | ||
|
|
||
| <properties> | ||
| <hadoop.version>2.8.0</hadoop.version> | ||
| <maven.compiler.source>1.8</maven.compiler.source> | ||
| <maven.compiler.target>1.8</maven.compiler.target> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.apache.hadoop</groupId> | ||
| <artifactId>hadoop-yarn-common</artifactId> | ||
| <version>${hadoop.version}</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.hadoop</groupId> | ||
| <artifactId>hadoop-common</artifactId> | ||
| <version>${hadoop.version}</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.apache.hadoop</groupId> | ||
| <artifactId>hadoop-yarn-client</artifactId> | ||
| <version>${hadoop.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.hadoop</groupId> | ||
| <artifactId>hadoop-yarn-common</artifactId> | ||
| <type>test-jar</type> | ||
| <version>${hadoop.version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <pluginManagement> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-checkstyle-plugin</artifactId> | ||
| <version>2.17</version> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.puppycrawl.tools</groupId> | ||
| <artifactId>checkstyle</artifactId> | ||
| <version>6.19</version> | ||
| </dependency> | ||
| </dependencies> | ||
| <executions> | ||
| <execution> | ||
| <id>validate</id> | ||
| <phase>validate</phase> | ||
| <goals> | ||
| <goal>check</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| <configuration> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may need add the style check to CI, you could have a look at test.sh under java package.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And whether we could add some unit test case, which prove the code of deploy on yarn is working, and bind to CI.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test case is to hard to implement, because we need an available hadoop and yarn env. Maybe we can improvement that later?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. |
||
| <configLocation>../../java/checkstyle.xml</configLocation> | ||
| <encoding>UTF-8</encoding> | ||
| <consoleOutput>true</consoleOutput> | ||
| <failsOnError>false</failsOnError> | ||
| <failOnViolation>false</failOnViolation> | ||
| <violationSeverity>warning</violationSeverity> | ||
| <format>xml</format> | ||
| <format>html</format> | ||
| <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile> | ||
| <linkXRef>false</linkXRef> | ||
| </configuration> | ||
| </plugin> | ||
| </plugins> | ||
| </pluginManagement> | ||
| </build> | ||
| </project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether we need the sub directory deploy, is it ok just put the file of run.sh under the "devops/yarn" directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there will be any other resource in the sub directory deploy. So we need this.