Execute Notebooks everywhere - David Sass - PSConfEU 2024

Описание к видео Execute Notebooks everywhere - David Sass - PSConfEU 2024

In this episode, the speaker, David Sass, a security engineer at Switch, discusses the use of PowerShell notebooks to address the issue of scripts that work on one machine but not on another due to various dependencies. He introduces PowerShell notebooks as a solution that should work universally, even in cloud pipelines. Notebooks were originally created for data science applications, allowing for the combination of data and scripts for analysis across different environments.

David explains that PowerShell notebooks do not rely on user profiles, reducing potential conflicts. They are self-contained solutions that can be easily shared without the need to edit profiles. He highlights the ease of documentation within notebooks and the benefits of having all code and results in one accessible location. Notebooks also run everywhere, as long as the required PowerShell Notebooks module is installed.

The speaker demonstrates the functionality of PowerShell notebooks, showcasing the ability to switch between editing and viewing modes, executing code cells, and maintaining session information even after closing and reopening the notebook. He warns against editing system profile files and explains the usage of notebook-scoped variables for maintaining session continuity.

David discusses the prerequisites for working with PowerShell notebooks, such as using VS Code with specific extensions and the Polyglot Notebooks extension. He also explains how PowerShell notebooks can be used in collaboration scenarios, offering a clean and shareable solution for team members. The speaker emphasizes the convenience of PowerShell notebooks for memory recall and built-in documentation features.

Moreover, David illustrates using PowerShell notebooks in practice, including setting up pipelines in GitHub actions, integrating with Azure CLI, and executing commands within notebooks seamlessly. He compares different approaches for executing notebooks, highlighting their efficiency and showcasing their flexibility for varied use cases.

The episode concludes with references to relevant resources on PowerShell notebooks and actions, as well as recommendations for further learning on authenticating to Azure without secrets and writing custom GitHub actions. A Q&A session follows, where the speaker addresses questions about PowerShell versions compatibility, sharing notebooks with non-technical colleagues, utilizing DevContainers for collaboration, and handling user credentials securely within containers.

Chapters:
00:00:00 Introduction and Sponsor Appreciation
00:01:58 Proposal of Using PowerShell Notebooks
00:03:56 Benefits of Using Notebooks
00:10:58 Setting Up PowerShell Notebooks in VS Code
00:19:06 Running PowerShell Notebooks in Pipelines
00:22:05 Triggering Pipelines with Notebook Changes
00:26:31 Automating Notebook Execution with GitHub Actions
00:31:00 References and Recommended Sessions
00:31:48 Audience Questions and Answers

Комментарии

Информация по комментариям в разработке