Drone in swarm mixed archs


#1

Hi

I want to run drone (server and agents) in a swarm environment with a mixture of x86 machines and rpi (arm)

i have this as my stack

version: '3.2'

services:
  drone-server:
    image: drone/drone
    privileged: true
    hostname: drone-server
    networks:
      - webnet
      - dronenet
      - dbnet
    volumes:
      - /docker/drone/data:/var/lib/drone/
    restart: always
    deploy:
      endpoint_mode: dnsrr
    environment:
      - DRONE_OPEN=true
      - DRONE_HOST=https://EXTERNALDRONEURL
      - DRONE_GITEA=true
      - DRONE_GITEA_URL=https://MYGITEAINSTALL
      - DRONE_SECRET="SOMETHINGBLAH"
      - DRONE_ADMIN=ME
      - DRONE_MAX_PROCS=2
      - DRONE_DATABASE_DRIVER=mysql
      - DRONE_GITEA_SKIP_VERIFY=true
      - DRONE_DATABASE_DATASOURCE=CONNECTIONTOMYSQL
  drone-agent:
    image: drone/agent
    privileged: true
    deploy:
      placement:
        constraints:
          - node.labels.role == web
      replicas: 3
      endpoint_mode: dnsrr
    networks:
      - dronenet
      - dbnet
    command: agent
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET="SOMETHINGBLAHBLAH"
  drone-agent-arm:
    image: drone/agent:linux-arm
    privileged: true
    command: agent
    restart: always
    networks:
      - dronenet
      - dbnet
    deploy:
      placement:
        constraints:
          - node.hostname == RASPBERRYPIHOSTNAME
      endpoint_mode: dnsrr
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET="SOMETHINGBLAHBLAH"

networks:
  dronenet:
    external: true
  dbnet:
    external: true
  webnet:
    external: true

But the arm service is forever pending due to no correct platform…

Inspecting the service it seems to think that the drone/agent:linux-arm image is on a amd64 platform

[root@manager02 ~]# docker service inspect drone_drone-agent-arm | grep Platform -A4
                    "Platforms": [
                        {
                            "Architecture": "amd64",
                            "OS": "linux"
                        }

any ideas?


#2

Late response, but you should probably edit the 1.0 release candidate which finally has great support for multi-arch builds.