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

Align prod with master ⚠️ wait from the release day #386

Open
wants to merge 71 commits into
base: prod
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
31faa8a
fix: Passing string to object value `nats.image`
alfrunes Sep 18, 2024
cd1a87a
feat!: Update docker image references to follow new repository scheme
alfrunes Sep 18, 2024
d74b41c
fix!: `tenantadm.certs` are no longer required
alfrunes Sep 18, 2024
501dfaf
feat: Autogenerate required useradm/deviceauth secrets
alfrunes Sep 18, 2024
9f42928
fix!: Change gui default targetPort to 8090
alfrunes Sep 18, 2024
87c10ff
refactor(workflows): Made workflows template arguments easier to read
alfrunes Sep 20, 2024
360ed7a
docs: Added remark about global.image.username/password to changelog
alfrunes Sep 20, 2024
c4ee390
chore: Bind the `server_priv_key_path` and plan path to avoid breakage
alfrunes Oct 1, 2024
0083f34
chore: default to SSL: false to avoid redirection loop
oldgiova Jul 21, 2023
fd7676d
fix: Changed default `global.enterprise` to false
alfrunes Oct 2, 2024
356a3eb
fix: Remove deprecated redis values
alfrunes Oct 2, 2024
0ed7e99
chore: Added explicit check for helm version
alfrunes Oct 2, 2024
efd057f
ci: Update helm version to 3.10.2
alfrunes Oct 2, 2024
e0e1692
chore: Add nats_uri to inventory and iot-manager services
alfrunes Oct 14, 2024
f12d15a
ci: added gitlab dependency proxy image
oldgiova Sep 11, 2024
bb84db0
ci: add release automation
oldgiova Sep 11, 2024
44a693a
feat: add gui hpa
oldgiova Oct 4, 2024
c80e1fd
ci: fix changelog append on top
oldgiova Oct 7, 2024
cad5b7b
ci: always regenerate the changelog
oldgiova Oct 9, 2024
80e2ff9
ci: using commit signoff option
oldgiova Oct 9, 2024
7b8a5b8
ci: fix remote repository already existing
oldgiova Oct 10, 2024
5d35459
ci: fix diverging PRs
oldgiova Oct 10, 2024
e81c105
ci: ignore already existing remotes
oldgiova Oct 10, 2024
aa741eb
ci: unique remote repo
oldgiova Oct 10, 2024
325da8b
ci: isolate scripts with dashes
oldgiova Oct 14, 2024
e9b5780
ci: force the remote branch
oldgiova Oct 14, 2024
9654235
fix: traefik container ports optionals
oldgiova Oct 4, 2024
a325ba7
chore(master): release mender 5.11.0
mender-test-bot Oct 14, 2024
500dd8e
feat!: Update docker image references to follow new repository scheme
alfrunes Sep 18, 2024
eaaf800
fix!: `tenantadm.certs` are no longer required
alfrunes Sep 18, 2024
e9dfef2
chore: new changelog file for the 6.x
oldgiova Oct 18, 2024
7d21622
feat!: mongodb sub-chart enabled by default
oldgiova Oct 18, 2024
9218f04
feat!: NATS sub-chart enabled by default
oldgiova Oct 18, 2024
2a7790a
feat!: redis subchart disabled by default
oldgiova Oct 18, 2024
3b9cfd2
feat!: storage proxy enabled by default
oldgiova Oct 18, 2024
df07622
docs: new v6.x setup
oldgiova Oct 18, 2024
723652d
Merge pull request #2 from oldgiova/v6.0.0-lesser
alfrunes Oct 22, 2024
0c30831
ci: adapt tests to the v6 chart
oldgiova Oct 22, 2024
cfca8d2
Merge pull request #3 from oldgiova/v6.0.0-lesser
alfrunes Oct 23, 2024
ae00839
Merge remote-tracking branch 'alfrunes/v6.0.0-lesser' into master
alfrunes Oct 28, 2024
f88829e
Merge pull request #343 from alfrunes/v6.0.0-lesser
alfrunes Oct 29, 2024
e0dc765
ci: workaround missing v4.0 tag
oldgiova Oct 29, 2024
30a5c44
Merge pull request #358 from oldgiova/temporary-main
oldgiova Oct 30, 2024
1b91bbe
ci: fix missing seaweedfs helm repo
oldgiova Oct 31, 2024
b87931b
Merge pull request #359 from oldgiova/fix-seaweedfs-repo-failed
oldgiova Oct 31, 2024
670293a
ci: fix seaweedfs filer data storage
oldgiova Oct 31, 2024
bc8bcf8
Merge pull request #360 from oldgiova/fix-seaweedfs-storage
oldgiova Oct 31, 2024
e34cf23
ci: using the right previous lts tag
oldgiova Oct 31, 2024
ce10566
Merge pull request #361 from oldgiova/fix-lts-test
oldgiova Oct 31, 2024
b84a174
ci: temporary disable prev lts to curr lts test
oldgiova Oct 31, 2024
bad64e7
Merge pull request #362 from oldgiova/fix-lts-test
oldgiova Oct 31, 2024
13f5813
chore(master): release mender 6.0.0-rc
mender-test-bot Oct 31, 2024
a471834
Merge pull request #363 from mendersoftware/release-please--branches-…
oldgiova Oct 31, 2024
71f6681
chore(internal): fix broken value reference for deviceauth secret key
alfrunes Oct 31, 2024
ec021f7
Merge pull request #366 from alfrunes/fix-broken-value-ref
oldgiova Oct 31, 2024
9ead1c8
fix: Add http timeouts, only apply https timeouts when https is enabled
chriswiggins Nov 12, 2024
e35c410
Merge pull request #369 from chriswiggins/feat/http-timeouts
oldgiova Nov 13, 2024
5e156fc
ci: run release-please on maintenance branches
oldgiova Nov 13, 2024
1573be7
Merge pull request #372 from oldgiova/release-from-maintenance-branches
oldgiova Nov 13, 2024
15c64a9
ci: include only branch tags in the changelog
oldgiova Nov 13, 2024
e9e24df
ci: cleanup unused vars
oldgiova Nov 13, 2024
1d9dcb3
Merge pull request #377 from oldgiova/git-cliff-use-branch-tags
oldgiova Nov 13, 2024
5633b67
chore(master): release mender 6.0.0-rc.1
mender-test-bot Nov 13, 2024
c57ef95
Merge pull request #370 from mendersoftware/release-please--branches-…
oldgiova Nov 14, 2024
f4256fc
typo: Update UPGRADE_from_v5_to_v6.md
LinAnt Nov 15, 2024
8f1cd69
Merge pull request #381 from LinAnt/patch-1
oldgiova Nov 15, 2024
14f15a1
fix: tenantadm endpoint fix
oldgiova Nov 28, 2024
44e3aaa
Merge pull request #388 from oldgiova/fix-tenant-issue
oldgiova Nov 28, 2024
2f8a157
chore(master): release mender 6.0.0-rc.2
mender-test-bot Nov 28, 2024
73b6c4d
Merge pull request #389 from mendersoftware/release-please--branches-…
oldgiova Nov 28, 2024
6e88a05
Merge branch 'master' into prod
oldgiova Nov 28, 2024
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
278 changes: 69 additions & 209 deletions .gitlab-ci.yml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"mender": "5.11.2"
"mender": "6.0.0-rc.2"
}

222 changes: 99 additions & 123 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,106 +16,127 @@ This chart bootstraps a [Mender](https://mender.io) deployment on a [Kubernetes]

## Prerequisites

- Kubernetes 1.12+
- Helm >= 3.7.0
- Kubernetes 1.26+
- Helm >= 3.10.0
- Object storage (AWS S3, Azure Blob Storage, GCS, MinIO, SeaweedFS)

## External services required

This Helm chart does not install the following external services and dependencies which are required to run Mender:
## Object storage setup
Supported object storage services are:
* Amazon S3
* Azure Blob Storage
* Google Cloud Storage
* Cloudflare R2

- MinIO
You can also use other S3-compatible object storage services like MinIO or
SeaweedFS, for development and testing purposes only.

### Installing mongodb
Following some setup sample. Please refer to the official documentation of the
object storage service you are using for more information.

MongoDB is integrated as a sub-chart deployment: you can enable it with
the following settings:
### Amazon S3

```
mongodb:
enabled: true
Create a new bucket in Amazon S3, then a IAM user and its access key with
the proper permissions to access the bucket.

You can find the required permissions in the
[Requirements section](https://docs.mender.io/overview/requirements#amazon-s3-iam-policies)
of the official documentation.

Then, export the following environment variables:

# or via the --set argument:
--set="mongodb.enabled=true"
```bash
export AWS_ACCESS_KEY_ID="replace-with-your-access-key-id"
export AWS_SECRET_ACCESS="replace-with-your-secret-access-key"
export AWS_REGION="replace-with-your-aws-region"
export STORAGE_BUCKET="replace-with-your-bucket-name"
```

You can customize it by following the [provider's](https://artifacthub.io/packages/helm/bitnami/mongodb)
specifications.
It's recommended to use an external deployment in Production.
### SeaweedFS

Alternatively to Amazon S3, you can install SeaweedFS, a compatible S3
solution.

### Installing MinIO
**Important**: the following setup is intended for development
and testing purposes only. For production usage, it's recommended to use
an external object storage service like AWS S3 or Azure Blob Storage.

You can install MinIO using the official MinIO Helm chart using `helm`:
Installing SeaweedFS:

```bash
cat >minio-operator.yml <<EOF
tenants: {}
export STORAGE_CLASS="default"
export STORAGE_BUCKET="replace-with-your-bucket-name"

cat >seaweedfs.yml <<EOF
filer:
s3:
enabled: true
enableAuth: true
createBuckets:
- name: "${STORAGE_BUCKET}"
storageClass: ${STORAGE_CLASS}

s3:
enabled: true
enableAuth: true
EOF

helm repo add minio https://operator.min.io/
helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm
helm repo update
helm install minio-operator minio/minio-operator --version 4.1.7 -f minio-operator.yml

export MINIO_ACCESS_KEY=$(pwgen 32 1)
export MINIO_SECRET_KEY=$(pwgen 32 1)

cat >minio.yml <<EOF
apiVersion: v1
kind: Secret
metadata:
name: minio-creds-secret
type: Opaque
data:
accesskey: $(echo -n $MINIO_ACCESS_KEY | base64)
secretkey: $(echo -n $MINIO_SECRET_KEY | base64)
---
apiVersion: minio.min.io/v2
kind: Tenant
metadata:
name: minio
labels:
app: minio
spec:
image: minio/minio:RELEASE.2021-06-17T00-10-46Z
credsSecret:
name: minio-creds-secret
pools:
- servers: 2
volumesPerServer: 2
volumeClaimTemplate:
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: "standard"
mountPath: /export
requestAutoCert: false
EOF
helm install seaweedfs --wait -f seaweedfs.yml seaweedfs/seaweedfs

kubectl apply -f minio.yml
```
Finally, export the following environment variables, needed for installing
Mender:

### Installing NATS
```bash
export AWS_ACCESS_KEY_ID=$(kubectl get secret seaweedfs-s3-secret -o jsonpath='{.data.admin_access_key_id}' |base64 -d)
export AWS_SECRET_ACCESS_KEY=$(kubectl get secret seaweedfs-s3-secret -o jsonpath='{.data.admin_secret_access_key}' |base64 -d)
export AWS_REGION="us-east-1"
export STORAGE_ENDPOINT="http://seaweedfs-s3:8333"
```

NATS is integrated as a sub-chart deployment: you can enable it with
the following settings:
## Installing Mender

```
nats:
This is the minimum configuration needed to install Mender:

```bash
export MENDER_SERVER_DOMAIN="mender.example.com"
export MENDER_SERVER_URL="https://${MENDER_SERVER_DOMAIN}"

cat >values.yaml <<EOF
global:
s3:
AWS_URI: "${MENDER_SERVER_URL}"
AWS_BUCKET: "${STORAGE_BUCKET}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
url: "${MENDER_SERVER_URL}"

ingress:
enabled: true
annotations:
<your ingress controller specific annotations>
hosts:
- ${MENDER_SERVER_DOMAIN}
tls:
- secretName: <your-tls-secret>
hosts:
- ${MENDER_SERVER_DOMAIN}

# or via the --set argument:
--set="nats.enabled=true"
```
api_gateway:
storage_proxy:
enabled: true
url: "${STORAGE_ENDPOINT}"
customRule: "PathRegexp(\`^/${STORAGE_BUCKET}\`)"

You can customize it by following the [provider's](https://docs.nats.io/running-a-nats-service/nats-kubernetes/helm-charts)
specifications.
It's recommended to use an external deployment in Production.
deployments:
customEnvs:
- name: DEPLOYMENTS_STORAGE_PROXY_URI
value: "${MENDER_SERVER_URL}"

## Installing the Chart
EOF
```

To install the chart with the release name `my-release` using `helm`:

Expand All @@ -127,56 +148,11 @@ The command deploys Mender on the Kubernetes cluster in the default configuratio

> **Tip**: List all releases using `helm list`

This is the minimum `values.yaml` file needed to install Mender:

```yaml
global:
image:
username: <your_user>
password: <your_password>
url: https://mender.example.com

api_gateway:
certs:
cert: |-
-----BEGIN CERTIFICATE-----
MIIFcjCCBFq...
key: |-
-----BEGIN PRIVATE KEY-----
MIIEvgIBADA...

device_auth:
certs:
key: |-
-----BEGIN RSA PRIVATE KEY-----
MIIEvgIBADA...

tenantadm:
certs:
key: |-
-----BEGIN RSA PRIVATE KEY-----
MIIEvgIBADA...

useradm:
certs:
key: |-
-----BEGIN RSA PRIVATE KEY-----
MIIEvgIBADA...
```
## Upgrading from Helm Chart 5.x and Meneder Server 3.7.x

You can generate your `cert` and `key` for `api-gareway` using `openssl`:

```bash
openssl req -x509 -sha256 -nodes -days 3650 -newkey ec:<(openssl ecparam -name prime256v1) -keyout private.key -out certificate.crt -subj /CN="your.host.name"
```

You can generate the RSA private keys for `device-auth`, `tenantadm` and `useradm` using `openssl`:

```bash
openssl genpkey -algorithm RSA -out device_auth.key -pkeyopt rsa_keygen_bits:3072
openssl rsa -in device_auth.key -out device_auth_converted.key
mv device_auth_converted.key device_auth.key
```
Please refer to [this document](UPGRADE_from_v5_to_v6.md) for the upgrade
procedure details.

## Uninstalling the Chart

Expand Down
Loading