mirror of https://github.com/k3s-io/k3s
170 lines
5.7 KiB
YAML
170 lines
5.7 KiB
YAML
ambassador:
|
|
image: cpuguy83/docker-grand-ambassador:0.9.1
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
command: "-name docker_apiserver_1"
|
|
etcd:
|
|
hostname: etcd
|
|
image: quay.io/coreos/etcd:v2.2.1
|
|
ports: [ "4001:4001" ]
|
|
command: >
|
|
--listen-client-urls 'http://etcd:4001'
|
|
--advertise-client-urls 'http://etcd:4001'
|
|
--initial-cluster-state new
|
|
mesosmaster1:
|
|
hostname: mesosmaster1
|
|
image: mesosphere/mesos:0.26.0-0.2.145.ubuntu1404
|
|
entrypoint: [ "mesos-master" ]
|
|
ports: [ "5050:5050" ]
|
|
environment:
|
|
- MESOS_HOSTNAME=mesosmaster1
|
|
- MESOS_PORT=5050
|
|
- MESOS_LOG_DIR=/var/log/mesos
|
|
- MESOS_QUORUM=1
|
|
- MESOS_REGISTRY=in_memory
|
|
- MESOS_WORK_DIR=/var/lib/mesos
|
|
- MESOS_ROLES=public
|
|
links:
|
|
- etcd
|
|
- "ambassador:apiserver"
|
|
mesosslave:
|
|
hostname: mesosslave
|
|
privileged: true
|
|
image: mesosphere/mesos-slave-dind:0.2.4_mesos-0.26.0_docker-1.8.2_ubuntu-14.04.3
|
|
ports: [ "10248","10249" ]
|
|
entrypoint:
|
|
- bash
|
|
- -xc
|
|
- >
|
|
NAME=$$(cut -f2 -d/ <<<$${MESOSMASTER1_NAME}) &&
|
|
N=$${NAME##*_} &&
|
|
PUBLIC_RESOURCES="$$(if [ $${N} = 2 ]; then echo ";cpus(public):2;mem(public):640;ports(public):[7000-7999]"; fi)" &&
|
|
DOCKER_NETWORK_OFFSET=0.0.$${N}.0
|
|
exec wrapdocker mesos-slave
|
|
--work_dir="/var/tmp/mesos/$${N}"
|
|
--attributes="rack:$${N};gen:201$${N}"
|
|
--hostname=$$(getent hosts mesosslave | cut -d' ' -f1 | sort -u | tail -1)
|
|
--resources="cpus:4;mem:1280;disk:25600;ports:[8000-21099]$${PUBLIC_RESOURCES}"
|
|
command: []
|
|
environment:
|
|
- MESOS_MASTER=mesosmaster1:5050
|
|
- MESOS_PORT=5051
|
|
- MESOS_LOG_DIR=/var/log/mesos
|
|
- MESOS_LOGGING_LEVEL=INFO
|
|
- MESOS_SWITCH_USER=0
|
|
- MESOS_CONTAINERIZERS=docker,mesos
|
|
- MESOS_ISOLATION=cgroups/cpu,cgroups/mem
|
|
- VAR_LIB_DOCKER_SIZE=10
|
|
- DOCKER_DAEMON_ARGS
|
|
links:
|
|
- etcd
|
|
- mesosmaster1
|
|
- "ambassador:apiserver"
|
|
apiserver:
|
|
hostname: apiserver
|
|
image: mesosphere/kubernetes-mesos
|
|
entrypoint:
|
|
- /bin/bash
|
|
- "-ceu"
|
|
- >
|
|
echo "Hostname: $$(hostname -f) ($$(hostname -f | xargs resolveip.sh))" &&
|
|
(grep "mesos-master\s*=" /opt/mesos-cloud.conf || echo " mesos-master = mesosmaster1:5050" >> /opt/mesos-cloud.conf) &&
|
|
await-health-check "-t=${MESOS_DOCKER_ETCD_TIMEOUT}" http://etcd:4001/health &&
|
|
await-health-check "-t=${MESOS_DOCKER_MESOS_TIMEOUT}" http://mesosmaster1:5050/health &&
|
|
await-file "-t=${KUBE_KEYGEN_TIMEOUT}" /var/run/kubernetes/auth/apiserver.crt &&
|
|
km apiserver
|
|
--address=$$(resolveip.sh apiserver)
|
|
--external-hostname=apiserver
|
|
--etcd-servers=http://etcd:4001
|
|
--port=8888
|
|
--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,DefaultStorageClass,ResourceQuota
|
|
--authorization-mode=AlwaysAllow
|
|
--token-auth-file=/var/run/kubernetes/auth/token-users
|
|
--basic-auth-file=/var/run/kubernetes/auth/basic-users
|
|
--service-account-key-file=/var/run/kubernetes/auth/service-accounts.key
|
|
--service-cluster-ip-range=10.10.10.0/24
|
|
--service-node-port-range=30000-32767
|
|
--cloud-provider=mesos
|
|
--cloud-config=/opt/mesos-cloud.conf
|
|
--allow-privileged
|
|
--tls-cert-file=/var/run/kubernetes/auth/apiserver.crt
|
|
--tls-private-key-file=/var/run/kubernetes/auth/apiserver.key
|
|
--runtime-config=experimental/v1alpha1
|
|
--v=4
|
|
ports: [ "8888:8888", "6443:6443" ]
|
|
volumes:
|
|
- ${MESOS_DOCKER_WORK_DIR}/auth:/var/run/kubernetes/auth:ro
|
|
links:
|
|
- etcd
|
|
- mesosmaster1
|
|
controller:
|
|
hostname: controller
|
|
image: mesosphere/kubernetes-mesos
|
|
entrypoint:
|
|
- /bin/bash
|
|
- "-ceu"
|
|
- >
|
|
echo "Hostname: $$(hostname -f) ($$(hostname -f | xargs resolveip.sh))" &&
|
|
(grep "mesos-master\s*=" /opt/mesos-cloud.conf || echo " mesos-master = mesosmaster1:5050" >> /opt/mesos-cloud.conf) &&
|
|
await-health-check "-t=${MESOS_DOCKER_MESOS_TIMEOUT}" http://mesosmaster1:5050/health &&
|
|
await-health-check "-t=${MESOS_DOCKER_API_TIMEOUT}" http://apiserver:8888/healthz &&
|
|
km controller-manager
|
|
--address=$$(resolveip.sh controller)
|
|
--master=http://apiserver:8888
|
|
--cloud-config=/opt/mesos-cloud.conf
|
|
--service-account-private-key-file=/var/run/kubernetes/auth/service-accounts.key
|
|
--root-ca-file=/var/run/kubernetes/auth/root-ca.crt
|
|
--v=4
|
|
volumes:
|
|
- ${MESOS_DOCKER_WORK_DIR}/auth:/var/run/kubernetes/auth:ro
|
|
links:
|
|
- mesosmaster1
|
|
- apiserver
|
|
scheduler:
|
|
hostname: scheduler
|
|
image: mesosphere/kubernetes-mesos
|
|
entrypoint:
|
|
- /bin/bash
|
|
- "-ceu"
|
|
- >
|
|
echo "Hostname: $$(hostname -f) ($$(hostname -f | xargs resolveip.sh))" &&
|
|
(grep "mesos-master\s*=" /opt/mesos-cloud.conf || echo " mesos-master = mesosmaster1:5050" >> /opt/mesos-cloud.conf) &&
|
|
await-health-check "-t=${MESOS_DOCKER_ETCD_TIMEOUT}" http://etcd:4001/health &&
|
|
await-health-check "-t=${MESOS_DOCKER_MESOS_TIMEOUT}" http://mesosmaster1:5050/health &&
|
|
await-health-check "-t=${MESOS_DOCKER_API_TIMEOUT}" http://apiserver:8888/healthz &&
|
|
km scheduler
|
|
--address=$$(resolveip.sh scheduler)
|
|
--hostname-override=scheduler
|
|
--etcd-servers=http://etcd:4001
|
|
--mesos-user=root
|
|
--api-servers=http://apiserver:8888
|
|
--mesos-master=mesosmaster1:5050
|
|
--allow-privileged
|
|
--cluster-dns=10.10.10.10
|
|
--cluster-domain=cluster.local
|
|
--mesos-executor-cpus=1.0
|
|
--mesos-sandbox-overlay=/opt/sandbox-overlay.tar.gz
|
|
--static-pods-config=/opt/static-pods
|
|
--mesos-framework-roles=*,public
|
|
--mesos-default-pod-roles=*,public
|
|
--v=4
|
|
--executor-logv=4
|
|
--profiling=true
|
|
links:
|
|
- etcd
|
|
- mesosmaster1
|
|
- apiserver
|
|
volumes:
|
|
- ./static-pod.json:/opt/static-pods/static-pod.json
|
|
keygen:
|
|
image: mesosphere/kubernetes-keygen:v1.0.0
|
|
command:
|
|
- certgen
|
|
- /var/run/kubernetes/auth
|
|
- /var/run/kubernetes/auth
|
|
- apiserver
|
|
volumes:
|
|
- ${MESOS_DOCKER_WORK_DIR}/auth:/var/run/kubernetes/auth
|
|
links:
|
|
- apiserver
|