Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Research spike Arch-Z (docker-compose) #36838

Closed
efritz opened this issue Jun 8, 2022 · 3 comments
Closed

Research spike Arch-Z (docker-compose) #36838

efritz opened this issue Jun 8, 2022 · 3 comments
Assignees
Labels
needs-investigation needs RFC, spike, prototype, tech design, etc rfc-696

Comments

@efritz
Copy link
Contributor

efritz commented Jun 8, 2022

Implements a portion of RFC 696: Reduced isolation deployments for executor.

Explore how to write a docker-compose.override.yaml file with our current executor distribution so that we can loosely bundle privileged executors on compose deployments. Findings should be added to product documentation (on installing/configuring executors).

@efritz
Copy link
Contributor Author

efritz commented Jun 8, 2022

Current work in progress:

version: '2.4'
services:
  executor:
    container_name: executor
    image: 'index.docker.io/sourcegraph/executor:insiders@sha256:4909f85ba9b2446cf7c901dc735f265493b50e90acaf4cc0d36bac11d8c0d1b4'
    cpus: 1
    mem_limit: '4g'
    user: root
    privileged: true
    environment:
      # sync with `executors.frontendURL` in site config
      - EXECUTOR_FRONTEND_URL=http://sourcegraph-frontend-0:3080
      # sync with `executors.accessToken` in site config
      - EXECUTOR_FRONTEND_PASSWORD=hunter2hunter2hunter2
      # Choose what work to process
      - EXECUTOR_QUEUE_NAME=codeintel
      # Documenting defaults
      - EXECUTOR_MAXIMUM_RUNTIME_PER_JOB=30m
      - EXECUTOR_MAXIMUM_NUM_JOBS=2
      - EXECUTOR_NUM_TOTAL_JOBS=200
      - EXECUTOR_MAX_ACTIVE_TIME=2h
      # Run as root
      - UID=1000
      - GID=1000
      # Note: path must be equivalent to mounted executor-scratch (see volumes)
      - TMPDIR=/tmp/sourcegraph/executor-scratch
    volumes:
      # Note: paths must be equivalent on host and in docker
      - '/tmp/sourcegraph/executor-scratch:/tmp/sourcegraph/executor-scratch'
      - '/var/run/docker.sock:/var/run/docker.sock'
    networks:
      - sourcegraph
    restart: always

@efritz
Copy link
Contributor Author

efritz commented Jun 8, 2022

Related: #36830

@efritz
Copy link
Contributor Author

efritz commented Jun 10, 2022

A working solution can be found in this branch/PR.

@Piszmog Piszmog changed the title RFC 696: Research spike Arch-Z (docker-compose) Research spike Arch-Z (docker-compose) Jan 5, 2023
@Piszmog Piszmog added the needs-investigation needs RFC, spike, prototype, tech design, etc label Jan 5, 2023
@eseliger eseliger closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-investigation needs RFC, spike, prototype, tech design, etc rfc-696
Projects
None yet
Development

No branches or pull requests

4 participants