Skip to content

Commit

Permalink
add deployment changes
Browse files Browse the repository at this point in the history
Signed-off-by: Musilah <[email protected]>
  • Loading branch information
Musilah committed Dec 9, 2024
1 parent 43c5ba9 commit 435172a
Show file tree
Hide file tree
Showing 30 changed files with 155 additions and 530 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy Docusaurus to GitHub Pages

# Controls when the action will run
on:
push:
branches:
- main

workflow_dispatch:
permissions:
contents: write

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest

steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build the website
run: yarn build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build


deploy:
name: Deploy to GitHub Pages
needs: build

permissions:
pages: write
id-token: write

runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 0 additions & 27 deletions .github/workflows/pages.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test deployment

on:
pull_request:
branches:
- main

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Test Build the website
run: yarn build
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ git remote add upstream https://github.com/absmach/magistrala-docs.git
If your cloned repository is behind the upstream commits, then get the latest changes from upstream:

```
git checkout master
git pull --rebase upstream master
git checkout main
git pull --rebase upstream main
```

Create a new topic branch from `master` using the naming convention `MG-[issue-number]`
Create a new topic branch from `main` using the naming convention `MG-[issue-number]`
to help us keep track of your contribution scope:

```
Expand All @@ -74,7 +74,7 @@ and `user.email` git configs, you can sign your commit automatically with `git c
Locally merge (or rebase) the upstream development branch into your topic branch:

```
git pull --rebase upstream master
git pull --rebase upstream main
```

Push your topic branch up to your fork:
Expand Down
6 changes: 5 additions & 1 deletion blog/kratos/kratos.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ tags: ['Magistrala', 'Kratos', 'User Management', 'Identity']

# Extending Magistrala Users Repository

For the past few months, we have been working on integrating Magistrala with [Ory Kratos](https://www.ory.sh/docs/kratos/ory-kratos-intro) as the user management service. Ory Kratos is a cloud-native identity and user management system, which can be used as the user management service for Magistrala. Let's delve deeper into the myriad capabilities that Kratos brings to the forefront:
For the past few months, we have been working on integrating Magistrala with [Ory Kratos](https://www.ory.sh/docs/kratos/ory-kratos-intro) as the user management service. Ory Kratos is a cloud-native identity and user management system, which can be used as the user management service for Magistrala.

<!-- truncate -->

Let's delve deeper into the myriad capabilities that Kratos brings to the forefront:

- self-service user login and registration. This is the ability to register and log in to the system without the need for an administrator.
- multi-factor authentication with Time-based One-time Passwords (TOTP).
Expand Down
2 changes: 2 additions & 0 deletions blog/oauth/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags: ['OAuth2.0', 'Authentication', 'Magistrala', 'Google OAuth']

Over the past months, we have been working on integrating OAuth2.0 with Magistrala. We are happy to announce that we have completed the integration and it is [now available](https://github.com/absmach/magistrala/pull/2103). We believe that this will open up a lot of possibilities for Magistrala and we are very excited about the future of Magistrala. We are planning to add more features to the OAuth2.0 integration in future releases. We are also planning to add support for more OAuth2.0 providers. This will enable users to use their preferred OAuth2.0 provider to authenticate with Magistrala.

<!-- truncate -->

[OAuth2.0](https://datatracker.ietf.org/doc/html/rfc6749) is an authorization framework that facilitates a third-party application to gain restricted access to another HTTP service. This can occur either by mediating an approval process between the resource owner and the HTTP service or by enabling the third-party application to autonomously acquire access. In OAuth2.0, a client requests access to a resource controlled by the resource owner and hosted by the resource server and is issued a different set of credentials than those of the resource owner. Instead of using the resource owner's credentials to access the resource, the client obtains an access token - a string representing the grant issued to the client by the resource owner. The client uses the access token to access the protected resources hosted by the resource server.

In OAuth2.0, there are four roles:
Expand Down
2 changes: 2 additions & 0 deletions blog/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tags: ['Magistrala', 'IIoT', 'User Guide', 'Industrial Automation', 'Open Source

In the world of Industrial Internet of Things (IIoT), businesses are always on the lookout for reliable, scalable, and secure ways to handle their connected devices and data. That's where Magistrala comes in—an open-source IIoT platform that's transforming the way we approach industrial automation and remote monitoring.

<!-- truncate -->

## Key Advantages of Magistrala

1. **Protocol Flexibility**: Magistrala's support for multiple protocols ensures that devices with different communication methods can easily connect and interact within the same ecosystem.
Expand Down
6 changes: 5 additions & 1 deletion blog/v0-14-0-release/v0-14-0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ tags: [release, SuperMQ, update]

# What's New in Magistrala v0.14.0

We're thrilled to announce the release of Magistrala v0.14.0, packed with exciting new features and improvements that elevate your experience! This update marks a significant leap forward, making Magistrala even more powerful and versatile. Here are some of the highlights:
We're thrilled to announce the release of Magistrala v0.14.0, packed with exciting new features and improvements that elevate your experience! This update marks a significant leap forward, making Magistrala even more powerful and versatile.

<!-- truncate -->

Here are some of the highlights:

- Switched to Google Zanzibar Access control approach with SpiceDB
- Implemented Domains for access control
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ Running SuperMQ on gateway moves computation from cloud towards the edge thus de
[vernemq]: https://vernemq.com/
[kafka]: https://kafka.apache.org/
[senml]: https://tools.ietf.org/html/draft-ietf-core-senml-08
[agent]: /edge/#agent
[export]: /edge/#export
[agent]: ./edge.md#agent
[export]: ./edge.md#export
6 changes: 3 additions & 3 deletions docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ mosquitto_sub -u <thing_id> -P <thing_secret> --cafile docker/ssl/certs/ca.crt -
```

[jwt]: https://jwt.io/
[messaging]: /messaging/#messaging
[messaging]: ./messaging.md#messaging
[rf5280]: https://tools.ietf.org/html/rfc5280
[ssl-makefile]: https://github.com/absmach/supermq/blob/master/docker/ssl/Makefile
[provision]: /provision/#platform-management
[ssl-makefile]: https://github.com/absmach/supermq/blob/main/docker/ssl/Makefile
[provision]: ./provision.md#platform-management
[openssl]: https://www.openssl.org/
[vault]: https://www.vaultproject.io/
[oidc]: https://openid.net/connect/
Expand Down
2 changes: 1 addition & 1 deletion docs/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ supermq-cli bootstrap bootstrap secure '09:6:0:sb:sa' 'key' 'v7aT0HGxJxt2gULzr3R

For more information about the Bootstrap service API, please check out the [API documentation][api-docs].

[api-docs]: https://github.com/absmach/supermq/blob/master/api/openapi/bootstrap.yml
[api-docs]: https://github.com/absmach/supermq/blob/main/api/openapi/bootstrap.yml
2 changes: 1 addition & 1 deletion docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Please assure that MQTT microservice has `node_modules` installed, as explained
[protobuf]: https://github.com/google/protobuf
[google-protobuf]: https://google.golang.org/protobuf/proto
[go-install]: https://golang.org/doc/install
[mg-ci-scripts]: https://github.com/absmach/supermq/blob/master/scripts/ci.sh
[mg-ci-scripts]: https://github.com/absmach/supermq/blob/main/scripts/ci.sh
[scratch-docker]: https://hub.docker.com/_/scratch/
[cleanup-docker]: #cleaning-up-your-dockerized-supermq-setup
[docker-compose-ref]: https://docs.docker.com/compose/reference/overview/
Expand Down
24 changes: 12 additions & 12 deletions docs/edge.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Agent service has following features:

- Remote execution of commands
- Remote terminal, remote session to `bash` managed by `Agent`
- Heartbeat - listening to Message Broker topic `heartbeat.>` it can remotely provide info on running services, if services are publishing heartbeat ( like [Export](/edge/#export))
- Heartbeat - listening to Message Broker topic `heartbeat.>` it can remotely provide info on running services, if services are publishing heartbeat ( like [Export](./edge.md#export))
- Proxying commands to other gateway services
- Edgex SMA - remotely making requests to EdgeX endpoints and fetching results, if EdgeX is deployed.

Expand Down Expand Up @@ -563,20 +563,20 @@ In SuperMQ `mqtt` service:
supermq-mqtt | {"level":"info","message":"Publish - client ID export-88529fb2-6c1e-4b60-b9ab-73b5d89f7404 to the topic: channels/e2adcfa6-96b2-425d-8cd4-ff8cb9c056ce/messages/export/test","ts":"2020-05-08T15:16:02.999684791Z"}
```

[agent]: /edge/#agent
[export]: /edge/#export
[supermq]: /architecture/
[bootstrap]: /bootstrap/
[bootstraping]: /bootstrap/#bootstrapping
[provision]: /provision/
[agent]: ./edge.md#agent
[export]: ./edge.md#export
[supermq]: ./architecture.md
[bootstrap]: ./bootstrap.md
[bootstraping]: ./bootstrap.md#bootstrapping
[provision]: ./provision.md
[edgex-repo]: https://github.com/edgexfoundry/edgex-go
[edgex-raml]: https://github.com/edgexfoundry/edgex-go/blob/master/api/raml/system-agent.raml
[conftoml]: https://github.com/absmach/export/blob/master/configs/config.toml
[docker-compose]: https://github.com/absmach/supermq/blob/main/docker/docker-compose.yml
[env]: https://github.com/absmach/export#environmet-variables
[mutual-tls]: /authentication/#mutual-tls-authentication-with-x509-certificates
[certs-service]: /certs/#certs-service
[protomsg]: https://github.com/absmach/supermq/blob/master/pkg/messaging/message.proto
[back-to-edge]: /edge/#edge
[mutual-tls]: ./authentication.md#mutual-tls-authentication-with-x509-certificates
[certs-service]: ./certs.md#certs-service
[protomsg]: https://github.com/absmach/supermq/blob/main/pkg/messaging/message.proto
[back-to-edge]: ./edge.md#edge
[nats]: https://nats.io/
[dev-guide]: /dev-guide
[dev-guide]: ./dev-guide.md
16 changes: 8 additions & 8 deletions docs/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ Things Service manages `things` and `channel`. `Thing` represents a device (or a
- The API endpoint for interacting with channels are described in the [channels API][channels-api].
- The CLI for interacting with channels are described in the [channels CLI][channels-cli].

[users-api]: /api/#users
[groups-api]: /api/#groups
[things-api]: /api/#things
[channels-api]: /api/#channels
[users-cli]: /cli/#users-management
[groups-cli]: /cli/#groups-management
[things-cli]: /cli/#things-management
[channels-cli]: /cli/#channels-management
[users-api]: ./api.md#users
[groups-api]: ./api.md#groups
[things-api]: ./api.md#things
[channels-api]: ./api.md#channels
[users-cli]: ./cli.md#users-management
[groups-cli]: ./cli.md#groups-management
[things-cli]: ./cli.md#things-management
[channels-cli]: ./cli.md#channels-management
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ This proves that messages have been correctly sent through the system via the pr
[docker-compose]: https://docs.docker.com/compose/install/
[mg-releases]: https://github.com/absmach/supermq/releases
[cli]: cli.md
[provisioning]: /provision/#platform-management
[provisioning]: ./provision.md#platform-management
5 changes: 2 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ Take a look at our [open issues][open-issues]. The [good-first-issue][good-first

[Apache-2.0][license]

[gopher]: img/gopherBanner.jpg
[open-issues]: https://github.com/absmach/supermq/issues
[good-first-issue]: https://github.com/absmach/supermq/labels/good-first-issue
[contribution-guide]: https://github.com/absmach/supermq/blob/master/CONTRIBUTING.md
[license]: https://github.com/absmach/supermq/blob/master/LICENSE
[contribution-guide]: https://github.com/absmach/supermq/blob/main/CONTRIBUTING.md
[license]: https://github.com/absmach/supermq/blob/main/LICENSE
2 changes: 1 addition & 1 deletion docs/lora.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ To forward LoRa messages the lora-adapter subscribes to topics `applications/+/d
[lora-gateway]: https://www.loraserver.io/lora-gateway-bridge/overview/
[semtech]: https://github.com/Lora-net/packet_forwarder/blob/master/PROTOCOL.TXT
[lora-app-server]: https://www.loraserver.io/lora-app-server/overview/
[lora-docker-compose]: https://github.com/absmach/supermq/blob/master/docker/addons/lora-adapter/docker-compose.yml
[lora-docker-compose]: https://github.com/absmach/supermq/blob/main/docker/addons/lora-adapter/docker-compose.yml
[redis]: https://redis.io/
2 changes: 1 addition & 1 deletion docs/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ When Unsubscribing from a channel, the reader is closed.
For more information and examples checkout [official nats.io documentation][nats], [official rabbitmq documentation][rabbitmq], [official vernemq documentation][vernemq] and [official kafka documentation][kafka].

[nats-jestream]: https://docs.nats.io/nats-concepts/jetstream
[http-api]: https://github.com/absmach/supermq/blob/master/api/openapi/http.yml
[http-api]: https://github.com/absmach/supermq/blob/main/api/openapi/http.yml
[mosquitto]: https://mosquitto.org
[paho]: https://www.eclipse.org/paho/
[rfc7252]: https://tools.ietf.org/html/rfc7252
Expand Down
1 change: 0 additions & 1 deletion docs/opcua.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ Things on SuperMQ can be created to represent these devices and the channels can

[opcua-adapter]: https://github.com/absmach/supermq/tree/main/opcua
[opcua-arch]: https://en.wikipedia.org/wiki/OPC_Unified_Architecture
[opcua-diagram]: img/opcua/opcua.png
[public-opcua]: https://github.com/node-opcua/node-opcua/wiki/publicly-available-OPC-UA-Servers-and-Clients
[redis]: https://redis.io/
[open62541]: https://www.open62541.org/doc/master/index.html
10 changes: 5 additions & 5 deletions docs/provision.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ Provision service provides a way of specifying this `provision layout` and creat
The service is configured using the environment variables presented in the following [table][config]. Note that any unset variables will be replaced with their default values.
By default, call to `/mapping` endpoint will create one thing and two channels (`control` and `data`) and connect it as this is typical setup required by [Agent](/edge/#agent). If there is a requirement for different provision layout we can use [config][conftoml] file in addition to environment variables.
By default, call to `/mapping` endpoint will create one thing and two channels (`control` and `data`) and connect it as this is typical setup required by [Agent](./edge.md#agent). If there is a requirement for different provision layout we can use [config][conftoml] file in addition to environment variables.
For the purposes of running provision as an add-on in docker composition environment variables seems more suitable. Environment variables are set in [.env][env].
Expand Down Expand Up @@ -790,16 +790,16 @@ MG_AGENT_BOOTSTRAP_ID=gateway MG_AGENT_BOOTSTRAP_KEY=external_key MG_AGENT_BOOTS
Agent will retrieve connections parameters and connect to SuperMQ cloud.
For more information about the Provision service API, please check out the [API documentation](https://github.com/absmach/supermq/blob/master/api/provision.yml).
For more information about the Provision service API, please check out the [API documentation](https://github.com/absmach/supermq/blob/main/api/provision.yml).
[supermq]: https://github.com/absmach/supermq
[bootstrap]: https://github.com/absmach/supermq/tree/main/bootstrap
[agent]: https://github.com/absmach/agent
[mgui]: https://github.com/absmach/magistrala-ui
[config]: https://github.com/absmach/supermq/tree/main/provision#configuration
[env]: https://github.com/absmach/supermq/blob/master/.env
[conftoml]: https://github.com/absmach/supermq/blob/master/docker/addons/provision/configs/config.toml
[users]: https://github.com/absmach/supermq/blob/master/users/README.md
[env]: https://github.com/absmach/supermq/blob/main/.env
[conftoml]: https://github.com/absmach/supermq/blob/main/docker/addons/provision/configs/config.toml
[users]: https://github.com/absmach/supermq/blob/main/users/README.md
[exp]: https://github.com/absmach/export
[cli]: https://github.com/absmach/supermq/tree/main/cli
[auth]: authentication.md
Expand Down
6 changes: 3 additions & 3 deletions docs/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ To start Timescale reader, execute the following command:
docker-compose -f docker/addons/timescale-reader/docker-compose.yml up -d
```

[subtopic]: /messaging/#subtopics
[subtopic]: ./messaging.md#subtopics
[nats-subject]: https://docs.nats.io/nats-concepts/subjects
[nats-wildcards]: https://docs.nats.io/nats-concepts/subjects#wildcards
[writers]: /storage/#writers
[writers]: ./storage.md#writers
[influxdb]: https://docs.influxdata.com/influxdb
[readers-api]: https://github.com/absmach/supermq/blob/master/api/readers.yml
[readers-api]: https://github.com/absmach/supermq/blob/main/api/readers.yml
12 changes: 6 additions & 6 deletions docs/twins.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,10 @@ Normally, you can use the default message broker, NATS, wildcards. In order to l

Since messages published on message broker are republished on any other protocol supported by SuperMQ - HTTP, MQTT, CoAP and WS - you can use any supported protocol client to pick up notifications.

[architecture]: /architecture/#architecture
[provision]: /provision/#provision
[writer]: /storage/#writers
[architecture]: ./architecture.md#architecture
[provision]: ./provision.md#provision
[writer]: ./storage.md#writers
[senml]: https://tools.ietf.org/html/rfc8428#section-4.3
[authentication]: /authentication/#authentication
[twins-api]: https://github.com/absmach/supermq/blob/master/api/openapi/twins.yml
[messaging]: /messaging/#messaging
[authentication]: ./authentication.md#authentication
[twins-api]: https://github.com/absmach/supermq/blob/main/api/openapi/twins.yml
[messaging]: ./messaging.md#messaging
Loading

0 comments on commit 435172a

Please sign in to comment.