Marathon/Apache Mesos : fin de la partie !

C’est la fin pour Marathon/Mesos, en fait c’est la fin depuis le 31/10/2021. Il est donc vivement recommandé de ne plus utiliser cette solution.

Marathon ; https://github.com/mesosphere/marathon :

Support for DC/OS ends on October 31, 2021. We will continue to provide support for our current DC/OS customers per their contracts, of course. However, we will no longer be investing in new features or capabilities or maintaining the related repositories. If a customer wishes to continue use of the DC/OS Enterprise platform or other non-free DC/OS components, the customer can purchase an End-of-Life License or Perpetual Use License, however support is not included in these licenses and continued use of DC/OS will be at your own discretion and risk. We apologize for any inconvenience this may have caused.

Apache Mesos : https://github.com/apache/mesos/

Lire aussi : Apache Mesos reaches end of life (April 6, 2021) https://gruchalski.com/posts/2021-04-06-apache-mesos-reaches-end-of-life/

An end of an era. What’s the better way to summarize that the maintainers of Apache Mesos are now voting on moving the project to Apache Attic. Attic is a place where Apache projects go when they reach end of life.

In other words: it’s end of the road for Apache Mesos.

It’s now between Kubernetesand HashiCorp Nomadto figure it out. What’s positive, they’re solving the same problem but serve different audiences.

A noter que pour l’instant il n’est pas dans Apache Attic : https://attic.apache.org/ . Mais c’est une histoire de mois.

Marathon/Mesos : Environnement complet via Docker ( docker-compose )

Je recommande fortement de NE PAS UTILISER Marathon/Mesos , c’est un logiciel qui est en fin de vie. Le lien du projet Marathon : https://mesosphere.github.io/marathon/ . Pour Apache Mesos : https://mesos.apache.org/ .

La dernière version de Apache Mesos c’est 1.10 du « October 20, 2020 ». La version 1.7.1 est du « January 28, 2019 ».

Voici le Docker Compose que j’ai utilisé, j’ai donc :

    – zookeeper :
    – mesos-master : 1.7.1 (impossibe d’avoir mieux)
    – mesos-slave : 1.7.1 (impossible d’avoir mieux)
    – marathon :

Ma configuration :
– Ubuntu 10.04.4
– Docker 20.10.14
– Docker-compose 1.14.0

Le fichier docker-compose-mesos.yml , pour lancer :

sudo docker-compose -f docker-compose-mesos.yml up

version: "3"

services:
  zookeeper:
    image: zookeeper
    pid: "host"
    hostname: zookeeper
    ports:
      - "2181:2181"
    networks:
      app_net:
        ipv4_address: 172.16.121.2

  mesos-master:
    image: mesosphere/mesos-master:1.7.1
    privileged: true
    pid: "host"
    hostname: localhost
    ports:
      - "5050:5050"
    networks:
      app_net:
        ipv4_address: 172.16.121.3
    links:
      - zookeeper
    depends_on:
      - zookeeper
    environment:
      MESOS_ZK: zk://zookeeper:2181/mesos
      MESOS_QUORUM: 1
      MESOS_CLUSTER: docker-compose
      MESOS_HOSTNAME: localhost
      MESOS_WORK_DIR: /var/tmp/mesos
      MESOS_LOG_DIR: /var/log/mesos
      LIBPROCESS_IP: 172.16.121.3
      MESOS_CONTAINERIZERS: docker,mesos
      MESOS_CLUSTER: local

  mesos-slave:
    image: mesosphere/mesos-slave:1.7.1
    privileged: true
    pid: "host"
    hostname: localhost
    ports:
      - "5051:5051"
    networks:
      app_net:
        ipv4_address: 172.16.121.4
    links:
      - zookeeper:zookeeper
      - mesos-master:master.mesos
    depends_on:
      - zookeeper
      - mesos-master
    environment:
      MESOS_MASTER: zk://zookeeper:2181/mesos
      MESOS_CONTAINERIZERS: docker,mesos
      MESOS_PORT: 5051
      MESOS_RESOURCES: mem:10000;disk:100000;ports(*):[11000-11999]
      MESOS_HOSTNAME: localhost
      MESOS_WORK_DIR: /var/tmp/mesos
      MESOS_LOG_DIR: /var/log/mesos
      MESOS_SYSTEMD_ENABLE_SUPPORT: "false"
      LIBPROCESS_IP: 172.16.121.4
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /bin/docker:/bin/docker 
      - /sys:/sys 
      - /cgroup:/cgroup

  marathon:
    image: mesosphere/marathon
    pid: "host"
    entrypoint:
      - ./bin/start
      - --disable_ha 
    hostname: localhost
    ports:
     - "8080:8080"
    networks:
      app_net:
        ipv4_address: 172.16.121.5
    links:
      - zookeeper
      - mesos-master
      - mesos-slave
    depends_on:
      - zookeeper
      - mesos-master
      - mesos-slave
    environment:
      - MARATHON_ZK=zk://zookeeper:2181/marathon
      - MARATHON_MASTER=zk://zookeeper:2181/mesos
      - LIBPROCESS_IP=172.16.121.5
      - MARATHON_DECLINE_OFFER_DURATION=3600000
      - MARATHON_MESOS_AUTHENTICATION_PRINCIPAL=marathon
      - MARATHON_MESOS_AUTHENTICATION_SECRET_FILE=/marathon.secret
      - MARATHON_MESOS_ROLE=public

networks:
  app_net:
    driver: bridge
    ipam:
      driver: default
      config:
      -
        subnet: 172.16.121.0/24

Docker : Accès aux volumes sous Windows

C’est simplement l’enfer sous Windows 🙂

Si par exemple on fait un volume :

docker volume create -name mes-datas

Ensuite pour avoir accès :

$ docker run --privileged -it -v /var/run/docker.sock:/var/run/docker.sock jongallant/ubuntu-docker-client 
$ docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
$ chroot /host
$ cd /var/lib/docker/volumes/mes-datas/_data/

Ensuite pour sortir:

$ exit
$ exit
$ exit

J’utilise donc ce conteneur : https://hub.docker.com/r/jongallant/ubuntu-docker-client .

Misère de misère.

 

Docker : ERROR: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority

Voici mon erreur :

$ sudo docker-compose up -d
Pulling db (library/mariadb:10.0.23)...
ERROR: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority

Pour fixer le problème, j’ai fait :

$ sudo update-ca-certificates --fresh
...
$ openssl s_client -showcerts -verify 5 -connect registry-1.docker.io:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | tee ~/docker.crt
...
$ openssl s_client -showcerts -verify 5 -connect production.cloudflare.docker.com:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | tee ~/docker-com.crt
...
$ sudo cp ~/docker-com.crt /usr/local/share/ca-certificates/.
...
$ sudo cp ~/docker.crt /usr/local/share/ca-certificates/
...
$ sudo update-ca-certificates
...
$ sudo service docker restart

Ensuite cela a fixé mon problème … provisoirement :

$ docker-compose up -d
Pulling db (library/mariadb:10.0.23)...
10.0.23: Pulling from library/mariadb
7268d8f794c4: Downloading
a3ed95caeb02: Downloading
e5a99361f38c: Downloading
20b20853e29d: Downloading
9dbc63cf121f: Downloading
fdebb5c64c6c: Downloading
38152cd1ae2a: Downloading
d7f1267eb179: Downloading
cb5b075a9692: Downloading
d65a44f4573e: Downloading
ERROR: x509: certificate signed by unknown authority