2.7 KiB
Installing Dragonfly Scheduler Server
This topic explains how to install the Dragonfly scheduler server.
Context
Install scheduler in one of the following ways:
- Deploying with Docker: Recommended for production usage.
- Deploying with physical machines.
Prerequisites
When deploying with Docker, the following conditions must be met.
| Required Software | Version Limit |
|---|---|
| Git | 1.9.1+ |
| Docker | 1.12.0+ |
When deploying with physical machines, the following conditions must be met.
| Required Software | Version Limit |
|---|---|
| Git | 1.9.1+ |
| Golang | 1.12.x |
| Nginx | 0.8+ |
Procedure - When Deploying with Docker
Get scheduler image
You can get it from DockerHub directly.
-
Obtain the latest Docker image of the scheduler.
docker pull d7yio/scheduler
Or you can build your own scheduler image.
-
Obtain the source code of Dragonfly.
git clone https://github.com/dragonflyoss/Dragonfly2.git -
Enter the project directory.
cd Dragonfly2 -
Build the Docker image.
TAG="1.0.0" make docker-build-scheduler D7Y_VERSION=$TAG -
Obtain the latest Docker image ID of the scheduler.
docker image ls | grep 'scheduler' | awk '{print $3}' | head -n1
Start scheduler
NOTE: Replace ${schedulerDockerImageId} with the ID obtained at the previous step.
docker run -d --name scheduler --restart=always -p 8002 ${schedulerDockerImageId}
Procedure - When Deploying with Physical Machines
Get scheduler executable file
-
Download a binary package of the scheduler. You can download one of the latest builds for Dragonfly on the [github releases page](https://github. com/dragonflyoss/Dragonfly2/releases).
version=1.0.0 wget https://github.com/dragonflyoss/Dragonfly2/releases/download/v$version/Dragonfly2_$version_linux_amd64.tar.gz -
Unzip the package.
# Replace `xxx` with the installation directory. tar -zxf Dragonfly2_1.0.0_linux_amd64.tar.gz -C xxx -
Move the
schedulerto yourPATHenvironment variable to make sure you can directly useschedulercommand.
Or you can build your own scheduler executable file.
-
Obtain the source code of Dragonfly.
git clone https://github.com/dragonflyoss/Dragonfly2.git -
Enter the project directory.
cd Dragonfly2 -
Compile the source code.
make build-scheduler && make install-scheduler
Start scheduler
scheduler --options
After this Task
-
After scheduler is installed, run the following commands to verify if scheduler is started, and if Port
8002is available.telnet 127.0.0.1 8002