Commit Graph

41 Commits

Author SHA1 Message Date
Stuart Leeks 668bab451d
Add --run-file support for stdin (#1364)
If the run-file argument is speficied as '-', read the config file from stdin

Signed-off-by: Stuart Leeks <stuartle@microsoft.com>
2023-11-22 07:04:02 -08:00
Pravin Pushkar 6738eefe2b
Multiapp run and stop implementation for windows (#1315)
* windows impl for multiapp run

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Uncommenting run on windows

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix static checks

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Kill children and grand children forcefully

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* ommiting tests for wiondows

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* rename method

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* shut down all processes

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Use job handle and named evens together to kill the processes

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* lint fix

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* revert wait to kill

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Adding E2E for windows template file run

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* rename job name

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* build failure

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

---------

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2023-08-30 11:06:40 +05:30
Mohit Pal Singh 2751f5fa74
Fix for Quote in username errors dapr init #972 (#1322)
* Fix for Quote in username errors dapr init #972

Signed-off-by: mrmtheboss <starktony239@gmail.com>

* addressed a GitHub Actions Check failure

Signed-off-by: mrmtheboss <starktony239@gmail.com>

* Addressed Shubham's comments

Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>

* Addressed Shubham's new comments

Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>

* Addressed a GitHub actions failure

Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>

* Update utils/utils.go

Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>

* Added Unit test for SanitizeDir() in utils/utils_test.go

Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>

* Addressed a GitHub actions failure

Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>

* Update comment.

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

---------

Signed-off-by: mrmtheboss <starktony239@gmail.com>
Signed-off-by: Mohit Pal Singh <mohit.pal.singh@outlook.com>
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: mrmtheboss <starktony239@gmail.com>
Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
2023-06-26 11:50:24 -07:00
Shubham Sharma 35f324a09e
Merge branch 'master' into shubham1172/merge-release-1.11 2023-06-10 18:24:23 +05:30
Shubham Sharma 77fbc192ea
Fix checks for container runtime installation (#1307)
* Check container runtime while installing

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix lint

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix lint (another attempt)

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

---------

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2023-06-09 11:14:23 +05:30
Mukundan Sundararajan c3f08b0679
add app channel address flag for run (#1283)
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2023-05-31 05:21:02 -07:00
Tharun K 756b541ae4
handle home directory prefix (#1247)
* handle home directory prefix

Signed-off-by: tharun634 <tharun634@gmail.com>

* add test

Signed-off-by: tharun634 <tharun634@gmail.com>

* lint + remove $HOME prefix

Signed-off-by: tharun634 <tharun634@gmail.com>

* windows check + homeDirPrefix const

Signed-off-by: tharun634 <tharun634@gmail.com>

---------

Signed-off-by: tharun634 <tharun634@gmail.com>
Co-authored-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2023-04-05 12:03:12 +05:30
Pravin Pushkar 7e00eb4f03
Fix dashboard port conflict message and allow starting on random port (#1189)
* fix dashboard start

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* added comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

---------

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2023-01-31 10:35:02 +05:30
Shubham Sharma b51eda4876
Make JSON and YAML output consistent across `list`, `components`, and `configurations` commands (#1172)
* Fix formatting

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update UT

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update UT

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update E2E

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2023-01-19 23:23:31 -08:00
Pravin Pushkar 9d18f86768
find dapr.yaml in dirpath when dapr run -f <dirpath> is executed (#1166)
* find dapr.yaml in dirpath when dapr run -f <dirpath> is executed

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* modtidy

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* get rid of afero

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* merge fixes

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2023-01-19 10:06:01 -08:00
Pravin Pushkar c1f9627ed6
Apps run config template parsing (#1152)
* initial commit for run template parsing

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* some code refactor.

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* add some UTs

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* call validate

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* add tests and correct err message

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* refactor Runconfig into 2 structs

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Fix Arg parsing

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix UTs. make app-id be inferred from app-dir if empty

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix tests

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* put config reltd code into separate folder

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* merge logic for common and apps section of flags.

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* adding tests and few refactoring

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix tests

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* file close

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* refactor file names

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* resolve path to abs and add more e2e for path resolving

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* address review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* remove getAppskeysmapping

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* add tests, and fix issue for setitng app id when empty.

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix tests

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2023-01-03 17:19:59 +05:30
Pravin Pushkar 63f14c36f9
mariner renew-certificate fix (#1139)
* mariner renew-certificate fix

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* added UT and E2E test

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* lint fix

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Update cmd/renew_certificate.go

Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* address review commnets

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* lint fix

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* trigger pr checks

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Update utils/utils_test.go

Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Update utils/utils_test.go

Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Update pkg/kubernetes/renew_certificate.go

Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* added inline comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* trigger pr checks

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* adding usage doc

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-07 18:14:10 +05:30
Shubham Sharma 07cf0553dc
Validate and limit container runtime configuration in init and uninstall commands (#1099)
* Limit container runtime

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Lint

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update docs for container runtime flag

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add uninstall e2e test

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update uninstallcmd

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix skip in e2e

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-10-12 02:47:41 -07:00
Mukundan Sundararajan 65855d5aa0
Upgrade linter to 1.49.0 (#1051)
* Upgrade linter to 1.49.0

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>

* fix linter error

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-08-25 16:58:54 +05:30
Shivam Kumar 792eae132d
Adding mariner support in dapr init (#1029)
* Adding image-variant flag in self-hosted mode

Signed-off-by: shivam <shivamkm07@gmail.com>

* Adding image-variant in kubernetes init

Signed-off-by: shivam <shivamkm07@gmail.com>

* Adding image-variant in dapr upgrade

Signed-off-by: shivam <shivamkm07@gmail.com>

* e2e test for standalone mariner init

Signed-off-by: shivam <shivamkm07@gmail.com>

* Incorporating comments

Signed-off-by: shivam <shivamkm07@gmail.com>

* Reducing code duplicacy

Signed-off-by: shivam <shivamkm07@gmail.com>

* Formatting change

Signed-off-by: shivam <shivamkm07@gmail.com>

* Adding e2e tests for kubernetes init

Signed-off-by: shivam <shivamkm07@gmail.com>

* e2e test for upgrade

Signed-off-by: shivam <shivamkm07@gmail.com>

* Fixing linter error

Signed-off-by: shivam <shivamkm07@gmail.com>

* fix linter errors

Signed-off-by: shivam <shivamkm07@gmail.com>

* Uncommenting upgrade tsts

Signed-off-by: shivam <shivamkm07@gmail.com>

Signed-off-by: shivam <shivamkm07@gmail.com>
2022-08-25 11:14:11 +05:30
Pravin Pushkar 5a28708a12
feature/podman: Updating dapr cli to allow different container runtime (#1041)
* feature/podman: Updating dapr cli to allow providing of container
runtime.

- Ability to provide docker or podman runtime for init and uninstall commands
  by passing along the --container-runtime flag with values docker or
  podman.

Signed-off-by: Martin <7595909+martin-bucinskas@users.noreply.github.com>

* feature/podman: Updating install message to use the runtime environment

Signed-off-by: Martin <7595909+martin-bucinskas@users.noreply.github.com>

* feature/podman: Fixing linting issues.

- Fixing go lint issues by running gofumpt and gofmt.

Signed-off-by: Martin <7595909+martin-bucinskas@users.noreply.github.com>

* Correcting rebase

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* use podman for macos tests

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* setting env

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* adding docker host

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Change step title and remove docker host

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* code cleanup

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* install podman mac helper

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Refactor use of global varibale

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* matrix added for slim and complete  mode

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* correcting worflow expression

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* refactor uninstall code

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* separate uninstall test for slim and complete mode

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Signed-off-by: Martin <7595909+martin-bucinskas@users.noreply.github.com>
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Martin <7595909+martin-bucinskas@users.noreply.github.com>
2022-08-23 21:30:50 +05:30
qiangmzsx f8b48c2a8a
Removing the use of the ioutil package (#1037)
Signed-off-by: qiangmzsx <qiangmzsx@gmail.com>
2022-08-07 17:30:20 +05:30
yellow chicks 68f8325360
feature/helmchart: supported private helm chart repo to install dapr cluster (#895)
* feature/helmchart: supported private helm chart repo to install dapr cluster

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature/helmchart: supported private helm chart repo to install dapr cluster

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature/helmchart: supported private helm chart repo to install dapr cluster

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature/helmchart: supported private helm chart repo to install dapr cluster

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature/helmchart: supported private helm chart repo to install dapr cluster

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature: add a private helm repo for dapr

Signed-off-by: 1046102779 <seachen@tencent.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Co-authored-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-08-02 15:23:29 +05:30
Pravin Pushkar 6262b933f8
Switching default to Docker Hub and Minor code refactoring (#930)
* Minor refactoring

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Swithcing default to dockerhub and adding some unit tests

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* changing redis to rejson

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Revert "changing redis to rejson"

This reverts commit aed3cf72d3c7f698a1df2789986317f8d70df4ec.

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* nit fixes

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* modifying unit test to accomodate rejson to redis

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-03-28 11:00:51 -07:00
Pravin Pushkar a134860308
pull docker images from ghcr and fallback to docker if necessary (#926)
* pulling images from ghcr by default

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fixing self_hosted e2e tests

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* default all tests with ghcr and removing tests for --image-registry

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* adding tests for dockerhub install and custom registry

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fixing review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Fixing review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Review comments fix

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* Some refactoring

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

* fix for review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-03-24 11:04:13 +05:30
tanvigour 050eb553f2
Go linter upgrade to 1.44.2 (#908)
* Go linter upgrade to 1.44

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* remove old excludes and address new ones

Signed-off-by: tanvigour <tanvi.gour@gmail.com>
2022-03-07 13:18:48 +05:30
Dmitry Shmulevich 0f9d0d3a89
replaced license headers (#855)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-10 08:09:09 +05:30
Long Dai 4d75238be8
runtime: support unix domain socket (#788)
* runtime: support unix domain socket

Signed-off-by: Long <long.dai@intel.com>

* feedback

Signed-off-by: Long <long.dai@intel.com>

* update example

Signed-off-by: Long <long.dai@intel.com>
2021-10-27 13:45:34 -07:00
meijin 5334e6655a gofmt utils.go file 2021-08-17 19:17:35 +08:00
meijin 5ed20845dd dapr dashboard add address option 2021-08-17 18:52:00 +08:00
Yaron Schneider 3ee9e53338
add renewed headers (#588) 2021-02-10 08:37:08 -08:00
Phil Kedy c32aaceb34 Name filtering and output format for the components command 2021-02-04 17:45:41 -05:00
Artur Souza bccd3bd92c
Show detail config in yaml or json. (#549)
* Show detail config in yaml or json.

* Unit testing for configurations cmd.

* Small change to if clause for configurations.
2020-12-11 13:55:15 -08:00
Mukundan Sundararajan 24ca35d78b
Upgrade to linter v1.31.0 (#447)
* Upgrade to linter v1.30.0

* Remove --fix from lint

* Fix linter issues

* use golang-ci lint action

* Fix linter version

* add linter patch version

* remove linter patch version
2020-10-07 17:24:12 -07:00
Artur Souza 604c968af1
Waits for dapr sidecar before running app without port. (#461) 2020-09-15 19:11:24 -07:00
Yaron Schneider 2dfe958269
Refactor init on kubernetes to use Helm (#432)
* refactor init on kubernetes to use Helm

* linter

* linter 2

* update README

* change repo url
2020-08-13 12:59:47 -07:00
Sashi Kumar cbe46b1eb1 Check if docker is running on uninstall (#334)
* Check if docker is running on uninstall

* Add comment for exported method

* Call DeleteRunDataFile even if docker is not running

* Refactor: Move to common method and rename container to image
2020-05-15 13:26:07 -07:00
Abhishek Gupta 8699ed9a8a
Checking containers are running before "dapr init" (#226)
* checking containers are running before dapr init

* updated impl

* removed constraint for placement container

* updated RunCmdAndWait and refactored

* fix lint issues

* fix linter

* correction

Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-02-11 11:30:58 -08:00
Young Bu Park f84566fb2b
Enable linter and fix all linter errors (#241)
* Enable golangci linter

* remove gomnd

* upgrade golang lint

* upgrade go to 1.13.7

* fix messages

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-02-03 09:07:32 -08:00
Leon Mai 24557c2465
Allow alternate install path (#213)
* alternate install

* Add comment
2019-11-27 15:15:09 -08:00
Leon Mai 2d430197fd
Fix issue where cli reports success when it could not start containers #200 (#205) 2019-11-18 12:48:58 -08:00
Phillip Hoff 997ab8ce38 Allow installation of Dapr runtime into a specific Docker network (#192)
* Allow option to specify Docker network for containers.

* Add network aliases when on a specific network

* Allow Redis and placement server hosts be specified

* Don't expose container ports when on explicit network

* Use a network-specific container name.

* Update docs.

* Update per PR feedback.
2019-11-06 10:17:55 -08:00
Young Bu Park e9e261a420 Merge release-0.4 to master (#141)
* Enable uninstall to remove placement container for standalone mode (#120)

* Uninstall placement container in standalone

* fix lint error

* remove useless logging

* simplify more

* Add v0.4.0-alpha.2 rel note (#125)

* add 0.4.0-alpha.2 release note

* add changes

* wip
2019-10-11 16:22:34 -07:00
shalabhs 93e4884096 Adding code comments as part of release checklists 2019-10-09 11:14:48 -07:00
Aman Bhardwaj 6debcf2610 Adding license header and updating to MIT license. 2019-10-08 16:36:31 -07:00
yaron2 8564568ba3 initial commit 2019-06-20 15:28:52 -07:00