240 发简信
  • 过载保护脚本

    #!/bin/bash ##create date 20170518 ##write by swx420528 ##version 1.0 ##overload_protec...

  • monit_riak.sh

    #!/bin/bash node=`ip addr|grep -v 127.0.0.|grep -w inet|awk -F'/' '{print$1}'|awk '{pri...

  • Linux command line keyboard shortcuts

    备份文件 cp install_collectd.log{,-old} 备份恢复 mv /etc/rc.conf{-old,} 重命名文件 mv /path/to/file....

  • 监控进程脚本

    #!/bin/bash node=`ip addr|grep -v 127.0.0.|grep -w inet|awk -F'/' '{print $1}'|awk '{pr...

  • nginx 文件服务器配置

    server { listen 8888; server_name localhost; #charset koi8-r; #access_log logs/host....

  • 检查文件修改记录脚本

    #!/bin/bash ##name monitor_nginx_config.sh /bin/md5sum /usr/local/nginx/conf/server.con...

  • 命令行user:passwd特殊符号的处理

    export http_proxy='http://joyesong:12@qa@proxy.qq.com:8080'这样是不行的,需要把密码12@qa中的@换为unicod...

  • linux下命令行密文修改密码的方法

    加密密码通过以下方法生成 openssl passwd-1 "Cloudtest_182" 在linux命令行通过以下方式修改密码 echo root:'$1$J5EOkqQ...

  • WWW SQL Designer

    http://ondras.zarovi.cz/sql/demo/

  • Free Download IT eBooks

    http://it-ebooks.info/search/?q=flask&type=title

  • Shell In A Box – A Web-Based SSH Terminal to Access Remote Linux Servers

    $ sudo apt-cache search shellinabox $ sudo apt-get install openssl shellinabox $ sudo v...

  • virtualenv guide

    https://virtualenv.pypa.io/en/stable/installation/

  • flask tutorials

    https://github.com/realpython/discover-flask

  • https://open.mesosphere.com/getting-started/install/#master-setup

    docker

    1.使用内网源获取镜像 docker pull rnd-dockerhub.huawei.com/official/nginx 2.启动marathon cd /home/s...

  • https://www.digitalocean.com/community/tutorials/how-to-configure-a-production-ready-mesosphere-cluster-on-ubuntu-14-04

    docker

    1.使用内网源获取镜像 docker pull rnd-dockerhub.huawei.com/official/nginx 2.启动marathon cd /home/s...

  • Starting a Service through the API

    We can also submit services through Marathon's API. This involves passing in a JSON object containing all of the fields that the overlay contained.

    This is a relatively simple process. Again, the only required fields areidfor the process identifier andcmdwhich contains the actual command to run.

    So we could create a JSON file calledhello.jsonwith this information:

    nano hello.json

    Inside, the bare minimum specification would look like this:

    { "id":"hello2", "cmd":"echo hello; sleep 10"}

    This service will work just fine. However, if we truly want to emulate the service we created in the web UI, we have to add some additional fields. These were defaulted in the web UI and we can replicate them here:

    { "id":"hello2", "cmd":"echo hello; sleep 10", "mem":16, "cpus":0.1, "instances":1, "disk":0.0, "ports":[0]}

    Save and close the JSON file when you are finished.

    Next, we can submit it using the Marathon API. The target is one of our master's Marathon service at port8080and the endpoint is/v2/apps. The data payload is our JSON file, which we can read intocurlby using the-dflag with the@flag to indicate a file.

    The command to submit will look like this:

    curl -i -H 'Content-Type: application/json' -d@hello2.json192.168.2.1:8080/v2/apps

    If we look at the Marathon interface, we can see that it was successfully added. It seems to have the exact same properties as our first service:

    The new service can be monitored and accessed in exactly the same way as the first service.

    Conclusion

    At this point, you should have a production-ready Mesosphere cluster up and running. We have only covered the basic configuration at this point, but you should be able to see the possibilities of leveraging the Mesosphere system.

    In future guides, we will cover how to deploy Docker containers on your cluster and how to use some of the tools in more depth.

    How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04(2)

    在Master服务器上配置Mesos 下面,我们将开始在三台master服务器上配置Mesos。在每台master服务器上完成下列步骤。 编辑Quorum以体现你的集群容量 ...

  • Starting a Service through the Web Interface

    The most straight forward way of getting a service running quickly on the cluster is to add an application through the Marathon web interface.

    First, visit the Marathon web interface on one of your the master servers. Remember, the Marathon interface is on port8080:

    http://192.168.2.1:8080

    From here, you can click on the "New App" button in the upper-right corner. This will pop up an overlay where you can add information about your new application:

    Fill in the fields with the requirements for your app. The only fields that are mandatory are:

    ID: A unique ID selected by the user to identify a process. This can be whatever you'd like, but must be unique.

    Command: This is the actual command that will be run by Marathon. This is the process that will be monitored and restarted if it fails.

    Using this information, you can set up a simple service that just prints "hello" and sleeps for 10 seconds. We will call this "hello":

    When you return to the interface, the service will go from "Deploying" to "Running":

    Every 10 seconds or so, the "Tasks/Instances" reading will go from "1/1" to "0/1" as the sleep amount passes and the service stops. Marathon then automatically restarts the task again. We can see this process more clearly in the Mesos web interface at port5050:

    http://192.168.2.1:5050

    Here, you can see the process finishing and being restarted:

    If you click on "Sandbox" and then "stdout" on any of the tasks, you can see the "hello" output being produced:

    How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04(2)

    在Master服务器上配置Mesos 下面,我们将开始在三台master服务器上配置Mesos。在每台master服务器上完成下列步骤。 编辑Quorum以体现你的集群容量 ...

  • Starting Services on Mesos and Marathon

    Marathon is Mesosphere's utility for scheduling long-running tasks. It is easy to think of Marathon as the init system for a Mesosphere cluster because it handles starting and stopping services, scheduling tasks, and making sure applications come back up if they go down.

    You can add services and tasks to Marathon in a few different ways. We will only be covering basic services. Docker containers will be handled in a future guide.

    How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04(2)

    在Master服务器上配置Mesos 下面,我们将开始在三台master服务器上配置Mesos。在每台master服务器上完成下列步骤。 编辑Quorum以体现你的集群容量 ...

  • You can also see that the available resources in the interface has been updated to reflect the pooled resources of your slave machines:

    To get additional information about each of your slave machines, you can click on the "Slaves" link at the top of the interface. This will give you an overview of each machine's resource contribution, as well as links to a page for each slave:

    How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04(2)

    在Master服务器上配置Mesos 下面,我们将开始在三台master服务器上配置Mesos。在每台master服务器上完成下列步骤。 编辑Quorum以体现你的集群容量 ...