forked from SUSE/susemanager-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUyuni-Master-AWS.tf
241 lines (209 loc) · 6.35 KB
/
Uyuni-Master-AWS.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
// Mandatory variables for terracumber
variable "URL_PREFIX" {
type = string
default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-master-dev-acceptance-tests-AWS"
}
// Not really used as this is for --runall parameter, and we run cucumber step by step
variable "CUCUMBER_COMMAND" {
type = string
default = "export PRODUCT='Uyuni' && run-testsuite"
}
variable "CUCUMBER_GITREPO" {
type = string
default = "https://github.com/uyuni-project/uyuni.git"
}
variable "CUCUMBER_BRANCH" {
type = string
default = "master"
}
variable "CUCUMBER_RESULTS" {
type = string
default = "/root/spacewalk/testsuite"
}
variable "MAIL_SUBJECT" {
type = string
default = "Results Uyuni-Master AWS: $status: $tests scenarios ($failures failed, $errors errors, $skipped skipped, $passed passed)"
}
variable "MAIL_TEMPLATE" {
type = string
default = "../mail_templates/mail-template-jenkins.txt"
}
variable "MAIL_SUBJECT_ENV_FAIL" {
type = string
default = "Results Uyuni-Master AWS: Environment setup failed"
}
variable "MAIL_TEMPLATE_ENV_FAIL" {
type = string
default = "../mail_templates/mail-template-jenkins-env-fail.txt"
}
variable "MAIL_FROM" {
type = string
default = "[email protected]"
}
variable "MAIL_TO" {
type = string
default = "[email protected]"
}
// sumaform specific variables
variable "SCC_USER" {
type = string
}
variable "SCC_PASSWORD" {
type = string
}
variable "GIT_USER" {
type = string
default = null // Not needed for master, as it is public
}
variable "GIT_PASSWORD" {
type = string
default = null // Not needed for master, as it is public
}
variable "REGION" {
type = string
default = "eu-central-1"
}
variable "AVAILABILITY_ZONE" {
type = string
default = "eu-central-1b"
}
variable "KEY_FILE" {
type = string
default = "/home/jenkins/.ssh/id_rsa"
}
variable "KEY_NAME" {
type = string
default = "internal-jenkins-worker"
}
variable "MY_IP" {
type = string
default = ""
}
provider "aws" {
region = var.REGION
}
module "cucumber_testsuite" {
source = "./modules/cucumber_testsuite"
product_version = "uyuni-master"
// Cucumber repository configuration for the controller
git_username = var.GIT_USER
git_password = var.GIT_PASSWORD
git_repo = var.CUCUMBER_GITREPO
branch = var.CUCUMBER_BRANCH
cc_username = var.SCC_USER
cc_password = var.SCC_PASSWORD
images = ["rocky8", "opensuse155o", "sles15sp4o", "ubuntu2204"]
use_avahi = false
name_prefix = "uyuni-master-"
// domain = "mgr.suse.de"
from_email = "[email protected]"
no_auth_registry = "mirror.sumaci.aws"
auth_registry = "mirror.sumaci.aws:5000/cucutest"
auth_registry_username = "cucutest"
auth_registry_password = "cucusecret"
git_profiles_repo = "https://github.com/uyuni-project/uyuni.git#:testsuite/features/profiles/cloud_aws"
container_server = true
container_proxy = true
mirror = "mirror.sumaci.aws"
// use_mirror_images = true
// server_http_proxy = "http-proxy.mgr.suse.de:3128"
custom_download_endpoint = "ftp://mirror.sumaci.aws:445"
host_settings = {
controller = {
image = "opensuse155o"
provider_settings = {
instance_type = "c6i.xlarge"
private_ip = "172.16.3.5"
overwrite_fqdn = "uyuni-master-controller.sumaci.aws"
}
}
server_containerized = {
image = "opensuse155o"
provider_settings = {
instance_type = "m6a.xlarge"
volume_size = "100"
private_ip = "172.16.3.6"
overwrite_fqdn = "uyuni-master-server.sumaci.aws"
}
runtime = "podman"
container_repository = "registry.opensuse.org/systemsmanagement/uyuni/master/containers"
container_tag = "latest"
helm_chart_url = "oci://registry.opensuse.org/systemsmanagement/uyuni/master/charts/uyuni/server"
login_timeout = 28800
}
proxy_containerized = {
image = "opensuse155o"
provider_settings = {
instance_type = "c6i.large"
private_ip = "172.16.3.7"
overwrite_fqdn = "uyuni-master-proxy.sumaci.aws"
}
runtime = "podman"
container_repository = "registry.opensuse.org/systemsmanagement/uyuni/master/containers"
container_tag = "latest"
}
suse_minion = {
image = "opensuse155o"
provider_settings = {
instance_type = "t3a.medium"
private_ip = "172.16.3.8"
overwrite_fqdn = "uyuni-master-suse-minion.sumaci.aws"
}
}
suse_sshminion = {
image = "opensuse155o"
provider_settings = {
instance_type = "t3a.medium"
private_ip = "172.16.3.9"
overwrite_fqdn = "uyuni-master-suse-sshminion.sumaci.aws"
}
}
rhlike_minion = {
image = "rocky8"
provider_settings = {
// openscap cannot run with less than 1.25 GB of RAM
// use small instead of micro
instance_type = "t3a.medium"
private_ip = "172.16.3.10"
overwrite_fqdn = "uyuni-master-rhlike-minion.sumaci.aws"
}
}
deblike_minion = {
image = "ubuntu2204"
provider_settings = {
instance_type = "t3a.medium"
private_ip = "172.16.3.11"
overwrite_fqdn = "uyuni-master-deblike-minion.sumaci.aws"
}
}
build_host = {
image = "sles15sp4o"
provider_settings = {
instance_type = "t3a.large"
private_ip = "172.16.3.12"
overwrite_fqdn = "uyuni-master-build-host.sumaci.aws"
}
}
// No PXE support for AWS yet
// No nested virtualization in AWS
}
provider_settings = {
create_network = false
vpc_id = "vpc-0e056f570bb1d7784"
public_subnet_id = "subnet-0ddb3211d5b0feef9"
public_security_group_id = "sg-0a21915f3523fbede"
create_private_network = true
private_network = "172.16.3.0/24"
create_additional_network = true
additional_network = "172.16.4.0/24"
bastion_host = "ec2-3-68-127-29.eu-central-1.compute.amazonaws.com"
availability_zone = var.AVAILABILITY_ZONE
region = var.REGION
ssh_allowed_ips = []
key_name = var.KEY_NAME
key_file = var.KEY_FILE
}
}
output "configuration" {
value = module.cucumber_testsuite.configuration
}