-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3afdfe7
commit 36641e1
Showing
4 changed files
with
180 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...trator/ms-learn/prerequisites-for-azure-admin--02-intro-to-azure-cloud-shell.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Introduction to Azure Cloud Shell | ||
|
||
Azure Cloud Shell is a browser-accessible command-line experience for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work, either Bash or PowerShell. Traditionally, to interact with Azure resources via command-line, you need to install the necessary components into your local computer (PC, Mac, Linux). With Cloud Shell, you have an authenticated, interactive shell that isn't part of a local machine. | ||
|
||
## What is Azure Cloud Shell? | ||
|
||
Azure Cloud Shell is a command-line environment you can access through your web browser. You can use this environment to manage Azure resources, including VMs, storage, and networking. Just like you do when using the Azure CLI or Azure PowerShell. | ||
|
||
Because Microsoft manages Cloud Shell, you always have access to the most recent versions of the Azure CLI and PowerShell modules right from any browser. You don't have to worry about keeping modules up to date. With Cloud Shell, you just open your browser and sign in. Just like that, you have access to a command-line environment fully connected with your account's permissions and the resources to which you have access. All that works in an infrastructure that's compliant with double encryption at rest by default. You don't need to take any further action! | ||
|
||
Azure Cloud Shell also provides cloud storage to persist files such as SSH keys, scripts, and more. This functionality lets you access important files in between sessions and with different machines. Finally, you can use the Cloud Shell editor to make changes to files, such as scripts, that are saved into this cloud storage directly from the Cloud Shell interface. | ||
|
||
## How does Azure Cloud Shell work? | ||
|
||
You have a few different options for accessing Azure Cloud Shell: | ||
|
||
* From a direct link. | ||
* From the Azure portal. | ||
* A screenshot of Cloud Shell accessed from Azure portal. | ||
|
||
When you open a Cloud Shell session, a temporary host is allocated to your session. This VM is preconfigured with the latest versions of PowerShell and Bash. You can then select the command-line experience you want to use: | ||
|
||
* PowerShell | ||
* Bash | ||
|
||
Cloud Shell sessions terminate after 20 minutes of inactivity. When a session terminates, files on your CloudDrive are persisted, but you need to start a new session to access the Cloud Shell environment. | ||
|
||
### Access your own scripts and files | ||
|
||
When using Cloud Shell, you might also need to run scripts or use files for different actions. You can persist files on Cloud Shell by using the Azure CloudDrive. | ||
|
||
After uploading files, you can interact with them as you would in a regular PowerShell or Bash session. | ||
|
||
Now that your file resides on CloudDrive, you can close the session and open another session on a different device and still access the same file. Cloud Shell also lets you map an Azure Storage File Share, which is tied to a specific region. Access to an Azure File Share lets you work with the contents of that share through Cloud Shell. | ||
|
||
If you need to edit scripts hosted on the CloudDrive or File Share, you can use the Cloud Shell editor. | ||
|
||
### Cloud Shell tools | ||
|
||
If you need to manage resources (such as Docker containers or Kubernetes Clusters) or want to use non-Microsoft tools (such as Ansible and Terraform) in Cloud Shell, the Cloud Shell session comes with these add-ons already preconfigured. | ||
|
||
## When should you use Azure Cloud Shell? | ||
|
||
You can use Azure Cloud Shell to: | ||
|
||
* Open a secure command-line session from any browser-based device. | ||
* Interact with Azure resources without the need to install plug-ins or add-ons to your device. | ||
* Persist files between sessions for later use. | ||
* Use either Bash or PowerShell, whichever you prefer, to manage Azure resources. | ||
* Edit files (such as scripts) via the Cloud Shell editor. | ||
|
||
You shouldn't use Azure Cloud Shell if: | ||
|
||
* You intend to leave a session open for more than 20 minutes for long running scripts or activities. In these cases, your session is disconnected without warning, and the current state is lost. | ||
* You need admin permissions, such as sudo access, from within the Azure CLI or PowerShell environment. | ||
* You need to install tools that aren't supported in the limited Cloud Shell environment, but instead require an environment such as a custom virtual machine or container. | ||
* You need storage from different regions. You might need to back up and synchronize this content since only one region can have the storage allocated to Azure Cloud Shell. | ||
* You need to open multiple sessions at the same time. Azure Cloud Shell allows only one instance at time and isn't suitable for concurrent work across multiple subscriptions or tenants. |
43 changes: 43 additions & 0 deletions
43
...-104--Administrator/ms-learn/prerequisites-for-azure-admin--03-intro-to-bash.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Introduction to Bash | ||
|
||
Bash is a vital tool for managing Linux machines. The name is short for "Bourne Again Shell." | ||
|
||
A shell is a program that commands the operating system to perform actions. You can enter commands in a console on your computer and run the commands directly, or you can use scripts to run batches of commands. Shells like PowerShell and Bash give system administrators the power and precision they need for fine-tuned control of the computers they're responsible for. | ||
|
||
There are other Linux shells, including csh and zsh, but Bash has become the de facto Linux standard. That's because Bash is compatible with Unix's first serious shell, the Bourne shell, also known as sh. Bash incorporates the best features of its predecessors. But Bash also has some fine features of its own, including built-in commands and the ability to invoke external programs. | ||
|
||
One reason for Bash's success is its simplicity. Bash, like the rest of Linux, is based on the Unix design philosophy. As Peter Salus summarized in his book A Quarter Century of Unix, three of the "big ideas" embodied in Unix are: | ||
|
||
* Programs do one thing and do it well | ||
* Programs work together | ||
* Programs use text streams as the universal interface | ||
|
||
The last part is key to understanding how Bash works. In Unix and Linux, everything is a file. That means you can use the same commands without worrying about whether the I/O stream — the input and output — comes from a keyboard, a disk file, a socket, a pipe, or another I/O abstraction. | ||
|
||
## Bash Fundamentals | ||
|
||
The full syntax for a Bash command is: | ||
|
||
```bash | ||
command [options] [arguments] | ||
``` | ||
|
||
Bash treats the first string it encounters as a command. | ||
|
||
### Get help | ||
|
||
Which options and arguments can be used, or must be used, varies from command to command. Fortunately, Bash documentation is built into the operating system. Help is never more than a command away. To learn about the options for a command, use the `man` (for "manual") command. For instance, to see all the options for the `mkdir` ("make directory") command, do this: | ||
|
||
```bash | ||
man mkdir | ||
``` | ||
|
||
`man` will be your best friend as you learn Bash. `man` is how you find the information you need to understand how any command works. | ||
|
||
### Use wildcards | ||
|
||
Wildcards are symbols that represent one or more characters in Bash commands. The most frequently used wildcard is the asterisk. It represents zero characters or a sequence of characters. Suppose your current directory contains hundreds of image files, but you only want to see the PNG files; the ones whose file names end with .png. Here's the command to list only those files: | ||
|
||
```bash | ||
ls *.png | ||
``` |