-
Notifications
You must be signed in to change notification settings - Fork 139
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
Elastic job cloud example for DC/OS 1.9. #181
Open
haocao
wants to merge
3
commits into
dcos:master
Choose a base branch
from
haocao:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# How to use Elastic Job Cloud on DC/OS | ||
|
||
[Elastic-Job-Cloud](https://github.com/dangdangdotcom/elastic-job/) is a distributed scheduled job cloud solution designed with HA and fault-tolerance in mind. It focuses on horizontal scaling, and provides transient and daemon jobs, event and schedule based job triggers, job dependencies, and job history.. | ||
|
||
- Estimated time for completion: 10 minutes | ||
- Target audience: Developer and appops that want use distributed schedule job. | ||
- Scope: Install and usage of a distributed scheduled job scheduler for DC/OS. | ||
|
||
**Table of Contents**: | ||
|
||
- [Prerequisites](#prerequisites) | ||
- [Install Elastic Job Cloud](#install-elastic-job-cloud) | ||
- [Use Elastic Job Cloud](#use-elastic-job-cloud) | ||
- [Uninstall Elastic Job Cloud](#uninstall-elastic-job-cloud) | ||
|
||
## Prerequisites | ||
|
||
- A running DC/OS 1.9 cluster with 1 nodes with at least 256MB of RAM and 1 CPUs available in the cluster. | ||
- [DC/OS CLI](https://dcos.io/docs/1.9/usage/cli/install/) installed. | ||
|
||
## Install Elastic Job Cloud | ||
|
||
From Packages in Universe menu, find `elastic-job-cloud` and click install button: | ||
|
||
![Install from Universe](img/install.png) | ||
|
||
And wait for success message: | ||
|
||
![Install success](img/install-success.png) | ||
|
||
Alternatively, you can install from the command line, entering this command: | ||
|
||
```bash | ||
This DC/OS Service is currently in preview. There may be bugs, incomplete features, incorrect documentation, or other discrepancies. | ||
Continue installing? [yes/no] yes | ||
Installing Marathon app for package [elastic-job-cloud] version [2.1.4] | ||
Service installed. | ||
|
||
It is recommended to access this service through the endpoint created in Elastic-Job-Cloud. | ||
|
||
Default login: `root`/`root`. Agents must install jdk 1.7+ . | ||
``` | ||
|
||
Next, validate that elastic-job-cloud is successfully installed. Go to the `Services` tab of the DC/OS UI and check if elastic-job-cloud shows up in the list: | ||
|
||
![Services](img/services.png) | ||
|
||
![Service Log](img/service-log.png) | ||
|
||
In addition, run this command to view installed services: | ||
|
||
```bash | ||
$./dcos package list | ||
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. I think you mean |
||
NAME VERSION APP COMMAND DESCRIPTION | ||
elastic-job-cloud 2.1.4 /elastic-job-cloud --- Elastic-Job-Cloud is a distributed scheduled job cloud solution designed with HA and fault-tolerance in mind. It focuses on horizontal scaling, and provides transient and daemon jobs, event and schedule based job triggers, job dependencies, and job history. | ||
``` | ||
|
||
## Use Elastic Job Cloud | ||
|
||
Open the Elastic Job Cloud UI from the DC/OS UI via the `Open Service` button and flowing these steps for creating app and job. | ||
|
||
![Create new app](img/new-app.png) | ||
|
||
Note: app url needs to upload your business job tar file to an application server which can be downloaded by DC/OS. | ||
|
||
![Create new job](img/new-job.png) | ||
|
||
Finally, verify that our job ran successfully. Run the following CLI command to view all completed tasks: | ||
|
||
```bash | ||
$ dcos task --completed | ||
NAME HOST USER STATE ID | ||
test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2 192.168.65.111 root F test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2@-@78ad098c-966c-45ad-ac7f-b36fccbb0085 | ||
test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2 192.168.65.111 root F test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2@-@8b7db175-e173-4487-9c60-2d6c2fb8f06f | ||
test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2 192.168.65.111 root F test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2@-@b0d38385-b557-4563-82c9-7c9ddfbd2cf0 | ||
test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2 192.168.65.111 root F test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2@-@cb19c5bc-d7c6-48a9-b514-1a5f96eb00b8 | ||
``` | ||
Note that the `--completed` argument includes tasks that have completed their execution. | ||
|
||
To view the output of a task, copy one of the values under the `ID` column in the output of the previous command and use it as the argument to `dcos task log`: | ||
|
||
```bash | ||
$ dcos task log --completed test_job@-@0@-@READY@-@347c79bb-9605-4e03-a05a-0acb1188820c-S2@-@78ad098c-966c-45ad-ac7f-b36fccbb0085 | ||
Item: 0 | Time: 09:20:08 | Thread: 43 | SIMPLE | ||
Item: 2 | Time: 09:20:08 | Thread: 45 | SIMPLE | ||
Item: 1 | Time: 09:20:08 | Thread: 47 | SIMPLE | ||
Item: 1 | Time: 09:21:08 | Thread: 49 | SIMPLE | ||
Item: 0 | Time: 09:21:08 | Thread: 51 | SIMPLE | ||
Item: 2 | Time: 09:21:08 | Thread: 53 | SIMPLE | ||
Item: 1 | Time: 09:22:09 | Thread: 55 | SIMPLE | ||
Item: 0 | Time: 09:22:09 | Thread: 57 | SIMPLE | ||
Item: 2 | Time: 09:22:09 | Thread: 59 | SIMPLE | ||
``` | ||
|
||
You can also see the tasks log in DC/OS UI: | ||
|
||
![DC/OS Service Tasks Logs](img/tasks-log.png) | ||
|
||
## Uninstall Elastic Job Cloud | ||
|
||
To uninstall Elastic Job Cloud enter the following command: | ||
|
||
```bash | ||
$ ./dcos package uninstall elastic-job-cloud | ||
Uninstalled package [elastic-job-cloud] version [2.1.4] | ||
The Elastic-Job-Cloud DC/OS Service has been uninstalled and will no longer run. | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Select your DC/OS version: | ||
|
||
[1.9](1.9) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The CLI command is missing here.
dcos package install elastic-job-cloud