forked from SUSE/susemanager-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_mirror.tf
144 lines (120 loc) · 2.93 KB
/
local_mirror.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
// Mandatory variables for terracumber
variable "URL_PREFIX" {
type = string
default = "https://ci.suse.de/view/Manager/view/Uyuni/job/uyuni-manager-mu-cloud"
}
// 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 $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: 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 "SSH_KEY" {
type = string
default = "/home/jenkins/.ssh/id_rsa.pub"
}
terraform {
required_version = "1.0.10"
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
version = "0.6.3"
}
}
}
provider "libvirt" {
uri = "qemu+tcp://grog.mgr.prv.suse.net/system"
}
locals {
pool = "ssd"
}
module "base" {
source = "./modules/base"
ssh_key_path = var.SSH_KEY
cc_username = var.SCC_USER
cc_password = var.SCC_PASSWORD
name_prefix = "mirror-mu-aws-"
images = [
"opensuse155o"]
provider_settings = {
pool = local.pool
network_name = null
bridge = "br0"
additional_network = "192.168.80.0/24"
}
}
module "mirror" {
source = "./modules/mirror"
base_configuration = module.base.configuration
customize_minima_file = "mirror/etc/minima-customize.yaml"
synchronize_immediately = true
disable_cron = true
image = "opensuse155o"
volume_provider_settings = {
pool = local.pool
// uncomment next line to use existing snapshot as starting point
// volume_snapshot_id = data.aws_ebs_snapshot.data_disk_snapshot.id
}
provider_settings = {
mac = "52:54:00:ba:b7:98"
memory = 4096
}
}
output "local_mirrors_public_name" {
value = module.mirror.configuration.hostnames
}
output "local_mirrors_public_ip" {
value = module.mirror.configuration.ipaddrs
}