Skip to content

Instantly share code, notes, and snippets.

'''
Extract cert and key file from pfx file
openssl pkcs12 -in admin.pfx -out certfile.pem -clcerts -nokeys
Enter Import Password:
MAC verified OK
openssl pkcs12 -in admin.pfx -out key.pem -nocerts -nodes
Enter Import Password:
MAC verified OK
'''
@shanku9
shanku9 / System Design.md
Created January 19, 2021 21:08 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
root@ip-192-168-1-93:/home/magma# apt policy magma
magma:
Installed: 1.3.2-1607585207-53c6e53f
Candidate: 1.3.2-1607585207-53c6e53f
root@ip-192-168-1-93:/home/magma# cat /etc/apt/sources.list.d/ovs_package_repo.list
deb http://packages.magma.etagecom.io stretch-1.4.0 main
root@ip-192-168-1-93:/home/magma# apt update
root@ip-192-168-1-93:/home/magma# apt policy magma
magma:
Installed: 1.3.3-1615327764-b24386ec
Candidate: 1.3.3-1615327764-b24386ec
root@ip-192-168-1-93:/home/magma# cat /etc/apt/sources.list.d/ovs_package_repo.list
deb http://packages.magma.etagecom.io stretch-1.4.0 main
root@ip-192-168-1-93:/home/magma# apt update
Ign:1 http://deb.debian.org/debian stretch InRelease
root@ip-192-168-1-93:/home/magma# bash agw_install.sh
Checking if the script has been executed by root user
Checking if Debian is installed
Making sure magma user is sudoers
Reading package lists... Done
Building dependency tree
Reading state information... Done
sudo is already the newest version (1.8.19p1-2.1+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
perl: warning: Setting locale failed.
root@ip-192-168-1-86:/home/magma# journalctl -fu agw_installation
-- Logs begin at Tue 2021-03-16 21:04:11 UTC. --
^C
root@ip-192-168-1-86:/home/magma# bash agw_install.sh
Checking if the script has been executed by root user
Checking if Debian is installed
Making sure magma user is sudoers
Need to check if both interfaces are named eth0 and eth1
Interfaces name are correct, let's check if network and DNS are up
PING google.com (172.217.10.206) from 192.168.1.93 eth0: 56(84) bytes of data.
@shanku9
shanku9 / gist:7f201b588319538f12dbb7699df764a1
Created March 16, 2021 22:04
14_baremetal_install Log
root@ip-192-168-1-93:/home/magma# bash agw_install.sh
Checking if the script has been executed by root user
Checking if Debian is installed
Making sure magma user is sudoers
Reading package lists... Done
Building dependency tree
Reading state information... Done
sudo is already the newest version (1.8.19p1-2.1+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
adduser: The user `magma' already exists.
magma@132_vagw1:~$
magma@132_vagw1:~$
magma@132_vagw1:~$ ls
agw_install.sh build-ovs magma
magma@132_vagw1:~$ journlactl -u agw_install
-bash: journlactl: command not found
magma@132_vagw1:~$ sudo journlactl -u agw_install
sudo: journlactl: command not found
magma@132_vagw1:~$
magma@132_vagw1:~$
magma@133_vagw1:~$ sudo apt policy magma
magma:
Installed: 1.3.3-1615327764-b24386ec
Candidate: 1.3.3-1615327764-b24386ec
Version table:
*** 1.3.3-1615327764-b24386ec 900
900 http://packages.magma.etagecom.io stretch-1.3.3/main amd64 Packages
100 /var/lib/dpkg/status
1.3.3-1614917907-371c6462 900
900 http://packages.magma.etagecom.io stretch-1.3.3/main amd64 Packages
magma@132_vagw1:~$ ####DOWNGRADE 1.4.0 >> 1.3.2
magma@132_vagw1:~$
magma@132_vagw1:~$ sudo dpkg -l | grep magma
ii magma 1.4.0-1615912803-6bca6402 amd64 Magma Access Gateway
ii magma-cpp-redis 4.3.1.2-2 amd64 Redis C++ client library
ii magma-libfluid 0.1.0.5-1 amd64 Libfluid Openflow Controller
ii magma-sctpd 1.4.0-1615912803-6bca6402 amd64 Magma SCTPD
magma@132_vagw1:~$ sudo apt policy magma
magma:
Installed: 1.4.0-1615912803-6bca6402