Skip to content

Commit

Permalink
move chrony installation out of containerD block (#646)
Browse files Browse the repository at this point in the history
Co-authored-by: Adil Adilli <[email protected]>
  • Loading branch information
adilliadil and Adil Adilli committed Mar 6, 2021
1 parent d8f107b commit bdb7dca
Show file tree
Hide file tree
Showing 50 changed files with 1,112 additions and 256 deletions.
41 changes: 20 additions & 21 deletions parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,6 @@ getMobyPkg() {
apt_get_update || exit $ERR_APT_UPDATE_TIMEOUT
}

{{- if NeedsContainerd}}
# CSE+VHD can dictate the containerd version, users don't care as long as it works
installStandaloneContainerd() {
# azure-built runtimes have a "+azure" suffix in their version strings (i.e 1.4.1+azure). remove that here.
CURRENT_VERSION=$(containerd -version | cut -d " " -f 3 | sed 's|v||' | cut -d "+" -f 1)
# v1.4.1 is our lowest supported version of containerd
local CONTAINERD_VERSION="1.4.3"
if semverCompare ${CURRENT_VERSION:-"0.0.0"} ${CONTAINERD_VERSION}; then
echo "currently installed containerd version ${CURRENT_VERSION} is greater than (or equal to) target base version ${CONTAINERD_VERSION}. skipping installStandaloneContainerd."
else
echo "installing containerd version ${CONTAINERD_VERSION}"
removeMoby
removeContainerd
downloadContainerd ${CONTAINERD_VERSION}
wait_for_apt_locks
retrycmd_if_failure 10 5 600 apt-get -y -f install ${CONTAINERD_DEB_FILE} || exit $ERR_CONTAINERD_INSTALL_TIMEOUT
rm -Rf $CONTAINERD_DOWNLOADS_DIR &
fi
}


disableNtpAndTimesyncdInstallChrony() {
# Disable systemd-timesyncd
sudo systemctl stop systemd-timesyncd
Expand Down Expand Up @@ -170,6 +149,26 @@ EOF
systemctl restart chrony
}

{{- if NeedsContainerd}}
# CSE+VHD can dictate the containerd version, users don't care as long as it works
installStandaloneContainerd() {
# azure-built runtimes have a "+azure" suffix in their version strings (i.e 1.4.1+azure). remove that here.
CURRENT_VERSION=$(containerd -version | cut -d " " -f 3 | sed 's|v||' | cut -d "+" -f 1)
# v1.4.1 is our lowest supported version of containerd
local CONTAINERD_VERSION="1.4.3"
if semverCompare ${CURRENT_VERSION:-"0.0.0"} ${CONTAINERD_VERSION}; then
echo "currently installed containerd version ${CURRENT_VERSION} is greater than (or equal to) target base version ${CONTAINERD_VERSION}. skipping installStandaloneContainerd."
else
echo "installing containerd version ${CONTAINERD_VERSION}"
removeMoby
removeContainerd
downloadContainerd ${CONTAINERD_VERSION}
wait_for_apt_locks
retrycmd_if_failure 10 5 600 apt-get -y -f install ${CONTAINERD_DEB_FILE} || exit $ERR_CONTAINERD_INSTALL_TIMEOUT
rm -Rf $CONTAINERD_DOWNLOADS_DIR &
fi
}

downloadContainerd() {
CONTAINERD_VERSION=$1
# currently upstream maintains the package on a storage endpoint rather than an actual apt repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ write_files:
encoding: gzip
owner: root
content: !!binary |
H4sIAAAAAAAA/8RY7W/btvN/77/ipvlF0v4oWU4X7LfCBdzYNYy6SeCHrsMwCDR1kjlLIkdSadzU//sX1INtOcm3zTLsmxeBfDzeE4+fu+OPP3hLnnlLqletFrKVAGcmcsV4FgPTGPBMG5okQci1UcLVK4iEgsUyz0zutFoKU3GDH8Ryc3IKdy0AgM+UmyASKqDSBIlga12QFRq1YWkY8CiIKE9yheB34Cc47wCVhsRoQOYqRiAbSMVyQzCLeYblN0t4a1uruxCZoTxDFf7zStlOttVXeT9AqXeqHpAZZCLQhhoNftdK7/4ELFcJkEjPJrAyRupfPE9StqYxajflTAktIuMykXpMZBGPvbwIqde+W7xdXM4XwXQ4GfZnw+1uG9ltI1KJ0A1xCW/AM6n8ryxfvwLecgPt4XQafJgF19OrQTAYvg0GV79eTq76g2A+/jC8WswfDdi5dcnvQCjXMRD+DJXX70dBfzAI3vXHk0IdlSalav1rf8Kz/LYfY2ZgJZKwXgxiNEEuQ2qwKbV/PQ8W14P+fNgwv95iszXIZaxo+MDGwXhmd4+m/UFzu01tK6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QnVmLRprz6TwAAAP//8FindXEdAAA=


- path: /opt/azure/containers/provision_configs.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,68 @@ getMobyPkg() {
apt_get_update || exit $ERR_APT_UPDATE_TIMEOUT
}

disableNtpAndTimesyncdInstallChrony() {
# Disable systemd-timesyncd
sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
# Disable ntp
sudo systemctl stop ntp
sudo systemctl disable ntp

# Install chrony
apt-get update
apt-get install chrony -y
cat > /etc/chrony/chrony.conf <<EOF
# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usuable directives.
# This will use (up to):
# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled
# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well
# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm)
# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only
# sources will be used.
# At the same time it retains some protection against one of the entries being
# down (compare to just using one of the lines). See (LP: #1754358) for the
# discussion.
#
# About using servers from the NTP Pool Project in general see (LP: #104525).
# Approved by Ubuntu Technical Board on 2011-02-08.
# See http://www.pool.ntp.org/join.html for more information.
#pool ntp.ubuntu.com iburst maxsources 4
#pool 0.ubuntu.pool.ntp.org iburst maxsources 1
#pool 1.ubuntu.pool.ntp.org iburst maxsources 1
#pool 2.ubuntu.pool.ntp.org iburst maxsources 2
# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
rtcsync
# Settings come from: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
makestep 1.0 -1
EOF

systemctl restart chrony
}

installMoby() {
CURRENT_VERSION=$(dockerd --version | grep "Docker version" | cut -d "," -f 1 | cut -d " " -f 3 | cut -d "+" -f 1)
local MOBY_VERSION="19.03.14"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ write_files:
encoding: gzip
owner: root
content: !!binary |
H4sIAAAAAAAA/8RY7W/btvN/77/ipvlF0v4oWU4X7LfCBdzYNYy6SeCHrsMwCDR1kjlLIkdSadzU//sX1INtOcm3zTLsmxeBfDzeE4+fu+OPP3hLnnlLqletFrKVAGcmcsV4FgPTGPBMG5okQci1UcLVK4iEgsUyz0zutFoKU3GDH8Ryc3IKdy0AgM+UmyASKqDSBIlga12QFRq1YWkY8CiIKE9yheB34Cc47wCVhsRoQOYqRiAbSMVyQzCLeYblN0t4a1uruxCZoTxDFf7zStlOttVXeT9AqXeqHpAZZCLQhhoNftdK7/4ELFcJkEjPJrAyRupfPE9StqYxajflTAktIuMykXpMZBGPvbwIqde+W7xdXM4XwXQ4GfZnw+1uG9ltI1KJ0A1xCW/AM6n8ryxfvwLecgPt4XQafJgF19OrQTAYvg0GV79eTq76g2A+/jC8WswfDdi5dcnvQCjXMRD+DJXX70dBfzAI3vXHk0IdlSalav1rf8Kz/LYfY2ZgJZKwXgxiNEEuQ2qwKbV/PQ8W14P+fNgwv95iszXIZaxo+MDGwXhmd4+m/UFzu01tK6JyDngGVFK2wi7JDU90kTNG0UxLoQwpDhaWiVhGucae7/quD4wShsrwiDNqUANDuSJMpKnIgMVK5JIk3CAwHulKKhNZZhRla2D2f8KXROWZ4SkCLg1dJqgBzcoIkYDVBDE3ECe5Nqgibe9GETcjJPCo+J9xQ/RGG0zJChOJSgMXxYpUIjfYBS41GuCyEv/nX5DwpaQpkZ//ymnCzaYg1D+IVa4hFXlmILNKS48kj7+AFowa0Bsd6dIhvdH2OoB1CguFYBdIYk8Zbr9Ufn/h8jWEogg9AI/gh90BVhcPz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QSAtNU89qb3km0SG3N+pLpbi4md9g7AOJ/IbkqCpR13qQqz9UVaUgh7SpfpSXkKsvqkA+8dq4y9743o5MCmak0EgED1M6FsYI7zY5U5lQwS2sGXq4yGiRroVTWSEPQY+oCE5YAGisK94BalQatdVwYn5I8nKbswCvYdV3qzQyvIArDIHzAlHUFMzBDLTEH6kjETZjas1t4iXoOUQSFkJVFs90422uDRpa7NtZwhGNlydjMUj3hTP77//9lF2UHWK5kBlfCTp0Nv9eWk97fr2QJPG05CeA0rZUy4JoLZfxLWC1V/O7Ag9KvTDOYXwptqUw29jDNhkWS+o68xtRJDKf/dwDdBC+7pS1DKFWeww4k7q/fA5WmBi2EHm01xmIJURCCH3nU+Oo+vGzBGo1l2i767Wrl3vju5+Di7Gx4fB6vNuj6+SAB379strLP4Lbq1sDdQHPcgmaRTqD1Y4v26WjtBNzJztrJDzXM+gbj5s4F51b0v0G4E0S7rcWzicHiEvVBU8Q7N3dkfem3wiAMwtYtdG7WSd3eeW6ud0xeaY3S5sv9DZP6C6RkQ637fG6pt2YamUVqCUzCltKAf1Qspz4PlmmaWGhlWyOyIVAAZibKklJizQlBrSnmZvXYvfp6bnm0WmKWR474wdFo/w6fJYBI4bffoNVcHxyNbluwvw+tnSAMdlvw++93TLRB1EHtrFbu5nF9fdJdjGe90D3498L1LwDvSvVs+Y3g/ppAz8D3GVUtn5q1++LHPLCWPP6CxHNk8qJ84JFfF+CfpasX1+Vh+oQnVmLRprz6TwAAAP//8FindXEdAAA=


- path: /opt/azure/containers/provision_configs.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,68 @@ getMobyPkg() {
apt_get_update || exit $ERR_APT_UPDATE_TIMEOUT
}

disableNtpAndTimesyncdInstallChrony() {
# Disable systemd-timesyncd
sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
# Disable ntp
sudo systemctl stop ntp
sudo systemctl disable ntp

# Install chrony
apt-get update
apt-get install chrony -y
cat > /etc/chrony/chrony.conf <<EOF
# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usuable directives.
# This will use (up to):
# - 4 sources from ntp.ubuntu.com which some are ipv6 enabled
# - 2 sources from 2.ubuntu.pool.ntp.org which is ipv6 enabled as well
# - 1 source from [01].ubuntu.pool.ntp.org each (ipv4 only atm)
# This means by default, up to 6 dual-stack and up to 2 additional IPv4-only
# sources will be used.
# At the same time it retains some protection against one of the entries being
# down (compare to just using one of the lines). See (LP: #1754358) for the
# discussion.
#
# About using servers from the NTP Pool Project in general see (LP: #104525).
# Approved by Ubuntu Technical Board on 2011-02-08.
# See http://www.pool.ntp.org/join.html for more information.
#pool ntp.ubuntu.com iburst maxsources 4
#pool 0.ubuntu.pool.ntp.org iburst maxsources 1
#pool 1.ubuntu.pool.ntp.org iburst maxsources 1
#pool 2.ubuntu.pool.ntp.org iburst maxsources 2
# This directive specify the location of the file containing ID/key pairs for
# NTP authentication.
keyfile /etc/chrony/chrony.keys
# This directive specify the file into which chronyd will store the rate
# information.
driftfile /var/lib/chrony/chrony.drift
# Uncomment the following line to turn logging on.
#log tracking measurements statistics
# Log files location.
logdir /var/log/chrony
# Stop bad estimates upsetting machine clock.
maxupdateskew 100.0
# This directive enables kernel synchronisation (every 11 minutes) of the
# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
rtcsync
# Settings come from: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
makestep 1.0 -1
EOF

systemctl restart chrony
}

installMoby() {
CURRENT_VERSION=$(dockerd --version | grep "Docker version" | cut -d "," -f 1 | cut -d " " -f 3 | cut -d "+" -f 1)
local MOBY_VERSION="19.03.14"
Expand Down
Loading

0 comments on commit bdb7dca

Please sign in to comment.