mirror of https://github.com/dapr/cli.git
Capitalized Dapr and uppercase CLI (#215)
* Capitalized Dapr * Fixed wording * Uppercase CLI * Missed capitalized Dapr * Fix uninstall description
This commit is contained in:
parent
eeea3d5a1b
commit
e759a815ed
10
README.md
10
README.md
|
@ -19,7 +19,7 @@ The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernet
|
||||||
|
|
||||||
**Windows**
|
**Windows**
|
||||||
|
|
||||||
Install the latest windows Dapr cli to `c:\dapr` and add this directory to User PATH environment variable.
|
Install the latest windows Dapr CLI to `c:\dapr` and add this directory to User PATH environment variable.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
powershell -Command "iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1 | iex"
|
powershell -Command "iwr -useb https://raw.githubusercontent.com/dapr/cli/master/install/install.ps1 | iex"
|
||||||
|
@ -70,10 +70,10 @@ You can install or upgrade to a specific version of the Dapr runtime using `dapr
|
||||||
# Install v0.1.0 runtime
|
# Install v0.1.0 runtime
|
||||||
$ dapr init --runtime-version 0.1.0
|
$ dapr init --runtime-version 0.1.0
|
||||||
|
|
||||||
# Check the versions of cli and runtime
|
# Check the versions of CLI and runtime
|
||||||
$ dapr --version
|
$ dapr --version
|
||||||
cli version: v0.1.0
|
CLI version: v0.1.0
|
||||||
runtime version: v0.1.0
|
Runtime version: v0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Install to a specific Docker network
|
#### Install to a specific Docker network
|
||||||
|
@ -250,7 +250,7 @@ $ dapr list --kubernetes
|
||||||
### Stop
|
### Stop
|
||||||
|
|
||||||
Use ```dapr list``` to get a list of all running instances.
|
Use ```dapr list``` to get a list of all running instances.
|
||||||
To stop an dapr app on your machine:
|
To stop a Dapr app on your machine:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ dapr stop --app-id myAppID
|
$ dapr stop --app-id myAppID
|
||||||
|
|
|
@ -47,7 +47,7 @@ func Execute(version, apiVersion string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setVersion() {
|
func setVersion() {
|
||||||
template := fmt.Sprintf("cli version: %s \nruntime version: %s", RootCmd.Version, version.GetRuntimeVersion())
|
template := fmt.Sprintf("CLI version: %s \nRuntime version: %s", RootCmd.Version, version.GetRuntimeVersion())
|
||||||
RootCmd.SetVersionTemplate(template)
|
RootCmd.SetVersionTemplate(template)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ var invokePayload string
|
||||||
|
|
||||||
var InvokeCmd = &cobra.Command{
|
var InvokeCmd = &cobra.Command{
|
||||||
Use: "invoke",
|
Use: "invoke",
|
||||||
Short: "invoke a dapr app with an optional payload",
|
Short: "Invokes a Dapr app with an optional payload",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
response, err := invoke.InvokeApp(invokeAppID, invokeAppMethod, invokePayload)
|
response, err := invoke.InvokeApp(invokeAppID, invokeAppMethod, invokePayload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
|
|
||||||
var ListCmd = &cobra.Command{
|
var ListCmd = &cobra.Command{
|
||||||
Use: "list",
|
Use: "list",
|
||||||
Short: "List all dapr instances",
|
Short: "List all Dapr instances",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if kubernetesMode {
|
if kubernetesMode {
|
||||||
list, err := kubernetes.List()
|
list, err := kubernetes.List()
|
||||||
|
@ -43,7 +43,7 @@ var ListCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(list) == 0 {
|
if len(list) == 0 {
|
||||||
fmt.Println("No dapr instances found.")
|
fmt.Println("No Dapr instances found.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ var protocol string
|
||||||
|
|
||||||
var RunCmd = &cobra.Command{
|
var RunCmd = &cobra.Command{
|
||||||
Use: "run",
|
Use: "run",
|
||||||
Short: "Launches dapr and your app side by side",
|
Short: "Launches Dapr and your app side by side",
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
viper.BindPFlag("placement-host", cmd.Flags().Lookup("placement-host"))
|
viper.BindPFlag("placement-host", cmd.Flags().Lookup("placement-host"))
|
||||||
|
|
|
@ -17,7 +17,7 @@ var stopAppID string
|
||||||
|
|
||||||
var StopCmd = &cobra.Command{
|
var StopCmd = &cobra.Command{
|
||||||
Use: "stop",
|
Use: "stop",
|
||||||
Short: "Stops a running dapr instance and its associated app",
|
Short: "Stops a running Dapr instance and its associated app",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
err := standalone.Stop(stopAppID)
|
err := standalone.Stop(stopAppID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -19,10 +19,10 @@ import (
|
||||||
var uninstallKubernetes bool
|
var uninstallKubernetes bool
|
||||||
var uninstallAll bool
|
var uninstallAll bool
|
||||||
|
|
||||||
// UninstallCmd is a command from removing an Dapr installation
|
// UninstallCmd is a command from removing a Dapr installation
|
||||||
var UninstallCmd = &cobra.Command{
|
var UninstallCmd = &cobra.Command{
|
||||||
Use: "uninstall",
|
Use: "uninstall",
|
||||||
Short: "removes a dapr installation",
|
Short: "Removes a Dapr installation",
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
viper.BindPFlag("network", cmd.Flags().Lookup("network"))
|
viper.BindPFlag("network", cmd.Flags().Lookup("network"))
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,7 +46,7 @@ git clone https://github.com/dapr/cli.git github.com/dapr/cli
|
||||||
|
|
||||||
### Build the Dapr CLI
|
### Build the Dapr CLI
|
||||||
|
|
||||||
You can build dapr CLI binaries via `make` tool and find the binaries in `./dist/{os}_{arch}/release/`.
|
You can build Dapr CLI binaries via `make` tool and find the binaries in `./dist/{os}_{arch}/release/`.
|
||||||
|
|
||||||
> Note : for windows environment with MinGW, use `mingw32-make.exe` instead of `make`.
|
> Note : for windows environment with MinGW, use `mingw32-make.exe` instead of `make`.
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Setup dapr in Kubernetes or Standalone modes
|
Setup Dapr in Kubernetes or Standalone modes
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Launches dapr and your app side-by-side
|
Launches Dapr and your app side-by-side
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -18,17 +18,17 @@ Usage:
|
||||||
|
|
||||||
Available Commands:
|
Available Commands:
|
||||||
help Help about any command
|
help Help about any command
|
||||||
init Setup dapr in Kubernetes or Standalone modes
|
init Setup Dapr in Kubernetes or Standalone modes
|
||||||
list List all dapr instances
|
list List all Dapr instances
|
||||||
publish Publish an event to multiple consumers
|
publish Publish an event to multiple consumers
|
||||||
run Launches dapr and your app side by side
|
run Launches Dapr and your app side by side
|
||||||
invoke Invoke a dapr app with an optional payload
|
invoke Invokes a Dapr app with an optional payload
|
||||||
stop Stops a running dapr instance and its associated app
|
stop Stops a running Dapr instance and its associated app
|
||||||
uninstall Removes a dapr installation
|
uninstall Removes a Dapr installation
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-h, --help help for dapr
|
-h, --help help for Dapr
|
||||||
--version version for dapr
|
--version version for Dapr
|
||||||
|
|
||||||
Use "dapr [command] --help" for more information about a command.
|
Use "dapr [command] --help" for more information about a command.
|
||||||
```
|
```
|
||||||
|
|
|
@ -10,7 +10,7 @@ $DaprRoot="c:\dapr"
|
||||||
$DaprCliFileName = "dapr.exe"
|
$DaprCliFileName = "dapr.exe"
|
||||||
$DaprCliFilePath = "${DaprRoot}\${DaprCliFileName}"
|
$DaprCliFilePath = "${DaprRoot}\${DaprCliFileName}"
|
||||||
|
|
||||||
# GitHub Org and repo hosting Dapr cli
|
# GitHub Org and repo hosting Dapr CLI
|
||||||
$GitHubOrg="dapr"
|
$GitHubOrg="dapr"
|
||||||
$GitHubRepo="cli"
|
$GitHubRepo="cli"
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ if((Get-ExecutionPolicy) -gt 'RemoteSigned' -or (Get-ExecutionPolicy) -eq 'ByPas
|
||||||
# Change security protocol to support TLS 1.2 / 1.1 / 1.0 - old powershell uses TLS 1.0 as a default protocol
|
# Change security protocol to support TLS 1.2 / 1.1 / 1.0 - old powershell uses TLS 1.0 as a default protocol
|
||||||
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
|
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
|
||||||
|
|
||||||
# Check if Dapr cli is installed.
|
# Check if Dapr CLI is installed.
|
||||||
if (Test-Path $DaprCliFilePath -PathType Leaf) {
|
if (Test-Path $DaprCliFilePath -PathType Leaf) {
|
||||||
Write-Warning "Dapr is detected - $DaprCliFilePath"
|
Write-Warning "Dapr is detected - $DaprCliFilePath"
|
||||||
Invoke-Expression "$DaprCliFilePath --version"
|
Invoke-Expression "$DaprCliFilePath --version"
|
||||||
|
@ -57,7 +57,7 @@ if ($releases.Count -eq 0) {
|
||||||
# Filter windows binary and download archive
|
# Filter windows binary and download archive
|
||||||
$windowsAsset = $releases[0].assets | where-object { $_.name -Like "*windows_amd64.zip" }
|
$windowsAsset = $releases[0].assets | where-object { $_.name -Like "*windows_amd64.zip" }
|
||||||
if (!$windowsAsset) {
|
if (!$windowsAsset) {
|
||||||
throw "Cannot find the windows dapr cli binary"
|
throw "Cannot find the windows Dapr CLI binary"
|
||||||
}
|
}
|
||||||
|
|
||||||
$zipFilePath = $DaprRoot + "\" + $windowsAsset.name
|
$zipFilePath = $DaprRoot + "\" + $windowsAsset.name
|
||||||
|
@ -76,7 +76,7 @@ if (!(Test-Path $DaprCliFilePath -PathType Leaf)) {
|
||||||
throw "Failed to download Dapr Cli archieve - $zipFilePath"
|
throw "Failed to download Dapr Cli archieve - $zipFilePath"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check the dapr cli version
|
# Check the Dapr CLI version
|
||||||
Invoke-Expression "$DaprCliFilePath --version"
|
Invoke-Expression "$DaprCliFilePath --version"
|
||||||
|
|
||||||
# Clean up zipfile
|
# Clean up zipfile
|
||||||
|
|
|
@ -127,7 +127,7 @@ installFile() {
|
||||||
local tmp_root_dapr_cli="$DAPR_TMP_ROOT/$DAPR_CLI_FILENAME"
|
local tmp_root_dapr_cli="$DAPR_TMP_ROOT/$DAPR_CLI_FILENAME"
|
||||||
|
|
||||||
if [ ! -f "$tmp_root_dapr_cli" ]; then
|
if [ ! -f "$tmp_root_dapr_cli" ]; then
|
||||||
echo "Failed to unpack Dapr cli executable."
|
echo "Failed to unpack Dapr CLI executable."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ func Run(config *RunConfig) (*RunOutput, error) {
|
||||||
|
|
||||||
for _, a := range dapr {
|
for _, a := range dapr {
|
||||||
if appID == a.AppID {
|
if appID == a.AppID {
|
||||||
return nil, fmt.Errorf("dapr with ID %s is already running", appID)
|
return nil, fmt.Errorf("Dapr with ID %s is already running", appID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,9 +300,9 @@ func Run(config *RunConfig) (*RunOutput, error) {
|
||||||
|
|
||||||
for _, a := range dapr {
|
for _, a := range dapr {
|
||||||
if daprHTTPPort == a.HTTPPort {
|
if daprHTTPPort == a.HTTPPort {
|
||||||
return nil, fmt.Errorf("there's already a dapr instance running with http port %v", daprHTTPPort)
|
return nil, fmt.Errorf("there's already a Dapr instance running with http port %v", daprHTTPPort)
|
||||||
} else if daprGRPCPort == a.GRPCPort {
|
} else if daprGRPCPort == a.GRPCPort {
|
||||||
return nil, fmt.Errorf("there's already a dapr instance running with gRPC port %v", daprGRPCPort)
|
return nil, fmt.Errorf("there's already a Dapr instance running with gRPC port %v", daprGRPCPort)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,7 +269,7 @@ func installDaprBinary(wg *sync.WaitGroup, errorChan chan<- error, dir, version
|
||||||
|
|
||||||
filepath, err := downloadFile(dir, daprURL)
|
filepath, err := downloadFile(dir, daprURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorChan <- fmt.Errorf("Error downloading dapr binary: %s", err)
|
errorChan <- fmt.Errorf("Error downloading Dapr binary: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,19 +283,19 @@ func installDaprBinary(wg *sync.WaitGroup, errorChan chan<- error, dir, version
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorChan <- fmt.Errorf("Error extracting dapr binary: %s", err)
|
errorChan <- fmt.Errorf("Error extracting Dapr binary: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
daprPath, err := moveFileToPath(extractedFilePath)
|
daprPath, err := moveFileToPath(extractedFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorChan <- fmt.Errorf("Error moving dapr binary to path: %s", err)
|
errorChan <- fmt.Errorf("Error moving Dapr binary to path: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = makeExecutable(daprPath)
|
err = makeExecutable(daprPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errorChan <- fmt.Errorf("Error making dapr binary executable: %s", err)
|
errorChan <- fmt.Errorf("Error making Dapr binary executable: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ import (
|
||||||
// +genclient:noStatus
|
// +genclient:noStatus
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// Component describes an Dapr component type
|
// Component describes a Dapr component type
|
||||||
type Component struct {
|
type Component struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
// +optional
|
// +optional
|
||||||
|
|
|
@ -27,7 +27,7 @@ func NewStandaloneComponents(configuration config.StandaloneConfig) *StandaloneC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadComponents loads dapr components from a given directory
|
// LoadComponents loads Dapr components from a given directory
|
||||||
func (s *StandaloneComponents) LoadComponents() ([]components_v1alpha1.Component, error) {
|
func (s *StandaloneComponents) LoadComponents() ([]components_v1alpha1.Component, error) {
|
||||||
dir := s.config.ComponentsPath
|
dir := s.config.ComponentsPath
|
||||||
files, err := ioutil.ReadDir(dir)
|
files, err := ioutil.ReadDir(dir)
|
||||||
|
|
|
@ -222,7 +222,6 @@ func (cli *Client) UpdateClientVersion(v string) {
|
||||||
if !cli.manualOverride {
|
if !cli.manualOverride {
|
||||||
cli.version = v
|
cli.version = v
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseHost verifies that the given host strings is valid.
|
// ParseHost verifies that the given host strings is valid.
|
||||||
|
|
Loading…
Reference in New Issue