Skip to content

Commit 3e0e613

Browse files
committed
Revert "[ARO-13400] Old E2E pipeline uses MiWi clusters (#4056)"
This reverts commit 1915349.
1 parent fe1dfac commit 3e0e613

File tree

176 files changed

+332
-26337
lines changed

Some content is hidden

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

176 files changed

+332
-26337
lines changed

.pipelines/e2e.yml

+1-29
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ jobs:
5858
displayName: Enable regression tests in CI
5959
condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
6060
61-
- script: |
62-
. secrets/env
63-
64-
# Retrieve the kubeconfig
65-
hack/get-admin-aks-kubeconfig.sh > aks.kubeconfig
66-
67-
if [ -f aks.kubeconfig ]; then
68-
echo "Kubeconfig retrieved successfully."
69-
else
70-
echo "Failed to retrieve Kubeconfig."
71-
exit 1
72-
fi
73-
displayName: Get Kubeconfig for AKS Cluster
74-
7561
- script: |
7662
az account set -s $AZURE_SUBSCRIPTION_ID
7763
SECRET_SA_ACCOUNT_NAME=$(SECRET_SA_ACCOUNT_NAME) make secrets
@@ -80,22 +66,12 @@ jobs:
8066
export CI=true
8167
. ./hack/e2e/run-rp-and-e2e.sh
8268
deploy_e2e_db
83-
84-
export SKIP_MIWI_ROLE_ASSIGNMENT=true
85-
. ./hack/devtools/local_dev_env.sh
86-
create_miwi_env_file
8769
displayName: Setup (Azure)
8870
8971
- script: |
9072
export CI=true
73+
# Tell the E2E binary to run the MIMO tests
9174
export ARO_E2E_MIMO=true
92-
export OS_CLUSTER_VERSION=4.15.35
93-
export USE_WI=true
94-
export ARO_INSTALL_VIA_HIVE="true"
95-
export ARO_ADOPT_BY_HIVE="true"
96-
export HIVE_KUBE_CONFIG_PATH="$(realpath ./aks.kubeconfig)"
97-
98-
. ./env
9975
. secrets/env
10076
. ./hack/e2e/run-rp-and-e2e.sh
10177
@@ -110,8 +86,6 @@ jobs:
11086
run_selenium
11187
validate_selenium_running
11288
113-
update_role_sets
114-
11589
run_mimo_actuator
11690
validate_mimo_actuator_running
11791
@@ -120,8 +94,6 @@ jobs:
12094
12195
register_sub
12296
123-
# cluster is cleaned up in a later step. Keep it around for now to enable must-gather collection on error
124-
export E2E_DELETE_CLUSTER=false
12597
make test-e2e -o e2e.test
12698
displayName: Execute Tests
12799
target: container

go.mod

-9
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ require (
7575
github.com/prometheus/common v0.51.1
7676
github.com/serge1peshcoff/selenium-go-conditions v0.0.0-20170824121757-5afbdb74596b
7777
github.com/sirupsen/logrus v1.9.3
78-
github.com/spf13/viper v1.20.0-alpha.6
7978
github.com/stretchr/testify v1.10.0
8079
github.com/tebeka/selenium v0.9.9
8180
github.com/ugorji/go/codec v1.2.12
@@ -170,7 +169,6 @@ require (
170169
github.com/go-openapi/validate v0.24.0 // indirect
171170
github.com/go-stack/stack v1.8.1 // indirect
172171
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
173-
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
174172
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
175173
github.com/gogo/protobuf v1.3.2 // indirect
176174
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
@@ -229,7 +227,6 @@ require (
229227
github.com/opencontainers/selinux v1.11.0 // indirect
230228
github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87 // indirect
231229
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect
232-
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
233230
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
234231
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
235232
github.com/pkg/sftp v1.13.6 // indirect
@@ -240,20 +237,15 @@ require (
240237
github.com/rivo/uniseg v0.4.7 // indirect
241238
github.com/robfig/cron v1.2.0 // indirect
242239
github.com/russross/blackfriday v1.6.0 // indirect
243-
github.com/sagikazarmark/locafero v0.6.0 // indirect
244240
github.com/sanity-io/litter v1.5.5 // indirect
245241
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
246242
github.com/sigstore/fulcio v1.4.5 // indirect
247243
github.com/sigstore/rekor v1.3.6 // indirect
248244
github.com/sigstore/sigstore v1.8.4 // indirect
249-
github.com/sourcegraph/conc v0.3.0 // indirect
250-
github.com/spf13/afero v1.11.0 // indirect
251-
github.com/spf13/cast v1.6.0 // indirect
252245
github.com/spf13/cobra v1.8.1 // indirect
253246
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect
254247
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
255248
github.com/stoewer/go-strcase v1.2.0 // indirect
256-
github.com/subosito/gotenv v1.6.0 // indirect
257249
github.com/sylabs/sif/v2 v2.18.0 // indirect
258250
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
259251
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
@@ -273,7 +265,6 @@ require (
273265
go.opentelemetry.io/otel/metric v1.24.0 // indirect
274266
go.opentelemetry.io/otel/trace v1.24.0 // indirect
275267
go.starlark.net v0.0.0-20220328144851-d1966c6b9fcd // indirect
276-
go.uber.org/multierr v1.11.0 // indirect
277268
golang.org/x/mod v0.20.0 // indirect
278269
golang.org/x/sys v0.30.0 // indirect
279270
golang.org/x/term v0.29.0 // indirect

go.sum

+2-20
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2
230230
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc=
231231
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
232232
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
233-
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
234-
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
233+
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
234+
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
235235
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
236236
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
237237
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
@@ -293,8 +293,6 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v
293293
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
294294
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
295295
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
296-
github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc=
297-
github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
298296
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
299297
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
300298
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 h1:sQspH8M4niEijh3PFscJRLDnkL547IeP7kpPe3uUhEg=
@@ -543,8 +541,6 @@ github.com/openshift/machine-config-operator v0.0.1-0.20230908201248-46b93e64dea
543541
github.com/openshift/machine-config-operator v0.0.1-0.20230908201248-46b93e64dea6/go.mod h1:zXXyi68fZLTGiIamAIwETIJdts9FCdyi9OCpnxh0N84=
544542
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M=
545543
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc=
546-
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
547-
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
548544
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
549545
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
550546
github.com/pin/tftp v2.1.0+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY=
@@ -587,8 +583,6 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99
587583
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
588584
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
589585
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
590-
github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk=
591-
github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0=
592586
github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo=
593587
github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=
594588
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
@@ -610,20 +604,12 @@ github.com/sigstore/sigstore v1.8.4 h1:g4ICNpiENFnWxjmBzBDWUn62rNFeny/P77HUC8da3
610604
github.com/sigstore/sigstore v1.8.4/go.mod h1:1jIKtkTFEeISen7en+ZPWdDHazqhxco/+v9CNjc7oNg=
611605
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
612606
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
613-
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
614-
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
615607
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
616608
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
617-
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
618-
github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
619-
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
620-
github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
621609
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
622610
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
623611
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA=
624612
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
625-
github.com/spf13/viper v1.20.0-alpha.6 h1:f65Cr/+2qk4GfHC0xqT/isoupQppwN5+VLRztUGTDbY=
626-
github.com/spf13/viper v1.20.0-alpha.6/go.mod h1:CGBZzv0c9fOUASm6rfus4wdeIjR/04NOLq1P4KRhX3k=
627613
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 h1:pnnLyeX7o/5aX8qUQ69P/mLojDqwda8hFOCBTmP/6hw=
628614
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6/go.mod h1:39R/xuhNgVhi+K0/zst4TLrJrVmbm6LVgl4A0+ZFS5M=
629615
github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU=
@@ -633,12 +619,8 @@ github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
633619
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
634620
github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
635621
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
636-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
637-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
638622
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
639623
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
640-
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
641-
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
642624
github.com/sylabs/sif/v2 v2.18.0 h1:eXugsS1qx7St2Wu/AJ21KnsQiVCpouPlTigABh+6KYI=
643625
github.com/sylabs/sif/v2 v2.18.0/go.mod h1:GOQj7LIBqp15fjqH5i8ZEbLp8SXJi9S+xbRO+QQAdRo=
644626
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=

hack/cluster/cluster.go

+40-5
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ import (
1212
"github.com/davecgh/go-spew/spew"
1313
"github.com/sirupsen/logrus"
1414

15+
"github.com/Azure/ARO-RP/pkg/env"
1516
"github.com/Azure/ARO-RP/pkg/util/cluster"
1617
msgraph_errors "github.com/Azure/ARO-RP/pkg/util/graph/graphsdk/models/odataerrors"
1718
utillog "github.com/Azure/ARO-RP/pkg/util/log"
19+
"github.com/Azure/ARO-RP/pkg/util/version"
1820
)
1921

2022
const (
@@ -26,22 +28,55 @@ func run(ctx context.Context, log *logrus.Entry) error {
2628
return fmt.Errorf("usage: CLUSTER=x %s {create,delete}", os.Args[0])
2729
}
2830

29-
conf, err := cluster.NewClusterConfigFromEnv()
31+
if err := env.ValidateVars(Cluster); err != nil {
32+
return err
33+
}
34+
35+
env, err := env.NewCore(ctx, log, env.COMPONENT_TOOLING)
3036
if err != nil {
3137
return err
3238
}
3339

34-
c, err := cluster.New(log, conf)
40+
vnetResourceGroup := os.Getenv("RESOURCEGROUP") // TODO: remove this when we deploy and peer a vnet per cluster create
41+
if os.Getenv("CI") != "" {
42+
vnetResourceGroup = os.Getenv(Cluster)
43+
}
44+
clusterName := os.Getenv(Cluster)
45+
46+
osClusterVersion := os.Getenv("OS_CLUSTER_VERSION")
47+
if osClusterVersion == "" {
48+
osClusterVersion = version.DefaultInstallStream.Version.String()
49+
log.Infof("using default cluster version %s", osClusterVersion)
50+
} else {
51+
log.Infof("using specified cluster version %s", osClusterVersion)
52+
}
53+
54+
masterVmSize := os.Getenv("MASTER_VM_SIZE")
55+
if masterVmSize == "" {
56+
masterVmSize = cluster.DefaultMasterVmSize.String()
57+
log.Infof("using default master VM size %s", masterVmSize)
58+
} else {
59+
log.Infof("using specified master VM size %s", masterVmSize)
60+
}
61+
62+
workerVmSize := os.Getenv("WORKER_VM_SIZE")
63+
if workerVmSize == "" {
64+
workerVmSize = cluster.DefaultWorkerVmSize.String()
65+
log.Infof("using default worker VM size %s", workerVmSize)
66+
} else {
67+
log.Infof("using specified worker VM size %s", workerVmSize)
68+
}
69+
70+
c, err := cluster.New(log, env, os.Getenv("CI") != "")
3571
if err != nil {
3672
return err
3773
}
3874

39-
spew.Dump(c.Config)
4075
switch strings.ToLower(os.Args[1]) {
4176
case "create":
42-
return c.Create(ctx)
77+
return c.Create(ctx, vnetResourceGroup, clusterName, osClusterVersion, masterVmSize, workerVmSize)
4378
case "delete":
44-
return c.Delete(ctx, conf.VnetResourceGroup, conf.ClusterName)
79+
return c.Delete(ctx, vnetResourceGroup, clusterName)
4580
default:
4681
return fmt.Errorf("invalid command %s", os.Args[1])
4782
}

0 commit comments

Comments
 (0)