- A repository that contains graphql services to manage and create workflows and entities for use with the CZ ID application.
To start both the entities
and workflows
services use
make init
Note that the Redis port of czid-web
and workflows
are the same, so if the initialization fails, you can stop the czid-web
redis container and try again.
After the services are running, the graphql services have endpoints at
http://localhost:8008/graphql ## entities
http://localhost:8042/graphql ## workflows
for entities and workflows respectively.
To generate a token for entities GQL queries:
cd entities/
# This will copy `{"Authorization": "<token>"}` to your clipboard, which you can paste into the GraphQL UI, under "Headers" at the bottom
make local-token
- ER Diagram: https://github.com/chanzuckerberg/czid-platformics/tree/main/entities/schema
- YAML: https://github.com/chanzuckerberg/czid-platformics/blob/main/entities/schema/platformics.yaml
This project uses happy for cloud deployment. The happy environments are defined in the idseq-infra repo.
We have defined GitHub Actions for deploying the services in each environment. To trigger these actions:
- Select the appropriate workflow for the environment you want to deploy to (for example, Deploy to Sandbox)
- Click
Run workflow
. - Select the branch you want to deploy. The default is
main
. - Select which service (entities or workflows) to deploy.
- Note: When possible, it's recommended to deploy both services to ensure that changes are in sync.
- Click the green
Run workflow
button.
Create a new stack:
- Make sure you have happy installed. You can follow the installation instructions for happy here.
- Run
happy create <your-stack-name> -env [dev, sandbox, staging, prod]
in the directory of the service you want to start (eitherentities
orworkflows
). - You should be able to see the service running at
<your-stack-name>.<env>.happy.czid.org/graphql
. - If migrations still need to be run, you can run them with
happy migrate <your-stack-name> –env [dev, sandbox, staging, prod]
.- If the job fails, you can also run migrations by shelling into the container with
happy shell <your-stack-name> [workflows/entities] –env [dev, sandbox, staging, prod]
and runningsh scripts/migrate.sh
.
- If the job fails, you can also run migrations by shelling into the container with
- If you need seed data, shell into the container with
happy shell <your-stack-name> [workflows/entities] –env [dev, sandbox, staging, prod]
then runpython3 scripts/seed.py
. - If you need seeded workflow versions/entities to run a workflow, shell into the container with
happy shell <your-stack-name> [workflows/entities] –env [dev, sandbox, staging, prod]
and runpython3 scripts/seed/[consensus-genome, bulk-downloads, etc]
.
Shell into a stack:
happy shell <your-stack-name> [workflows/entities] –env [dev, sandbox, staging, prod]
Update an existing stack:
happy update <your-stack-name> –env [dev, sandbox, staging, prod]
Get logs from a stack:
happy logs <your-stack-name> <entities/workflows> --env [dev, sandbox, staging, prod]
For more information on happy, read their docs here.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
Please disclose security issues responsibly by contacting [email protected].