Hands-on Linux administration on Azure : develop, maintain, and automate applications on the Azure cloud platform

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Thanks to its flexibility in delivering scalable cloud solutions, Microsoft Azure is a suitable platform for managing all your workloads. You can use it to implement Linux virtual machines and containers, and to create applications in open source languages with open APIs. This Linux administration book first takes you through the fundamentals of Linux and Azure to prepare you for the more advanced Linux features in later chapters. With the help of real-world examples, you’ll learn how to deploy virtual machines (VMs) in Azure, expand their capabilities, and manage them efficiently. You will manage containers and use them to run applications reliably, and in the concluding chapter, you'll explore troubleshooting techniques using a variety of open source tools. By the end of this book, you'll be proficient in administering Linux on Azure and leveraging the tools required for deployment.

Author(s): Frederik Vos; Rithin Skaria; Kamesh Ganesan
Edition: Second
Publisher: Packt Publishing
Year: 2020

Language: English

Cover
FM
Table of Contents
Preface
Chapter 1: Exploring the Microsoft Azure Cloud
Fundamentals of Cloud Computing
Virtualization
SDDC
SOA
Cloud Services
Cloud Types
Understanding the Microsoft Azure Cloud
A Brief History of the Microsoft Azure Cloud
Azure Architecture
Azure in Your Organization
Azure and Open Source
Summary
Questions
Further Reading
Chapter 2: Getting Started with the Azure Cloud
Technical Requirements
Getting Access to Azure
Logging in Using the Azure portal
Getting Command-line Access to Azure
Installing the Azure CLI
Logging in with the Azure CLI
PowerShell
Logging in with PowerShell
Azure Resource Manager
Linux and Azure
Linux distributions
Microsoft-endorsed Linux Distributions
Deploying a Linux Virtual Machine
Your First Virtual Machine
Images
Virtual Machine Sizing
Virtual Machine Networking
Virtual Machine Information
Connecting to Linux
Logging into Your Linux virtual machine Using Password Authentication
Logging into your Linux Virtual Machine with an SSH private key
Summary
Questions
Further Reading
Chapter 3: Basic Linux Administration
The Linux Shell
Executing Commands
Command-line Editing
Working with history
Autocompletion
Globbing
Redirections
Working with Variables
Bash Configuration Files
Getting Help
Using the man pages
Using info Documents
Other Documentation
Working with Text Files
Reading Text
Searching in Text Files
Editing Text Files
Finding Your Way in the Filesystem
The Filesystem Hierarchy Standard
Mounting Filesystems
Finding Files on the Filesystem
Process Management
View Processes
Sending Signals to a Process
Discretionary Access Control
User Management
Group Management
Login Management
Summary
Questions
Further Reading
Chapter 4: Managing Azure
Managing Azure Resources Using the Azure CLI and PowerShell
Technical Requirements
Managing Storage Resources
Storage Accounts
Managed Disks
Azure Files
Azure Blob
Managing Network Resources
Virtual Network
Subnets
Network Security Group
Public IP Address and Network Interface
Managing Compute Resources
Virtual Machine Resources
Azure Profile
Resource Group
Storage Account
Virtual Networks
Network Security Group
Public IP Address and Network Interface
Summary
Questions
Further Reading
Chapter 5: Advanced Linux Administration
Technical Requirements
Software Management
The RPM Software Manager
Software Management with YUM
Software Management with DNF
The DPKG Software Manager
Software Management with apt
Software Management with ZYpp
Networking
Identifying the Network Interfaces
Identifying the IP Address
Showing the Route Table
Network Configuration
Changes in the Network Configuration
Hostname
DNS
Storage
Storage Provided by Block Devices
Adding a Data Disk
Partitioning
Filesystems in Linux
The ext4 Filesystem
The XFS Filesystem
The ZFS Filesystem
Linux Software RAID
Stratis
systemd
Working with Units
Services
Targets
Scheduled Tasks
Mounting Local Filesystem
Mounting Remote Filesystem
Summary
Questions
Further Reading
Chapter 6: Managing Linux Security and Identities
Linux Security Tips
Technical Requirements
DAC
Introduction to DAC
File Permissions in Linux
Symbolic Method
Absolute (Numeric) Node
MAC
LSM
SELinux
SELinux Configuration
SELinux Context on Files
SELinux Boolean
AppArmor
AppArmor Status
Generating AppArmor Profiles
firewalld and systemd
firewalld Zones
firewalld Services
firewalld Network Sources
systemd Security
Restricting Access to the Filesystem
Restricting Network Access
Identity and Access Management in Azure – IAM
Azure AD Domain Services
Setting up Azure AD Domain Services
Linux Configuration
Hostname
DNS Servers
Installing Dependencies
Joining the Domain – Ubuntu and RHEL/CentOS
Joining the Domain – SUSE
Logging in with Azure AD Credentials to the Linux VM
Other Security Solutions in Azure
Summary
Questions
Further Reading
Chapter 7: Deploying Your Virtual Machines
Deployment Scenarios
What Do You Need?
Automated Deployment Options in Azure
Scripting
Automated Deployment with Azure Resource Manager
Deploying ARM Templates Using PowerShell
Deploying ARM Templates Using Bash
Initial Configuration
Initial Configuration with the Custom Script Extension
Initial Configuration with cloud-init
Vagrant
Installing and Configuring Vagrant
Deploying a VM with Vagrant
Vagrant Provisioners
Packer
Installing and Configuring Packer
Custom Virtual Machines and VHDs
Creating a Managed Image
An Alternative Method Using Snapshots
Custom VHDs
Summary
Questions
Further Reading
Chapter 8: Exploring Continuous Configuration Automation
Technical Requirements
Understanding Configuration Management
Using Ansible
Installation of Ansible
SSH Configuration
Bare-Minimum Configuration
Inventory File
Ansible Playbooks and Modules
Authenticating to Microsoft Azure
Resource Group
Virtual Machine
Azure Inventory Management in Ansible
Using Terraform
Installation
Authenticating to Azure
Deployment to Azure
Deploying a Virtual Machine
Using PowerShell DSC
Azure Automation DSC
Installing PowerShell DSC on Linux
Creating a Desired State
PowerShell DSC Resources
Azure Policy Guest Configuration
Guest Configuration Extension for Linux
Commands
Other Solutions
Summary
Questions
Further Reading
Chapter 9: Container Virtualization in Azure
Introduction to Container Technology
History of Containers
The chroot Environment
OpenVZ
LXC
systemd-nspawn
Creating a Container with debootstrap
Creating a Container with yum
systemd-firstboot
Deploying the First Container
Enabling a Container at Boot Time
Docker
Docker Installation
Building Docker Images
Docker Machine
Docker Compose
Docker Registry
Azure Container Instances
Azure Container Registry
Using the Azure Portal
Using the Azure CLI
Buildah, Podman, and Skopeo
History
Installation
Buildah
Podman
Skopeo
Containers and Storage
Summary
Questions
Further Reading
Chapter 10: Working with Azure Kubernetes Service
Technical Requirements
Using WSL and VS Code
Installing Dependencies
kubectl Installation
Starting to Use AKS
Creating a Cluster with the Azure CLI
First Deployment in AKS
Creating Services
Multi-Container Pods
Working with Helm
Installing Helm
Helm Repository Management
Installing Applications with Helm
Creating Helm Charts
Working with Draft
Installing Draft
Using Draft
Managing Kubernetes
Updating Applications
Scaling Applications
Upgrading Kubernetes
Persistent Storage
Azure Disk for Kubernetes
Azure Files for Kubernetes
Summary
Questions
Further Reading
Chapter 11: Troubleshooting and Monitoring Your Workloads
Technical Requirements
Accessing Your System
No Remote Access
Working on the Port
Using nftables
Boot Diagnostics
Logging in Linux
Azure Log Analytics
Configuring the Log Analytics Service
Installing the Azure Log Analytics Agent
Getting the Data
Log Analytics and Kubernetes
Log Analytics for Your Network
Performance Monitoring
Displaying Linux processes with top
Top Alternatives
Sysstat – a Collection of Performance-Monitoring Tools
dstat
Network stats with iproute2
Network Monitoring with IPTraf-NG
tcpdump
Summary
Questions
Further Reading
Chapter 12: Appendix
Index