summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--host_vars/aus-colo.linaro.org1
-rw-r--r--host_vars/uk1.linaro.cloud112
-rw-r--r--hosts3
-rw-r--r--roles/colo-router/tasks/main.yml2
-rw-r--r--templates/router/uk-r1-router-dnsmasq23
-rw-r--r--uk-devcloud.yml11
6 files changed, 151 insertions, 1 deletions
diff --git a/host_vars/aus-colo.linaro.org b/host_vars/aus-colo.linaro.org
index e84125b..38bc647 100644
--- a/host_vars/aus-colo.linaro.org
+++ b/host_vars/aus-colo.linaro.org
@@ -1,3 +1,4 @@
+configure_vpn: true
ldap_cache_url: ""
login_groups:
diff --git a/host_vars/uk1.linaro.cloud b/host_vars/uk1.linaro.cloud
new file mode 100644
index 0000000..7ed3011
--- /dev/null
+++ b/host_vars/uk1.linaro.cloud
@@ -0,0 +1,112 @@
+configure_vpn: false
+ldap_cache_url: ""
+
+login_groups:
+ - dev-cloud-admins
+ - users
+
+vlans:
+ - ifname: eno1.10
+ address: 10.10.0.1/16
+ device: eno1
+
+public_ips: []
+
+racks:
+ - name: uk-r1
+ hosts:
+ # Infrastructure machines
+ - name: uk-pm-1
+ mac: "00:C0:B7:EE:FB:35"
+ ip: 10.10.0.11
+ pxe: false
+ - name: uk-serial-1
+ mac: "00:e0:86:26:0c:c3"
+ ip: 10.10.0.12
+ pxe: false
+
+ # devcloud servers
+ - name: uk-r1-reva-01
+ mac: "a0:36:9f:ad:25:86"
+ ip: 10.10.0.101
+ pxe: false
+ - name: uk-r1-reva-01-pxe
+ mac: "00:00:1a:1b:73:49"
+ ip: 10.10.1.101
+ - name: uk-r1-reva-02
+ mac: "a0:36:9f:ad:26:cc"
+ ip: 10.10.0.102
+ pxe: false
+ - name: uk-r1-reva-02-pxe
+ mac: "00:00:1a:1b:72:04"
+ ip: 10.10.1.102
+ - name: uk-r1-reva-03
+ mac: "00:1b:21:74:04:05"
+ ip: 10.10.0.103
+ pxe: false
+ - name: uk-r1-reva-03-pxe
+ mac: "00:00:1a:1b:73:19"
+ ip: 10.10.1.103
+ - name: uk-r1-reva-04
+ mac: "a0:36:9f:ad:2d:c4"
+ ip: 10.10.0.104
+ pxe: false
+ - name: uk-r1-reva-04-pxe
+ mac: "00:00:1a:1b:72:f5"
+ ip: 10.10.1.104
+ - name: uk-r1-reva-05
+ mac: "a0:36:9f:ad:2d:ce"
+ ip: 10.10.0.105
+ pxe: false
+ - name: uk-r1-reva-05-pxe
+ mac: "00:00:1a:1b:73:34"
+ ip: 10.10.1.105
+ - name: uk-r1-reva-06
+ mac: "a0:36:9f:ad:2f:1e"
+ ip: 10.10.0.106
+ pxe: false
+ - name: uk-r1-reva-06-pxe
+ mac: "00:00:1a:1b:73:31"
+ ip: 10.10.1.106
+ - name: uk-r1-reva-07
+ mac: "a0:36:9f:ad:31:c2"
+ ip: 10.10.0.107
+ pxe: false
+ - name: uk-r1-reva-07-pxe
+ mac: "00:00:1a:1b:77:6f"
+ ip: 10.10.1.107
+ - name: uk-r1-reva-08
+ mac: "a0:36:9f:ad:30:00"
+ ip: 10.10.0.108
+ pxe: false
+ - name: uk-r1-reva-08-pxe
+ mac: "00:00:1a:1b:72:f1"
+ ip: 10.10.1.108
+ - name: uk-r1-reva-09
+ mac: "a0:36:9f:ad:2f:22"
+ ip: 10.10.0.109
+ pxe: false
+ - name: uk-r1-reva-09-pxe
+ mac: "00:00:1a:1b:73:16"
+ ip: 10.10.1.109
+ - name: uk-r1-reva-10
+ mac: "a0:36:9f:ad:26:b8"
+ ip: 10.10.0.110
+ pxe: false
+ - name: uk-r1-reva-10-pxe
+ mac: "00:00:1a:1b:77:d5"
+ ip: 10.10.1.110
+
+ - name: uk-r1-revb-01
+ mac: "00:00:1a:1b:96:b2"
+ ip: 10.10.0.111
+ - name: uk-r1-revb-02
+ mac: "00:00:1a:1b:9f:a1"
+ ip: 10.10.0.112
+
+ - name: uk-r1-d02-03
+ mac: "00:18:82:05:00:34"
+ ip: 10.10.0.113
+ #- name: uk-r1-d02-04
+ # mac: "00:18:82:05:00:3d"
+ # ip: 10.10.0.114
diff --git a/hosts b/hosts
index 2d1fbd4..f967e3f 100644
--- a/hosts
+++ b/hosts
@@ -5,6 +5,9 @@ r1-maas-server.aus-colo.linaro.org
r2-x86-1.aus-colo.linaro.org
r3-x86-1.aus-colo.linaro.org
+[uk-devcloud]
+uk1.linaro.cloud
+
[weblogs]
weblogs.linaro.org
diff --git a/roles/colo-router/tasks/main.yml b/roles/colo-router/tasks/main.yml
index 9469b81..4118ff6 100644
--- a/roles/colo-router/tasks/main.yml
+++ b/roles/colo-router/tasks/main.yml
@@ -1,4 +1,4 @@
-- {include: vpn.yml, tags: [vpn]}
+- {include: vpn.yml, tags: [vpn], when: configure_vpn}
- {include: proxy.yml, tags: [proxy]}
- {include: iptables.yml, tags: [iptables]}
diff --git a/templates/router/uk-r1-router-dnsmasq b/templates/router/uk-r1-router-dnsmasq
new file mode 100644
index 0000000..de089ce
--- /dev/null
+++ b/templates/router/uk-r1-router-dnsmasq
@@ -0,0 +1,23 @@
+# DO NOT EDIT! MANAGED BY ANSIBLE
+
+domain=uk1
+
+except-interface=eno2
+
+dhcp-range=eno1.10,10.10.0.100,10.10.3.250,255.255.0.0,24h
+
+{% for rack in racks %}
+# rack {{rack.name}}
+{% for host in rack.hosts %}
+{% if host.tag is defined %}
+dhcp-host={{host.mac}},set:{{host.tag}},{{host.name}},{{host.ip}}
+{% else %}
+dhcp-host={{host.mac}},set:{{rack.name}},{{host.name}},{{host.ip}}
+{% endif %}
+{% endfor %}
+{% endfor %}
+
+#enable-tftp
+#tftp-root=/var/lib/tftpboot/
+
+dhcp-boot=tag:uk-r1,/pxelinux/grubaa64.efi,uk-r1-router,10.10.0.1
diff --git a/uk-devcloud.yml b/uk-devcloud.yml
new file mode 100644
index 0000000..652cd18
--- /dev/null
+++ b/uk-devcloud.yml
@@ -0,0 +1,11 @@
+# Deploy uk DevCloud
+---
+- name: Configure firewall/router
+ hosts: uk1.linaro.cloud
+ become: yes
+ vars_files:
+ - "{{secrets_dir}}/host_vars/{{inventory_hostname}}"
+ roles:
+ - role: colo-router
+ - {role: colo-pxe, tags: [pxe]}
+ # TODO - {role: devcloud-admin, tags: [devcloud]}