305-300 · Question #28
Which of the following kinds of data can cloud-init process directly from user-data? (Choose three.)
The correct answer is A. Shell scripts to execute B. Lists of URLs to import D. cloud-config declarations in YAML. Cloud-init is a tool that allows users to customize the configuration and behavior of cloud instances during the boot process. Cloud-init can process different kinds of data that are passed to the instance via user-data, which is a mechanism provided by various cloud providers…
Question
Options
- AShell scripts to execute
- BLists of URLs to import
- CISO images to boot from
- Dcloud-config declarations in YAML
- EBase64-encoded binary files to execute
How the community answered
(20 responses)- A80% (16)
- C10% (2)
- E10% (2)
Explanation
Cloud-init is a tool that allows users to customize the configuration and behavior of cloud instances during the boot process. Cloud-init can process different kinds of data that are passed to the instance via user-data, which is a mechanism provided by various cloud providers to inject data into the instance. Among the kinds of data that cloud-init can process directly from user-data Shell scripts to execute: Cloud-init can execute user-data that is formatted as a shell script, starting with the #!/bin/sh or #!/bin/bash shebang. The script can contain any commands that are valid in the shell environment of the instance. The script is executed as the root user during the Lists of URLs to import: Cloud-init can import user-data that is formatted as a list of URLs, separated by newlines. The URLs can point to any valid data source that cloud-init supports, such as shell scripts, cloud-config files, or include files. The URLs are fetched and processed by cloud- init in the order they appear in the list. cloud-config declarations in YAML: Cloud-init can process user-data that is formatted as a cloud- config file, which is a YAML document that contains declarations for various cloud-init modules. The cloud-config file can specify various aspects of the instance configuration, such as hostname, users, packages, commands, services, and more. The cloud-config file must start with the #cloud-
Topics
Community Discussion
No community discussion yet for this question.