Skip to content

Commit

Permalink
Update playbooks to deploy vmx and switches on esxi
Browse files Browse the repository at this point in the history
  • Loading branch information
knewell committed Jan 16, 2019
1 parent 39f4ec5 commit 0cd9fb7
Show file tree
Hide file tree
Showing 20 changed files with 363 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ pip-selfcheck.json
*.swp

.retry
group_vars/vmware
*.ova
13 changes: 11 additions & 2 deletions core/core-model-sr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ nodes:
sid: 90
iso: 49.0001.0010.0100.1009.00

lags:
- node: sr-vmx5
intf: ae0
ports: [ge-0/0/2, ge-0/0/3]
- node: sr-vmx7
intf: ae0
ports: [ge-0/0/2, ge-0/0/3]


links:
- {left: sr-vmx1, left_port: ge-0/0/0, left_ip: 10.0.0.0.0,
right: sr-vmx2, right_port: ge-0/0/0, right_ip: 10.0.0.0.1,
Expand Down Expand Up @@ -91,8 +100,8 @@ links:
right: sr-vmx6, right_port: ge-0/0/3, right_ip: 10.0.0.11,
mask: 31, cost: 1000, mpls: True, iso: True }

- {left: sr-vmx5, left_port: ge-0/0/2, left_ip: 10.0.0.12,
right: sr-vmx7, right_port: ge-0/0/2, right_ip: 10.0.0.13,
- {left: sr-vmx5, left_port: ae0, left_ip: 10.0.0.12,
right: sr-vmx7, right_port: ae0, right_ip: 10.0.0.13,
mask: 31, cost: 500, mpls: True, iso: True }

- {left: sr-vmx6, left_port: ge-0/0/0, left_ip: 10.0.0.14,
Expand Down
8 changes: 8 additions & 0 deletions core/core-to-nodes.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ nodes:
{% if node.iso is defined %}
iso: {{ node.iso }}
{% endif %}
lags:
{% for lag in lags %}
{% if lag.node == node.name %}
{% for port in lag.ports %}
{{ port }}: {{ lag.intf }}
{% endfor %}
{% endif %}
{% endfor %}
links:
{% for link in links %}
{% if link.left == node.name %}
Expand Down
1 change: 0 additions & 1 deletion core_config/sr-vmx1-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/0 {
description "sr-vmx2"
Expand Down
1 change: 0 additions & 1 deletion core_config/sr-vmx2-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/0 {
description "sr-vmx1"
Expand Down
1 change: 0 additions & 1 deletion core_config/sr-vmx3-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/2 {
description "sr-vmx1"
Expand Down
1 change: 0 additions & 1 deletion core_config/sr-vmx4-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/0 {
description "sr-vmx5"
Expand Down
48 changes: 33 additions & 15 deletions core_config/sr-vmx5-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,25 @@ system {
}
}
}

chassis {
aggregated-devices {
ethernet {
device-count 10;
}
}
}
interfaces {
ae0 {
description "sr-vmx7"
unit 0 {
family inet {
address 10.0.0.12/31
}
family mpls;
family iso;
}
}

ge-0/0/0 {
description "sr-vmx4"
unit 0 {
Expand All @@ -64,16 +81,17 @@ interfaces {
}

ge-0/0/2 {
description "sr-vmx7"
unit 0 {
family inet {
address 10.0.0.12/31
}
family mpls;
family iso;
description "[ae0]"
gigether-options {
802.3.ad ae0
}
}
ge-0/0/3 {
description "[ae0]"
gigether-options {
802.3.ad ae0
}
}

fxp0 {
description "OOB to MGMT Network";
unit 0 {
Expand Down Expand Up @@ -129,6 +147,10 @@ protocols {
}
}
level 1 disable;
interface ae0.0 {
point-to-point;
metric 500;
}
interface ge-0/0/0.0 {
point-to-point;
metric 1000;
Expand All @@ -137,23 +159,19 @@ protocols {
point-to-point;
metric 1000;
}
interface ge-0/0/2.0 {
point-to-point;
metric 500;
}
interface lo0.0 {
passive;
}
}
mpls {
interface ae0.0;
interface ge-0/0/0.0;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
}
lldp {
interface ae0;
interface ge-0/0/0;
interface ge-0/0/1;
interface ge-0/0/2;
}
}
policy-options {
Expand Down
1 change: 0 additions & 1 deletion core_config/sr-vmx6-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/0 {
description "sr-vmx7"
Expand Down
48 changes: 33 additions & 15 deletions core_config/sr-vmx7-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,25 @@ system {
}
}
}

chassis {
aggregated-devices {
ethernet {
device-count 10;
}
}
}
interfaces {
ae0 {
description "sr-vmx5"
unit 0 {
family inet {
address 10.0.0.13/31
}
family mpls;
family iso;
}
}

ge-0/0/0 {
description "sr-vmx6"
unit 0 {
Expand All @@ -64,16 +81,17 @@ interfaces {
}

ge-0/0/2 {
description "sr-vmx5"
unit 0 {
family inet {
address 10.0.0.13/31
}
family mpls;
family iso;
description "[ae0]"
gigether-options {
802.3.ad ae0
}
}
ge-0/0/3 {
description "[ae0]"
gigether-options {
802.3.ad ae0
}
}

fxp0 {
description "OOB to MGMT Network";
unit 0 {
Expand Down Expand Up @@ -131,6 +149,10 @@ protocols {
}
}
level 1 disable;
interface ae0.0 {
point-to-point;
metric 500;
}
interface ge-0/0/0.0 {
point-to-point;
metric 1000;
Expand All @@ -139,22 +161,18 @@ protocols {
point-to-point;
metric 1000;
}
interface ge-0/0/2.0 {
point-to-point;
metric 500;
}
interface lo0.0 {
passive;
}
}
mpls {
interface ae0.0;
interface ge-0/0/0.0;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
}
lldp {
interface ae0;
interface ge-0/0/0;
interface ge-0/0/1;
interface ge-0/0/2;
}
}
1 change: 0 additions & 1 deletion core_config/sr-vmx8-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/0 {
description "sr-vmx9"
Expand Down
1 change: 0 additions & 1 deletion core_config/sr-vmx9-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ system {
}
}
}

interfaces {
ge-0/0/0 {
description "sr-vmx8"
Expand Down
12 changes: 12 additions & 0 deletions hosts_vmware
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[switches]
test-vmx1-br-int
test-vmx2-br-int
test-vmx1-vmx2

[vmx]
test-vmx1
test-vmx2

[vmware:children]
switches
vmx
20 changes: 19 additions & 1 deletion junos/core.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ system {
}
}
}

{% if node.lags %}
chassis {
aggregated-devices {
ethernet {
device-count 10;
}
}
}
{% endif %}
{#
**************************************************
### Interfaces configuration ######
Expand Down Expand Up @@ -83,6 +91,16 @@ interfaces {
}
{% endif %}
{% endfor %}
{% if node.lags %}
{% for intf,lag in node.lags.items()|sort %}
{{ intf.split('.')[0] }} {
description "[{{ lag }}]"
gigether-options {
802.3.ad {{ lag }}
}
}
{% endfor %}
{% endif %}
fxp0 {
description "OOB to MGMT Network";
unit 0 {
Expand Down
Loading

0 comments on commit 0cd9fb7

Please sign in to comment.