Skip to content

Commit

Permalink
NOISSUE - Update Docker and Compose versions (#2159)
Browse files Browse the repository at this point in the history
Signed-off-by: Dusan Borovcanin <[email protected]>
  • Loading branch information
dborovcanin authored Apr 10, 2024
1 parent e803f36 commit 6580030
Show file tree
Hide file tree
Showing 78 changed files with 116 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-License-Identifier: Apache-2.0 -->
<!--
Pull request title should be `MG-XXX - description` or `NOISSUE - description` where XXX is ID of the issue that this PR relate to.
Please review the [CONTRIBUTING.md](https://github.com/absmach/magistrala/blob/master/CONTRIBUTING.md) file for detailed contributing guidelines.
Please review the [CONTRIBUTING.md](https://github.com/absmach/magistrala/blob/main/CONTRIBUTING.md) file for detailed contributing guidelines.
For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
Expand Down
2 changes: 1 addition & 1 deletion ADOPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Pull request commit must be [signed](https://docs.github.com/en/github/authentic
## Adopters list (alphabetical)


**Note:** The list is maintained by the users themselves. If you find yourself on this list, and you think it's inappropriate. Please contact [project maintainers](https://github.com/absmach/magistrala/blob/master/MAINTAINERS) and you will be permanently removed from the list.
**Note:** The list is maintained by the users themselves. If you find yourself on this list, and you think it's inappropriate. Please contact [project maintainers](https://github.com/absmach/magistrala/blob/main/MAINTAINERS) and you will be permanently removed from the list.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ For more details, check out the [official documentation][docs].

The following are needed to run Magistrala:

- [Docker](https://docs.docker.com/install/) (version 24.0.7)
- [Docker compose](https://docs.docker.com/compose/install/) (version 2.24.0)
- [Docker](https://docs.docker.com/install/) (version 26.0.0)

Developing Magistrala will also require:

Expand Down
4 changes: 2 additions & 2 deletions api/asyncapi/mqtt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

asyncapi: '2.6.0'
id: 'https://github.com/absmach/magistrala/blob/master/api/asyncapi/mqtt.yml'
id: 'https://github.com/absmach/magistrala/blob/main/api/asyncapi/mqtt.yml'
info:
title: Magistrala MQTT Adapter
version: '1.0.0'
Expand All @@ -16,7 +16,7 @@ info:
license:
name: Apache 2.0
url: 'https://github.com/absmach/magistrala/blob/master/LICENSE'
url: 'https://github.com/absmach/magistrala/blob/main/LICENSE'


defaultContentType: application/json
Expand Down
4 changes: 2 additions & 2 deletions api/asyncapi/websocket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

asyncapi: 2.6.0
id: 'https://github.com/absmach/magistrala/blob/master/api/asyncapi/websocket.yml'
id: 'https://github.com/absmach/magistrala/blob/main/api/asyncapi/websocket.yml'
info:
title: Magistrala WebSocket adapter
description: WebSocket adapter provides a WebSocket API for sending messages through communication channels. WebSocket adapter uses [mProxy](https://github.com/absmach/mproxy) for proxying traffic between client and MQTT broker.
Expand All @@ -13,7 +13,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: 'https://github.com/absmach/magistrala/blob/master/LICENSE'
url: 'https://github.com/absmach/magistrala/blob/main/LICENSE'
tags:
- name: WebSocket
defaultContentType: application/json
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/invitations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/notifiers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/readers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/things.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/twins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion api/openapi/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ info:
email: [email protected]
license:
name: Apache 2.0
url: https://github.com/absmach/magistrala/blob/master/LICENSE
url: https://github.com/absmach/magistrala/blob/main/LICENSE
version: 0.14.0

servers:
Expand Down
2 changes: 1 addition & 1 deletion auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The service is configured using the environment variables presented in the follo

## Deployment

The service itself is distributed as Docker container. Check the [`auth`](https://github.com/absmach/magistrala/blob/master/docker/docker-compose.yml) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`auth`](https://github.com/absmach/magistrala/blob/main/docker/docker-compose.yml) service section in docker-compose file to see how service is deployed.

Running this service outside of container requires working instance of the postgres database, SpiceDB, and Jaeger server.
To start the service outside of the container, execute the following shell script:
Expand Down
2 changes: 1 addition & 1 deletion auth/postgres/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestMain(m *testing.M) {

container, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: "postgres",
Tag: "16.1-alpine",
Tag: "16.2-alpine",
Env: []string{
"POSTGRES_USER=test",
"POSTGRES_PASSWORD=test",
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The service is configured using the environment variables presented in the follo

## Deployment

The service itself is distributed as Docker container. Check the [`boostrap`](https://github.com/absmach/magistrala/blob/master/docker/addons/bootstrap/docker-compose.yml) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`bootstrap`](https://github.com/absmach/magistrala/blob/main/docker/addons/bootstrap/docker-compose.yml) service section in docker-compose file to see how service is deployed.

To start the service outside of the container, execute the following shell script:

Expand All @@ -77,7 +77,7 @@ git clone https://github.com/absmach/magistrala

cd magistrala

# compile the service
# compile the servic e
make bootstrap

# copy binary to bin
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/api/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ func (lm *loggingMiddleware) Update(ctx context.Context, token string, cfg boots
}
if err != nil {
args = append(args, slog.Any("error", err))
lm.logger.Warn("Update boostrap config failed to complete successfully", args...)
lm.logger.Warn("Update bootstrap config failed to complete successfully", args...)
return
}
lm.logger.Info("Update boostrap config completed successfully", args...)
lm.logger.Info("Update bootstrap config completed successfully", args...)
}(time.Now())

return lm.svc.Update(ctx, token, cfg)
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/postgres/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestMain(m *testing.M) {

container, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: "postgres",
Tag: "16.1-alpine",
Tag: "16.2-alpine",
Env: []string{
"POSTGRES_USER=test",
"POSTGRES_PASSWORD=test",
Expand Down
4 changes: 2 additions & 2 deletions certs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ When `MG_CERTS_VAULT_HOST` is set it is presumed that `Vault` is installed and `
First you'll need to set up `Vault`.
To setup `Vault` follow steps in [Build Your Own Certificate Authority (CA)](https://learn.hashicorp.com/tutorials/vault/pki-engine).

For lab purposes you can use docker-compose and script for setting up PKI in [https://github.com/absmach/magistrala/blob/master/docker/addons/vault/README.md](https://github.com/absmach/magistrala/blob/master/docker/addons/vault/README.md)
For lab purposes you can use docker-compose and script for setting up PKI in [https://github.com/absmach/magistrala/blob/main/docker/addons/vault/README.md](https://github.com/absmach/magistrala/blob/main/docker/addons/vault/README.md)

```bash
MG_CERTS_VAULT_HOST=<https://vault-domain:8200>
Expand Down Expand Up @@ -68,7 +68,7 @@ The service is configured using the environment variables presented in the follo

## Deployment

The service is distributed as Docker container. Check the [`certs`](https://github.com/absmach/magistrala/blob/main/docker/addons/bootstrap/docker-compose.yml) service section in docker-compose to see how the service is deployed.
The service is distributed as Docker container. Check the [`certs`](https://github.com/absmach/magistrala/blob/main/docker/addons/bootstrap/docker-compose.yml) service section in docker-compose file to see how the service is deployed.

Running this service outside of container requires working instance of the auth service, things service, postgres database, vault and Jaeger server.
To start the service outside of the container, execute the following shell script:
Expand Down
2 changes: 1 addition & 1 deletion certs/postgres/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestMain(m *testing.M) {

container, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: "postgres",
Tag: "16.1-alpine",
Tag: "16.2-alpine",
Env: []string{
"POSTGRES_USER=test",
"POSTGRES_PASSWORD=test",
Expand Down
2 changes: 1 addition & 1 deletion cli/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var cmdBootstrap = []cobra.Command{
config <JSON_config> - Updates editable fields of the provided Config.
connection <id> <channel_ids> - Updates connections performs update of the channel list corresponding Thing is connected to.
channel_ids - '["channel_id1", ...]'
certs <id> <client_cert> <client_key> <ca> - Update boostrap config certificates.`,
certs <id> <client_cert> <client_key> <ca> - Update bootstrap config certificates.`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) < 3 {
logUsage(cmd.Use)
Expand Down
2 changes: 1 addition & 1 deletion coap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The service is configured using the environment variables presented in the follo

## Deployment

The service itself is distributed as Docker container. Check the [`coap-adapter`](https://github.com/absmach/magistrala/blob/main/docker/docker-compose.yml) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`coap-adapter`](https://github.com/absmach/magistrala/blob/main/docker/docker-compose.yml) service section in docker-compose file to see how service is deployed.

Running this service outside of container requires working instance of the message broker service, things service and Jaeger server.
To start the service outside of the container, execute the following shell script:
Expand Down
2 changes: 1 addition & 1 deletion consumers/notifiers/postgres/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestMain(m *testing.M) {

container, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: "postgres",
Tag: "16.1-alpine",
Tag: "16.2-alpine",
Env: []string{
"POSTGRES_USER=test",
"POSTGRES_PASSWORD=test",
Expand Down
6 changes: 3 additions & 3 deletions consumers/writers/cassandra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ default values.
| MG_MESSAGE_BROKER_URL | Message broker instance URL | nats://localhost:4222 |
| MG_JAEGER_URL | Jaeger server URL | http://jaeger:14268/api/traces |
| MG_SEND_TELEMETRY | Send telemetry to magistrala call home server | true |
| MG_CASSANDRA_WRITER_INSANCE_ID | Cassandra writer instance ID | |
| MG_CASSANDRA_WRITER_INSTANCE_ID | Cassandra writer instance ID | |

## Deployment

The service itself is distributed as Docker container. Check the [`cassandra-writer`](https://github.com/absmach/magistrala/blob/master/docker/addons/cassandra-writer/docker-compose.yml#L30-L49) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`cassandra-writer`](https://github.com/absmach/magistrala/blob/main/docker/addons/cassandra-writer/docker-compose.yml#L30-L49) service section in docker-compose file to see how service is deployed.

To start the service, execute the following shell script:

Expand Down Expand Up @@ -59,7 +59,7 @@ MG_CASSANDRA_PORT=[Cassandra DB port] \
MG_MESSAGE_BROKER_URL=[Message Broker instance URL] \
MG_JAEGER_URL=[Jaeger server URL] \
MG_SEND_TELEMETRY=[Send telemetry to magistrala call home server] \
MG_CASSANDRA_WRITER_INSANCE_ID=[Cassandra writer instance ID] \
MG_CASSANDRA_WRITER_INSTANCE_ID=[Cassandra writer instance ID] \
$GOBIN/magistrala-cassandra-writer
```

Expand Down
6 changes: 3 additions & 3 deletions consumers/writers/influxdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ default values.

## Deployment

The service itself is distributed as Docker container. Check the [`influxdb-writer`](https://github.com/absmach/magistrala/blob/master/docker/addons/influxdb-writer/docker-compose.yml#L35-L58) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`influxdb-writer`](https://github.com/absmach/magistrala/blob/main/docker/addons/influxdb-writer/docker-compose.yml#L35-L58) service section in docker-compose file to see how service is deployed.

To start the service, execute the following shell script:

Expand Down Expand Up @@ -87,13 +87,13 @@ and writer service, it contains InfluxData Web Admin Interface which can be used
exploration and data visualization and analytics. In order to run Magistrala InfluxDB writer, execute the following command:

```bash
docker-compose -f docker/addons/influxdb-writer/docker-compose.yml up -d
docker compose -f docker/addons/influxdb-writer/docker-compose.yml up -d
```

And, to use the default .env file, execute the following command:

```bash
docker-compose -f docker/addons/influxdb-writer/docker-compose.yml up --env-file docker/.env -d
docker compose -f docker/addons/influxdb-writer/docker-compose.yml up --env-file docker/.env -d
```

_Please note that you need to start core services before the additional ones._
Expand Down
2 changes: 1 addition & 1 deletion consumers/writers/mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ default values.

## Deployment

The service itself is distributed as Docker container. Check the [`mongodb-writer`](https://github.com/absmach/magistrala/blob/master/docker/addons/mongodb-writer/docker-compose.yml#L36-L55) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`mongodb-writer`](https://github.com/absmach/magistrala/blob/main/docker/addons/mongodb-writer/docker-compose.yml#L36-L55) service section in docker-compose file to see how service is deployed.

To start the service, execute the following shell script:

Expand Down
2 changes: 1 addition & 1 deletion consumers/writers/postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default values.

## Deployment

The service itself is distributed as Docker container. Check the [`postgres-writer`](https://github.com/absmach/magistrala/blob/master/docker/addons/postgres-writer/docker-compose.yml#L34-L59) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`postgres-writer`](https://github.com/absmach/magistrala/blob/main/docker/addons/postgres-writer/docker-compose.yml#L34-L59) service section in docker-compose file to see how service is deployed.

To start the service, execute the following shell script:

Expand Down
2 changes: 1 addition & 1 deletion consumers/writers/postgres/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestMain(m *testing.M) {

container, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: "postgres",
Tag: "16.1-alpine",
Tag: "16.2-alpine",
Env: []string{
"POSTGRES_USER=test",
"POSTGRES_PASSWORD=test",
Expand Down
2 changes: 1 addition & 1 deletion consumers/writers/timescale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default values.

## Deployment

The service itself is distributed as Docker container. Check the [`timescale-writer`](https://github.com/absmach/magistrala/blob/master/docker/addons/timescale-writer/docker-compose.yml#L34-L59) service section in docker-compose to see how service is deployed.
The service itself is distributed as Docker container. Check the [`timescale-writer`](https://github.com/absmach/magistrala/blob/main/docker/addons/timescale-writer/docker-compose.yml#L34-L59) service section in docker-compose file to see how service is deployed.

To start the service, execute the following shell script:

Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Follow the [official documentation](https://docs.docker.com/compose/install/).
Run the following commands from the project root directory.

```bash
docker-compose -f docker/docker-compose.yml up
docker compose -f docker/docker-compose.yml up
```

```bash
docker-compose -f docker/addons/<path>/docker-compose.yml up
docker compose -f docker/addons/<path>/docker-compose.yml up
```

To pull docker images from a specific release you need to change the value of `MG_RELEASE_TAG` in `.env` before running these commands.
Expand Down
6 changes: 2 additions & 4 deletions docker/addons/bootstrap/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

# This docker-compose file contains optional bootstrap services. Since it's optional, this file is
# dependent of docker-compose file from <project_root>/docker. In order to run this services, execute command:
# docker-compose -f docker/docker-compose.yml -f docker/addons/bootstrap/docker-compose.yml up
# docker compose -f docker/docker-compose.yml -f docker/addons/bootstrap/docker-compose.yml up
# from project root.

version: "3.7"

networks:
magistrala-base-net:

Expand All @@ -17,7 +15,7 @@ volumes:

services:
bootstrap-db:
image: postgres:16.1-alpine
image: postgres:16.2-alpine
container_name: magistrala-bootstrap-db
restart: on-failure
environment:
Expand Down
Loading

0 comments on commit 6580030

Please sign in to comment.