Skip to content

Commit

Permalink
Merge pull request sonic-net#161 from Azure/201911
Browse files Browse the repository at this point in the history
201911
  • Loading branch information
bbinxie authored May 8, 2020
2 parents 950926a + 5e17126 commit fedaec7
Show file tree
Hide file tree
Showing 410 changed files with 17,444 additions and 3,672 deletions.
5 changes: 5 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# through http.
# * ENABLE_ZTP: Enables zero touch provisioning.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * INSTALL_KUBERNETES: Allows including Kubernetes
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
# * by default for TOR switch.
# * ENABLE_SYNCD_RPC: Enables rpc-based syncd builds.
Expand Down Expand Up @@ -165,6 +166,10 @@ SONIC_BUILD_INSTRUCTION := make \
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
ENABLE_ZTP=$(ENABLE_ZTP) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
INSTALL_KUBERNETES=$(INSTALL_KUBERNETES) \
KUBERNETES_VERSION=$(KUBERNETES_VERSION) \
K8s_GCR_IO_PAUSE_VERSION=$(K8s_GCR_IO_PAUSE_VERSION) \
K8s_CNI_CALICO_VERSION=$(K8s_CNI_CALICO_VERSION) \
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
SONIC_ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
SONIC_INSTALL_DEBUG_TOOLS=$(INSTALL_DEBUG_TOOLS) \
Expand Down
22 changes: 17 additions & 5 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 @@ -203,6 +203,22 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get update
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install docker-ce=${DOCKER_VERSION}
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove software-properties-common gnupg2

if [ "$INSTALL_KUBERNETES" == "y" ]
then
## Install Kubernetes
echo '[INFO] Install kubernetes'
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -fsSL \
https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
sudo LANG=C chroot $FILESYSTEM_ROOT apt-key add -
## Check out the sources list update matches current Debian version
sudo cp files/image_config/kubernetes/kubernetes.list $FILESYSTEM_ROOT/etc/apt/sources.list.d/
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get update
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install kubeadm=${KUBERNETES_VERSION}-00
# kubeadm package auto install kubelet & kubectl
else
echo '[INFO] Skipping Install kubernetes'
fi

## Add docker config drop-in to specify dockerd command line
sudo mkdir -p $FILESYSTEM_ROOT/etc/systemd/system/docker.service.d/
## Note: $_ means last argument of last command
Expand Down Expand Up @@ -317,10 +333,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
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def get_presence(self):
presence = int(sfp_presence.read(), 16)
except IOError:
return False
logger.log_info("debug:port_ %s sfp presence is %s" % (str(self.index)), % (str(presence))
logger.log_info("debug:port_ %s sfp presence is %s" % (str(self.index), str(presence)))
return presence

def get_model(self):
Expand Down
1 change: 0 additions & 1 deletion device/arista/x86_64-arista_7050cx3_32s/platform_reboot

This file was deleted.

1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7050cx3_32s/platform_reboot
1 change: 0 additions & 1 deletion device/arista/x86_64-arista_7050cx3_32s/plugins

This file was deleted.

1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7050cx3_32s/plugins
1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7060cx2_32s/default_sku
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Arista-7060CX2-32S-C32 t1
1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7060cx2_32s/fancontrol
1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7060cx2_32s/platform_reboot
1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7060cx2_32s/plugins
1 change: 1 addition & 0 deletions device/arista/x86_64-arista_7060cx2_32s/sensors.conf
Loading

0 comments on commit fedaec7

Please sign in to comment.