1 2 3 4 5 6 7 8 9 10 | docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \ --name etcd --restart always quay.io/coreos/etcd:v2.2.1 \ -name etcd0 \ -advertise-client-urls http://192.168.1.4:2379,http://192.168.1.4:4001 \ -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ -initial-advertise-peer-urls http://192.168.1.4:2380 \ -listen-peer-urls http://0.0.0.0:2380 \ -initial-cluster-token etcd-cluster-1 \ -initial-cluster etcd0=http://192.168.1.2:2380,etcd1=http://192.168.1.3:2380,etcd2=http://192.168.1.4:2380\ -initial-cluster-state new |
1 2 3 | cat /mnt/k8s/mesos-cloud.conf [mesos-cloud] mesos-master = zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | docker run -d --privileged -v /mnt/k8s:/mnt/k8s --name apiserver --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km apiserver \ --address=192.168.1.2 \ --etcd-servers=http://192.168.1.2:4001,http://192.168.1.3:4001,http://192.168.1.4:4001\ --service-cluster-ip-range=10.10.10.0/24 \ --port=8888 \ --cloud-provider=mesos \ --cloud-config=/mnt/k8s/mesos-cloud.conf \ --secure-port=0 \ --v=1 docker run -d --privileged -v /mnt/k8s:/mnt/k8s --name controller-manager --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km controller-manager \ --master=192.168.1.2:8888 \ --cloud-provider=mesos \ --cloud-config=/mnt/k8s/mesos-cloud.conf \ --v=1 docker run -d --privileged --name scheduler --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha kmscheduler \ --address=192.168.1.2 \ --mesos-master=zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos \ --etcd-servers=http://192.168.1.2:4001,http://192.168.1.3:4001,http://192.168.1.4:4001\ --mesos-user=root \ --api-servers=192.168.1.2:8888 \ --cluster-dns=10.10.10.10 \ --cluster-domain=cluster.local \ --v=2 |
1 2 3 | cat /mnt/k8s/mesos-cloud.conf [mesos-cloud] mesos-master = zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | docker run -d --privileged -v /mnt/k8s:/mnt/k8s --name apiserver --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km apiserver \ --address=192.168.1.3 \ --etcd-servers=http://192.168.1.2:4001,http://192.168.1.3:4001,http://192.168.1.4:4001\ --service-cluster-ip-range=10.10.10.0/24 \ --port=8888 \ --cloud-provider=mesos \ --cloud-config=/mnt/k8s/mesos-cloud.conf \ --secure-port=0 \ --v=1 docker run -d --privileged -v /mnt/k8s:/mnt/k8s --name controller-manager --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km controller-manager \ --master=192.168.1.3:8888 \ --cloud-provider=mesos \ --cloud-config=/mnt/k8s/mesos-cloud.conf \ --v=1 docker run -d --privileged --name scheduler --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km scheduler \ --address=192.168.1.3 \ --mesos-master=zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos \ --etcd-servers=http://192.168.1.2:4001,http://192.168.1.3:4001,http://192.168.1.4:4001\ --mesos-user=root \ --api-servers=192.168.1.3:8888 \ --cluster-dns=10.10.10.10 \ --cluster-domain=cluster.local \ --v=2 |
1 2 3 | cat /mnt/k8s/mesos-cloud.conf [mesos-cloud] mesos-master = zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | docker run -d --privileged -v /mnt/k8s:/mnt/k8s --name apiserver --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km apiserver \ --address=192.168.1.4 \ --etcd-servers=http://192.168.1.2:4001,http://192.168.1.3:4001,http://192.168.1.4:4001\ --service-cluster-ip-range=10.10.10.0/24 \ --port=8888 \ --cloud-provider=mesos \ --cloud-config=/mnt/k8s/mesos-cloud.conf \ --secure-port=0 \ --v=1 docker run -d --privileged -v /mnt/k8s:/mnt/k8s --name controller-manager --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km controller-manager \ --master=192.168.1.4:8888 \ --cloud-provider=mesos \ --cloud-config=/mnt/k8s/mesos-cloud.conf \ --v=1 docker run -d --privileged --name scheduler --net=host --restart always powerkvm/k8s-mesos-x86:v1.4.0-alpha km scheduler \ --address=192.168.1.4 \ --mesos-master=zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos \ --etcd-servers=http://192.168.1.2:4001,http://192.168.1.3:4001,http://192.168.1.4:4001\ --mesos-user=root \ --api-servers=192.168.1.4:8888 \ --cluster-dns=10.10.10.10 \ --cluster-domain=cluster.local \ --v=2 |
1 2 | rpm -Uvh http://repos.mesosphere.io/el/7/ ... repo-7-2.noarch.rpm && \ yum -y install mesos |
1 2 3 4 5 6 | #cat > /etc/mesos/zk <<EOF zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos EOF echo 192.168.1.5 | sudo tee /etc/mesos-slave/ip cp /etc/mesos-slave/ip /etc/mesos-slave/hostname |
systemctl restart mesos-slave |
1 2 3 4 5 6 7 8 | #cat > /etc/yum.repos.d/cluster.repo <<EOF [cluster] name=cluster baseurl=http://ftp.unicamp.br/pub/ppc64el/rhel/7_1/misc_ppc64el/ enabled=1 gpgcheck=0 priority=10 sslverify=1 EOF |
yum -y install mesos-0.22.1 python-mesos |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # 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=zk://192.168.1.2:2181,192.168.1.3:2181,192.168.1.4:2181/mesos MESOS_EXECUTOR_REGISTRATION_TIMEOUT=10mins MESOS_IP=192.168.1.6 # 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 |
service emsos-slave start |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |