Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions assume you have speedtest-cli installed #20

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Install Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
buildx-version: latest

- name: hub.docker.com Login
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

- name: Build the multi-arch image
run: |
docker buildx build \
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## October 20 2020 - v1.4 (Beta)
* Created initial Kubernetes YAML files.
* Updated documentation.

## October 16 2020 - v1.3
* API configuration is now executed using `cURL` [Docker image](https://hub.docker.com/r/curlimages/curl).
* `README.md` updated (Solving [https://github.com/fmdlc/ISP-Checker/issues/14](https://github.com/fmdlc/ISP-Checker/issues/14)).

## October 12 2020 - v1.2
* Enabling CI build a multi-architecture Docker image (Extending support to `linux/amd64`, `linux/arm/v7`, `linux/arm64`)
* Fixing Docker images version on Docker Compose.
Expand Down
18 changes: 9 additions & 9 deletions ISP-Checker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ install:
@sleep 10

$(info Make: Initializing datasources and dashboards)
@curl -s --location -X POST 'http://admin:admin@localhost:3000/api/datasources' \
--header 'Content-Type: application/json' \
-d @./grafana/datasource.json > /dev/null
@docker run --network host -v "$(PWD)/grafana:/app" --rm curlimages/curl:7.73.0 \
-s --location -XPOST 'http://admin:[email protected]:3000/api/datasources' \
--header 'Content-Type: application/json' -d @/app/datasource.json > /dev/null

@curl -s --location -X POST 'http://admin:admin@localhost:3000/api/dashboards/db' \
--header 'Content-Type: application/json' \
-d @./grafana/network-dashboard.json > /dev/null
@docker run --network host -v "$(PWD)/grafana:/app" --rm curlimages/curl:7.73.0 \
-s --location -XPOST 'http://admin:[email protected]:3000/api/dashboards/db' \
--header 'Content-Type: application/json' -d @/app/network-dashboard.json > /dev/null

@curl -s --location -X PUT 'http://admin:admin@localhost:3000/api/user/preferences' \
--header 'Content-Type: application/json' \
-d @./grafana/default.json > /dev/null
@docker run --network host -v "$(PWD)/grafana:/app" --rm curlimages/curl:7.73.0 \
-s --location -XPUT 'http://admin:[email protected]:3000/api/user/preferences' \
--header 'Content-Type: application/json' -d @/app/default.json > /dev/null

@echo "\nOpen your browser a points to http://127.0.0.1:3000/\n"
@echo "Default Username: admin | Default Password: admin"
Expand Down
3 changes: 2 additions & 1 deletion ISP-Checker/telegraf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ COPY ./bin/entrypoint.sh /entrypoint.sh
RUN apt-get update && apt-get install -y --no-install-recommends \
mtr \
speedtest-cli && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
usermod -G video telegraf

EXPOSE 8125/udp 8092/udp 8094

Expand Down
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ISP-Checker
![License](https://img.shields.io/github/license/fmdlc/ISP-Checker) ![LastCommit](https://img.shields.io/github/last-commit/fmdlc/ISP-Checker) ![Docker](https://img.shields.io/badge/Docker-19.03.13-blue)
![License](https://img.shields.io/github/license/fmdlc/ISP-Checker) ![LastCommit](https://img.shields.io/github/last-commit/fmdlc/ISP-Checker) ![Build](https://github.com/fmdlc/ISP-Checker/workflows/Build/badge.svg) ![Docker](https://img.shields.io/badge/Docker-19.03.13-blue)

> A `docker-compose` stack to run a set of ISP controls and collect metrics on a [Raspberry Pi](https://www.raspberrypi.org/).
> A `docker-compose` and `kubernetes` stack to run a set of ISP controls and collect metrics on a [Raspberry Pi](https://www.raspberrypi.org/).

[![Linkedin](https://i.stack.imgur.com/gVE0j.png) LinkedIn](https://www.linkedin.com/in/fmdlc) [![GitHub](https://i.stack.imgur.com/tskMh.png) GitHub](https://github.com/fmdlc)

Expand Down Expand Up @@ -41,11 +41,35 @@ The following platforms are supported:
You can easily import this dashboard into your current Grafana installation getting it from the Official's [Grafana repository](https://grafana.com/grafana/dashboards/13140).

### Configuration

Make sure you have the [Docker-CE](https://phoenixnap.com/kb/docker-on-raspberry-pi) and [cURL](https://curl.haxx.se/) installed on your *Raspberry Pi*. If you don't, install it using your prefer method.
```bash
$ curl -fsSL https://get.docker.com -o get-docker.sh | bash -
```

As well as [speedtest-cli](https://github.com/sivel/speedtest-cli) which is required to measure bandwidth.
```bash
$ pip install speedtest-cli
```

#### kubernetes
Kubernetes is in `beta` version. To install just run:
```bash
$: kubectl apply -f https://raw.githubusercontent.com/fmdlc/ISP-Checker/master/kubernetes/ISP-Checker-deploy.yaml
```
You need to expose the `grafana` service to get access. You can do it by creating a `LoadBalancer` service type or by using an `IngressController`.

#### docker-compose
You need to have `docker-compose` installed. To install it execute:

```bash
$: sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```

Alternatively you can install it using `pip`:
```bash
$: pip install docker-compose
```

Configure the `./ISP-Checker/credentials.env` file.
There are two users:
* <ins>Read-Only user:</ins> Used by Grafana to acccess to metrics
Expand Down
Binary file added img/cluster.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading