Skip to content

Commit

Permalink
Metadata Manager Restructuring (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamputraintan authored Jan 23, 2024
1 parent 5b2b5b4 commit 346780c
Show file tree
Hide file tree
Showing 86 changed files with 182 additions and 7,889 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ test:
# Python (conda or venv), Rust and Cargo, TypeScript and Node environment, Docker and Container runtimes
suite: test
@(cd lib/workload/stateless/sequence_run_manager && $(MAKE) test)
@(cd lib/workload/stateless/metadata_manager && $(MAKE) test)
@#(cd lib/workload/stateless/filemanager && $(MAKE) test) # FIXME uncomment when ready @Marko
@#(cd lib/workload/stateless/metadata_manager && $(MAKE) test) # FIXME uncomment when ready @William

clean:
@yarn clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ COPY dbschema/migrations ./dbschema/migrations
COPY dbschema/*.esdl ./dbschema/

RUN make install
RUN make edgetypes

ENTRYPOINT [ "make", "start", "EDGEDB_HOST=edgedb" ]
ENTRYPOINT [ "cross-env" "EDGEDB_HOST=edgedb" "yarn" "start" ]
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
EDGEDB_HOST ?= localhost

# Installation
# installation
install:
@yarn install

# To run docker compose
# docker compose shortcut
up:
@docker compose up -d
@docker compose up --wait -d

down:
@docker compose down

stop:
@docker compose down

# Build the app for deployment
docker-edgedb:
@docker compose up --wait -d edgedb

edgetypes:
# asset build
edgetypes: | docker-edgedb
@yarn run -B generate queries --target ts --file --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure # pragma: allowlist secret
@yarn run -B generate edgeql-js --target ts --output-dir dbschema/edgeql-js --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure # pragma: allowlist secret
@yarn run -B generate interfaces --file dbschema/interfaces.ts --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure # pragma: allowlist secret
Expand All @@ -35,31 +37,38 @@ build: edgetypes
@rm -rf nodejs

# Testing
test:

# full test pipeline
test: install docker-edgedb edgetypes suite

suite:
@yarn test

# Starting server
start: edgetypes
@yarn start
start-scenario-1: edgetypes
@yarn run insert-scenario-1
start: up

stop: down

# development
start-dev: docker-edgedb edgetypes
@yarn start

# Start in watch mode
watch: edgetypes
watch-dev: docker-edgedb edgetypes
@yarn run insert-scenario-1
@yarn watch

# Inserting scenarios
insert-scenario-1:
@yarn run insert-scenario-1

insert-scenario-2:
@yarn run insert-scenario-2

# Shortcut of edgedb cli
edgedb:
edgedb: | docker-edgedb
@edgedb --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure # pragma: allowlist secret
edgedb-ui:
edgedb-ui: | docker-edgedb
@edgedb ui --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure --no-server-check # pragma: allowlist secret
edgedb-migrate:
edgedb-migrate: | docker-edgedb
@edgedb migrate --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure # pragma: allowlist secret
edgedb-migration-create:
edgedb-migration-create: | docker-edgedb
@edgedb migration create --dsn edgedb://orcabus_admin:admin@$(EDGEDB_HOST):5656 --tls-security insecure # pragma: allowlist secret
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ services:
- './dbschema:/dbschema'
ports:
- '5656:5656'
healthcheck:
test: ["CMD", "curl", "-f", "http://edgedb:5656/server/status/alive"]
interval: 30s
timeout: 60s
retries: 5
start_period: 30s

app:
build: .
Expand All @@ -26,3 +32,6 @@ services:
- '8080:8080'
links:
- edgedb
depends_on:
edgedb:
condition: service_healthy
10 changes: 0 additions & 10 deletions lib/workload/stateless/metadata_manager/src/deploy/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions lib/workload/stateless/metadata_manager/src/deploy/.npmignore

This file was deleted.

49 changes: 0 additions & 49 deletions lib/workload/stateless/metadata_manager/src/deploy/asset/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions lib/workload/stateless/metadata_manager/src/deploy/bin/deploy.ts

This file was deleted.

63 changes: 0 additions & 63 deletions lib/workload/stateless/metadata_manager/src/deploy/cdk.json

This file was deleted.

This file was deleted.

Loading

0 comments on commit 346780c

Please sign in to comment.