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

Local Developer Experience - Run multiple dapr apps using dapr run -f #1123

Closed
6 tasks done
shubham1172 opened this issue Nov 2, 2022 · 10 comments
Closed
6 tasks done
Assignees
Labels
Epic An issue which represents a larger set of issues with a common theme kind/proposal A new proposal to be considered pinned
Milestone

Comments

@shubham1172
Copy link
Member

shubham1172 commented Nov 2, 2022

Describe proposal

This is related to the implementation of the proposal https://github.com/dapr/proposals/blob/main/0003-I-enhance-dapr-run-multiple-apps.md

Targets for v1.10

The main requirements for the command:

Future enhancements - moved to #1240

Describe the proposal (Old version)

This issue derives from dapr/community#207 to propose two new commands -
dapr compose up and dapr compose down.

Compose file structure

version: 1
common:
  environment:  # any environment variable shared among apps
    - DEBUG: true
services:
  - id: kafka
    image: docker.io/bitnami/kafka
    port: 4040
    environment:
      - KAFKA_BROKER_ID: 1
apps:
  - id: webapp
    root_directory: ./webapp/
    components_directory: ./webapp/components # can be default by convention too, ignore if dir is not found.
    config_file: ./webapp/config.yaml # can be default by convention too, ignore if file is not found.
    protocol: HTTP
    port: 8080
    command: python3 app.py
  - id: backend
    root_directory: ./backend/
    components_directory: ./backend/components # can be default by convention too, ignore if dir is not found.
    config_file: ./backend/config.yaml # can be default by convention too, ignore if file is not found.
    protocol: GRPC
    port: 3000
    env:
      - DEBUG: false
    command: ./backend

User experience

  • The user can run dapr compose up to start these services and apps
  • If something crashes, it will be restarted with exponential back-off until a back-off limit
  • If ports are missing, compose automatically finds a free port
  • The user can run dapr compose down to gracefully stop everything

Open questions

  1. Should we separate services into another proposal?
  2. Should we support running apps in containers directly?
  3. Should we support running alternate container runtime (like podman) since CLI already does that?

Release Note

RELEASE NOTE: ADD Dapr compose up and down

@shubham1172 shubham1172 added the kind/proposal A new proposal to be considered label Nov 2, 2022
@mukundansundar mukundansundar added this to the v1.10 milestone Nov 7, 2022
@mukundansundar mukundansundar self-assigned this Nov 8, 2022
@mukundansundar
Copy link
Collaborator

Related PR dapr/proposals#6

@mukundansundar
Copy link
Collaborator

mukundansundar commented Dec 5, 2022

Issues to be created

  • Implement YAML template processing with UTs for the run configuration file.

  • Add capability to look for resources under given input directory and fallback to default if not present with UTs

  • Implement basic dapr run -f with E2Es. Generate the ports automatically and inject as env var into app (HTTP, GRPC, Internal GRPC and Metrics). Write logs to file and STDOUT See io.MultiWriter)(Run apps sequentially)

  • (Optional if not in future release)Enhance the template to have a depends_on field and run apps in parallel

  • Enhance dapr run to store logs temporarily for any run not only dapr run -f.

  • Enhance dapr logs to view logs (Use the folder path defined above and tail log files)

  • Add a detached mode for run command -d

@mukundansundar
Copy link
Collaborator

@yaron2 Please take a look on the issues list ... Will be creating them soon

@mukundansundar mukundansundar added the Epic An issue which represents a larger set of issues with a common theme label Dec 5, 2022
@mukundansundar
Copy link
Collaborator

Related PR dapr/proposals#6

This proposal has been accepted for implementation ...

@philliphoff
Copy link
Contributor

@mukundansundar I've created several proposals (#1153, #1154, #1155) based on our earlier conversation as to how best accommodate tooling with this new feature.

@greenie-msft
Copy link
Contributor

@mukundansundar is there a docs issue for this effort already?

@mukundansundar mukundansundar changed the title [EPIC] Dapr Compose - Ability to start and stop Dapr apps and services [EPIC] Local Developer Experience - Run multiple dapr apps using dapr run -f Jan 5, 2023
@mukundansundar mukundansundar changed the title [EPIC] Local Developer Experience - Run multiple dapr apps using dapr run -f Local Developer Experience - Run multiple dapr apps using dapr run -f Jan 5, 2023
@hhunter-ms
Copy link

@mukundansundar is there a docs issue for this effort already?

Docs issue: dapr/docs#3047

@mukundansundar
Copy link
Collaborator

moving this Epic to another milestone ... initial implementation as part of 1.10 is done as seen in the linked issues above.

@philliphoff
Copy link
Contributor

Where does "native" Windows support sit relative to other tasks (if at all)?

@artursouza artursouza modified the milestones: v1.11, v1.10 Feb 21, 2023
@artursouza
Copy link
Member

@mukundansundar Please, create a new issue for enhancements in 1.10

@github-project-automation github-project-automation bot moved this from In Progress to Done in 1.10 Release Tracking Board Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic An issue which represents a larger set of issues with a common theme kind/proposal A new proposal to be considered pinned
Projects
No open projects
Development

No branches or pull requests

7 participants