Hands-On Linux Administration on Azure

Book description

Learn to efficiently run Linux-based workloads in Azure

Key Features

  • Manage and deploy virtual machines in your Azure environment
  • Explore various open source tools to integrate automation and orchestration
  • Leverage Linux features to create, run, and manage containers

Book Description

Azure's market share has increased massively and enterprises are adopting it rapidly. Linux is a widely-used operating system and has proven to be one of the most popular workloads on Azure. It has become crucial for Linux administrators and Microsoft professionals to be well versed with the concepts of managing Linux workloads in an Azure environment.

Hands-On Linux Administration on Azure starts by introducing you to the fundamentals of Linux and Azure, after which you will explore advanced Linux features and see how they are managed in an Azure environment. Next, with the help of real-world scenarios, you will learn how to deploy virtual machines(VMs) in Azure, along with extending Azure VMs capabilities and managing them efficiently. You will then understand continuous configuration automation and use Ansible, SaltStack and Powershell DSC for orchestration. As you make your way through the chapters, you will understand containers and how they work, along with managing containers and the various tasks you can perform with them. In the concluding chapters, you will cover some Linux troubleshooting techniques on Azure, and you will also be able to monitor Linux in Azure using different open source tools.

By the end of this book, you will be able to administer Linux on Azure and make the most of the important tools required for deployment.

What you will learn

  • Understand why Azure is the ideal solution for your open source workloads
  • Master essential Linux skills and learn to find your way around the Linux environment
  • Deploy Linux in an Azure environment
  • Use configuration management to manage Linux in Azure
  • Manage containers in an Azure environment
  • Enhance Linux security and use Azure's identity management systems
  • Automate deployment with Azure Resource Manager (ARM) and Powershell
  • Employ Ansible to manage Linux instances in an Azure cloud environment

Who this book is for

Hands-On Linux Administration on Azure is for Linux administrators and Microsoft professionals that need to deploy and manage their workloads in Azure. Prior knowledge of Linux and Azure isn't necessary.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Linux Administration on Azure
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Exploring the Azure Cloud
    1. Fundamentals of cloud computing
      1. Virtualization
      2. Software-Defined Datacenter
      3. SOA
      4. Cloud services
      5. Cloud types
    2. Understanding the Azure Cloud
      1. A small history of the Azure Cloud
      2. Azure architecture
      3. Azure in your organization
      4. Azure and open source
    3. Summary
    4. Questions
    5. Further reading
  7. Getting Started with the Azure Cloud
    1. Technical requirements
    2. Getting access to Azure
      1. Logging in using the Azure portal
      2. Getting command-line access to Azure
      3. Installing the Azure command-line interface
      4. Logging in with the Azure CLI
      5. PowerShell
      6. Logging in with PowerShell
      7. Azure Resource Manager
    3. Linux and Azure
      1. Linux distributions
      2. Microsoft-endorsed Linux distributions
    4. Deploying a Linux virtual machine
      1. Your first virtual machine
      2. Images
      3. Image sizing
      4. Virtual machine networking
      5. Virtual machine information
    5. Connecting to Linux
      1. Logging in to your Linux VM using password authentication 
      2. Logging in to your Linux VM with an SSH private key 
    6. Summary
    7. Questions
    8. Further reading
  8. Basic Linux Administration
    1. The Linux shell
      1. Executing commands
      2. Command-line editing
      3. Working with history
      4. Auto-completion
      5. Globbing
      6. Redirections
      7. Working with variables
      8. Bash configuration files 
    2. Getting help
      1. Using the man-pages
      2. Using info documents
      3. Other documentation
    3. Working with text files
      1. Reading text
      2. Searching in text files
      3. Editing text files
    4. Finding your way in the filesystem
      1. File hierarchy system
      2. Mounting filesystems
      3. Finding files on the filesystem
    5. Process management
      1. View processes
      2. Sending signals to a process
    6. Discretionary Access Control
      1. User management
      2. Group management
      3. Login management
    7. Summary
    8. Questions
    9. Further reading
  9. Managing Azure
    1. Technical requirements
    2. Storage services
      1. Storage accounts
      2. Managed disks
      3. Azure Files
      4. Blob storage
    3. Networking
      1. Virtual network
      2. Subnets
      3. Network Security Group
      4. Public IP address and network interface
    4. Components for your virtual machine
      1. Azure profile
      2. Resource group
      3. Storage account
      4. Virtual network
      5. NSG
      6. Public IP address and network interface
    5. Summary
    6. Questions
    7. Further reading
  10. Advanced Linux Administration
    1. Technical requirements
    2. Software management
      1. The RPM software manager
      2. The DPKG software manager
      3. Software management with YUM
      4. Software management with Zypp
      5. Software management with apt
    3. Networking
      1. Identifying the network interfaces
      2. Identifying the IP address 
      3. Showing the route table
      4. Network configuration
      5. Changes in the network configuration
      6. Hostname
      7. DNS
    4. Storage
      1. Storage provided by block devices
      2. Adding a data disk
      3. Partitioning
      4. Filesystems in Linux
        1. Ext4 filesystem
        2. XFS filesystem
        3. ZFS filesystem
        4. BTRFS filesystem
        5. Swap filesystem
      5. Linux software RAID
    5. Systemd
      1. Working with units
      2. Services
      3. Targets
      4. Scheduled tasks
      5. Mounting local filesystems
      6. Mounting remote filesystems
    6. Summary
    7. Questions
    8. Further reading
  11. Managing Linux Security and Identities
    1. Linux security tips
    2. Technical requirements
    3. Linux firewall
      1. Firewalld zones
      2. Firewalld services
      3. Firewalld network sources
    4. Linux Security Modules
      1. SELinux
        1. SELinux configuration
        2. SELinux context on ports
        3. SELinux context on files
        4. SELinux Boolean
      2. AppArmor
      3. AppArmor status
      4. Generating AppArmor profiles
    5. Systemd security
      1. Restricting access to the filesystem
      2. Restricting network access
    6. Azure Active Directory Domain Service
      1. Setting up AADS
      2. Linux configuration
        1. NTP configuration
        2. Hostname
        3. DNS servers
        4. Installing dependencies
        5. Joining the domain – Ubuntu and RHEL/CentOS
        6. Joining the domain – SUSE
    7. Summary
    8. Questions
    9. Further reading
  12. Deploying Your Virtual Machines
    1. Deployment scenarios
      1. What do you need?
    2. Automated deployment options
      1. Scripting
      2. Azure Resource Manager
    3. Initial configuration
      1. Initial configuration with the Custom Script Extension
      2. Initial configuration with cloud-init
    4. Vagrant and Packer
      1. Installing and configuring Vagrant
      2. Deploying a virtual machine with Vagrant
      3. Vagrant provisioners
      4. Packer (part 1)
        1. Installing and configuring Packer
    5. Custom images and VHDs
      1. Creating a managed image
      2. Alternative method using snapshots
      3. Packer (part 2)
      4. Custom VHDs
    6. Summary
    7. Questions
    8. Further reading
  13. Exploring Continuous Configuration Automation
    1. Technical requirements
    2. Ansible
      1. Installation of Ansible
      2. SSH configuration
      3. Bare-minimum configuration
      4. Inventory file
      5. Ansible playbooks and modules
      6. Conditionals – when statement
      7. Loops
      8. Handlers
      9. Working with variables
      10. Working with templates
      11. Authenticating to Microsoft Azure
      12. Resource group
      13. Virtual machine
      14. Azure inventory management in Ansible
    3. SaltStack
      1. Some Salt terminology
      2. SaltStack installation
      3. Authorization
      4. Execution modules
      5. Salt states
      6. Top file
      7. Salt grains
      8. State conditions
      9. Working with variables and templates
      10. Integration with Azure
    4. PowerShell desired state configuration
      1. Azure automation DSC
      2. Automation account
      3. Installing PowerShell DSC on Linux
      4. Creating a desired state
      5. PowerShell DSC Resources
      6. Applying the resources in Azure
    5. Other solutions
    6. Summary
    7. Questions
    8. Further reading 
  14. Container Virtualization in Azure
    1. History of containers
      1. Chroot environment
      2. OpenVZ
      3. LXC 
    2. Systemd-nspawn
      1. Creating a container with debootstrap 
      2. Creating a container with yum
      3. systemd-firstboot
      4. Deploying the first container
      5. Enabling a container at boot time
    3. Rkt
      1. Getting started with Rkt
      2. Creating Rkt images with acbuild
      3. Creating Rkt images with Buildah
    4. Docker
      1. Docker installation
      2. Building Docker images
      3. Docker Machine
      4. Docker Compose
      5. Azure container instances 
      6. Docker registry
      7. Azure container registry
    5. Containers and storage
    6. Summary
    7. Questions
    8. Further reading 
  15. Working with Azure Kubernetes Service
    1. Technical requirements
      1. Installing dependencies
      2. Minikube
    2. Starting to use AKS
      1. Creating a cluster with the Azure CLI
      2. Creating a cluster with PowerShell
      3. First deployment in AKS
      4. Creating services
      5. Multicontainer pods
    3. Working with Helm
      1. Installing Helm
      2. Helm repository management
      3. Installing applications with Helm
      4. Creating Helm charts
    4. Working with Draft
      1. Installing Draft
      2. Using Draft
    5. Managing Kubernetes
      1. Updating applications
      2. Scaling applications
      3. Upgrading Kubernetes
    6. Persistent storage
      1. Azure Disk for Kubernetes
      2. Azure File for Kubernetes
    7. Summary
    8. Questions
    9. Further reading
  16. Troubleshooting and Monitoring Your Workloads
    1. Technical requirements
    2. Accessing your system
      1. No remote access
      2. Knocking on the port
      3. Boot diagnostics
    3. Logging in Linux
      1. Working with journalctl
      2. Filters
      3. Filtering based on fields
      4. Database persistence
      5. Syslog protocol
      6. Adding log entries
      7. Integrating journald with RSYSLOG
      8. Other log files
    4. Microsoft Log Analytics
      1. Configuring the Log Analytics service
      2. Installing the OMS agent
      3. Getting the data
      4. Log Analytics and Kubernetes
      5. Log Analytics for your network
    5. Performance monitoring
      1. Displaying Linux processes with top
      2. Top alternatives
      3. Sysstat – a collection of performance-monitoring tools
      4. dstat
      5. Network stats with iproute2
      6. Network monitoring with IPTraf-NG
      7. tcpdump
    6. Summary
    7. Questions
    8. Further reading
  17. Assessments
    1. Chapter 1: Exploring the Azure Cloud
    2. Chapter 2: Getting Started with the Azure Cloud
    3. Chapter 3: Basic Linux Administration
    4. Chapter 4: Managing Azure
    5. Chapter 5: Advanced Linux Administration
    6. Chapter 6: Managing Linux Security and Identities
    7. Chapter 7: Deploying Your Virtual Machines
    8. Chapter 8: Exploring Continuous Configuration Automation
    9. Chapter 9: Container Virtualization in Azure
    10. Chapter 10: Working with the Azure Kubernetes Service
    11. Chapter 11: Troubleshooting and Monitoring Your Workloads
  18. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Hands-On Linux Administration on Azure
  • Author(s): Frederik Vos
  • Release date: August 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789130966