This repository has been archived by the owner on Feb 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py.SAMPLE.py
123 lines (105 loc) · 3.99 KB
/
config.py.SAMPLE.py
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
# -*- coding: iso8859-15 -*-
"""
config.py
configuration file for k5 api. Caveat: don't upload to github without cleaning
you'll need your credentials; all other values come from your config needs
"""
import base64
testing=True
htmlProxies = {'http' : 'http://YourUserID:yourProxyPassword@YourFtsProxy:82', 'https' : 'http://yourUserID:[email protected]:82'}
#htmlProxies = {}
adminUser='YourK5UserID'
adminPassword='YourK5Password'
contract='YourK5ContractNum'
region='uk-1' # or any other region
projectid='YourK5ProjectID' # might be obsolete
securityGroup = 'YourSecGroupMust Exist'
# securityGroupID = '11113222222333333'
subnetName='yourDesiredSubnetName'
subnetAddress='10.10.0.0/16' # pick it along your design
allocationPoolStart= '10.10.10.1' # pick it along your design
allocationPoolEnd='10.10.100.255' # pick it along your design
"""
basics for the availability zones
"""
availabilityZone = 'uk-1a'
# availabilityZone = 'uk-1b'
zoneInfo = { 'uk-1a' : {'externalNet' : 'inf_az1_ext-net01',
'nameserver1' : '62.60.42.9' ,
'nameserver2' : '8.8.8.8',
'networkName' : 'oceania-1a',
'routerName' : 'oceania01-a'},
'uk-1b' : {'externalNet' : 'inf_az2_ext-net01',
'nameserver1' : '62.60.39.9' ,
'nameserver2' : '8.8.8.8',
'networkName' : 'oceania-1b',
'routerName' : 'oceania01-b'}
}
key='NameOfSecretKeyPair'
firewallRules = [ {
"action": "allow",
"description": "SSH",
"destination_ip_address": "10.10.0.0/16",
"destination_port": "22",
"enabled": True,
"ip_version": 4,
"name": "ALLOW_SSH_IN",
"protocol": "tcp",
"source_ip_address": "0.0.0.0/0",
"availability_zone": availabilityZone } , {
"action": "allow",
"description": "HTTPS all around",
"destination_ip_address": "0.0.0.0/0",
"destination_port": "443",
"enabled": True,
"ip_version": 4,
"name": "ALLOW_HTTPS",
"protocol": "tcp",
"source_ip_address": "0.0.0.0/0",
"availability_zone": availabilityZone } , {
"action": "allow",
"description": "DNS ",
"destination_ip_address": "0.0.0.0/0",
"destination_port": "53",
"enabled": True,
"ip_version": 4,
"name": "ALLOW_DNS_outbound",
"protocol": "tcp",
"source_ip_address": "10.10.0.0/16",
"availability_zone": availabilityZone } , {
"action": "allow",
"description": "DNS UDP outbound",
"destination_ip_address": "0.0.0.0/0",
"destination_port": "53",
"enabled": True,
"ip_version": 4,
"name": "ALLOW_DNS_UDP_out",
"protocol": "udp",
"source_ip_address": "10.10.0.0/16",
"availability_zone": availabilityZone }
]
firewallPolicyName = 'Oceania01' # not for K5, but for our context this should be unique
firewallPolicyDescription = """This is a basic firewall Policy for our demonstration purposes"""
firewallName = 'Oceania01' # not for K5, but for our context this should be unique
firewallDescription = """This is a basic firewall for our demonstration purposes"""
# this didn't work yet. Would immediately update Ubuntu14 to 16.
initialLxUpgrade="""#!/bin/bash
sudo apt-get -y update
sudo apt-get -y upgrade
sudo do-release-upgrade -f DistUpgradeViewNonInteractive
"""
# server parameters;
ubuntuServerInfo = {
'name' : 'Oceania02LX',
'imageRef' : '45895e58-e416-4b96-9576-1df6cba6e264',
'flavorid' : '1902',
'volumesize' : '20',
'availabilityZone' : availabilityZone,
'networkPortName' : networkPortName,
'security_group_name' : securityGroup,
'sshkey_name' : key,
'initialPassword' : False,
'initialScript' : initialLxUpgrade
}
serverInfo = ubuntuServerInfo
# serverInfo = windowsServerInfo