[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid-Compose #1022

Open
xmonader opened this issue May 20, 2024 · 1 comment
Open

Grid-Compose #1022

xmonader opened this issue May 20, 2024 · 1 comment
Assignees
Labels
compose type_feature New feature or request
Milestone

Comments

@xmonader
Copy link
Contributor
xmonader commented May 20, 2024

Grid-Compose

Should allow users to define and manage their own multi-vm applications in a single compose file and deploy them on threefold farms, driven by yaml spec file where you define services, networks and disks used (similar to Docker Compose).

Main Components

Verison

To Specify the grid-compose version for backward compatibility

version: '1.0.0'

Networks

networks:
  net1:
    type: 'wg'
  net2:
    type: 'mycelium'
  net3:
    type: 'yggdrasil'
  net4:
    type: 'publicip4'
  net5:
    type: 'publicip6'

Services

Where you define each service, its flists, env variables, resources, .. etc and we can also define the dependencies using e.g depends_on: list of service names

e.g

services:
  web:
    flist: 'https://hub.grid.tf/tf-official-apps/nginx-latest.flist'
    environment:
      - ENV_VAR_NAME=value
    volumes:
      - web-data:/data

    networks:
      - net1
    resources:
      cpu: 2
      memoryGB: 50.5
  database:
    flist: 'https://hub.grid.tf/tf-official-apps/postgresql-latest.flist'
    environment:
      - POSTGRES_DB=mydb
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=secret
    volumes:
      - db-data:/var/lib/postgresql/data
    
    networks:
      - net1
      - net2
      - net3
    resources:
      cpu: 4
      memoryGB: 2

Storage

storage:
  web-data:
    type: 'zmount'
    driver_opts:
      size: 10GB
  db-data:
    type: 'zmount'
    driver_opts:
      size: 20GB

Extra

Healthcheck

we can start with something like this for each service

    healthcheck:
      test: ['CMD', 'curl' , 'http://{myceliumip}']
      interval: 1m30s
      timeout: 10s
      retries: 3

Scaling

TBD

Secrets

It's not always environment variables, it can be injected from somewhere else, but for now I believe env vars or even env files are more than enough

@ramezsaeed ramezsaeed added this to the 1.1.0 milestone May 27, 2024
@Omarabdul3ziz Omarabdul3ziz self-assigned this May 28, 2024
@rawdaGastan rawdaGastan modified the milestones: 1.1.0, v0.16.0 Jul 4, 2024
@Omarabdul3ziz
Copy link
Contributor
Omarabdul3ziz commented Jul 23, 2024
  • explore repo and grid-client
  • start with the basic commands. up, down, ps
  • manage znetworks between services
  • add the checkhealth and dependson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compose type_feature New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

5 participants