Skip to content

Commit

Permalink
Merge pull request #226 from Annopaolo/fwport-22.11
Browse files Browse the repository at this point in the history
Forward port changes from 22.11
  • Loading branch information
matt-mazzucato authored Oct 4, 2023
2 parents eeb01f9 + 29faf68 commit be506f5
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 5 additions & 13 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ archives:
files:
- none*

replacements:
amd64: x86_64
386: i386
darwin: macOS
name_template: >-
{{ .ProjectName }}_{{ trimprefix .Version "v" }}_{{- if eq .Os "darwin" }}macOS{{- else }}{{ .Os }}{{ end }}_{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}
# Deliver as a zip file on Windows
format_overrides:
Expand All @@ -34,16 +32,10 @@ nfpms:
# note that this is an array of nfpm configs
- id: astartectl
package_name: astartectl
file_name_template: >-
{{ .PackageName }}_{{ trimprefix .Version "v" }}_{{- if eq .Os "darwin" }}macOS{{- else }}{{ .Os }}{{ end }}_{{- if eq .Arch "amd64" }}x86_64{{- else if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}
# Replacements for GOOS and GOARCH in the package name.
# Keys should be valid GOOSs or GOARCHs.
# Values are the respective replacements.
# Default is empty.
replacements:
amd64: x86_64
386: i386

vendor: Ispirata
vendor: SECO Mind
# Your app's homepage.
# Default is empty.
homepage: https://github.com/astarte-platform/astartectl
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- `appengine send-data`: fix the encoding of binaryblob and binaryblobarray data.

## [22.11.04] - 2023-09-22
### Fixed
- `cluster instance deploy`: Allow real burst instances to be deployed for Astarte >= `v1.1.0`.

## [22.11.03] - 2023-07-27
### Added
- `cluster instance deploy`: Allow to deploy Astarte >= `v1.1.0`.

### Fixed
- `appengine device send-data`: fix `--to-curl` representation to return a valid command.
- `housekeeping realms create`: allow the creation of a realm when explicitly setting a topology
strategy.

## [22.11.02] - 23/05/2023
### Changed
- `appengine device`: print a parametric command rather than a partial one with
Expand Down
2 changes: 1 addition & 1 deletion cmd/appengine/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const (
-H "User-Agent: astarte-go" \
-H "Authorization: Bearer $TOKEN" \
"https://$ASTARTE_BASE_URL/appengine/v1/$REALM/devices/$DEVICE_ID/interfaces/$INTERFACE/$PATH
-data '{"data" : $DATA}'`
--data '{"data" : $DATA}'`
)

// DevicesCmd represents the devices command
Expand Down
5 changes: 4 additions & 1 deletion cmd/cluster/deployment/all_profiles.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2019 Ispirata Srl
// Copyright © 2019 - 23 SECO Mind Srl
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -25,5 +25,8 @@ func GetAllBuiltinAstarteClusterProfiles() []AstarteClusterProfile {
// 1.0 profiles (good for 1.0 for now)
astarteBasicProfile10,
astarteBurstProfile10,
// 1.1 profiles
astarteBasicProfile11,
astarteBurstProfile11,
}
}
79 changes: 79 additions & 0 deletions cmd/cluster/deployment/basic_1.1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright © 2023 SECO Mind Srl
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package deployment

import (
"github.com/Masterminds/semver/v3"
)

var astarteBasicProfile11 AstarteClusterProfile = AstarteClusterProfile{
Name: "basic",
Description: "Basic profile for test Clusters. Deterministic allocations, all Astarte Pods work on basics.",
Requirements: AstarteProfileRequirements{
CPUAllocation: 3500,
MemoryAllocation: 7 * 1024 * 1024 * 1024,
},
Compatibility: AstarteProfileCompatibility{},
DefaultSpec: AstarteDeploymentSpec{},
CustomizableFields: []AstarteProfileCustomizableField{},
}

func init() {
astarteBasicProfile11.Compatibility.MaxAstarteVersion, _ = semver.NewVersion("1.1.99")
astarteBasicProfile11.Compatibility.MinAstarteVersion, _ = semver.NewVersion("1.1.0")

// Let components basic only
astarteBasicProfile11.DefaultSpec.Components.Resources.Requests.CPU = "1200m"
astarteBasicProfile11.DefaultSpec.Components.Resources.Requests.Memory = "2048M"
astarteBasicProfile11.DefaultSpec.Components.Resources.Limits.CPU = "3000m"
astarteBasicProfile11.DefaultSpec.Components.Resources.Limits.Memory = "3072M"

// Queue size to a minimum, decent amount
astarteBasicProfile11.DefaultSpec.Components.DataUpdaterPlant.DataQueueCount = 128

// Very tiny Cassandra installation
astarteBasicProfile11.DefaultSpec.Cassandra.Deploy = true
astarteBasicProfile11.DefaultSpec.Cassandra.MaxHeapSize = "1024M"
astarteBasicProfile11.DefaultSpec.Cassandra.HeapNewSize = "256M"
astarteBasicProfile11.DefaultSpec.Cassandra.Resources.Requests.CPU = "1000m"
astarteBasicProfile11.DefaultSpec.Cassandra.Resources.Requests.Memory = "1024M"
astarteBasicProfile11.DefaultSpec.Cassandra.Resources.Limits.CPU = "2000m"
astarteBasicProfile11.DefaultSpec.Cassandra.Resources.Limits.Memory = "2048M"
astarteBasicProfile11.DefaultSpec.Cassandra.Storage.Size = "30Gi"

// Minimal CFSSL installation
astarteBasicProfile11.DefaultSpec.Cfssl.Deploy = true
astarteBasicProfile11.DefaultSpec.Cfssl.Resources.Requests.CPU = "100m"
astarteBasicProfile11.DefaultSpec.Cfssl.Resources.Requests.Memory = "128M"
astarteBasicProfile11.DefaultSpec.Cfssl.Resources.Limits.CPU = "200m"
astarteBasicProfile11.DefaultSpec.Cfssl.Resources.Limits.Memory = "256M"
astarteBasicProfile11.DefaultSpec.Cfssl.Storage.Size = "2Gi"

// Minimal RabbitMQ installation
astarteBasicProfile11.DefaultSpec.Rabbitmq.Deploy = true
astarteBasicProfile11.DefaultSpec.Rabbitmq.Resources.Requests.CPU = "300m"
astarteBasicProfile11.DefaultSpec.Rabbitmq.Resources.Requests.Memory = "512M"
astarteBasicProfile11.DefaultSpec.Rabbitmq.Resources.Limits.CPU = "1000m"
astarteBasicProfile11.DefaultSpec.Rabbitmq.Resources.Limits.Memory = "1024M"
astarteBasicProfile11.DefaultSpec.Rabbitmq.Storage.Size = "4Gi"

// Minimal VerneMQ installation
astarteBasicProfile11.DefaultSpec.Vernemq.Deploy = true
astarteBasicProfile11.DefaultSpec.Vernemq.Resources.Requests.CPU = "200m"
astarteBasicProfile11.DefaultSpec.Vernemq.Resources.Requests.Memory = "1024M"
astarteBasicProfile11.DefaultSpec.Vernemq.Resources.Limits.CPU = "1000m"
astarteBasicProfile11.DefaultSpec.Vernemq.Resources.Limits.Memory = "1024M"
astarteBasicProfile11.DefaultSpec.Vernemq.Storage.Size = "4Gi"
}
75 changes: 75 additions & 0 deletions cmd/cluster/deployment/burst_1.1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Copyright © 2023 SECO Mind Srl
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package deployment

import (
"github.com/Masterminds/semver/v3"
)

var astarteBurstProfile11 AstarteClusterProfile = AstarteClusterProfile{
Name: "burst",
Description: "Burst profile for CI Clusters. No deterministic allocations, all Astarte Pods work on bursts.",
Requirements: AstarteProfileRequirements{
CPUAllocation: 2 * 1000,
MemoryAllocation: 5 * 1024 * 1024 * 1024,
},
Compatibility: AstarteProfileCompatibility{},
DefaultSpec: AstarteDeploymentSpec{},
CustomizableFields: []AstarteProfileCustomizableField{},
}

func init() {
astarteBurstProfile11.Compatibility.MaxAstarteVersion, _ = semver.NewVersion("1.1.99")
astarteBurstProfile11.Compatibility.MinAstarteVersion, _ = semver.NewVersion("1.1.0")

// Do not set resources, this will let components burst

// Queue size to a minimum, decent amount
astarteBurstProfile11.DefaultSpec.Components.DataUpdaterPlant.DataQueueCount = 128

// Very tiny Cassandra installation
astarteBurstProfile11.DefaultSpec.Cassandra.Deploy = true
astarteBurstProfile11.DefaultSpec.Cassandra.MaxHeapSize = "512M"
astarteBurstProfile11.DefaultSpec.Cassandra.HeapNewSize = "256M"
astarteBurstProfile11.DefaultSpec.Cassandra.Resources.Requests.CPU = "500m"
astarteBurstProfile11.DefaultSpec.Cassandra.Resources.Requests.Memory = "1024M"
astarteBurstProfile11.DefaultSpec.Cassandra.Resources.Limits.CPU = "1000m"
astarteBurstProfile11.DefaultSpec.Cassandra.Resources.Limits.Memory = "2048M"
astarteBurstProfile11.DefaultSpec.Cassandra.Storage.Size = "10Gi"

// Minimal CFSSL installation
astarteBurstProfile11.DefaultSpec.Cfssl.Deploy = true
astarteBurstProfile11.DefaultSpec.Cfssl.Resources.Requests.CPU = "0m"
astarteBurstProfile11.DefaultSpec.Cfssl.Resources.Requests.Memory = "128M"
astarteBurstProfile11.DefaultSpec.Cfssl.Resources.Limits.CPU = "0m"
astarteBurstProfile11.DefaultSpec.Cfssl.Resources.Limits.Memory = "128M"
astarteBurstProfile11.DefaultSpec.Cfssl.Storage.Size = "2Gi"

// Minimal RabbitMQ installation
astarteBurstProfile11.DefaultSpec.Rabbitmq.Deploy = true
astarteBurstProfile11.DefaultSpec.Rabbitmq.Resources.Requests.CPU = "200m"
astarteBurstProfile11.DefaultSpec.Rabbitmq.Resources.Requests.Memory = "256M"
astarteBurstProfile11.DefaultSpec.Rabbitmq.Resources.Limits.CPU = "1000m"
astarteBurstProfile11.DefaultSpec.Rabbitmq.Resources.Limits.Memory = "256M"
astarteBurstProfile11.DefaultSpec.Rabbitmq.Storage.Size = "4Gi"

// Minimal VerneMQ installation
astarteBurstProfile11.DefaultSpec.Vernemq.Deploy = true
astarteBurstProfile11.DefaultSpec.Vernemq.Resources.Requests.CPU = "0m"
astarteBurstProfile11.DefaultSpec.Vernemq.Resources.Requests.Memory = "256M"
astarteBurstProfile11.DefaultSpec.Vernemq.Resources.Limits.CPU = "0m"
astarteBurstProfile11.DefaultSpec.Vernemq.Resources.Limits.Memory = "256M"
astarteBurstProfile11.DefaultSpec.Vernemq.Storage.Size = "4Gi"
}

0 comments on commit be506f5

Please sign in to comment.