Tag: 马拉松

put_archive与python马拉松docker应用程序?

我猜想,我想要做的是不可能的devise,但certificate我错了。 对于我们的一个后端,我们使用python marathon客户端来pipe理mesos群集上的docker容器。 我想要做的是一旦它启动,dynamic添加一个文件到docker容器。 使用普通的docker客户端,我会做这样的事情: def create_archive(file_contents, file_name): """ doc """ tarstream = io.BytesIO() with tarfile.open(fileobj=tarstream, mode='w') as tarfile_: encoded_file_contents = file_contents.encode('utf8') tarinfo = tarfile.TarInfo(file_name) tarinfo.size = len(encoded_file_contents) tarinfo.mtime = time.time() tarfile_.addfile(tarinfo, io.BytesIO(encoded_file_contents)) logger.info("[+] Successfully created tarfile {}".format(file_name)) # We're at the end of the tarstream, go back to the beginning. return tarstream.seek(0) def add_docker_archive(docker_client, […]

如何在没有权限问题的情况下在marathon上部署artifactory-oss的docker镜像

我正在尝试部署artifactory-oss的docker容器 这是我用于本地testing它docker-compose.yml : version: '2' services: artifactory: image: jfrog-docker-registry.bintray.io/jfrog/artifactory-oss:4.1.3 ports: – "8081:8081" volumes: – "/var/opt/jfrog/artifactory" 我曾尝试将它部署在与马拉松比赛中。 我有权限问题: I0415 19:43:01.747540 15616 fetcher.cpp:424] Fetcher Info: {"cache_directory":"\/tmp\/mesos\/fetch\/slaves\/4e00de0a-3293-453f-83ab-9576653867d7-S0","items":[{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":true,"value":"file:\/\/\/etc\/docker.tar.gz"}}],"sandbox_directory":"\/tmp\/mesos\/slaves\/4e00de0a-3293-453f-83ab-9576653867d7-S0\/frameworks\/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000\/executors\/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111\/runs\/f412d99e-34f4-459f-8533-4e58c2e8dd59"} I0415 19:43:01.749455 15616 fetcher.cpp:379] Fetching URI 'file:///etc/docker.tar.gz' I0415 19:43:01.749469 15616 fetcher.cpp:250] Fetching directly into the sandbox directory I0415 19:43:01.749485 15616 fetcher.cpp:187] Fetching URI 'file:///etc/docker.tar.gz' I0415 19:43:01.749500 15616 fetcher.cpp:167] Copying resource with […]

如何禁止马拉松在“docker日志”访问日志?

我将Marathon作为Docker容器运行。 当我请求运行“docker日志”的日志时,我看到很多与访问事件相关的logging: [2017-04-24 13:05:59,106] INFO 172.25.250.16 – – [24/Apr/2017:13:05:59 +0000] "GET //vdorct2:8080/v2/queue HTTP/1.1" 200 32 "http://vdorct2:8080/ui/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36" 1 (mesosphere.chaos.http.ChaosRequestLog$$EnhancerByGuice$$c1e74978:qtp2035387904-37) [2017-04-24 13:05:59,107] INFO Proxying request to GET http://vdorct1:8080/v2/deployments from vdorct2:8080 (mesosphere.marathon.api.JavaUrlConnectionRequestForwarder$:qtp2035387904-31) [2017-04-24 13:05:59,110] INFO 172.25.250.16 – – [24/Apr/2017:13:05:59 +0000] "GET //vdorct2:8080/v2/deployments HTTP/1.1" 200 22 "http://vdorct2:8080/ui/" "Mozilla/5.0 (Windows […]

如何拉马拉松需要被授权的docker形象

我想用marathon部署一个docker容器,如果docker镜像没有授权,镜像可以正常拉,但是当我试图从需要授权的仓库拉出镜像时,任务部署失败,响应是 Failed to launch container: Failed to run 'docker -H unix:///var/run/docker.sock pull example.com/web:laest': exited with status 1; stderr='Error response from daemon: repository example.com/web not found: does not exist or no pull access ' 我把/var/run/docker.sock文件的权限更改为777节点上的master,但问题仍然出现,似乎权限不是问题的根本原因; 我尝试在节点上运行“docker login”,并手动拉取图像,然后马拉松任务正常运行,我的马拉松json如下所示: { "id": "/web", "cmd": "docker login –username='sam' –passwoer='123456' example.com/web:latest", "cpus": 0.3, "mem": 32, "disk": 0, "instances": 1, "env": { […]

您在Marathon中定义的磁盘属性大小是否包含泊坞窗图像的大小?

在Mesos中,您可以根据资源(cpu,mem,disk等)定义服务的限制。 在马拉松,这可以看起来像: { "id": "/grafana/demo", "instances": 1, "cpus": 1.0, "mem": 256, "disk": 128, "container": { "type": "DOCKER", "docker": { "image": "grafana/grafana:latest", … } } } 现在我的问题: grafana/grafana:latest的docker图像大小grafana/grafana:latest数量INTO "disk": 128,分配? 或者是"disk": 128,docker图像grafana/grafana:latest ?

从docker-composeconfigurationMarathon-LB

我正在试图从dockerconfigurationmarathon-lb,但alwas正在等待PID,所以我不知道是否在docker-compose.yml上设置的configuration上做错了什么。 dockercomposer php文件也是版本2。 请你能帮我解决这个问题。 marathonlb: image: mesosphere/marathon-lb:v1.4.1 restart: unless-stopped # must alter iptables otherwise: # "can't initialize iptables table `filter': Permission denied (you must be root)" privileged: true environment: – PORTS=9090 ports: – "11080:80" – "11443:443" – "11090:9090" – "11091:9091" command: sse –health-check –group external –marathon http://marathon:8080

在Mesosphere中的“args”是否与docker run命令中的环境variables相当?

我有一个微服务json模板来部署使用Mesosphere: { "id": "service", "container": { "docker": { "image": "foo/foo:latest" }, "type": "DOCKER", "volumes": [] }, "args": [ "–key", "value" ], "cpus": 0.5, "mem": 128.0, "instances": 1 } 但出于原因,我想手动做docker run命令来部署这个容器。 这是我的cmd: docker run –name service\ -e "key=Mesosphere DCOS" \ –cpu-period=100000 \ –cpu-quota=50000 \ –memory=128M \ foo/foo:latest 然后退出并抱怨key值的容器丢失。 所以我不确定是否args = -e在docker run命令中。

Mesos无法在重启任务时终止孤立容器

有时在mesos中重新部署应用程序时,旧容器仍在运行。 而我检查mesos-slave日志,我得到这样的错误。 Termination of executor 'demo.4a429a8d-6131-11e7-93ff-760a85a3d38c' of framework 97bda209-8873-4ec8-a2fb-bdde146d7a36-0000 failed: Unknown container: 2fb62a34-ccce-4f6e-974f-a5f19356083a 造成这种情况的原因是什么?如何解决?

将默认parameter passing给apache-mesos中的容器

我试图将默认参数(如卷或者envs)传递给我通过Marathon和Apache Mesos创build的docker容器。 通过传递给mesos-slave的参数是可能的。 我已经把带有JSON内容的/etc/mesos-slave/default_container_info文件(mesos-slave读取这个文件并把它作为参数): { "type": "DOCKER", "volumes": [ { "host_path": "/var/lib/mesos-test", "container_path": "/tmp", "mode": "RW" } ] } 然后,我重新启动了mesos-slave并在马拉松中创build了新的容器,但在容器中看不到装入的容器。 我哪里可以做错? 如何将默认值以其他方式传递给我的容器?

docker上的Marathon-LBconfiguration失败

我正在Docker上创build马拉松LBconfiguration。 我从这个dockerfile构build图像: https://github.com/mesosphere/marathon-lb/blob/master/Dockerfile 但是无法执行docker run命令: root @ ip-10-1-0-251:〜#docker run -e PORTS = 9090 rk sse –group external [致命tini(5)] exec / marathon-lb /运行失败:没有这样的文件或目录