~andreserl/maas/qa-lab-tests-new-deps

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
import os
import platform

# Environment variables that can be used to configure
# what is tested.

# Whether or not to pause the CI. Useful when needing to use
# a static MAAS instance.
PAUSE_CI = bool(os.environ.get('PAUSE_CI', False))

# Series to install on deployed nodes.
NODE_SERIES = os.environ.get('NODE_SERIES', 'xenial')

# Whether or not the ARM nodes should be used
# in the test.
DO_NOT_USE_ARM_NODES = bool(
    os.environ.get('DO_NOT_USE_ARM_NODES', True))

USE_ARM_NODES = not DO_NOT_USE_ARM_NODES
USE_PPC_NODES = bool(os.environ.get('USE_PPC_NODES', False))
USE_ARM64_NODES = bool(os.environ.get('USE_ARM64_NODES', False))

CLUSTER_CONTROLLER_IP = '10.245.136.6'

SQUID_DEB_PROXY_URL = 'http://10.55.32.185:8000'
# HTTP proxy used to access the external world.
HTTP_PROXY = "http://162.213.35.104:3128"

# Whether or not set the http proxy. Currently only working on raring
DO_NOT_SET_PROXY = bool("raring" not in platform.linux_distribution())

# Whether or not the cluster controller nodes in different network
# should be used.
USE_CC_NODES = bool(os.environ.get('USE_CC_NODES', False))

MAAS_URL = "http://10.245.136.6/MAAS"
MAIN_ARCHIVE = "http://us.archive.ubuntu.com/ubuntu"
PORTS_ARCHIVE = "http://ports.ubuntu.com/ubuntu-ports"
USER_DATA_URL = "http://10.245.136.6/MAAS/metadata/enlist/latest/user-data"
ADMIN_USER = "admin"
PASSWORD = "test"
POWER_USER = "root"
POWER_PASS = "ubuntu"
GIGABYTE_USER = "admin"
GIGABYTE_PASS = "password"

SLAVES = [
    {
        "hostname": "lenovo-RD230-01",
        "mac": "00:25:9C:2F:C7:9E",
        "ip": "10.245.136.5",
    },
    # Jenkins master running on on old jenkins slave.
    # Currently used as the new lander
    {
        "hostname": "lenovo-RD230-01-jenkins-master",
        "mac": "00:e0:81:dd:d1:cf",
        "ip": "10.245.136.2",
    },
    {
        "hostname": "HP-DL360-Gen9",
        "mac": "94:18:82:76:C0:64",
        "ip": "10.245.136.7",
    },
]

# Uses the pre-1.6 API, where a cluster interface had no "name" field.
# MAAS will take the name from the "interface" field, as long as it's
# a unique name within the cluster.  Newer clients would pass a name.
REGION_DHCP_CONFIG = {
    "ip": "10.245.136.6",
    "interface": "eth1",
    "subnet_mask": "255.255.248.0",
    "broadcast_ip": "10.245.143.255",
    "router_ip": "10.245.136.1",
    "management": 2,
    "ip_range_low": "10.245.136.10",
    "ip_range_high": "10.245.136.200",
    # add cidr as it is now default in new networking configs.
    "cidr": "10.245.136.0/21"
}

REGION_CONTROLLER_NODES = {
    # lenovo-RD230-03, MAAS-03
    "00:E0:81:DD:D5:99": "10.245.143.103",
    # lenovo-RD230-04, MAAS-04
    "00:E0:81:DD:D1:0B": "10.245.143.104",
    # These machines seem busted. TODO: Investigate
    # lenovo-RD230-05, MAAS-05
    # "00:E0:81:DD:D4:11": "10.245.143.105",
    # lenovo-RD230-06, MAAS-06
    "00:E0:81:D1:B1:47": "10.245.143.106",
    # Took these two machines from the CLUSTER_CONTROLLER_NODES pool
    # as it seems that the other two were broken
    # lenovo-RD230-07, MAAS-07
    "00:E0:81:DD:D1:1B": "10.245.143.107",
    # lenovo-RD230-08, MAAS-08
    "00:E0:81:DD:D1:2B": "10.245.143.108",
    # lenovo-RD230-10, MAAS-10
    "00:E0:81:DC:38:6D": "10.245.143.110",
}

BMC_START_IP = '10.245.143.100'
BMC_END_IP = '10.245.143.200'

CLUSTER_CONTROLLER_NODES = {
    # lenovo-RD230-09, MAAS-09
    "00:E0:81:DD:D1:A3": "10.245.143.109",
    # lenovo-RD230-11, MAAS-11
    "00:E0:81:DD:D0:FF": "10.245.143.111",
}


LENOVO_LAB = REGION_CONTROLLER_NODES
if USE_CC_NODES:
    LENOVO_LAB.update(CLUSTER_CONTROLLER_NODES)

# TODO: mapping is outdated.
ARM_LAB = {
    'fc:2f:40:d8:fb:1a': '192.168.21.50',
    'fc:2f:40:fa:2f:9a': '192.168.21.51',
    'fc:2f:40:ec:73:42': '192.168.21.52',
    'fc:2f:40:d5:87:ce': '192.168.21.53'
}

PPC_SYSTEMS = {
    '98:BE:94:02:6A:C8': '10.245.143.113',
}
GIGABYTE_SYSTEMS = {
    '1c:1b:0d:0d:52:7c': '10.245.143.114',
}

GEN9_USER = 'Administrator'
GEN9_PASS = 'insecure'
GEN9_SYSTEMS = {
    "94:18:82:7a:72:44": "10.245.143.116",
    #"94:18:82:7a:72:64": "10.245.143.117", - 16-03-2017: being manually tested
    "94:18:82:7a:82:c8": "10.245.143.118",
    "94:18:82:7a:72:80": "10.245.143.119",
}

# Dell Hardware for CentOS / Windows CI testing
USE_DELL_R630_SYSTEMS = bool(os.environ.get('USE_DELL_R630_SYSTEMS', False))
DELL_R630_SYSTEMS = {
    "f4:8e:38:d0:0e:d2": "10.245.143.120", # natasha
    "f4:8e:38:d0:0b:54": "10.245.143.121", # opelt
}
DELL_R630_USER = "root"
DELL_R630_PASS = "calvin"

TEST_WINDOWS = bool(os.environ.get('TEST_WINDOWS', False))
WINDOWS_IMAGE = "/home/ubuntu/windows-win2012hvr2-amd64-root-dd"

# dnssec is now enabled by default, so disable it to avoid errors from the
# forwarder server.
# See StackOverflow question "ns got insecure response, parent indicates
# it should be secure": http://bit.ly/1pe8Hkk
LAB_DNS_CONFIG = """
options {
    directory "/var/cache/bind";
    forwarders {
    10.245.136.1;
    };
    allow-query-cache {any;};
    dnssec-enable no;
    dnssec-validation no;
    auth-nxdomain no;    # conform to RFC1035
};
"""

JUJU_CONFIG = """
default: maas
environments:
  maas:
    type: maas
    maas-server: '%s'
    maas-oauth: '%s'
    bootstrap-timeout: 18000
    admin-secret: 'nothing'
    default-series: %s
    logging-config: <root>=TRACE
    disable-network-management: true
"""

TEST_JUJU = bool(os.environ.get('TEST_JUJU', False))
TEST_CUSTOM_IMAGES = bool(os.environ.get('TEST_CUSTOM_IMAGES', False))