Skip to content

Instantly share code, notes, and snippets.

@dims
Last active June 18, 2019 09:07
Show Gist options
  • Select an option

  • Save dims/7ad86fb2ec12c91a4672 to your computer and use it in GitHub Desktop.

Select an option

Save dims/7ad86fb2ec12c91a4672 to your computer and use it in GitHub Desktop.

Revisions

  1. dims revised this gist Mar 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    zookeeper
    Deploy Zookeeper
    ---------------
    Save following as ~/zookeeper-3.4.8/conf/zoo.cfg
    ```
  2. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    Start ZooKeeper
    zookeeper
    ---------------
    Save following as ~/zookeeper-3.4.8/conf/zoo.cfg
    ```
    tickTime=2000
    dataDir=/var/zookeeper
    clientPort=2181
    ```
    Start zookeeper
    ```
    cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
  3. dims revised this gist Mar 25, 2016. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,15 @@
    Start ZooKeeper
    ---------------
    ````
    Save following as ~/zookeeper-3.4.8/conf/zoo.cfg
    ```
    tickTime=2000
    dataDir=/var/zookeeper
    clientPort=2181
    ```
    ```
    cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ````
    ```

    Start Mesos Master
    ------------------
  4. dims revised this gist Mar 25, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -65,6 +65,11 @@ CONTAINER ID IMAGE COMMAND CREATED
    c09b82a92895 python:3 "/bin/sh -c 'python3 " 9 seconds ago Up 8 seconds 0.0.0.0:31587->8080/tcp mesos-1affdefd-256a-466d-9c54-512b0a967832-S1.371f1432-515b-47dd-ace8-71eccfe57d0e
    ```

    Check Deployed Application:
    ```
    $ curl http://localhost:31587
    ```

    Notes
    -----
    - http://mesos.apache.org/gettingstarted/
  5. dims revised this gist Mar 25, 2016. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,12 @@ curl -X POST http://127.0.0.1:8080/v2/apps -d @basic-3.json -H "Content-type: ap
    curl http://localhost:8080/v2/apps | python -m json.tool
    ```

    Check Docker container:
    ```
    $ docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    c09b82a92895 python:3 "/bin/sh -c 'python3 " 9 seconds ago Up 8 seconds 0.0.0.0:31587->8080/tcp mesos-1affdefd-256a-466d-9c54-512b0a967832-S1.371f1432-515b-47dd-ace8-71eccfe57d0e
    ```

    Notes
    -----
  6. dims revised this gist Mar 25, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ Start Mesos Master
    ------------------
    ```
    cd ~/mesos/build/
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10.0.3:2181/mesos --quorum=1
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://127.0.0.1:2181/mesos --quorum=1
    ```

    Mesos Web UI : http://127.0.0.1:5050/
    @@ -25,7 +25,7 @@ Start Marathon
    --------------
    ```
    cd ~/marathon/
    sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/marathon
    sudo ./bin/start --master zk://127.0.0.1:2181/mesos --zk zk://127.0.0.1:2181/marathon
    ```

    Marathon Web UI : http://127.0.0.1:8080/
    @@ -54,7 +54,7 @@ Save the following into basic-3.json (Example from https://mesosphere.github.io/

    Use curl to deploy and monitor:
    ```
    curl -X POST http://10.0.0.3:8080/v2/apps -d @basic-3.json -H "Content-type: application/json"
    curl -X POST http://127.0.0.1:8080/v2/apps -d @basic-3.json -H "Content-type: application/json"
    curl http://localhost:8080/v2/apps | python -m json.tool
    ```

  7. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,8 @@ cd ~/marathon/
    sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/marathon
    ```

    Marathon Web UI : http://127.0.0.1:8080/

    Deploy Example Marathon App
    ---------------------------
    Save the following into basic-3.json (Example from https://mesosphere.github.io/marathon/docs/application-basics.html)
  8. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,8 @@ Start Mesos Master
    cd ~/mesos/build/
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10.0.3:2181/mesos --quorum=1
    ```
    Mesos Web UI : http://localhost:5050/

    Mesos Web UI : http://127.0.0.1:5050/

    Start Mesos Slave
    ------------------
  9. dims revised this gist Mar 25, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@ Start Mesos Master
    cd ~/mesos/build/
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10.0.3:2181/mesos --quorum=1
    ```
    Mesos Web UI : http://localhost:5050/

    Start Mesos Slave
    ------------------
  10. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,7 @@ sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/mara

    Deploy Example Marathon App
    ---------------------------
    Save the following into basic-3.json
    Save the following into basic-3.json (Example from https://mesosphere.github.io/marathon/docs/application-basics.html)
    ```
    {
    "id": "basic-3",
    @@ -53,7 +53,7 @@ Use curl to deploy and monitor:
    curl -X POST http://10.0.0.3:8080/v2/apps -d @basic-3.json -H "Content-type: application/json"
    curl http://localhost:8080/v2/apps | python -m json.tool
    ```
    https://mesosphere.github.io/marathon/docs/application-basics.html


    Notes
    -----
  11. dims revised this gist Mar 25, 2016. 1 changed file with 25 additions and 0 deletions.
    25 changes: 25 additions & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,31 @@ sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/mara

    Deploy Example Marathon App
    ---------------------------
    Save the following into basic-3.json
    ```
    {
    "id": "basic-3",
    "cmd": "python3 -m http.server 8080",
    "cpus": 0.5,
    "mem": 32.0,
    "container": {
    "type": "DOCKER",
    "docker": {
    "image": "python:3",
    "network": "BRIDGE",
    "portMappings": [
    { "containerPort": 8080, "hostPort": 0 }
    ]
    }
    }
    }
    ```

    Use curl to deploy and monitor:
    ```
    curl -X POST http://10.0.0.3:8080/v2/apps -d @basic-3.json -H "Content-type: application/json"
    curl http://localhost:8080/v2/apps | python -m json.tool
    ```
    https://mesosphere.github.io/marathon/docs/application-basics.html

    Notes
  12. dims revised this gist Mar 25, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,7 @@ sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos
    Start Marathon
    --------------
    ```
    cd ~/marathon/
    sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/marathon
    ```

  13. dims revised this gist Mar 25, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ Start Mesos Slave
    ------------------
    ```
    cd ~/mesos/build/
    sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos --exutor_registration_timeout=5mins
    sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos --executor_registration_timeout=5mins
    ```

    Start Marathon
  14. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,14 @@ sudo bin/zkServer.sh start-foreground
    Start Mesos Master
    ------------------
    ```
    cd ~/mesos/build/
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10.0.3:2181/mesos --quorum=1
    ```

    Start Mesos Slave
    ------------------
    ```
    cd ~/mesos/build/
    sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos --exutor_registration_timeout=5mins
    ```

  15. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    Start ZooKeeper
    ---------------

    ````cd ~/zookeeper-3.4.8/
    ````
    cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ````

  16. dims renamed this gist Mar 25, 2016. 1 changed file with 0 additions and 14 deletions.
    14 changes: 0 additions & 14 deletions Mesos-Marathon-Quick-Start → Mesos-Marathon-Quick-Start.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,3 @@
    1. foo

    ````python
    print 'bar'
    ````

    1. sub-foo

    ````python
    print 'sub-bar'
    ````

    2. Bar

    Start ZooKeeper
    ---------------

  17. dims revised this gist Mar 25, 2016. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions Mesos-Marathon-Quick-Start
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,17 @@
    1. foo

    ````python
    print 'bar'
    ````

    1. sub-foo

    ````python
    print 'sub-bar'
    ````

    2. Bar

    Start ZooKeeper
    ---------------

  18. dims revised this gist Mar 25, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Mesos-Marathon-Quick-Start
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ Start ZooKeeper

    ````cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ````
    ````

    Start Mesos Master
    ------------------
  19. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Mesos-Marathon-Quick-Start
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    Start ZooKeeper
    ---------------
    ````cd ~/zookeeper-3.4.8/

    ````cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ````

  20. dims renamed this gist Mar 25, 2016. 1 changed file with 0 additions and 0 deletions.
  21. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,8 @@
    Start ZooKeeper
    ---------------
    ```cd ~/zookeeper-3.4.8/
    ````cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ```
    ````

    Start Mesos Master
    ------------------
  22. dims revised this gist Mar 25, 2016. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,6 @@
    Start ZooKeeper
    ---------------
    ```

    cd ~/zookeeper-3.4.8/
    ```cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ```
  23. dims revised this gist Mar 25, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,10 @@
    Start ZooKeeper
    ---------------
    ```

    cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground

    ```

    Start Mesos Master
  24. dims revised this gist Mar 25, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    Start ZooKeeper
    ---------------
    ```
    cd ~/zookeeper-3.4.8/
    sudo bin/zkServer.sh start-foreground
    ```

  25. dims revised this gist Mar 25, 2016. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -25,3 +25,10 @@ sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/mara
    Deploy Example Marathon App
    ---------------------------
    https://mesosphere.github.io/marathon/docs/application-basics.html

    Notes
    -----
    - http://mesos.apache.org/gettingstarted/
    - https://github.com/mesosphere/marathon
    - https://mesosphere.github.io/marathon/docs/
    - https://mesosphere.github.io/marathon/docs/native-docker.html
  26. dims revised this gist Mar 25, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -24,6 +24,4 @@ sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/mara

    Deploy Example Marathon App
    ---------------------------
    ```
    https://mesosphere.github.io/marathon/docs/application-basics.html
    ```
  27. dims revised this gist Mar 25, 2016. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -21,3 +21,9 @@ Start Marathon
    ```
    sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/marathon
    ```

    Deploy Example Marathon App
    ---------------------------
    ```
    https://mesosphere.github.io/marathon/docs/application-basics.html
    ```
  28. dims revised this gist Mar 25, 2016. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -13,5 +13,11 @@ sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10
    Start Mesos Slave
    ------------------
    ```
    udo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos --exutor_registration_timeout=5mins
    sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos --exutor_registration_timeout=5mins
    ```

    Start Marathon
    --------------
    ```
    sudo ./bin/start --master zk://10.0.0.3:2181/mesos --zk zk://localhost:2181/marathon
    ```
  29. dims revised this gist Mar 25, 2016. 1 changed file with 10 additions and 2 deletions.
    12 changes: 10 additions & 2 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,17 @@
    ###### Start ZooKeeper
    Start ZooKeeper
    ---------------
    ```
    sudo bin/zkServer.sh start-foreground
    ```

    ###### Start Mesos Master
    Start Mesos Master
    ------------------
    ```
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10.0.3:2181/mesos --quorum=1
    ```

    Start Mesos Slave
    ------------------
    ```
    udo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --containerizers=docker,mesos --exutor_registration_timeout=5mins
    ```
  30. dims revised this gist Mar 25, 2016. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions Mesos-Marathon-Quick-Start.rst
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    Start ZooKeeper
    ---------------

    ###### Start ZooKeeper
    ```
    sudo bin/zkServer.sh start-foreground
    ```

    ###### Start Mesos Master
    ```
    sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos --zk=zk://10.0.3:2181/mesos --quorum=1
    ```