https://github.com/sitewhere/swctl
SiteWhere Control CLI
https://github.com/sitewhere/swctl
Last synced: 9 months ago
JSON representation
SiteWhere Control CLI
- Host: GitHub
- URL: https://github.com/sitewhere/swctl
- Owner: sitewhere
- License: apache-2.0
- Created: 2020-06-11T18:44:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-29T12:21:55.000Z (almost 5 years ago)
- Last Synced: 2025-04-05T07:33:01.329Z (9 months ago)
- Language: Go
- Size: 3.63 MB
- Stars: 7
- Watchers: 8
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://travis-ci.org/sitewhere/swctl) [](https://goreportcard.com/report/github.com/sitewhere/swctl) [](https://godoc.org/github.com/sitewhere/swctl) [](https://codecov.io/gh/sitewhere/swctl)

---
# SiteWhere Control CLI
## Build
For building it requires go 1.14+.
```console
make build
```
## Install swctl
### From source code
```console
make install
```
### Install binary with curl on Linux
```bash
curl -L https://github.com/sitewhere/swctl/releases/latest/download/swctl.linux.amd64 -o swctl && \
chmod +x ./swctl && sudo mv ./swctl /usr/local/bin/swctl
```
### Install binary with curl on macOS
```bash
curl -L https://github.com/sitewhere/swctl/releases/latest/download/swctl.darwin.amd64 -o swctl && \
chmod +x ./swctl && sudo mv ./swctl /usr/local/bin/swctl
```
### Install binary with curl on Windows
```bash
curl -L https://github.com/sitewhere/swctl/releases/latest/download/swctl.windows.amd64.exe -o swctl.exe
```
## Usage
### Prerequistes
- [Istio](https://istio.io) 1.8+ Installed in your cluster. Check Istio setup [documentation](https://istio.io/latest/docs/setup/).
If run into docker pull image request limit, use the following command
```command
istioctl install -y --set hub=gcr.io/istio-release
```
### Install SiteWhere
To install SiteWhere 3.0 on your Kubernetes cluster, run the following command.
```console
swctl install
```
This comamnd will do the following for you:
- Install SiteWhere Custom Resource Definitions.
- Install SiteWhere Templates.
- Install SiteWhere Operator.
- Install SiteWhere Infrastructure.

### Listing SiteWhere Instances
```console
swctl instances
```
### Showing the details of a Intance
If you'd like to show the details `sitewhere` instance, execute this command:
```console
swctl instances sitewhere
```
The result should be something like this:
```bash
Instance Name : sitewhere
Instance Namespace : sitewhere
Configuration Template : default
Dataset Template : default
Tenant Management Status : Bootstrapped
User Management Status : Bootstrapped
Configuration:
Infrastructure:
Namespace : sitewhere-system
gRPC:
Backoff Multiplier : 1.50
Initial Backoff (sec) : 10
Max Backoff (sec) : 600
Max Retry : 6
Resolve FQDN : false
Kafka:
Hostname : sitewhere-kafka-kafka-bootstrap
Port : 9092
Def Topic Partitions : 8
Def Topic Replication Factor : 3
Metrics:
Enabled : true
HTTP Port : 9090
Redis:
Hostname : sitewhere-infrastructure-redis-ha-announce
Port : 26379
Node Count : 3
Master Group Name : sitewhere
Persistence:
Cassandra:
InfluxDB:
RDB:
Microservices:
asset-management : Ready
batch-operations : Ready
command-delivery : Ready
device-management : Ready
device-registration : Ready
device-state : Ready
event-management : Ready
event-sources : Ready
inbound-processing : Ready
instance-management : Ready
label-generation : Ready
outbound-connectors : Ready
schedule-management : Ready
```
### Creating a SiteWhere Instance
```console
swctl create instance sitewhere
```
### Deleting a SiteWhere Instance
```console
swctl delete instance sitewhere
```