Geavanceerd
Zoeken inSamenvattingen
Zo zoek je
  • Woorden vinden lestitels, tekst en code. Filter op soort (gidsen, cursussen, programma's, boeken) of blijf in dit boek.
  • book:rhcsa en ch:8 maken de zoektocht kleiner; #code vindt een woord alleen in commando's van de lessen.
  • "twee woorden" vindt precies die zin.
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken
Probeer:

Cursus 3Naam in de cursus: AZ 104 - 2 - Azure Resource Management

Azure Resource Management

Course 3 of 7 in the AZ-104 path on Manara. Command-line and scripting tools.

Notitie

My result — Tasks in this course: all done (18/18); Module review quizzes: 100% (each module); Path progress: all 197 tasks of the 7 courses done; Mock exams: both passed — 92% and 98% (80% to pass).

Course page: Manara

  • 7 Lessen
  • 1 Commando's
  • 1 Labs

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

3.1

Command-Line & Scripting Tools for Azure Management

Azure CLI is a command-line tool for Azure.

  • It runs on Windows, macOS, Linux, and Azure Cloud Shell.
  • CLI commands look like az <service> <action>.
  • az login signs you in. A service principal lets a script sign in.
  • CLI output can be JSON, table, or TSV.
  • Azure PowerShell uses cmdlets from the Az module.
  • Connect-AzAccount signs you in.
  • PowerShell fits Windows and hybrid environments.
  • Both tools create, change, and delete resources.
  • Both tools work inside scripts and pipelines.

In more detail

  • Every resource needs a resource group, so make one first.
  • CLI: az group create --name demo --location eastus.
  • PowerShell: New-AzResourceGroup -Name demo -Location eastus.
  • Add --output table to read CLI results more easily.
  • Use Get-AzResource or az resource list to see what exists.
  • Scripts repeat the same steps with no typing errors.
  • Keep scripts in Git so you can see every change.
  • Many teams put these scripts in a CI/CD pipeline.

Commando's in deze les

3.2

Infrastructure as Code (IaC) for Resource Deployment

IaC means you define infrastructure in code.

  • ARM templates are JSON files. They describe the end state.
  • Declarative means you say what you want, not the steps.
  • Templates use parameters, variables, and outputs.
  • Dependencies tell Azure the right order for resources.
  • You can validate a template before you deploy it.
  • Bicep is a small language that compiles to ARM JSON.
  • bicep decompile turns an ARM template into Bicep.
  • Modules split a big template into small parts.
  • Keep templates in Git and deploy from a pipeline.

In more detail

  • Put changing values, like location or size, in parameters.
  • Use a variable for a value that repeats inside the template.
  • Use an output to return a value after the deploy.
  • Deploy a group template with az deployment group create.
  • In PowerShell, use New-AzResourceGroupDeployment.
  • A Bicep resource line has a type, an API version, and a name.
  • Small modules are easier to read and test.
  • Run a validation first, so errors show up early.

Commando's in deze les

3.3

Web-Based & Browser-Based Azure Management

Azure Portal is a web GUI for Azure.

  • You can create VMs, storage, networks, and databases with clicks.
  • The portal shows dashboards, metrics, alerts, and logs.
  • Access Control (IAM) in the portal manages roles.
  • Azure Cloud Shell is a terminal inside the browser.
  • Cloud Shell includes Azure CLI, PowerShell, Git, and Terraform.
  • Cloud Shell keeps files in an Azure Files share.
  • You can open Cloud Shell from the portal, the mobile app, or a URL.
  • The portal is good for looking and for quick changes.
  • The portal is not good for repeatable work.
  • CLI and PowerShell are better for scripts.
  • Bicep and ARM templates are better for whole environments.

In more detail

  • Use the portal to learn a service and to check resources.
  • Use Cloud Shell when you need a command but have no tools installed.
  • Use CLI or PowerShell when a task must run the same way each time.
  • Use Bicep or ARM templates to build a full environment.
  • Pick the tool that fits the job, not the tool you like most.
  • The course compares six tools: CLI, PowerShell, ARM, Bicep, Portal, and Cloud Shell.
  • Each tool has one weak point. For example, the portal is weak for automation.
  • Cloud Shell has no rich UI for deep troubleshooting.

3.4

Key terms

The words of this course in one table. Learn them before the quiz or exam.

TermMeaning
01CLI and PowerShell — commands and scripts.
02Infrastructure as Code — ARM templates and Bicep.
03Web-based tools — portal and Cloud Shell.
ARM templateThe JSON file that describes Azure resources.
AutomationRunning tasks without a person clicking.
Az moduleThe PowerShell module that holds Azure cmdlets.
Azure CLIThe cross-platform command tool for Azure.
Azure Cloud ShellA browser terminal with Azure tools ready.
Azure FilesThe file share that keeps Cloud Shell files.
Azure PortalThe web interface for Azure.
Azure PowerShellThe PowerShell module set for Azure.
BashA common Linux command shell.
BicepThe readable language for ARM deployments.
Cloud ShellA browser terminal with Azure tools ready.
CmdletA PowerShell command, like Get-AzVM.
DashboardOne page with charts and key numbers.
DeclarativeA style where you state the wanted result.
DecompileConvert an ARM template into Bicep.
DependencyA link that sets the resource order.
GitVersion control for scripts and templates.
GUIA screen with buttons and menus.
IaCInfrastructure as Code: infrastructure written as files.
IAMAccess Control, the page for roles and access.
ModuleA small Bicep or ARM file you reuse.
OutputA value returned after the deploy.
Output formatThe shape of a command result: JSON, table, or TSV.
ParameterA value that you pass in at deploy time.
PipelineAn automated build and deploy process.
Resource groupThe box that holds related resources.
Resource managementCreate, change, and delete Azure resources.
ScriptA file of commands that runs in order.
Service principalAn app identity that scripts use to sign in.
TerraformA tool that builds infrastructure from code.
VariableA value used inside the template.

3.5

Check yourself

Answer each question first, then open it to check the answer.

1What does a CLI command start with?

It starts with az, then the service, then the action.

2Which command signs you in to Azure PowerShell?

Connect-AzAccount.

3Why do teams use scripts instead of the portal?

Scripts are faster, repeatable, and free of typing errors.

4What is the difference between a parameter and a variable?

A parameter comes from outside at deploy time. A variable is set inside the file.

5Why is Bicep easier than raw ARM JSON?

It removes heavy JSON brackets and keeps the same result.

6What does bicep decompile do?

It converts an existing ARM template into a Bicep file.

7Name two tools that come pre-installed in Cloud Shell.

Azure CLI and Azure PowerShell (also Git and Terraform).

8Why is the portal a poor choice for repeatable deployments?

You must click the same steps again, so small differences slip in.

9Where does Cloud Shell keep your files between sessions?

In an Azure Files share that stays with your account.

Commando's in deze les

Oefenen

Alle commando's in dit hoofdstuk