1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # This file contains environment variables that are passed to mesos-slave. # To get a description of all options run mesos-slave --help; any option # supported as a command-line option is also supported as an environment # variable. # The mesos master URL to contact. Should be host:port for # non-ZooKeeper based masters, otherwise a zk:// or file:// URL. MESOS_master=192.168.122.31:5050 MESOS_EXECUTOR_REGISTRATION_TIMEOUT=10mins MESOS_IP=192.168.122.48 # For isolated sandbox testing #MESOS_master=127.0.0.1:5050 # For a complete listing of options execute 'mesos-slave --help' MESOS_log_dir=/var/log/mesos MESOS_work_dir=/var/run/mesos MESOS_containerizers=docker,mesos # systemd cgroup integration MESOS_isolation='cgroups/cpu,cgroups/mem' MESOS_cgroups_root='system.slice/mesos-slave.service' MESOS_cgroups_hierarchy=/sys/fs/cgroup |
1 2 | # firewall-cmd --zone=public --add-port=5051/tcp -permanent # firewall-cmd -reload |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | curl -X POST http://192.168.122.48:8080/v2/apps -d @mysqlcontainer.json -H "Content-type: application/json" #cat mysqlcontainer.json { "id": "mysql", "cpus": 0.5, "mem": 64.0, "instances": 1, "container": { "type": "DOCKER", "docker": { "image": "ppc64le/mysql", "network": "BRIDGE", "portMappings": [ { "containerPort": 3306, "hostPort": 0, "servicePort": 0, "protocol": "tcp" } ] } }, "env": { "MYSQL_ROOT_PASSWORD" : "password", "MYSQL_USER" : "test", "MYSQL_PASSWORD" : "test", "MYSQL_DB" : "BucketList" } } |
1 2 3 4 5 6 | $ curl -X POST -H "Content-type: application/json" localhost:8080/v2/apps -d '{ "id": "sleep-cluster", "cmd": "sleep 60", "instances": 3, "constraints": [["hostname", "CLUSTER", "a.specific.node.com"]] }' |
1 | # mesos-slave --master=zk://192.168.122.48:2181/mesos --containerizers=docker,mesos --executor_registration_timeout=10mins --ip=192.168.122.253 --hostname=Ubuntu |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | curl -X POST http://192.168.122.48:8080/v2/apps -d @flaskcontainer.json -H "Content-type: application/json" # cat flaskcontainer.json { "id": "flaskappcontainer", "cpus": 0.5, "mem": 64.0, "instances": 1, "container": { "type": "DOCKER", "docker": { "image": "ppc64le/flaskapp", "network": "BRIDGE", "portMappings": [ { "containerPort": 80, "hostPort": 0, "servicePort": 0, "protocol": "tcp" } ], "parameters": [ { "key": "link", "value": "mesos-b81f9a21-3133-49de-acf6-988226eb6874-S18.5d3dcaa7-05c6-4a5b-af68-dba32b7d1835"} ] } }, "constraints": [ [ "hostname","CLUSTER","ubuntu" ] ] } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |