Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

#965 change dapr startup from daprd to dapr CLI #966

Merged
merged 1 commit into from
Mar 9, 2021
Merged

#965 change dapr startup from daprd to dapr CLI #966

merged 1 commit into from
Mar 9, 2021

Conversation

mmisztal1980
Copy link
Contributor

@mmisztal1980 mmisztal1980 commented Mar 9, 2021

This PR:

@rynowak
Copy link
Member

rynowak commented Mar 9, 2021

I've been chatting with @mmisztal1980 - about this one. We launch dapr sidecars using daprd (the actual sidecar) directly because dapr run didn't have all of the arguments we needed we first built Tye. The drawback is that dapr run does more, and is where things like dashboard integration get set up. Now that dapr run exposes all of the functionality we need, this is better 👍

@@ -271,23 +271,23 @@ private string GetDaprExecutablePath()
// Starting with dapr version 11, dapr is installed in user profile/home.
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var windowsPath = Environment.ExpandEnvironmentVariables("%USERPROFILE%/.dapr/bin/daprd.exe");
var windowsPath = Environment.ExpandEnvironmentVariables("%HOMEDRIVE%/dapr/dapr.exe");
Copy link
Contributor

Choose a reason for hiding this comment

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

@rynowak is there any plan to move dapr.exe outside of the %HOMEDRIVE%?

Copy link
Member

Choose a reason for hiding this comment

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

I would think not since it's 1.0.

@jkotalik jkotalik merged commit 3d3164c into dotnet:master Mar 9, 2021
@jkotalik
Copy link
Contributor

jkotalik commented Mar 9, 2021

Thanks!

@mmisztal1980 mmisztal1980 deleted the bug/965 branch March 9, 2021 22:58
@mmisztal1980
Copy link
Contributor Author

@jkotalik any chance this change is available in the upcoming nightly build?

@jkotalik
Copy link
Contributor

jkotalik commented Mar 9, 2021

Yeah it will be available shortly. https://github.com/dotnet/tye/blob/master/docs/getting_started.md#working-with-ci-builds

@mmisztal1980
Copy link
Contributor Author

mmisztal1980 commented Mar 10, 2021

@jkotalik I've updated the tool, which resolved to: Tool 'microsoft.tye' (version '0.7.0-alpha.21153.4') was successfully installed.
I've run my services locally and the dapr dashboard, however I did not observe the desired effect.

Did the nightly build emit the artifact successfully? I can see that my change was built: https://dnceng.visualstudio.com/public/_build/results?buildId=1030021&view=results however the build number 20210309.5 differs from the revision number of the recently downloaded alpha (unless I got the versioning wrong or it's a different pipeline alltogether)

@jkotalik
Copy link
Contributor

What happens when you run tye --version?

@mmisztal1980
Copy link
Contributor Author

mmisztal1980 commented Mar 10, 2021

@jkotalik here you go

tye --version
0.7.0-alpha.21153.4+528c743efc48eb0c5aa18c9272fac5235f38b0ed

@jkotalik
Copy link
Contributor

Hm, for some reason your change didn't make it to a public build. I'll look into it.

@jkotalik
Copy link
Contributor

In the mean time, you can also build from source: https://github.com/dotnet/tye/blob/master/docs/developer_guide.md#using-local-builds

@jkotalik
Copy link
Contributor

@mmisztal1980 it's available now.

@mmisztal1980
Copy link
Contributor Author

mmisztal1980 commented Mar 10, 2021

@jkotalik fooling around with the locally-built version, trying to run one of the samples (pub-sub) to verify that the change is working, however the services are in a crash-loop.

I've stopped and removed all containers prior to executing tye run, so I'm guessing it's not the well-known redis port conflict issue - any hints how can I diagnose what's going on?

The dapr dashboard remains empty at this time - my guess it due to the issue I'm experiencing

image

 docker ps
CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS          PORTS                      NAMES
92d121b89e6d   mcr.microsoft.com/dotnet/core/sdk:3.1   "dotnet Microsoft.Ty…"   55 seconds ago   Up 51 seconds                              orders-proxy_dadf5689-e
b566fe6baf73   mcr.microsoft.com/dotnet/core/sdk:3.1   "dotnet Microsoft.Ty…"   55 seconds ago   Up 51 seconds                              products-proxy_7835b9ca-f
4c667c5b6d03   mcr.microsoft.com/dotnet/core/sdk:3.1   "dotnet Microsoft.Ty…"   55 seconds ago   Up 50 seconds                              store-dapr-proxy_63c77d5a-9
8138b12d2ab6   mcr.microsoft.com/dotnet/core/sdk:3.1   "dotnet Microsoft.Ty…"   55 seconds ago   Up 51 seconds                              products-dapr-proxy_ce5a0d76-7
e2ccb3d95224   daprio/dapr                             "./placement"            55 seconds ago   Up 51 seconds   0.0.0.0:51380->50005/tcp   placement_4694fb85-c
da5e227d3686   mcr.microsoft.com/dotnet/core/sdk:3.1   "dotnet Microsoft.Ty…"   55 seconds ago   Up 52 seconds                              orders-dapr-proxy_daedc872-f
edb335a0c96d   mcr.microsoft.com/dotnet/core/sdk:3.1   "dotnet Microsoft.Ty…"   55 seconds ago   Up 52 seconds                              store-proxy_a069375b-f
fa899117260d   redis                                   "docker-entrypoint.s…"   55 seconds ago   Up 52 seconds   0.0.0.0:6379->6379/tcp     redis_a3b4f8ca-9

@mmisztal1980
Copy link
Contributor Author

found something, working on it

@mmisztal1980
Copy link
Contributor Author

I've managed to fix the crash-loop, the tye run local environment is stable, however the dapr dashboard is empty.
image

@rynowak any hints?

[22:49:34 INF] Executing application from D:\Checkout\tye\samples\dapr\pub-sub\tye.yaml
[22:49:35 INF] Dashboard running on http://127.0.0.1:8000
[22:49:36 INF] Docker image redis already installed
[22:49:36 INF] Docker image daprio/dapr already installed
[22:49:36 INF] Creating docker network tye_network_3547df07-4
[22:49:36 INF] Running docker command network create --driver bridge tye_network_3547df07-4
[22:49:37 INF] Running image redis for redis_241d5926-b
[22:49:37 INF] Running image daprio/dapr for placement_7e2fa832-d
[22:49:37 INF] Building projects
[22:49:40 INF] Running container redis_241d5926-b with ID afe8f1fa4f8a
[22:49:40 INF] Running docker command network connect tye_network_3547df07-4 redis_241d5926-b --alias redis
[22:49:40 INF] Running container store-proxy_03d2042d-c with ID 9a20937e6988
[22:49:40 INF] Running docker command network connect tye_network_3547df07-4 store-proxy_03d2042d-c --alias store
[22:49:41 INF] Launching service products_7bed6681-e: D:\Checkout\tye\samples\dapr\pub-sub\products\bin\Debug\netcoreapp3.1\products.exe
[22:49:41 INF] Launching service orders_f558bac5-9: D:\Checkout\tye\samples\dapr\pub-sub\orders\bin\Debug\netcoreapp3.1\orders.exe
[22:49:41 INF] Launching service products-dapr_cb5ca785-4: C:/dapr/dapr.exe run --app-id products --app-port 52296 --dapr-grpc-port 52303 --dapr-http-port 52304 --placement-host-address localhost:52293 --log-level debug --components-path ./components/
[22:49:41 INF] Launching service store_48f71d31-b: D:\Checkout\tye\samples\dapr\pub-sub\store\bin\Debug\netcoreapp3.1\store.exe
[22:49:41 INF] Launching service store-dapr_95baa976-8: C:/dapr/dapr.exe run --app-id store --app-port 52298 --dapr-grpc-port 52306 --dapr-http-port 52307 --placement-host-address localhost:52293 --log-level debug --components-path ./components/
[22:49:41 INF] Launching service orders-dapr_de2f8f43-7: C:/dapr/dapr.exe run --app-id orders --app-port 52294 --dapr-grpc-port 52300 --dapr-http-port 52301 --placement-host-address localhost:52293 --log-level debug --components-path ./components/
[22:49:41 INF] products_7bed6681-e running on process id 21844 bound to http://localhost:52296, https://localhost:52297
[22:49:41 INF] Replica products_7bed6681-e is moving to a ready state
[22:49:41 INF] Running container orders-proxy_16a2a8b8-9 with ID 419f2d1b761e
[22:49:41 INF] Running docker command network connect tye_network_3547df07-4 orders-proxy_16a2a8b8-9 --alias orders
[22:49:41 INF] orders_f558bac5-9 running on process id 26872 bound to http://localhost:52294, https://localhost:52295
[22:49:41 INF] Replica orders_f558bac5-9 is moving to a ready state
[22:49:41 INF] products-dapr_cb5ca785-4 running on process id 1876 bound to https://localhost:52303, http://localhost:52304, http://localhost:52305
[22:49:41 INF] Replica products-dapr_cb5ca785-4 is moving to a ready state
[22:49:41 INF] store_48f71d31-b running on process id 12940 bound to http://localhost:52298, https://localhost:52299
[22:49:41 INF] store-dapr_95baa976-8 running on process id 13840 bound to https://localhost:52306, http://localhost:52307, http://localhost:52308
[22:49:41 INF] orders-dapr_de2f8f43-7 running on process id 18616 bound to https://localhost:52300, http://localhost:52301, http://localhost:52302
[22:49:41 INF] Replica store_48f71d31-b is moving to a ready state
[22:49:41 INF] Replica store-dapr_95baa976-8 is moving to a ready state
[22:49:41 INF] Replica orders-dapr_de2f8f43-7 is moving to a ready state
[22:49:41 INF] Selected process 21844.
[22:49:41 INF] Selected process 26872.
[22:49:41 INF] Listening for event pipe events for products_7bed6681-e on process id 21844
[22:49:41 INF] Listening for event pipe events for orders_f558bac5-9 on process id 26872
[22:49:42 INF] Selected process 12940.
[22:49:42 INF] Listening for event pipe events for store_48f71d31-b on process id 12940
[22:49:44 INF] Replica redis_241d5926-b is moving to a ready state
[22:49:44 INF] Collecting docker logs for redis_241d5926-b.
[22:49:44 INF] Running container products-proxy_6431a91d-6 with ID 52ee2aef02c3
[22:49:44 INF] Running docker command network connect tye_network_3547df07-4 products-proxy_6431a91d-6 --alias products
[22:49:44 INF] Running container orders-dapr-proxy_76f612ac-3 with ID 00e30e026355
[22:49:44 INF] Running docker command network connect tye_network_3547df07-4 orders-dapr-proxy_76f612ac-3 --alias orders-dapr
[22:49:44 INF] Running container store-dapr-proxy_06ff3263-b with ID b4dd349d5c7b
[22:49:44 INF] Running docker command network connect tye_network_3547df07-4 store-dapr-proxy_06ff3263-b --alias store-dapr
[22:49:44 INF] Collecting docker logs for store-proxy_03d2042d-c.
[22:49:44 INF] Running container placement_7e2fa832-d with ID 3b7dd7d3e5c4
[22:49:44 INF] Running docker command network connect tye_network_3547df07-4 placement_7e2fa832-d --alias placement
[22:49:44 INF] Running container products-dapr-proxy_bb4be1f3-9 with ID 6f5fd5281bf6
[22:49:44 INF] Running docker command network connect tye_network_3547df07-4 products-dapr-proxy_bb4be1f3-9 --alias products-dapr
[22:49:44 INF] Collecting docker logs for orders-proxy_16a2a8b8-9.
[22:49:45 INF] Collecting docker logs for products-proxy_6431a91d-6.
[22:49:45 INF] Collecting docker logs for orders-dapr-proxy_76f612ac-3.
[22:49:45 INF] Collecting docker logs for store-dapr-proxy_06ff3263-b.
[22:49:45 INF] Replica placement_7e2fa832-d is moving to a ready state
[22:49:45 INF] Collecting docker logs for placement_7e2fa832-d.
[22:49:45 INF] Collecting docker logs for products-dapr-proxy_bb4be1f3-9.
[22:49:46 INF] Failed to collect diagnostics for products-dapr_cb5ca785-4 after 00:00:05.
[22:49:46 INF] Failed to collect diagnostics for store-dapr_95baa976-8 after 00:00:05.
[22:49:46 INF] Failed to collect diagnostics for orders-dapr_de2f8f43-7 after 00:00:05.

jkotalik added a commit that referenced this pull request May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants