Skip to content

Commit

Permalink
Merge pull request #62 from zhenggen-xu/sonic-cfg-mgmt-merge2
Browse files Browse the repository at this point in the history
Sonic cfg mgmt merge2
  • Loading branch information
zhenggen-xu authored Mar 27, 2020
2 parents da6958f + dd52413 commit a1b5c6f
Show file tree
Hide file tree
Showing 297 changed files with 25,176 additions and 2,353 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@
path = src/sonic-restapi
url = https://github.com/Azure/sonic-restapi.git
branch = master
[submodule "src/sonic-ztp"]
path = src/sonic-ztp
url = https://github.com/Azure/sonic-ztp
2 changes: 2 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# * BUILD_NUMBER: Desired version-number to pass to the building-system.
# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files
# through http.
# * ENABLE_ZTP: Enables zero touch provisioning.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
# * by default for TOR switch.
Expand Down Expand Up @@ -162,6 +163,7 @@ SONIC_BUILD_INSTRUCTION := make \
BUILD_NUMBER=$(BUILD_NUMBER) \
BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) \
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
ENABLE_ZTP=$(ENABLE_ZTP) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
Expand Down
15 changes: 5 additions & 10 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
else
DOCKER_VERSION=5:18.09.8~3-0~debian-stretch
fi
LINUX_KERNEL_VERSION=4.9.0-9-2
LINUX_KERNEL_VERSION=4.9.0-11-2

## Working directory to prepare the file system
FILESYSTEM_ROOT=./fsroot
Expand Down Expand Up @@ -139,7 +139,9 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/initramfs-tools_*.deb || \
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/linux-image-${LINUX_KERNEL_VERSION}-*_${CONFIGURED_ARCH}.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install acl
[[ $CONFIGURED_ARCH == amd64 ]] && sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install dmidecode
if [[ $CONFIGURED_ARCH == amd64 ]]; then
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install dmidecode hdparm
fi

## Update initramfs for booting with squashfs+overlay
cat files/initramfs-tools/modules | sudo tee -a $FILESYSTEM_ROOT/etc/initramfs-tools/modules > /dev/null
Expand Down Expand Up @@ -315,10 +317,6 @@ fi
## Disable kexec supported reboot which was installed by default
sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec

## Modifty ntp default configuration: disable initial jump (add -x), and disable
## jump when time difference is greater than 1000 seconds (remove -g).
sudo sed -i "s/NTPD_OPTS='-g'/NTPD_OPTS='-x'/" $FILESYSTEM_ROOT/etc/default/ntp

## Remove sshd host keys, and will regenerate on first sshd start
sudo rm -f $FILESYSTEM_ROOT/etc/ssh/ssh_host_*_key*
sudo cp files/sshd/host-ssh-keygen.sh $FILESYSTEM_ROOT/usr/local/bin/
Expand Down Expand Up @@ -394,9 +392,6 @@ set /files/etc/sysctl.conf/net.ipv6.conf.default.keep_addr_on_down 1
set /files/etc/sysctl.conf/net.ipv6.conf.all.keep_addr_on_down 1
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.keep_addr_on_down 1
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.accept_ra_defrtr 0
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.accept_ra 0
set /files/etc/sysctl.conf/net.ipv4.tcp_l3mdev_accept 1
set /files/etc/sysctl.conf/net.ipv4.udp_l3mdev_accept 1
Expand Down Expand Up @@ -435,10 +430,10 @@ EOF

sudo cp files/dhcp/rfc3442-classless-routes $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d
sudo cp files/dhcp/sethostname $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/sethostname6 $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/graphserviceurl $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/snmpcommunity $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/vrf $FILESYSTEM_ROOT/etc/dhcp/dhclient-exit-hooks.d/
sudo cp files/dhcp/dhclient.conf $FILESYSTEM_ROOT/etc/dhcp/
if [ -f files/image_config/ntp/ntp ]; then
sudo cp ./files/image_config/ntp/ntp $FILESYSTEM_ROOT/etc/init.d/
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# name lanes alias index
Ethernet0 1,2,3,4 Ethernet1/1 1
Ethernet4 5,6,7,8 Ethernet2/1 2
Ethernet8 9,10,11,12 Ethernet3/1 3
Ethernet12 13,14,15,16 Ethernet4/1 4
Ethernet16 21,22,23,24 Ethernet5/1 5
Ethernet20 17,18,19,20 Ethernet6/1 6
Ethernet24 25,26,27,28 Ethernet7/1 7
Ethernet28 29,30,31,32 Ethernet8/1 8
Ethernet32 37,38,39,40 Ethernet9/1 9
Ethernet36 33,34,35,36 Ethernet10/1 10
Ethernet40 41,42,43,44 Ethernet11/1 11
Ethernet44 45,46,47,48 Ethernet12/1 12
Ethernet48 53,54,55,56 Ethernet13/1 13
Ethernet52 49,50,51,52 Ethernet14/1 14
Ethernet56 57,58,59,60 Ethernet15/1 15
Ethernet60 61,62,63,64 Ethernet16/1 16
Ethernet64 69,70,71,72 Ethernet17/1 17
Ethernet68 65,66,67,68 Ethernet18/1 18
Ethernet72 73,74,75,76 Ethernet19/1 19
Ethernet76 77,78,79,80 Ethernet20/1 20
Ethernet80 85,86,87,88 Ethernet21/1 21
Ethernet84 81,82,83,84 Ethernet22/1 22
Ethernet88 89,90,91,92 Ethernet23/1 23
Ethernet92 93,94,95,96 Ethernet24/1 24
Ethernet96 101,102,103,104 Ethernet25/1 25
Ethernet100 97,98,99,100 Ethernet26/1 26
Ethernet104 105,106,107,108 Ethernet27/1 27
Ethernet108 109,110,111,112 Ethernet28/1 28
Ethernet112 117,118,119,120 Ethernet29/1 29
Ethernet116 113,114,115,116 Ethernet30/1 30
Ethernet120 121,122,123,124 Ethernet31/1 31
Ethernet124 125,126,127,128 Ethernet32/1 32
Ethernet128 129 Ethernet33 33
Ethernet132 128 Ethernet34 34
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/td3-a7050cx3-32s-32x100G.config.bcm
Loading

0 comments on commit a1b5c6f

Please sign in to comment.