Hands-On Azure for Developers

Book description

Gain practical skills with Azure and understand how to start developing scalable and easy-to-maintain cloud applications

Key Features

  • Get up and running with the development aspects of Azure cloud
  • Build fault-tolerant and scalable applications on Azure
  • A practical, developer-centric guide for Azure developers

Book Description

Microsoft Azure is one of the fastest growing public cloud service providers in the market currently, and also holds the second highest market share after AWS. Azure has a sophisticated set of services that will help you build fault-tolerant and scalable cloud-based applications.

Hands-On Azure for Developers will take you on a journey through multiple PaaS services available in Azure, including App Services, Functions, and Service Fabric, and explain in detail how to build a complete and reliable system with ease. You will learn about how to maximize your skills when building cloud-based solutions leveraging different SQL/NoSQL databases, serverless and messaging components, and even search engines such as Azure Search. In the concluding chapters, this book covers more advanced scenarios such as scalability best practices, serving static content with Azure CDN, and distributing loads with Azure Traffic Manager.

By the end of the book, you will be able to build modern applications on the Azure cloud using the most popular and promising technologies, which will help make your solutions reliable, stable, and efficient.

What you will learn

  • Implement serverless components such as Azure functions and logic apps
  • Integrate applications with available storages and containers
  • Understand messaging components, including Azure Event Hubs and Azure Queue Storage
  • Gain an understanding of Application Insights and other proper monitoring solutions
  • Store your data with services such as Azure SQL and Azure Data Lake Storage
  • Develop fast and scalable cloud applications

Who this book is for

Hands-On Azure for Developers is for developers who want to build highly scalable cloud-based applications on Azure. Prior knowledge of Azure services will be an added advantage.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Azure for Developers
  3. Dedication
  4. About Packt
    1. Why subscribe?
    2. Packt.com
  5. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  6. 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
  7. Azure App Service
    1. Technical requirements
    2. Creating and deploying Azure App Service
      1. Creating Azure App Service using the Azure Portal
        1. Selecting Azure Web App from available services
        2. Configuring an Azure web app
          1. Creating an App Service Plan
      2. Creating an Azure App Service using Visual Studio
      3. Deploying Azure App Service using FTP
        1. Deploying Azure App Service with user-level credentials
        2. Deploying Azure App Service using app-level credentials
          1. Downloading app-level credentials from the Azure Portal
          2. Configuring WebDeploy in Visual Studio
      4. Creating Azure App Services using Visual Studio Code
    3. Working with different operating systems and platforms
      1. Selecting an operating system
      2. Selecting different platforms
        1. Working with application settings
    4. Different App Service Plans and features
      1. Dev/Test App Service Plans
      2. Production App Service Plans
      3. Isolated App Service Plans
    5. Securing App Services using different security providers
      1. Configuring authentication/authorization in the Azure Portal
        1. Using Azure Active Directory to secure App Services
        2. Using other authentication providers
    6. Diagnostics and monitoring of App Services
      1. The Overview blade
      2. Metrics
      3. Monitoring
    7. Summary
    8. Questions
    9. Further reading
  8. Azure WebJobs
    1. Technical requirements
    2. Creating WebJobs
      1. Creating and deploying WebJobs in Azure Portal
        1. Creating an application in Visual Studio
        2. Deploying a WebJob in the Azure Portal
      2. Deploying WebJobs from Visual Studio
      3. Working with the WebJobs SDK
        1. Calling a job manually
        2. Automatic triggers in WebJobs
        3. Publish a job
      4. Azure WebJobs limitations
    3. Using different file types for WebJobs
      1. Creating and deploying a Node.js application as a WebJob
      2. Deploying a Node.js Azure WebJob from Visual Studio Code
    4. Summary
    5. Questions
    6. Further reading
  9. Deploying Web Applications as Containers
    1. Technical requirements
    2. Working with AKS
      1. Preparing an application
      2. Container Registry and Kubernetes clusters
        1. Pushing a Docker image to Azure Container Registry
        2. Creating a Kubernetes cluster using AKS
      3. Running, scaling, and updating an application in AKS
        1. Solving problems with authentication
        2. Scaling a cluster
        3. Updating an application
    3. Azure Container Instances
      1. Creating and deploying an application and container
        1. Pushing an image to Azure Container Registry
        2. Deploying an application to ACI
    4. Web App for Containers
      1. Creating a web app hosted in a container
      2. Deploying a custom application
    5. Summary
    6. Questions
    7. Further reading
  10. Distributed Applications and Microservices with Service Fabric
    1. Technical requirements
    2. Understanding microservices
      1. Monolith versus microservices
      2. Microservice approach
        1. Using different languages and frameworks
        2. Scaling and updating services individually
        3. Using well-designed interfaces and protocols
        4. Dealing with state
        5. Diagnosing and monitoring microservices
    3. Containers, services, and actors in SF
      1. Containers
        1. Creating a cluster
        2. Deploying a container
        3. Packaging a service
      2. Reliable services
        1. Creating a SF application
        2. Deploying an application to the cloud
      3. Reliable actors
        1. Creating a project with actors
        2. Creating an actor's client
    4. Communication between services
      1. Creating a communication channel
    5. Clusters in SF
      1. Cluster security
        1. Node-to-node security
        2. Client-to-node security
      2. Scaling
        1. Scaling a cluster up or down
    6. Monitoring and diagnostics
      1. Application monitoring
      2. Cluster monitoring
      3. Health monitoring
    7. Summary
    8. Questions
    9. Further reading
  11. Using Azure Search
    1. Technical requirements
    2. Creating an Azure Search service
      1. Using Azure Portal
    3. Full-text search in Azure Search
      1. Sending a request
    4. Linguistic analysis in full-text search
      1. Analyzers in Azure Search
        1. Analyzer selection
    5. Indexing in Azure Search
      1. Importing more data
        1. Push model
        2. Pull model
    6. Cognitive search – adding AI to the indexing workload
      1. Configuring Cognitive Search
    7. Summary
    8. Questions
    9. Further reading
  12. Mobile Notifications with Notification Hub
    1. Technical requirements
    2. Reasons to use Notification Hub
      1. Challenges for application design
    3. Push notification architecture
      1. Direct connection
      2. Queued communication
      3. Triggered communication
    4. Registering devices in Notification Hub
      1. Notification Hub device registration
        1. Creating a Notification Hub
        2. Registering in an application
        3. Checking available registrations
        4. Using installations
    5. Sending a notification
      1. Sending a test notification
        1. Test notification in Azure Portal
        2. Test notification in the SDK
      2. Using the SDK to send a notification
    6. Rich content notifications
      1. Creating and sending a rich content notification
    7. Summary
    8. Questions
    9. Further reading
  13. Serverless and Azure Functions
    1. Technical requirements
    2. Understanding Azure Functions
      1. Being "serverless"
        1. Responsibilities of cloud vendors
        2. Pricing model
      2. Azure Functions concepts
        1. Function app
        2. Functions
        3. Triggers and bindings
        4. Pricing models
      3. Scaling
        1. Scaling in the consumption model
        2. Scaling in the App Service model
    3. Configuring the local environment for developing Azure Functions
      1. Starting with Azure Functions locally
    4. Creating a function
      1. Using Visual Studio
      2. Using Azure Portal
    5. Azure Functions features
      1. Platform features
      2. Security
      3. Monitor
      4. Host.json
      5. Publish
    6. Workflow in Azure Functions – Durable Functions
      1. Orchestrations and activities
      2. Orchestration client
      3. Orchestration history
      4. Timers
      5. External events
    7. Integrating functions with other services
      1. Function file
      2. Input/output bindings
      3. Custom bindings
    8. Summary
    9. Questions
    10. Further reading
  14. Integrating Different Components with Logic Apps
    1. Technical requirements
    2. What is Azure Logic Apps?
      1. Azure Logic Apps – how it works
      2. Azure Logic Apps – advantages
    3. Connectors for Logic Apps
      1. Connector types
        1. Built-in connectors
        2. Managed API connectors
        3. On-premises connectors
        4. Integration account connectors and enterprise connectors
    4. Creating Logic Apps and integrating services
      1. Creating Logic Apps in Azure Portal
      2. Working with Azure Logic Apps in Visual Studio
    5. B2B integration
      1. Starting B2B integration in Azure Logic Apps
    6. Summary
    7. Questions
    8. Further reading
  15. Swiss Army Knife - Azure Cosmos DB
    1. Technical requirements
    2. Understanding Cosmos DB
      1. Creating a Cosmos DB instance in the portal
      2. Using Azure Cosmos DB in Visual Studio
      3. Pricing in Azure Cosmos DB
    3. Partitioning, throughput, and consistency
      1. Partitions in Azure Cosmos DB
      2. Throughput in Azure Cosmos DB
      3. Consistency in Azure Cosmos DB
    4. CosmosDB data models and APIs
      1. SQL
      2. MongoDB
      3. Graph
      4. Table
      5. Cassandra
    5. Different features of CosmosDB
      1. Account level throughput
      2. Database level throughput
      3. Firewall and virtual networks
      4. Azure Functions
      5. Stored procedures
      6. User-defined functions and triggers
    6. Summary
    7. Questions
    8. Further reading
  16. Reactive Architecture with Event Grid
    1. Technical requirements
    2. Azure Event Grid and reactive architecture
      1. Reactive architecture
      2. Topics and event subscriptions
        1. Event sources
        2. Event handlers
        3. Topics and subscriptions
    3. Connecting services through Azure Event Grid
      1. Creating Azure Event Grid in Azure Portal
      2. Azure Event Grid security
      3. Creating a subscription
    4. Publishing custom events to Azure Event Grid
      1. Event gateway concept
      2. Handling a custom event
    5. Integrating Azure Functions with Azure Event Grid
      1. EventGridTrigger in Azure Functions
      2. Testing Azure Event Grid and Azure Functions
    6. Summary
    7. Questions
    8. Further reading
  17. Using Azure Storage - Tables, Queues, Files, and Blobs
    1. Technical requirements
    2. Using Azure Storage in a solution
      1. Different Azure Storage services
      2. Different types of storage account
      3. Securing Azure Storage
      4. Replication
    3. Storing data with Azure Storage Tables
      1. Creating an Azure Storage service
      2. Managing Table Storage
      3. Storing data in Table Storage
        1. PartitionKey
        2. RowKey
        3. Timestamp
        4. General rules for entities
      4. Querying data in Table Storage
      5. Table API in Azure Cosmos DB
    4. Implementing fully managed file shares with Azure Files
      1. Azure Files concepts
      2. Working with Azure Files
      3. Blob Storage versus Azure Files
    5. Queues in Azure Queue Storage
      1. Queue Storage features
      2. Developing an application using Queue Storage
    6. Object storage solution – Azure Storage Blobs
      1. Blob Storage concepts
      2. Inserting data into Blob Storage
      3. Containers and permissions
      4. Blob Storage: additional features
    7. Summary
    8. Questions
    9. Further reading
  18. Big Data Pipeline - Azure Event Hub
    1. Technical requirements
    2. Azure Event Hub service and concepts
      1. Azure Event Hub concepts
      2. Azure Event Hub durability
    3. Working with Azure Event Hub
      1. Creating an Azure Event Hub in the Azure portal
      2. Working with Azure Event Hub in the portal
      3. Developing applications with Azure Event Hub
    4. Azure Event Hub security
      1. Event publishers
      2. IP filters
    5. Azure Event Hub Capture feature
      1. How Azure Event Hub Capture works
      2. Enabling Event Hub Capture
    6. Summary
    7. Questions
    8. Further reading
  19. Real-Time Data Analysis - Azure Stream Analytics
    1. Technical requirements
    2. Azure Stream Analytics introduction
      1. Stream ingestions versus stream analysis
      2. Azure Stream Analytics concepts
    3. Input and output types
      1. Create Azure Stream Analytics in Azure portal
        1. Adding an input
        2. Adding an output
    4. Azure Stream Analytics query language
      1. Writing a query
    5. Event ordering, checkpoints, and replays
      1. Event ordering
      2. Checkpoints and replays
    6. Summary
    7. Questions
    8. Further reading
  20. Enterprise Integration - Azure Service Bus
    1. Technical requirements
    2. Azure Service Bus fundamentals
      1. Azure Service Bus versus other messaging services
      2. Azure Service Bus and Azure Storage Queues
      3. Azure Service Bus in Azure portal
      4. Queues, topics, and relays
        1. Queues
        2. Topics
        3. Relays
      5. Azure Service Bus design patterns
      6. Developing solutions with Azure Service Bus SDK
    3. Azure Service Bus security
      1. Managed Service Identity
      2. RBAC
    4. Advanced features of Azure Service Bus
      1. Dead lettering
      2. Sessions
      3. Transactions
    5. Handling outages and disasters
      1. Disaster recovery
      2. Handling outages
    6. Summary
    7. Questions
    8. Further reading
  21. Using Application Insights to Monitor Your Applications
    1. Technical requirements
    2. Using the Application Insights service
      1. Logging data in the cloud
      2. Azure Application Insights fundamentals
      3. Creating Azure Application Insights in the portal
    3. Monitoring different platforms
      1. .NET
      2. Node.js
      3. Azure Functions
    4. Analytics module
      1. Accessing the Analytics module
    5. Application Insights automation
      1. Alerts
    6. Summary
    7. Questions
    8. Further reading
  22. SQL in Azure - Azure SQL
    1. Technical requirements
    2. Differences between Microsoft SQL Server and Azure SQL
      1. Azure SQL fundamentals
      2. Advanced Azure SQL features
      3. SQL Server on VMs
    3. Creating and configuring Azure SQL
      1. Creating an Azure SQL instance
      2. Azure SQL features in the portal
    4. Security
      1. Firewall
      2. Advanced Threat Protection
      3. Auditing
      4. Dynamic Data Masking
    5. Scaling Azure SQL
      1. Single database
      2. Elastic pool
      3. Read scale-out
      4. Sharding
    6. Monitoring and tuning
      1. Monitoring
      2. Tuning
    7. Summary
    8. Questions
    9. Further reading
  23. Big Data Storage - Azure Data Lake
    1. Technical requirements
    2. Understanding Azure Data Lake Store
      1. Azure Data Lake Store fundamentals
      2. Creating an Azure Data Lake Store instance
    3. Storing data in Azure Data Lake Store
      1. Using the Azure portal to navigate
        1. Filter
        2. New folder
        3. Upload
        4. Access
        5. Files and folders
      2. Microsoft Azure Storage Explorer
      3. Using SDKs
    4. Security
      1. Authentication and authorization
        1. RBAC
        2. POSIX ACL
      2. Network isolation
    5. Best practices
      1. Performance
      2. Security
      3. Resiliency
      4. Data structure
    6. Summary
    7. Questions
    8. Further reading
  24. Scaling Azure Applications
    1. Technical requirements
    2. Autoscaling, scaling up, scaling out
      1. Autoscaling
      2. Scaling up and scaling out
    3. Scaling Azure App Services
      1. Manual scaling
      2. Autoscaling
    4. Scaling Azure Functions
      1. Scaling serverless applications
      2. Scaling Azure Functions
    5. Scaling Azure Service Fabric
      1. Scaling a cluster manually
      2. Using Azure SDK to scale your cluster
    6. Summary
    7. Questions
    8. Further reading
  25. Serving Static Content Using Azure CDN
    1. Technical requirements
    2. Azure CDN fundamentals
      1. Working with CDNs
      2. Creating an Azure CDN in the portal
    3. Optimization and caching
      1. Configuring the endpoint
        1. Compression
        2. Caching rules
        3. Geo-filtering
    4. Developing applications with Azure CDN
      1. Configuring Azure App Service with Azure CDN
    5. Summary
    6. Questions
    7. Further reading
  26. Distributing Load with Azure Traffic Manager
    1. Technical requirements
    2. Azure Traffic Manager fundamentals
      1. Functions of Azure Traffic Manager
      2. Creating Azure Traffic Manager in the Azure portal
        1. Routing method – performance
        2. Routing method – weighted
        3. Routing method – priority
        4. Routing method – geographic
        5. Routing method – MultiValue
        6. Routing method – subnet
      3. Working with Azure Traffic Manager in the Azure Portal
        1. Configuration
        2. Real user measurements
        3. Endpoints
    3. Monitoring
      1. Nslookup
      2. Traffic view
    4. Summary
    5. Questions
    6. Further reading
  27. Tips and Tricks for Azure
    1. Technical requirements
    2. The Azure CLI and Cloud Shell
      1. The Azure CLI
      2. Cloud Shell
    3. Locks
      1. Creating and managing locks
    4. Naming conventions
      1. Finding the best naming convention
    5. Resources in Azure
      1. Azure Resource Explorer
    6. Summary
    7. Questions
    8. Further reading
  28. Assessments
    1. Chapter 1: Azure App Service
    2. Chapter 2: Azure WebJobs
    3. Chapter 3: Deploying Web Applications as Containers
    4. Chapter 4: Distributed Applications and Microservices with Service Fabric
    5. Chapter 5: Using Azure Search
    6. Chapter 6: Mobile Notifications with Notification Hub
    7. Chapter 7: Serverless and Azure Functions
    8. Chapter 8: Integrating Different Components with Logic Apps
    9. Chapter 9: Swiss Army Knife – CosmosDB
    10. Chapter 10: Reactive Architecture with Event Grid
    11. Chapter 11: Using Azure Storage – Tables, Queues, Files, and Blobs
    12. Chapter 12: Big Data Pipeline – Azure Event Hub
    13. Chapter 13: Real-Time Data Analysis – Azure Stream Analytics
    14. Chapter 14: Enterprise Integration – Azure Service Bus
    15. Chapter 15: Using Application Insights to Monitor Your Applications
    16. Chapter 16: SQL in Azure – Azure SQL
    17. Chapter 17: Big Data Storage – Azure Data Lake
    18. Chapter 18: Scaling Azure Applications
    19. Chapter 19: Serving Static Content Using Azure CDN
    20. Chapter 20: Distributing Load with Azure Traffic Manager
    21. Chapter 21: Tips and Tricks for Azure
  29. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Hands-On Azure for Developers
  • Author(s): Kamil Mrzyglod
  • Release date: November 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789340624