SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
How we deployed a datacenter in one
click
ex-Blade Network Team: Cédric Hascoët, Jean-Christophe Legatte, Loïc Pailhas,
Sébastien Hurtel, Tchadel Icard, and Vincent Bernat
FRnOG 34 — October 1st, 2021
What's deployed?
2 Juniper QFX10002-72Q as edge routers,
32 Cisco Catalyst 2960S as OOB switches,
4 Facebook Wedge 100 as spine switches,
16 Facebook Wedge 100 as leaf switches,
4 Opengear CM71xx-2 as console servers,
2 Linux bastion/VPN/gateway servers,
1 Linux LibreNMS server.
What's con gured?
Edge routers:
BGP con guration + policies
Routing engine protection
BGP-based fabric (Facebook Wedge)
Out-of-band fabric (Cisco)
Administrative gateway (Linux)
ZTP
Firewall and NAT
Access to console servers
VPN to other sites
External stores: DNS, IRR, RPKI, NetBox
Steps
1. Get space, power, cooling, racks, equipments, cabling done.
2. Install Debian 10 on gateway servers.
3. ./run-ansible-gitlab playbooks/site.yaml --
limit=adm-gateway:&location-ussfo03,none.
4. Wait for all devices to autoprovision.
5. ./run-ansible-gitlab playbooks/site.yaml --
limit=location-ussfo03.
Source of truth
No NetBox.
YAML les versioned with Git.
1. List of devices
2. Classi er: from device name, attach properties to build a scope
3. Hierarchy de nition for data: given a scope, where to lookup
data for a device
4. Data les: at YAML les tted inside a hierarchy of directories
List of devices
devices:
# USSFO03
## OOB
- ob1-n1.ussfo03.blade-group.net
- ob2-n1.ussfo03.blade-group.net
- ob1-p1.ussfo03.blade-group.net
- ob2-p1.ussfo03.blade-group.net
- ob1-p2.ussfo03.blade-group.net
# [...]
Classi er
matchers:
- '.(ussfo03).':
location: '1'
continent: us
- '^to([12])-[as]?p(d+).':
member: '1'
pod: '2'
- '^to[12]-pd+.ussfo03.':
groups:
- tor-bgp
- tor-bgp-compute
- '^to[12]-(p|ap|sp)d+.ussfo03.':
os: cumulus
model: wedge100
Hierarchy de nition
def searchpaths(scope):
paths = [
f"host/{scope[location]}/{scope[shorthost]}",
f"location/{scope[location]}",
f"os/{scope[os]}-{scope[model]}",
f"os/{scope[os]}",
'common'
]
return paths
Data les
Don't repeat yourself
Data model should t your needs
peer:
ix-sfmix:
rs-sfmix:
monitored: true
asn: 63055
remote:
- 206.197.187.253
- 2001:504:30::ba06:3055:1
blizzard:
asn: 57976
remote:
- 206.197.187.42
- 2001:504:30::ba05:7976:1
irr: AS-BLIZZARD
Commit by Loïc
Jerikan
Compile con guration les from source of truth and templates
Faster than Ansible
Easier to debug than Ansible
Optionally checks generated con guration
Templates
Using Jinja2
Same as Ansible
system {
ntp {
{% for ntp in lookup("system", "ntp") %}
server {{ ntp }};
{% endfor %}
}
name-server {
{% for dns in lookup("system", "dns") %}
{{ dns }};
{% endfor %}
}
}
Error handling
templates/opengear/config.j2:15: in top-level template code
config.interfaces.{{ interface }}.netmask {{ infos.adddress | ipaddr("netmask") }}
continent = 'us'
device = 'con1-ag2.ussfo03.blade-group.net'
environment = 'prod'
host = 'con1-ag2.ussfo03'
infos = {'address': '172.30.24.19/21'}
interface = 'wan'
location = 'ussfo03'
loop = <LoopContext 1/2>
member = '2'
model = 'cm7132-2-dac'
os = 'opengear'
shorthost = 'con1-ag2'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
value = JerkianUndefined, query = 'netmask', version = False, alias = 'ipaddr'
[…]
# Check if value is a list and parse each element
if isinstance(value, (list, tuple, types.GeneratorType)):
_ret = [ipaddr(element, str(query), version) for element in value]
return [item for item in _ret if item]
> elif not value or value is True:
E jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'adddress'
Integration into GitLab
Use merge request work ow
Review changes to data les and templates
Build generated con guration les
Produce a diff
Integration into GitLab
Ansible
Inventory generated by Jerikan
Single playbook
Idempotency is important
--diff --check should work as expected
deploy complete con guration
Further reading
(w/ demo)
(free bundle: Jerikan, Ansible playbooks, data,
templates and generated con guration for two datacenters)
Blog post about Jerikan+Ansible
GitHub repository

Contenu connexe

Similaire à slides-frnog34.pdf

26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
Freddy Buenaño
 

Similaire à slides-frnog34.pdf (20)

Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
Hacking the swisscom modem
Hacking the swisscom modemHacking the swisscom modem
Hacking the swisscom modem
 
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
Information Theft: Wireless Router Shareport for Phun and profit - Hero Suhar...
 
snort.ppt
snort.pptsnort.ppt
snort.ppt
 
Lost in Translation: When Industrial Protocol Translation goes Wrong [CONFide...
Lost in Translation: When Industrial Protocol Translation goes Wrong [CONFide...Lost in Translation: When Industrial Protocol Translation goes Wrong [CONFide...
Lost in Translation: When Industrial Protocol Translation goes Wrong [CONFide...
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
uCluster
uClusteruCluster
uCluster
 
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStackExperiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
Experiences in Providing Secure Mult-Tenant Lustre Access to OpenStack
 
Linux network tools (Maarten Blomme)
Linux network tools (Maarten Blomme)Linux network tools (Maarten Blomme)
Linux network tools (Maarten Blomme)
 
Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1Harmonia open iris_basic_v0.1
Harmonia open iris_basic_v0.1
 
26.1.7 lab snort and firewall rules
26.1.7 lab   snort and firewall rules26.1.7 lab   snort and firewall rules
26.1.7 lab snort and firewall rules
 
Enabling a Secure Multi-Tenant Environment for HPC
Enabling a Secure Multi-Tenant Environment for HPCEnabling a Secure Multi-Tenant Environment for HPC
Enabling a Secure Multi-Tenant Environment for HPC
 
Percona Live UK 2014 Part III
Percona Live UK 2014  Part IIIPercona Live UK 2014  Part III
Percona Live UK 2014 Part III
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
 
CONFidence 2017: Hacking embedded with OpenWrt (Vladimir Mitiouchev)
CONFidence 2017: Hacking embedded with OpenWrt (Vladimir Mitiouchev)CONFidence 2017: Hacking embedded with OpenWrt (Vladimir Mitiouchev)
CONFidence 2017: Hacking embedded with OpenWrt (Vladimir Mitiouchev)
 
Network Automation (Bay Area Juniper Networks Meetup)
Network Automation (Bay Area Juniper Networks Meetup)Network Automation (Bay Area Juniper Networks Meetup)
Network Automation (Bay Area Juniper Networks Meetup)
 
Android 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and NetworkAndroid 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and Network
 
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
Lee Myers - What To Do When Nagios Notification Don't Meet Your Needs.
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

slides-frnog34.pdf

  • 1. How we deployed a datacenter in one click ex-Blade Network Team: Cédric Hascoët, Jean-Christophe Legatte, Loïc Pailhas, Sébastien Hurtel, Tchadel Icard, and Vincent Bernat FRnOG 34 — October 1st, 2021
  • 2. What's deployed? 2 Juniper QFX10002-72Q as edge routers, 32 Cisco Catalyst 2960S as OOB switches, 4 Facebook Wedge 100 as spine switches, 16 Facebook Wedge 100 as leaf switches, 4 Opengear CM71xx-2 as console servers, 2 Linux bastion/VPN/gateway servers, 1 Linux LibreNMS server.
  • 3. What's con gured? Edge routers: BGP con guration + policies Routing engine protection BGP-based fabric (Facebook Wedge) Out-of-band fabric (Cisco) Administrative gateway (Linux) ZTP Firewall and NAT Access to console servers VPN to other sites External stores: DNS, IRR, RPKI, NetBox
  • 4. Steps 1. Get space, power, cooling, racks, equipments, cabling done. 2. Install Debian 10 on gateway servers. 3. ./run-ansible-gitlab playbooks/site.yaml -- limit=adm-gateway:&location-ussfo03,none. 4. Wait for all devices to autoprovision. 5. ./run-ansible-gitlab playbooks/site.yaml -- limit=location-ussfo03.
  • 5. Source of truth No NetBox. YAML les versioned with Git. 1. List of devices 2. Classi er: from device name, attach properties to build a scope 3. Hierarchy de nition for data: given a scope, where to lookup data for a device 4. Data les: at YAML les tted inside a hierarchy of directories
  • 6. List of devices devices: # USSFO03 ## OOB - ob1-n1.ussfo03.blade-group.net - ob2-n1.ussfo03.blade-group.net - ob1-p1.ussfo03.blade-group.net - ob2-p1.ussfo03.blade-group.net - ob1-p2.ussfo03.blade-group.net # [...]
  • 7. Classi er matchers: - '.(ussfo03).': location: '1' continent: us - '^to([12])-[as]?p(d+).': member: '1' pod: '2' - '^to[12]-pd+.ussfo03.': groups: - tor-bgp - tor-bgp-compute - '^to[12]-(p|ap|sp)d+.ussfo03.': os: cumulus model: wedge100
  • 8. Hierarchy de nition def searchpaths(scope): paths = [ f"host/{scope[location]}/{scope[shorthost]}", f"location/{scope[location]}", f"os/{scope[os]}-{scope[model]}", f"os/{scope[os]}", 'common' ] return paths
  • 9. Data les Don't repeat yourself Data model should t your needs peer: ix-sfmix: rs-sfmix: monitored: true asn: 63055 remote: - 206.197.187.253 - 2001:504:30::ba06:3055:1 blizzard: asn: 57976 remote: - 206.197.187.42 - 2001:504:30::ba05:7976:1 irr: AS-BLIZZARD
  • 11. Jerikan Compile con guration les from source of truth and templates Faster than Ansible Easier to debug than Ansible Optionally checks generated con guration
  • 12. Templates Using Jinja2 Same as Ansible system { ntp { {% for ntp in lookup("system", "ntp") %} server {{ ntp }}; {% endfor %} } name-server { {% for dns in lookup("system", "dns") %} {{ dns }}; {% endfor %} } }
  • 13. Error handling templates/opengear/config.j2:15: in top-level template code config.interfaces.{{ interface }}.netmask {{ infos.adddress | ipaddr("netmask") }} continent = 'us' device = 'con1-ag2.ussfo03.blade-group.net' environment = 'prod' host = 'con1-ag2.ussfo03' infos = {'address': '172.30.24.19/21'} interface = 'wan' location = 'ussfo03' loop = <LoopContext 1/2> member = '2' model = 'cm7132-2-dac' os = 'opengear' shorthost = 'con1-ag2' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ value = JerkianUndefined, query = 'netmask', version = False, alias = 'ipaddr' […] # Check if value is a list and parse each element if isinstance(value, (list, tuple, types.GeneratorType)): _ret = [ipaddr(element, str(query), version) for element in value] return [item for item in _ret if item] > elif not value or value is True: E jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'adddress'
  • 14. Integration into GitLab Use merge request work ow Review changes to data les and templates Build generated con guration les Produce a diff
  • 16. Ansible Inventory generated by Jerikan Single playbook Idempotency is important --diff --check should work as expected deploy complete con guration
  • 17. Further reading (w/ demo) (free bundle: Jerikan, Ansible playbooks, data, templates and generated con guration for two datacenters) Blog post about Jerikan+Ansible GitHub repository