Skip to content

Instantly share code, notes, and snippets.

View keithnoguchi's full-sized avatar
☮️
hacking

Keith Noguchi keithnoguchi

☮️
hacking
View GitHub Profile
@keithnoguchi
keithnoguchi / FB-PE-InterviewTips.md
Created September 30, 2021 22:24 — forked from ameenkhan07/FB-PE-InterviewTips.md
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

u0$ vim build/conf/local.conf
[1]+ Stopped vim build/conf/local.conf
u0$ ls -F
build/ COPYING images/ Makefile README.md tools/ yocto/
u0$ pwd
/usr/local/git/ops-build
u0$ make devenv_init
Build System for openswitch
(ansible)[ansible-ios]$ ansible -m ios_facts -a "host=ios01 username=cisco password=cisco authorize=true gather_subset=all" ios01
ios01 | SUCCESS => {
"ansible_facts": {
"ansible_net_all_ipv4_addresses": [
"172.26.4.30"
],
"ansible_net_all_ipv6_addresses": [],
"ansible_net_config": "Building configuration...\n\nCurrent configuration : 3205 bytes\n!\n! Last configuration change at 20:15:33 UTC Tue May 24 2016 by ********\n!\nversion 15.6\nservice timestamps debug datetime msec\nservice timestamps log datetime msec\nno service password-encryption\n!\nhostname veos01\n!\nboot-start-marker\nboot-end-marker\n!\n!\nvrf definition Mgmt-intf\n !\n address-family ipv4\n exit-address-family\n !\n address-family ipv6\n exit-address-family\n!\nno logging buffered\nlogging console informational\nenable password ********\n!\nno aaa new-model\nethernet lmi ce\n!\n!\n!\nmmi polling-interval 60\nno mmi auto-configure\nno mmi pvc\nmmi snmp-timeout 180\n!\n!\n!\n!\n!\n!\n!\n!\n!\n
#
# (c) 2016 Peter Sprygada <psprygada@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
$ ansible-playbook site.yaml
PLAY [verify the switch version] ***********************************************
TASK [setup] *******************************************************************
ok: [spine2]
ok: [leaf2]
ok: [leaf1]
ok: [spine1]
ok: [fab1]
YourAnsibleBox$ ansible-playbook site.yaml
PLAY [verify the switch version] ***********************************************
TASK [show version CLI] ********************************************************
ok: [fab1]
ok: [spine2]
ok: [spine1]
ok: [leaf1]
ok: [leaf2]
13:06 (ddompe) make testenv_run legacy ops # create fs, export to docker, run the vsi legacy tests found on ops/test
13:06 (ddompe) make testenv_rerun legacy ops # skip fs and export to docker, re-runs the vsi legacy tests, because they obviously fail at random place
13:07 ddompe gave made the effort to connect with the developer experience
13:08 (ddompe) make testenv_run component ops-foo ops-bar ops-zoo # builds fs, export docker, and runs the tests with topology framework under ops-tests/component on these components
13:08 (ddompe) # if the components are on the devenv, we use the tests from there, otherwise we download the branch and revision specified on the recipe automatically
13:09 (ddompe) going back to my rant
13:09 (ddompe) we need to create layers for the FT tests
DRIVING SDN ADOPTION – ON.Lab, SERVICE PROVIDERS AND VENDORS OPEN SOURCE ONOS
ONOS is a resilient high performance open source SDN network operating system purpose built
for Service Provider networks. ONOS has been developed by ON.Lab along with a community of
leading Service Providers, Vendors and Researchers and will be open sourced on Dec 5th, 2014.
http://onosproject.org/wp-content/uploads/2014/11/Whitepaper-Service-Provider-SDN-final.pdf
---
- name: checking the database connection
hosts: ops
gather_facts: no
vars:
ansible_ssh_user: admin
tasks:
- name: checking if admin can execute `sudo ovsdb-client dump` on the switch
command: ovsdb-client dump
become: yes
---
- name: copy ssh public key to the switch
hosts: ops
gather_facts: no
vars:
ansible_ssh_user: root
public_key: /home/admin/.ssh/id_rsa.pub
tasks:
- authorized_key: user=admin key="{{ lookup('file', public_key) }}"