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

V2 - Disable Services #140

Merged
merged 7 commits into from
Nov 14, 2024
Merged

V2 - Disable Services #140

merged 7 commits into from
Nov 14, 2024

Conversation

marcus-snx
Copy link
Contributor

  • remove postgres database (and foreign migration for parquet scripts)
  • replace indexers service with new version
  • remove the postgres and individual processor services from docker-compose.yaml

@marcus-snx marcus-snx requested a review from Tburm November 13, 2024 20:34
env_file:
- .env
environment:
AIRFLOW__CORE__EXECUTOR: LocalExecutor
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://postgres:$PG_PASSWORD@db:5432/postgres
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually do this part without impacting airflow? I thought this refers to airflow using the database to store information about jobs. It's possible this isn't actually happening so everything will be fine though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this makes sense, I thought it was using this only for access inside the container network. I'll have a look at the airflow docs tomorrow and see what's the minimum we need for it to work well in production.

Comment on lines 2 to 30
db:
image: ghcr.io/synthetixio/data/postgres:${VERSION}
indexer:
build:
context: ./postgres
dockerfile: Dockerfile
restart: always
networks:
- data
environment:
POSTGRES_PASSWORD: $PG_PASSWORD
PGDATA: /var/lib/postgresql/data
POSTGRES_SHARED_BUFFERS: "4GB"
POSTGRES_WORK_MEM: "100MB"
POSTGRES_MAINTENANCE_WORK_MEM: "1GB"
POSTGRES_EFFECTIVE_CACHE_SIZE: "8GB"
volumes:
- ./postgres/initdb:/docker-entrypoint-initdb.d
- ./postgres-data:/var/lib/postgresql/data
- ./parquet-data:/parquet-data
ports:
- "${DB_PORT}:5432"
deploy:
resources:
limits:
cpus: "4.0"
memory: 8192M
shm_size: 4gb
tmpfs:
- /dev/shm:size=4g
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check if this impacts airflow. If it does, I think we can scale it down significantly but may need to keep some of this.

@marcus-snx
Copy link
Contributor Author

@Tburm I've added the postgres service again, will test it out and see how much we can downscale it once I have the pipeline setup done for the scheduler part

@Tburm
Copy link
Contributor

Tburm commented Nov 14, 2024

image this is my favorite part

@Tburm Tburm merged commit 6c0b1d2 into main-v2 Nov 14, 2024
1 check passed
@Tburm Tburm deleted the feat/disable-services branch November 14, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants