Skip to content

Commit

Permalink
MG-145 - Update chart/app version, README, and fix CI (#146)
Browse files Browse the repository at this point in the history
* Update chart/app version and README

Signed-off-by: JeffMboya <[email protected]>

* Add dependencies to lint-test.yaml

Signed-off-by: JeffMboya <[email protected]>

* Fix CI to lint magistrala chart

Signed-off-by: JeffMboya <[email protected]>

* remove extra spaces

Signed-off-by: JeffMboya <[email protected]>

* update trigger from main to master

Signed-off-by: JeffMboya <[email protected]>

* Update README

Signed-off-by: JeffMboya <[email protected]>

check cluster status

Signed-off-by: JeffMboya <[email protected]>

check cluster status

Signed-off-by: JeffMboya <[email protected]>

run cluster check after creation

Signed-off-by: JeffMboya <[email protected]>

update kubectl version

Signed-off-by: JeffMboya <[email protected]>

update kubectl version

Signed-off-by: JeffMboya <[email protected]>

update kubectl version

Signed-off-by: JeffMboya <[email protected]>

update kubectl version

Signed-off-by: JeffMboya <[email protected]>

update chart version

Signed-off-by: JeffMboya <[email protected]>

update chart version

Signed-off-by: JeffMboya <[email protected]>

update docs

Signed-off-by: JeffMboya <[email protected]>

remove kubectl steps

Signed-off-by: JeffMboya <[email protected]>

update ct to v2.6.1

Signed-off-by: JeffMboya <[email protected]>

* replace command line arguments with config file

Signed-off-by: JeffMboya <[email protected]>

use config file for ct

Signed-off-by: JeffMboya <[email protected]>

use config file for ct

Signed-off-by: JeffMboya <[email protected]>

* add arguments to ct install

Signed-off-by: JeffMboya <[email protected]>

* add arguments to ct install

Signed-off-by: JeffMboya <[email protected]>

* add config options

Signed-off-by: JeffMboya <[email protected]>

* replace upstream with remote url

Signed-off-by: JeffMboya <[email protected]>

* replace upstream with remote url

Signed-off-by: JeffMboya <[email protected]>

* replace upstream with remote url

Signed-off-by: JeffMboya <[email protected]>

* fix target branch

Signed-off-by: JeffMboya <[email protected]>

* fix target branch

Signed-off-by: JeffMboya <[email protected]>

* add step to fetch and install those dependencies

Signed-off-by: JeffMboya <[email protected]>

* process all charts

Signed-off-by: JeffMboya <[email protected]>

* update chart dir

Signed-off-by: JeffMboya <[email protected]>

* update README

Signed-off-by: JeffMboya <[email protected]>

* Update README

Signed-off-by: JeffMboya <[email protected]>

---------

Signed-off-by: JeffMboya <[email protected]>
  • Loading branch information
JeffMboya authored Sep 12, 2024
1 parent 585ec3b commit fb44c46
Show file tree
Hide file tree
Showing 6 changed files with 382 additions and 239 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,27 @@ jobs:
with:
version: v3.15.4

- name: Add Helm repositories and update
run: |
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add hashicorp https://helm.releases.hashicorp.com
helm repo update
- name: Update Helm dependencies
run: |
helm dependency update charts/magistrala
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- uses: actions/setup-python@v5
with:
python-version: "3.x"
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected].0
uses: helm/[email protected].1

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -37,12 +51,14 @@ jobs:
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
run: |
ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts/magistrala/charts
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/[email protected]

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs charts/magistrala/charts
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Release Charts
on:
push:
branches:
- main
- master

jobs:
release:
Expand Down Expand Up @@ -39,6 +39,10 @@ jobs:
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo update
- name: Update Helm dependencies
run: |
helm dependency update charts/magistrala
- name: Run chart-releaser
uses: helm/[email protected]
env:
Expand Down
59 changes: 54 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,62 @@
## DevOps

DevOps scripts for Magistrala IoT platform
Scripts for managing the Magistrala IoT platform. For installation instructions, refer to [Magistrala Kubernetes Documentation](https://docs.magistrala.abstractmachines.fr/kubernetes/).

## Install
### Autogenerating Helm Chart Documentation

Follow the instructions in [`charts`](charts) directory.
The documentation for Magistrala Helm charts in `charts/magistrala/README.md` is generated using `helm-docs`, which extracts metadata from `Chart.yaml` and `values.yaml`. To update the documentation after changes, follow these steps:

Detailed documentation can be found [here](https://docs.magistrala.abstractmachines.fr/kubernetes/).
### Prerequisites

Before starting, ensure the following tools are installed:

1. **Helm**
Make sure [Helm](https://helm.sh) is installed on your system. If not, follow the [Helm installation guide](https://helm.sh/docs) to get started.

2. **Helm Docs Tool**
The documentation for the Magistrala Helm charts is autogenerated using the `helm-docs` tool. To install `helm-docs`, use the following command:

```bash
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
```

If Go is not installed, follow the [Go installation guide](https://golang.org/doc/install).

### Step 1: Navigate to Your Project Directory

First, move to the directory where the Helm charts are stored. For this project, the command would be:

```bash
cd devops
```

### Step 2: Run the `helm-docs` Command

Generate or update the documentation for your Helm charts by running:

```bash
helm-docs
```

This command will parse the charts in the `charts` directory and update the `charts/magistrala/README.md` file. A typical successful run looks like this:

```bash
INFO[2024-09-11T11:34:20+03:00] Found Chart directories [charts/magistrala]
INFO[2024-09-11T11:34:20+03:00] Generating README Documentation for chart charts/magistrala
```

### Step 3: Commit and Push the Changes

After `helm-docs` has updated the documentation, review the changes, and then commit and push them to your Git repository:

```bash
git add charts/magistrala/README.md
git commit -m "Update Helm chart documentation"
git push origin <your-branch>
```

Replace `<your-branch>` with the branch you are working on.

## License

[Apace-2.0](LICENSE)
This project is licensed under the [Apache-2.0](LICENSE).
4 changes: 2 additions & 2 deletions charts/magistrala/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ name: magistrala
description: Magistrala IoT Platform
icon: https://avatars1.githubusercontent.com/u/13207490
type: application
version: 1.0.4 # Incremented chart version if the chart is updated
appVersion: "0.12.2" # Update application version if the app is updated
version: 1.0.6 # Incremented chart version if the chart is updated
appVersion: "0.14.0" # Update application version if the app is updated
home: https://abstractmachines.fr/magistrala.html
sources:
- https://hub.docker.com/u/magistrala
Expand Down
Loading

0 comments on commit fb44c46

Please sign in to comment.