mesos and Elasticsearch design (Docker deployment) (4)

The version used this time is mesos-elasticsearch, based on the installation and use of Docker .

The address is at http://mesos-elasticsearch.readthedocs.org/en/latest/

Using Docker installation, there are two images in Docker hub, one is mesos/elasticsearch-scheduler, the other is mesos/elasticsearch-excutor

My experimental environment is a mesos cluster consisting of three virtual machines, ubuntu is the master, and two debians are slaves (debian and debian2).

1. Pull the mesos/elasticsearch-scheduler and mesos/elasticsearch-excutor images from the Docker hub, tag them and push them to the registry

2. Use marathon on the master to deploy the installation of elasticsearch

      First write a marathon.json file

     { "id":"elasticsearch-mesos-scheduler",  

"container":{  

"docker":{  

"image":"ubuntu:5000/el-sc",  

"network":"HOST"  

}  

},  

"args":["--zookeeperMesosUrl","zk://ubuntu:2181/mesos","--executorImage","ubuntu:5000/el-ex","--executorForcePullImage","true"],  

"cpus":0.2, "mem":512.0,  

"env":{  

"JAVA_OPTS":"-Xms128m -Xmx256m"},  

"instances":1

}

To explain, the instances here is 1. One scheduler is installed through marathon, which is usually installed on the master, and then the excutor is installed through the scheduler. If no parameters are set by default, there are three excutors. ubuntu is the domain name of the master, ubuntu:5000/el-sc is the images I uploaded to the registry earlier, and ubuntu:5000/el-ex is the images that were sent to the registry.

Then submit the marathon with curl

curl -k -XPOST -d @marathon.json -H "Content-Type: application/json" http://ubuntu:8080/v2/apps

3. Enter localhost:31100 in the browser to see the el cluster and search console. (Note: localhost:5050 to view the deployment of node tasks, sometimes not scheduler

Not necessarily installed on the master)

4. Use curl to upload json data during testing (Note: the uploaded port is 31000)

 

$ curl -XPUT http://debian:31000/twitter/tweet/1-d '{
    "user": "kimchy",
    "post_date": "2009-11-15T13:12:00",
    "message": "Trying out elasticsearch, so far so good?"
}'

You can view it in el.

 

 

http://blog.csdn.net/joosonmao/article/details/49174229

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326654097&siteId=291194637