Skip to content

Commit 1aab534

Browse files
adrianrioboclaude
andcommitted
feat(ibmcloud): add GitLab runner support for IBM Power and IBM Z
- Registers runner with docker executor backed by rootful Podman socket - Adds --docker-privileged so crun can mount /proc (required on ppc64le and s390x) - Reliably mounts the IBM Power data volume at /home via cloud-init - Extracts otelcol-contrib into a reusable integration module Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ce74314 commit 1aab534

251 files changed

Lines changed: 29915 additions & 10921 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ VERSION_VARIABLES := -X $(MODULEPATH)/pkg/manager/context.OCI=$(IMG) \
2828
-X $(MODULEPATH)/pkg/integrations/cirrus.version=$(CIRRUS_CLI) \
2929
-X $(MODULEPATH)/pkg/integrations/github.runnerVersion=$(GITHUB_RUNNER) \
3030
-X $(MODULEPATH)/pkg/integrations/gitlab.version=$(GITLAB_RUNNER) \
31-
-X $(MODULEPATH)/pkg/provider/ibmcloud/action/ibm-power.otelColVersion=$(OTELCOL_VERSION) \
32-
-X $(MODULEPATH)/pkg/provider/ibmcloud/action/ibm-z.otelColVersion=$(OTELCOL_VERSION)
31+
-X $(MODULEPATH)/pkg/integrations/otelcol.version=$(OTELCOL_VERSION)
3332
LDFLAGS := $(VERSION_VARIABLES) ${GO_EXTRA_LDFLAGS}
3433
GCFLAGS := all=-N -l
3534
GOOS := $(shell go env GOOS)

cmd/mapt/cmd/aws/hosts/fedora.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func getFedoraCreate() *cobra.Command {
5757
DebugLevel: viper.GetUint(params.DebugLevel),
5858
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
5959
GHRunnerArgs: params.GithubRunnerArgs(),
60-
GLRunnerArgs: params.GitLabRunnerArgs(),
60+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
6161
Tags: viper.GetStringMapString(params.Tags),
6262
},
6363
&fedora.FedoraArgs{

cmd/mapt/cmd/aws/hosts/mac.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func getMacRequest() *cobra.Command {
4848
Debug: viper.IsSet(params.Debug),
4949
DebugLevel: viper.GetUint(params.DebugLevel),
5050
GHRunnerArgs: params.GithubRunnerArgs(),
51-
GLRunnerArgs: params.GitLabRunnerArgs(),
51+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
5252
Tags: viper.GetStringMapString(params.Tags),
5353
},
5454
&mac.MacRequestArgs{

cmd/mapt/cmd/aws/hosts/rhel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func getRHELCreate() *cobra.Command {
5353
DebugLevel: viper.GetUint(params.DebugLevel),
5454
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
5555
GHRunnerArgs: params.GithubRunnerArgs(),
56-
GLRunnerArgs: params.GitLabRunnerArgs(),
56+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
5757
Tags: viper.GetStringMapString(params.Tags),
5858
},
5959
&rhel.RHELArgs{

cmd/mapt/cmd/aws/hosts/windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func getWindowsCreate() *cobra.Command {
6666
DebugLevel: viper.GetUint(params.DebugLevel),
6767
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
6868
GHRunnerArgs: params.GithubRunnerArgs(),
69-
GLRunnerArgs: params.GitLabRunnerArgs(),
69+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
7070
Tags: viper.GetStringMapString(params.Tags),
7171
},
7272
&windows.WindowsServerArgs{

cmd/mapt/cmd/aws/services/mac-pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func request() *cobra.Command {
174174
DebugLevel: viper.GetUint(params.DebugLevel),
175175
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
176176
GHRunnerArgs: params.GithubRunnerArgs(),
177-
GLRunnerArgs: params.GitLabRunnerArgs(),
177+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
178178
Tags: viper.GetStringMapString(params.Tags),
179179
},
180180
&macpool.RequestMachineArgs{

cmd/mapt/cmd/azure/hosts/rhel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func getCreateRHEL() *cobra.Command {
4949
DebugLevel: viper.GetUint(params.DebugLevel),
5050
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
5151
GHRunnerArgs: params.GithubRunnerArgs(),
52-
GLRunnerArgs: params.GitLabRunnerArgs(),
52+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
5353
Tags: viper.GetStringMapString(params.Tags),
5454
},
5555
&azureRHEL.RhelArgs{

cmd/mapt/cmd/azure/hosts/windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func getCreateWindowsDesktop() *cobra.Command {
6262
DebugLevel: viper.GetUint(params.DebugLevel),
6363
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
6464
GHRunnerArgs: params.GithubRunnerArgs(),
65-
GLRunnerArgs: params.GitLabRunnerArgs(),
65+
GLRunnerArgs: params.GitLabRunnerArgs(params.LinuxGitLabArch()),
6666
Tags: viper.GetStringMapString(params.Tags),
6767
},
6868
&azureWindows.WindowsArgs{

cmd/mapt/cmd/ibmcloud/hosts/ibm-power.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package hosts
22

33
import (
44
"github.com/redhat-developer/mapt/cmd/mapt/cmd/params"
5+
"github.com/redhat-developer/mapt/pkg/integrations/gitlab"
56
maptContext "github.com/redhat-developer/mapt/pkg/manager/context"
67
ibmpower "github.com/redhat-developer/mapt/pkg/provider/ibmcloud/action/ibm-power"
78
"github.com/spf13/cobra"
@@ -52,17 +53,24 @@ func ibmPowerCreate() *cobra.Command {
5253
DebugLevel: viper.GetUint(params.DebugLevel),
5354
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
5455
GHRunnerArgs: params.GithubRunnerArgs(),
56+
GLRunnerArgs: params.GitLabRunnerArgs(&gitlab.Ppc64le),
5557
Tags: viper.GetStringMapString(params.Tags),
5658
},
5759
&ibmpower.PWArgs{
5860
PIPrivateSubnetID: viper.GetString(params.PIPrivateSubnetID),
5961
WorkspaceID: viper.GetString(params.WorkspaceID),
6062
VPCPublicSubnetID: viper.GetString(params.VPCPublicSubnetID),
63+
Memory: viper.GetFloat64(params.PIMemory),
64+
Processors: viper.GetFloat64(params.PIProcessors),
65+
ProcType: viper.GetString(params.PIProcType),
66+
SysType: viper.GetString(params.PISysType),
67+
StorageType: viper.GetString(params.PIStorageType),
68+
DiskSize: viper.GetInt(params.PIDiskSize),
6169
OtelAppCode: viper.GetString(params.OtelAppCode),
6270
OtelAuthToken: viper.GetString(params.OtelAuthToken),
6371
OtelEndpoint: viper.GetString(params.OtelEndpoint),
64-
OtelIndex: viper.GetString(params.OtelIndex),
65-
OtelExtraAttrs: viper.GetStringMapString(params.OtelExtraAttrs),
72+
OtelIndex: viper.GetString(params.OtelIndex),
73+
OtelExtraAttrs: viper.GetStringMapString(params.OtelExtraAttrs),
6674
})
6775
},
6876
}
@@ -77,8 +85,16 @@ func ibmPowerCreate() *cobra.Command {
7785
flagSet.StringP(params.OtelEndpoint, "", "https://otel-input.corp.redhat.com", params.OtelEndpointDesc)
7886
flagSet.StringP(params.OtelIndex, "", "", params.OtelIndexDesc)
7987
flagSet.StringToStringP(params.OtelExtraAttrs, "", nil, params.OtelExtraAttrsDesc)
88+
flagSet.Float64(params.PIMemory, params.PIMemoryDefault, params.PIMemoryDesc)
89+
flagSet.Float64(params.PIProcessors, params.PIProcessorsDefault, params.PIProcessorsDesc)
90+
flagSet.String(params.PIProcType, params.PIProcTypeDefault, params.PIProcTypeDesc)
91+
flagSet.String(params.PISysType, params.PISysTypeDefault, params.PISysTypeDesc)
92+
flagSet.String(params.PIStorageType, params.PIStorageTypeDefault, params.PIStorageTypeDesc)
93+
flagSet.Int(params.PIDiskSize, params.PIDiskSizeDefault, params.PIDiskSizeDesc)
8094
params.AddGHActionsFlags(flagSet)
8195
params.AddCirrusFlags(flagSet)
96+
params.AddGitLabRunnerFlags(flagSet)
97+
flagSet.Int(params.GlRunnerConcurrent, params.GlRunnerConcurrentPowerDefault, params.GlRunnerConcurrentDesc)
8298
c.PersistentFlags().AddFlagSet(flagSet)
8399
_ = c.MarkPersistentFlagRequired(params.PIPrivateSubnetID)
84100
_ = c.MarkPersistentFlagRequired(params.WorkspaceID)

cmd/mapt/cmd/ibmcloud/hosts/ibm-z.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package hosts
22

33
import (
44
"github.com/redhat-developer/mapt/cmd/mapt/cmd/params"
5+
"github.com/redhat-developer/mapt/pkg/integrations/gitlab"
56
maptContext "github.com/redhat-developer/mapt/pkg/manager/context"
67
ibmz "github.com/redhat-developer/mapt/pkg/provider/ibmcloud/action/ibm-z"
78
"github.com/spf13/cobra"
@@ -52,14 +53,17 @@ func ibmZCreate() *cobra.Command {
5253
DebugLevel: viper.GetUint(params.DebugLevel),
5354
CirrusPWArgs: params.CirrusPersistentWorkerArgs(),
5455
GHRunnerArgs: params.GithubRunnerArgs(),
56+
GLRunnerArgs: params.GitLabRunnerArgs(&gitlab.S390x),
5557
Tags: viper.GetStringMapString(params.Tags),
5658
},
5759
&ibmz.ZArgs{
5860
SubnetID: viper.GetString(params.SubnetID),
61+
Profile: viper.GetString(params.IZProfile),
62+
DiskSize: viper.GetInt(params.IZDiskSize),
5963
OtelAppCode: viper.GetString(params.OtelAppCode),
6064
OtelAuthToken: viper.GetString(params.OtelAuthToken),
6165
OtelEndpoint: viper.GetString(params.OtelEndpoint),
62-
OtelIndex: viper.GetString(params.OtelIndex),
66+
OtelIndex: viper.GetString(params.OtelIndex),
6367
OtelExtraAttrs: viper.GetStringMapString(params.OtelExtraAttrs),
6468
})
6569
},
@@ -73,8 +77,12 @@ func ibmZCreate() *cobra.Command {
7377
flagSet.StringP(params.OtelEndpoint, "", "https://otel-input.corp.redhat.com", params.OtelEndpointDesc)
7478
flagSet.StringP(params.OtelIndex, "", "", params.OtelIndexDesc)
7579
flagSet.StringToStringP(params.OtelExtraAttrs, "", nil, params.OtelExtraAttrsDesc)
80+
flagSet.String(params.IZProfile, params.IZProfileDefault, params.IZProfileDesc)
81+
flagSet.Int(params.IZDiskSize, params.IZDiskSizeDefault, params.IZDiskSizeDesc)
7682
params.AddGHActionsFlags(flagSet)
7783
params.AddCirrusFlags(flagSet)
84+
params.AddGitLabRunnerFlags(flagSet)
85+
flagSet.Int(params.GlRunnerConcurrent, params.GlRunnerConcurrentS390xDefault, params.GlRunnerConcurrentDesc)
7886
c.PersistentFlags().AddFlagSet(flagSet)
7987
return c
8088
}

0 commit comments

Comments
 (0)