-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Mosquitto | ||
|
||
### Install | ||
|
||
```shell | ||
docker run -it -p 1883:1883 eclipse-mosquitto:1.6.15 | ||
``` | ||
|
||
### Test | ||
|
||
```shell | ||
mosquitto_sub -h localhost -t "notelab/test" | ||
``` | ||
|
||
```shell | ||
mosquitto_pub -h localhost -t "notelab/test" -m "Testing the MQTT communication" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,84 @@ | ||
## Troubleshooting | ||
## Server | ||
|
||
### k3s | ||
|
||
#### Install | ||
### k3s Install | ||
|
||
```shell | ||
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.20.9+k3s1 sh - | ||
``` | ||
|
||
#### Fix permissions | ||
### k3s list pods | ||
|
||
```shell | ||
kubectl get pods -A | ||
``` | ||
|
||
### k3s fix permissions | ||
|
||
To fix `k3s` permissions, run the following command (or add it to your `.bashrc` or `.zshrc`): | ||
|
||
```shell | ||
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/k3s-config && sudo chown $USER: ~/.kube/k3s-config && export KUBECONFIG=~/.kube/k3s-config | ||
``` | ||
|
||
#### Uninstall | ||
### k3s uninstall | ||
|
||
```shell | ||
/usr/local/bin/k3s-uninstall.sh | ||
``` | ||
|
||
### RabbitMQ install | ||
|
||
```shell | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo update | ||
helm install rabbitmq bitnami/rabbitmq --version 10.1.14 \ | ||
--set replicaCount=1 \ | ||
--set auth.username=user,auth.password=password \ | ||
--set service.type=NodePort,service.nodePorts.amqp=30672,service.nodePorts.manager=31672 | ||
``` | ||
|
||
### RabbitMQ test | ||
|
||
```shell | ||
amqp-consume --url amqp://user:password@SERVER_IP:30672 -e amq.topic -r test cat | ||
``` | ||
|
||
```shell | ||
amqp-publish --url amqp://user:password@SERVER_IP:30672 -e amq.topic -r test -b Testing_AMQP_communication | ||
``` | ||
|
||
|
||
|
||
### Elasticsearch install | ||
|
||
```shell | ||
helm repo add elastic https://Helm.elastic.co | ||
helm repo update | ||
helm install elasticsearch elastic/elasticsearch \ | ||
--version 7.17.1 \ | ||
--set replicas=1 \ | ||
--set service.type=NodePort,service.nodePort=32200 | ||
``` | ||
|
||
### Elasticsearch test | ||
|
||
```shell | ||
curl -H "Content-Type: application/json" -XPOST "http://SERVER_IP:32200/notelab/temperature_topic/1" -d ’{"id":"test", "temperature":22}’ | ||
``` | ||
|
||
```shell | ||
curl -XGET "http://SERVER_IP:32200/notelab/_search?pretty" -H 'Content-Type: application/json' -d '{"query": {"match_all": {}}}' | ||
``` | ||
|
||
|
||
### Logstash install | ||
|
||
```shell | ||
helm repo add elastic https://Helm.elastic.co | ||
helm repo update | ||
helm install logstash-notelab elastic/logstash \ | ||
--version 7.17.1 \ | ||
--set replicas=1 \ | ||
-f logstash_conf.yml | ||
``` | ||
|