在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Azure/WALinuxAgent开源软件地址(OpenSource Url):https://github.com/Azure/WALinuxAgent开源编程语言(OpenSource Language):Python 99.4%开源软件介绍(OpenSource Introduction):Microsoft Azure Linux AgentLinux distributions supportOur daily automation tests most of the Linux distributions supported by Azure; the Agent can be used on other distributions as well, but development, testing and support for those are done by the open source community. Testing is done using the develop branch, which can be unstable. For a stable build please use the master branch instead. IntroductionThe Microsoft Azure Linux Agent (waagent) manages Linux provisioning and VM interaction with the Azure Fabric Controller. It provides the following functionality for Linux IaaS deployments:
CommunicationThe information flow from the platform to the agent occurs via two channels:
The agent will use an HTTP proxy if provided via the RequirementsThe following systems have been tested and are known to work with the Azure Linux Agent. Please note that this list may differ from the official list of supported systems on the Microsoft Azure Platform as described here. Waagent depends on some system packages in order to function properly:
InstallationInstallation via your distribution's package repository is preferred. You can also customize your own RPM or DEB packages using the configuration samples provided (see deb and rpm sections below). For more advanced installation options, such as installing to custom locations or prefixes, you can use setuptools to install from source by running: sudo python setup.py install --register-service For Python 3, use: sudo python3 setup.py install --register-service You can view more installation options by running: sudo python setup.py install --help The agent's log file is kept at UpgradeUpgrading via your distribution's package repository is strongly preferred. If upgrading manually, same with installation above by running: sudo python setup.py install --force Restart waagent service,for most of linux distributions: sudo service waagent restart For Ubuntu, use: sudo service walinuxagent restart For CoreOS, use: sudo systemctl restart waagent Command line optionsFlags
Commands
ConfigurationA configuration file (/etc/waagent.conf) controls the actions of waagent. Blank lines and lines whose first character is a A sample configuration file is shown below: Extensions.Enabled=y
Extensions.GoalStatePeriod=6
Extensions.GoalStateHistoryCleanupPeriod=1800
Provisioning.Agent=auto
Provisioning.DeleteRootPassword=n
Provisioning.RegenerateSshHostKeyPair=y
Provisioning.SshHostKeyPairType=rsa
Provisioning.MonitorHostName=y
Provisioning.DecodeCustomData=n
Provisioning.ExecuteCustomData=n
Provisioning.PasswordCryptId=6
Provisioning.PasswordCryptSaltLength=10
ResourceDisk.Format=y
ResourceDisk.Filesystem=ext4
ResourceDisk.MountPoint=/mnt/resource
ResourceDisk.MountOptions=None
ResourceDisk.EnableSwap=n
ResourceDisk.EnableSwapEncryption=n
ResourceDisk.SwapSizeMB=0
Logs.Verbose=n
Logs.Collect=y
Logs.CollectPeriod=3600
OS.AllowHTTP=n
OS.RootDeviceScsiTimeout=300
OS.EnableFIPS=n
OS.OpensslPath=None
OS.SshClientAliveInterval=180
OS.SshDir=/etc/ssh
HttpProxy.Host=None
HttpProxy.Port=None The various configuration options are described in detail below. Configuration options are of three types : Boolean, String or Integer. The Boolean configuration options can be specified as "y" or "n". The special keyword "None" may be used for some string type configuration entries as detailed below. Configuration File OptionsExtensions.EnabledType: Boolean This allows the user to enable or disable the extension handling functionality in the agent. Valid values are "y" or "n". If extension handling is disabled, the goal state will still be processed and VM status is still reported, but only every 5 minutes. Extension config within the goal state will be ignored. Note that functionality such as password reset, ssh key updates and backups depend on extensions. Only disable this if you do not need extensions at all. Note: disabling extensions in this manner is not the same as running completely
without the agent. In order to do that, the Extensions.GoalStatePeriodType: Integer How often to poll for new goal states (in seconds) and report the status of the VM and extensions. Goal states describe the desired state of the extensions on the VM. Note: setting up this parameter to more than a few minutes can make the state of the VM be reported as unresponsive/unavailable on the Azure portal. Also, this setting affects how fast the agent starts executing extensions. Extensions.GoalStateHistoryCleanupPeriodType: Integer How often to clean up the history folder of the agent. The agent keeps past goal states on this folder, each goal state represented with a set of small files. The history is useful to debug issues in the agent or extensions. AutoUpdate.EnabledType: Boolean Enables auto-update of the Extension Handler. The Extension Handler is responsible for managing extensions and reporting VM status. The core functionality of the agent is contained in the Extension Handler, and we encourage users to enable this option in order to maintain an up to date version. On most distros the default value is 'y'. For more information on the agent version, see our FAQ. Provisioning.AgentType: String Default: auto Choose which provisioning agent to use (or allow waagent to figure it out by specifying "auto"). Possible options are "auto" (default), "waagent", "cloud-init", or "disabled". Provisioning.Enabled (removed in 2.2.45)Type: Boolean Default: y This allows the user to enable or disable the provisioning functionality in the agent. Valid values are "y" or "n". If provisioning is disabled, SSH host and user keys in the image are preserved and any configuration specified in the Azure provisioning API is ignored. Note: This configuration option has been removed and has no effect. waagent
now auto-detects cloud-init as a provisioning agent (with an option to override
with Provisioning.MonitorHostNameType: Boolean Default: n Monitor host name changes and publish changes via DHCP requests. Provisioning.MonitorHostNamePeriodType: Integer Default: 30 How often to monitor host name changes (in seconds). This setting is ignored if MonitorHostName is not set. Provisioning.UseCloudInitType: Boolean Default: n This options enables / disables support for provisioning by means of cloud-init. When true ("y"), the agent will wait for cloud-init to complete before installing extensions and processing the latest goal state. Provisioning.Enabled must be disabled ("n") for this option to have an effect. Setting Provisioning.Enabled to true ("y") overrides this option and runs the built-in agent provisioning code. Note: This configuration option has been removed and has no effect. waagent
now auto-detects cloud-init as a provisioning agent (with an option to override
with Provisioning.DeleteRootPasswordType: Boolean If set, the root password in the /etc/shadow file is erased during the provisioning process. Provisioning.RegenerateSshHostKeyPairType: Boolean If set, all SSH host key pairs (ecdsa, dsa and rsa) are deleted during the provisioning process from /etc/ssh/. And a single fresh key pair is generated. The encryption type for the fresh key pair is configurable by the Provisioning.SshHostKeyPairType entry. Please note that some distributions will re-create SSH key pairs for any missing encryption types when the SSH daemon is restarted (for example, upon a reboot). Provisioning.SshHostKeyPairTypeType: String This can be set to an encryption algorithm type that is supported by the SSH daemon on the VM. The typically supported values are "rsa", "dsa" and "ecdsa". Note that "putty.exe" on Windows does not support "ecdsa". So, if you intend to use putty.exe on Windows to connect to a Linux deployment, please use "rsa" or "dsa". Provisioning.MonitorHostNameType: Boolean If set, waagent will monitor the Linux VM for hostname changes (as returned by the "hostname" command) and automatically update the networking configuration in the image to reflect the change. In order to push the name change to the DNS servers, networking will be restarted in the VM. This will result in brief loss of Internet connectivity. Provisioning.DecodeCustomDataType: Boolean If set, waagent will decode CustomData from Base64. Provisioning.ExecuteCustomDataType: Boolean If set, waagent will execute CustomData after provisioning. Provisioning.PasswordCryptIdType: String Algorithm used by crypt when generating password hash.
Provisioning.PasswordCryptSaltLengthType: String Length of random salt used when generating password hash. ResourceDisk.FormatType: Boolean If set, the resource disk provided by the platform will be formatted and mounted by waagent if the filesystem type requested by the user in "ResourceDisk.Filesystem" is anything other than "ntfs". A single partition of type Linux (83) will be made available on the disk. Note that this partition will not be formatted if it can be successfully mounted. ResourceDisk.FilesystemType: String This specifies the filesystem type for the resource disk. Supported values vary by Linux distribution. If the string is X, then mkfs.X should be present on the Linux image. SLES 11 images should typically use 'ext3'. BSD images should use 'ufs2' here. ResourceDisk.MountPointType: String This specifies the path at which the resource disk is mounted. ResourceDisk.MountOptionsType: String Specifies disk mount options to be passed to the mount -o command. This is a comma separated list of values, ex. 'nodev,nosuid'. See mount(8) for details. ResourceDisk.EnableSwapType: Boolean If set, a swap file (/swapfile) is created on the resource disk and added to the system swap space. ResourceDisk.EnableSwapEncryptionType: Boolean If set, the swap file (/swapfile) is mounted as an encrypted filesystem (flag supported only on FreeBSD.) ResourceDisk.SwapSizeMBType: Integer The size of the swap file in megabytes. Logs.VerboseType: Boolean If set, log verbosity is boosted. Waagent logs to /var/log/waagent.log and leverages the system logrotate functionality to rotate logs. Logs.CollectType: Boolean If set, agent logs will be periodically collected and uploaded to a secure location for improved supportability. NOTE: This feature is only supported ubuntu 16.04+; this flag will not take effect on any other distro. Logs.CollectPeriodType: Integer This configures how frequently to collect and upload logs. Default is each hour. NOTE: This only takes effect if the Logs.Collect option is enabled. OS.AllowHTTPType: Boolean If SSL support is not compiled into Python, the agent will fail all HTTPS requests. You can set this option to 'y' to make the agent fall-back to HTTP, instead of failing the requests. NOTE: Allowing HTTP may unintentionally expose secure data. OS.EnableRDMAType: Boolean If set, the agent will attempt to install and then load an RDMA kernel driver that matches the version of the firmware on the underlying hardware. OS.EnableFIPSType: Boolean If set, the agent will emit into the environment "OPENSSL_FIPS=1" when executing OpenSSL commands. This signals OpenSSL to use any installed FIPS-compliant libraries. Note that the agent itself has no FIPS-specific code. If no FIPS-compliant certificates are installed, then enabling this option will cause all OpenSSL commands to fail. OS.MonitorDhcpClientRestartPeriodType: Integer Default: 30 The agent monitor restarts of the DHCP client and restores network rules when it happens. This setting determines how often (in seconds) to monitor for restarts. OS.RootDeviceScsiTimeoutType: Integer This configures the SCSI timeout in seconds on the root device. If not set, the system defaults are used. OS.RootDeviceScsiTimeoutPeriodType: Integer How often to set the SCSI timeout on the root device (in seconds). This setting is ignored if RootDeviceScsiTimeout is not set. OS.OpensslPathType: String This can be used to specify an alternate path for the openssl binary to use for cryptographic operations. OS.RemovePersistentNetRulesPeriodType: Integer How often to remove the udev rules for persistent network interface names (75-persistent-net-generator.rules and /etc/udev/rules.d/70-persistent-net.rules) (in seconds) OS.SshClientAliveIntervalType: Integer This values sets the number of seconds the agent uses for the SSH ClientAliveInterval configuration option. OS.SshDirType: String This option can be used to override the normal location of the SSH configuration directory. HttpProxy.Host, HttpProxy.PortType: String If set, the agent will use this proxy server to access the internet. These values
will override the CGroups.EnforceLimitsType: Boolean If set, the agent will attempt to set cgroups limits for cpu and memory for the agent process itself as well as extension processes. See the wiki for further details on this. CGroups.ExcludedType: String The list of extensions which will be excluded from cgroups limits. This should be comma separated. TelemetryWALinuxAgent collects usage data and sends it to Microsoft to help improve our products and services. The data collected is used to track service health and assist with Azure support requests. Data collected does not include any personally identifiable information. Read our privacy statement to learn more. WALinuxAgent does not support disabling telemetry at this time. WALinuxAgent must be removed to disable telemetry collection. If you need this feature, please open an issue in GitHub and explain your requirement. AppendixWe do not maintain packaging information in this repo but some samples are shown below as a reference. See the downstream distribution repositories for officially maintained packaging. deb packagesThe official Ubuntu WALinuxAgent package can be found here. Run once:
To compile the package, from the top-most directory:
rpm packagesThe instructions below describe how to build an rpm package.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论