* Support environments with broken $HOME
Currently in standalone mode dapr cli will install the dapr runtime
binaries into $HOME/.dapr. However, in some environments $HOME is
readonly or os.UserHomeDir() can fail (e.g. AWS Lambda). To support
dapr in these environments this change does 2 things:
1. Allows the user to set DAPR_PATH environment variable to indicate
the location of the dapr runtime binaries.
2. Allows the user to optionally specify --dapr-path cli flag to
indicate the location of the dapr runtime binaries. When both
DAPR_PATH environment variable and --dapr-path CLI flag are present,
the cli flag has higher precedence.
When neither DAPR_PATH nor the --dapr-path CLI flag are present, we
fallback to existing behavior of defaulting to $HOME/.dapr.
Signed-off-by: Mike Brown <github@torvosoft.com>
* Address comments
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Address comments
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Address comments
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Fix unit test
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Fix e2e test
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Fix lint
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
Signed-off-by: Mike Brown <github@torvosoft.com>
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
* 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>
Signed-off-by: Long Dai <long0dai@foxmail.com>
Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* fix dapr latest version check for dapr init -k
* adding dashboard --version command
* printing result of version call
* updated reference doc for dashboard version command
* cleaning up commit
* added function to install dashboard binaries
* added to waitgroup
* updated installBinary method to support non-dapr repositories
* adding dashboard binaries
* binary install working for daprd and dashboard on linux
* added dashboard command for standalone
* updated dashboard documentation
* changed linux home directory to be outside of root
* fixing version issue
* moved location of extracted web folder
* fixing path issues on linux
* changed dashboard to take latest version
* updated documentation for dashboard standalone
* fixed issue where binary name was unknown in non-default path dapr install
* added user error message for dashboard not found error
* fixing linting issues
* adding dashboard compatibility changes
* mark dashboard flag as required
* syncing compatibility branch and master
* fixing uninstall error
* removing unnecessary check
* removing unused constants
* changed standalone untar method openfile mode
* added missing error message
* removed windows binary check in untar method
* updating unzip method to support multiple files in archive
* adding sanitizeExtractPath method and limiting archive copy bytes
* changed max file size to 100MB
* removing max file size limit
* removing debug statement
* Adding dashboard command to allow for standalone dashboard launch
* removed -rc tag downloads for dashboard
* removing extra alias
* adding function moveDashboardFiles to simplify installBinary function
* moving dashboard command logic to standalone/dashboard.go
* removing error channel from moveDashboardFiles
* removing error channel from moveDashboardFiles
Co-authored-by: Shalabh Mohan Shrivastava <shalabhs@microsoft.com>
* added function to install dashboard binaries
* added to waitgroup
* updated installBinary method to support non-dapr repositories
* adding dashboard binaries
* binary install working for daprd and dashboard on linux
* added dashboard command for standalone
* updated dashboard documentation
* changed linux home directory to be outside of root
* fixing version issue
* moved location of extracted web folder
* fixing path issues on linux
* changed dashboard to take latest version
* updated documentation for dashboard standalone
* fixed issue where binary name was unknown in non-default path dapr install
* added user error message for dashboard not found error
* fixing linting issues
* adding dashboard compatibility changes
* mark dashboard flag as required
* syncing compatibility branch and master
* fixing uninstall error
* removing unnecessary check
* removing unused constants
* changed standalone untar method openfile mode
* added missing error message
* removed windows binary check in untar method
* updating unzip method to support multiple files in archive
* adding sanitizeExtractPath method and limiting archive copy bytes
* changed max file size to 100MB
* removing max file size limit
* removing debug statement
* removing tabs in cmd/dashboard.go
* fixing whitespace issues
Co-authored-by: Shalabh Mohan Shrivastava <shalabhs@microsoft.com>
* removed prerequisite for dapr dashboard command
* updated dashboard command to accept namespace
* removed -n flag to set namespace
* fixing linting issues
* dapr dashboard command now supports -n namespace argument
* fixing format issue
* printing error on failed k8s config load
* added defaultNamespace constant, fixed duplication bug
* changed to tell user which namespace dashboard is found in
* removed extra comment