mirror of https://github.com/dapr/cli.git
Add build step to README.md (#72)
This commit is contained in:
parent
88bb65482b
commit
f153ff2e0e
49
README.md
49
README.md
|
@ -4,8 +4,9 @@
|
|||
|
||||
The Actions CLI allows you to setup Actions on your local dev machine or on a Kubernetes cluster, provides debugging support, launches and manages Actions instances.
|
||||
|
||||
## Setup
|
||||
## Getting started
|
||||
|
||||
### Prerequisites
|
||||
* Download the [release](https://github.com/actionscore/cli/releases) for your OS
|
||||
* Unpack it
|
||||
* Move it to your desired location (for Mac/Linux - ```mv actions /usr/local/bin```. For Windows, add the executable to your System PATH.)
|
||||
|
@ -14,11 +15,7 @@ __*Note: For Windows users, run the cmd terminal in administrator mode*__
|
|||
|
||||
__*Note: For Linux users, if you run docker cmds with sudo, you need to use ```sudo actions init```*__
|
||||
|
||||
|
||||
|
||||
### Usage
|
||||
|
||||
#### Install Actions
|
||||
### Install Actions
|
||||
|
||||
To setup Actions on your local machine:
|
||||
|
||||
|
@ -54,7 +51,7 @@ $ actions init --runtime-version v0.3.0-alpha
|
|||
|
||||
*Note: The init command will install the latest stable version of Actions on your cluster. For more advanced use cases, use our [Helm Chart](https://github.com/actionscore/actions/tree/master/charts/actions-operator).*
|
||||
|
||||
#### Launch Actions and your app
|
||||
### Launch Actions and your app
|
||||
|
||||
The Actions CLI lets you debug easily by launching both Actions and your app.
|
||||
Logs from both the Actions Runtime and your app will be displayed in real time!
|
||||
|
@ -77,7 +74,7 @@ Example of launching Actions on port 6000:
|
|||
$ actions run --app-id nodeapp --app-port 3000 --port 6000 node app.js
|
||||
```
|
||||
|
||||
#### Publish/Subscribe
|
||||
### Publish/Subscribe
|
||||
|
||||
To use pub-sub with your app, make sure that your app has a ```POST``` HTTP endpoint with some name, say ```myevent```.
|
||||
This sample assumes your app is listening on port 3000.
|
||||
|
@ -100,7 +97,7 @@ Publish a message with a payload:
|
|||
$ actions publish --topic myevent --payload '{ "name": "yoda" }'
|
||||
```
|
||||
|
||||
#### Invoking
|
||||
### Invoking
|
||||
|
||||
To test your endpoints with Actions, simply expose any ```POST``` HTTP endpoint.
|
||||
For this sample, we'll assume a node app listening on port 300 with a ```/mymethod``` endpoint.
|
||||
|
@ -117,7 +114,7 @@ Invoke your app:
|
|||
$ actions send --app-id nodeapp --method mymethod
|
||||
```
|
||||
|
||||
#### List
|
||||
### List
|
||||
|
||||
To list all Actions instances running on your machine:
|
||||
|
||||
|
@ -131,7 +128,7 @@ To list all Actions instances running in a Kubernetes cluster:
|
|||
$ actions list --kubernetes
|
||||
```
|
||||
|
||||
#### Stop
|
||||
### Stop
|
||||
|
||||
Use ```actions list``` to get a list of all running instances.
|
||||
To stop an actions app on your machine:
|
||||
|
@ -140,7 +137,7 @@ To stop an actions app on your machine:
|
|||
$ actions stop --app-id myAppID
|
||||
```
|
||||
|
||||
#### Enable profiling
|
||||
### Enable profiling
|
||||
|
||||
In order to enable profiling, use the `enable-profiling` flag:
|
||||
|
||||
|
@ -155,7 +152,7 @@ If you want to manually assign a profiling port, use the `profile-port` flag:
|
|||
$ actions run --app-id nodeapp --app-port 3000 node app.js --enable-profiling --profile-port 7777
|
||||
```
|
||||
|
||||
#### Uninstall (Kubernetes)
|
||||
### Uninstall (Kubernetes)
|
||||
|
||||
To remove Actions from your Kubernetes cluster, use the `uninstall` command.
|
||||
|
||||
|
@ -164,3 +161,29 @@ To remove Actions from your Kubernetes cluster, use the `uninstall` command.
|
|||
```
|
||||
$ actions uninstall --kubernetes
|
||||
```
|
||||
|
||||
|
||||
## Developing Actions CLI
|
||||
|
||||
### Prerequisites
|
||||
|
||||
1. The Go language environment [(instructions)]( https://golang.org/doc/install).
|
||||
|
||||
Make sure you've already configured your GOPATH and GOROOT environment variables.
|
||||
|
||||
### Clone the repo
|
||||
|
||||
```
|
||||
cd $GOPATH/src
|
||||
mkdir -p github.com/actionscore/cli
|
||||
git clone https://github.com/actionscore/cli.git github.com/actionscore/cli
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```
|
||||
cd $GOPATH/src/actions/cli
|
||||
make build
|
||||
```
|
||||
|
||||
**Windows Users**: Actions currently takes a dependency on gcc. If building throws an error containing: `"gcc": executable file not found in %PATH%`, you'll need to install gcc through the [Cygwin Project](https://sourceware.org/cygwin/) or the [MinGW Project](http://mingw-w64.org/doku.php).
|
|
@ -1,4 +1,12 @@
|
|||
# Actions CLI
|
||||
## Prerequisites
|
||||
|
||||
* Download the [release](https://github.com/actionscore/cli/releases) for your OS
|
||||
* Unpack it
|
||||
* Move it to your desired location (for Mac/Linux - ```mv actions /usr/local/bin```. For Windows, add the executable to your System PATH.)
|
||||
|
||||
__*Note: For Windows users, run the cmd terminal in administrator mode*__
|
||||
|
||||
__*Note: For Linux users, if you run docker cmds with sudo, you need to use ```sudo actions init```*__
|
||||
|
||||
The Actions CLI allows you to setup Actions on your local dev machine or on a Kubernetes cluster, provides debugging support, launches and manages Actions instances.
|
||||
|
||||
|
|
Loading…
Reference in New Issue