2016-11-08 5 views
0

GPUリソ​​ースをサポートするフレームワークは、MarathonとAuroraの2つです。私は、GPUリソ​​ースを備えたメソスエージェント上でバッチジョブを起動したいと思います。ですから、オーロラだけがその種の仕事をサポートしています。しかし、オーロラは現時点で公式にdcosによってサポートされていません。私は統合しようとしましたが成功しませんでした。 DCOS MesosのマスターはAuroraフレームワークを登録しませんが、出展者はAuroraのレコードを作成します。私は、メソスのマスターログでオーロラについての記録を見つけることはできませんでした。ここにオーロラスケジューラの設定があります:ApacheのAuroraとdcosの統合

#!/bin/bash 

GLOG_v=0 
LIBPROCESS_PORT=8083 
#LIBPROCESS_IP=127.0.0.1 

JAVA_HOME=/opt/mesosphere/active/java/usr/java 

JAVA_OPTS="-server -Djava.library.path='/opt/mesosphere/lib;/usr/lib;/usr/lib64'" 

PATH=$PATH:/opt/mesosphere/bin 

MESOS_NATIVE_JAVA_LIBRARY=/opt/mesosphere/lib/libmesos.so 

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mesosphere/lib 

JAVA_LIBRARY_PATH=$JAVA_LIBRARY_PATH:/opt/mesosphere/lib 

# Flags control the behavior of the Aurora scheduler. 
# For a full list of available flags, run /usr/lib/aurora/bin/aurora-scheduler -help 
AURORA_FLAGS=(
    # The name of this cluster. 
    -cluster_name='My Cluster' 

    # The HTTP port upon which Aurora will listen. 
    -http_port=8088 

    # The ZooKeeper URL of the ZNode where the Mesos master has registered. 
    -mesos_master_address=zk://master_ip1:2181,master_ip2:2181,master_ip3:2181/mesos 

    # The ZooKeeper quorum to which Aurora will register itself. 
    -zk_endpoints=master_ip1:2181,master_ip1:2181,master_ip1:2181 

    # The ZooKeeper ZNode within the specified quorum to which Aurora will register its 
    # ServerSet, which keeps track of all live Aurora schedulers. 
    -serverset_path='/aurora/scheduler' 

    # Allows the scheduling of containers of the provided type. 
    -allowed_container_types='DOCKER,MESOS' 

    -allow_docker_parameters=true 
    -allow_gpu_resource=true 
    -executor_user=root 
    ### Native Log Settings ### 

    # The native log serves as a replicated database which stores the state of the 
    # scheduler, allowing for multi-master operation. 

    # Size of the quorum of Aurora schedulers which possess a native log. If running in 
    # multi-master mode, consult the following document to determine appropriate values: 
    # 
    # https://aurora.apache.org/documentation/latest/deploying-aurora-scheduler/#replicated-log-configuration 
    -native_log_quorum_size=2 
    # The ZooKeeper ZNode to which Aurora will register the locations of its replicated log. 
    -native_log_zk_group_path='/aurora/replicated-log' 
    # The local directory in which an Aurora scheduler can find Aurora's replicated log. 
    -native_log_file_path='/var/lib/aurora/scheduler/db' 
    # The local directory in which Aurora schedulers will place state backups. 
    -backup_dir='/var/lib/aurora/scheduler/backups' 

    ### Thermos Settings ### 

    # The local path of the Thermos executor binary. 
    -thermos_executor_path='/usr/bin/thermos_executor' 
    # Flags to pass to the Thermos executor. 
    -thermos_executor_flags='--announcer-ensemble 127.0.0.1:2181') 
+0

実際にDC/OSでAuroraを実行しようとしている人は誰も聞いたことがありません。だから、あなたが最初かもしれない。メトロノームがGPUリソ​​ースをサポートするように計画されていますが、現実的には数ヶ月以内には実現しないでしょう。 – KarlKFI

答えて

1

DC/OS 1.8でオーロラフレームワークを開始できました。 mesosとjavaのためDS/OSに組み込まれており、特に私はドッカーとオーロラを分離する必要があります、パスをカスタム設定しています。だから、私のドッカーのレポで、オーロラのコンポーネントのドッカー画像を見つけることができます:Aurora schedulerAurora executor。これにより、私または他の人がユニバースパッケージを作成することもできます。 DC/OS上でオーロラスケジューラを展開するための

ステップ:

  1. は、DC/OSエージェントのそれぞれのフォルダ/var/lib/auroraを作成

  2. スタート次を使用して、すべてのDC/OSエージェントのオーロラキュータJSON:

    { 
        "id": "/aurora/aurora-executor", 
        "env": { 
        "MESOS_ROOT": "/var/lib/mesos/slave" 
        }, 
        "instances": 20, 
        "cpus": 1, 
        "mem": 128, 
        "disk": 0, 
        "gpus": 0, 
        "constraints": [ 
        [ 
         "hostname", 
         "UNIQUE" 
        ] 
        ], 
        "container": { 
        "docker": { 
         "image": "krot/aurora-executor", 
         "forcePullImage": true, 
         "privileged": false, 
         "network": "HOST" 
        }, 
        "type": "DOCKER", 
        "volumes": [ 
         { 
         "containerPath": "/var/lib/mesos/slave", 
         "hostPath": "/var/lib/mesos/slave", 
         "mode": "RW" 
         }, 
         { 
         "containerPath": "/var/lib/aurora", 
         "hostPath": "/var/lib/aurora", 
         "mode": "RW" 
         } 
        ] 
        } 
    } 
    

    注意。"instances"をエージェントの数に設定します。

    2a。オーロラエグゼキュータの展開の代替方法は、(DCのそれぞれで行われるべき/ OSエージェント):

    sudo yum install -y python2 wget 
    wget -c https://apache.bintray.com/aurora/centos-7/aurora-executor-0.16.0-1.el7.centos.aurora.x86_64.rpm 
    rpm -Uhv --nodeps aurora-executor-0.16.0-1.el7.centos.aurora.x86_64.rpm 
    

    のようなものが得られ--mesos-rootフラグを追加、編集を行います。

    grep -A5 OBSERVER_ARGS /etc/sysconfig/thermos 
    OBSERVER_ARGS=(
        --port=1338 
        --mesos-root=/var/lib/mesos/slave 
        --log_to_disk=NONE 
        --log_to_stderr=google:INFO 
    ) 
    
  3. スタート

    { 
         "id": "/aurora/aurora-scheduler", 
         "env": { 
         "CLUSTER_NAME": "YourCluster", 
         "ZK_ENDPOINTS": "master.mesos:2181", 
         "MESOS_MASTER": "zk://master.mesos:2181/mesos", 
         "QUORUM_SIZE": "2", 
         "EXTRA_SCHEDULER_ARGS": "-allow_gpu_resource=true" 
         }, 
         "instances": 3, 
         "cpus": 1, 
         "mem": 1024, 
         "disk": 0, 
         "gpus": 0, 
         "constraints": [ 
         [ 
          "hostname", 
          "UNIQUE" 
         ] 
         ], 
         "container": { 
         "docker": { 
          "image": "krot/aurora-scheduler", 
          "forcePullImage": true, 
          "privileged": false, 
          "network": "HOST" 
         }, 
         "type": "DOCKER", 
         "volumes": [ 
          { 
          "containerPath": "/var/lib/aurora", 
          "hostPath": "/var/lib/aurora", 
          "mode": "RW" 
          } 
         ] 
         } 
    } 
    

    注:次のJSONを(3つの以上のインスタンスは、フォールトトレランスのために推奨されている)を使用して、オーロラスケジューラ。-allow_gpu_resource=trueは、GPUサポートを有効にします。 Auroraスケジューラは、環境変数を使用して構成できます。詳細は、documentationを参照してください。

+0

ニース。 [DCOSユニバース](https://github.com/mesosphere/universe)にプッシュしてください。 – janisz

関連する問題