Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executable Tutorial Proposal #2540

Merged
merged 4 commits into from
Sep 26, 2024
Merged

Executable Tutorial Proposal #2540

merged 4 commits into from
Sep 26, 2024

Conversation

bepp-boop
Copy link
Contributor

Assignment Proposal

Title

Infrastructure as Code with Pulumi

Names and KTH ID

Deadline

  • Task 3

Category

  • Executable tutorial

Description

This tutorial provides a step-by-step guide on using Pulumi for Infrastructure as Code (IaC) to install, set up, and create/deploy an infrastructure consisting of an NGINX web server and multiple services such as NGINX and Redis using Docker containers. It covers the process of defining and managing infrastructure resources using Pulumi, enabling users to easily provision and manage their infrastructure in a declarative manner. By following this tutorial, users will gain hands-on experience in leveraging Pulumi for DevOps practices in managing their infrastructure.

Relevance

Infrastructure as Code (IaC) is a fundamental practice in DevOps that allows teams to automate the provisioning and management of infrastructure resources. Pulumi is a modern IaC tool that enables developers to define and manage infrastructure resources using familiar programming languages. By using Pulumi, teams can achieve greater flexibility, consistency, and scalability in managing their infrastructure, aligning with the DevOps goal of automating and streamlining the development and deployment processes. This tutorial aims to introduce users to Pulumi and demonstrate its capabilities in managing infrastructure resources effectively.

Killercoda: https://killercoda.com/bepp-boop/scenario/pulumi
Github: https://github.com/bepp-boop/KillerCoda

@algomaster99 algomaster99 self-assigned this Sep 26, 2024
@algomaster99 algomaster99 merged commit fa2919c into KTH:2024 Sep 26, 2024
2 checks passed
@bepp-boop
Copy link
Contributor Author

Hey I am finished with the tutorial. I am unable to get to gpg to work cause at least seem like the key is expire so I can not encrypt using the public key block. So I just leave a temporal token access key in the tutorial or that user can create account on Pulumi to generate their own stack.

@algomaster99
Copy link
Collaborator

Sounds good! Also update this information in your tutorial with KillerCoda.

@bepp-boop
Copy link
Contributor Author

ok I have update it and it it in the intro of the killercoda

@kthfre
Copy link
Contributor

kthfre commented Oct 17, 2024

Feedback

Disclaimer: "I/We certify that generative AI, incl. ChatGPT, has not been used to write this feedback. Using generative AI without permission is considered academic misconduct."

High-level strengths

This is a tutorial that in detail describes the process of utilizing Pulumi as a tool for IaC setting up a containerized nginx and redis service through a python script. Due to the step-by-step description, one can imagine making minor modifications to the tutorial and using it in a real-world scenario according to one's own preferences. For example, this could be switching nginx to apache. The use case of deploying web servers is also very common so it is likely to cater to many people. The tutorial is relatively easy to execute (despite being a somewhat advanced use case) which is very good. Furthermore, Pulumi seems like a great choice for IaC as it seemingly is a common and versatile tool. It is important to emphasize that the constructive feedback that follows is delivered in the context that this is a somewhat advanced use case and our impression is that the tutorial in general is of higher quality than the average submission.

High-level weaknesses

The introduction could include a motivating section that highlights the benefits of Pulumi as an Infrastructure as Code (IaC) tool, explaining why users should choose it over other tools. The main titles of individual pages could be adjusted to better align with the content, ensuring they accurately represent all aspects of content, rather than focusing on just one part. This would give the reader a clear understanding of the main points just from the titles. For example titles like “Download Pulumi” and “Setting up Pulumi”. "Copy to clipboard" button/function would have been more helpful for the code blocks in the tutorial.

Detailed feedback per tutorial section

Step 1: Introduction

  • The definition of Pulumi is concise, straightforward, and easy to understand.
  • The “Pulumi CLI” section feels slightly out of place; it would be more structured if included under the "Environment Setup" section.

Step 2: Download Pulumi

  • The information and commands for activating Pulumi in the current session are very helpful, especially for new users installing Pulumi for the first time, as it guides them on how to use the current session effectively.
  • Since the content includes installation steps along with downloading, a title closer to "Environment Setup" would be more accurate.

Step 3: Setting up Pulumi

  • The steps and content focus on the containerd service, but the title "Setting up Pulumi" is mismatched and confusing.
  • In the "learning objectives", it is clear that we need containers, but details about each step on this page would make it clear why they are essential.

Step 4: Deploy a Container

  • This page initially included some typographical errors where we struggled slightly to execute the tutorial, they have subsequently been fixed, so this was but is no longer actionable.
  • The one part that could have been slightly clarified is the Pulumi key creation process, perhaps a link to the “Personal access token” page on Pulumi’s webpage and simply clicking "create new token", but the user is likely to figure this out in due time.
  • The access token supplied in the tutorial has seemingly expired at this point, the tutorial could be updated with a new short-lived access token during the feedback and grading period.

Step 5: Multiple Container Deployment

  • The code snippet and how to edit the __main__.py file could perhaps have been slightly clearer. This was no issue whatsoever for us, but if one take it literally as it is presented and replaces “# Existing code here” with the existing code one ends up with duplicate import statements. One other way could be to simply add the whole code snippet (as the initial setup script was not overly large). Again, nitpicking.
  • There is no other constructive feedback of note for this section, although we are slightly curious about the sleep 2 command issued at the end and its purpose.

Summary

To conclude, this is a great tutorial that educates the reader (it did for us!), and it is overwhelmingly a positive learning experience with a few minor drawbacks. Automation and repeatability are important in DevOps and IaC and we believe the tutorial accurately illustrates such a process. Finally, we came here hungry this morning and expected Quang to serve us some fried eggs to go along with the coffee, as we have heard he commonly does. Preposterously, imagining his kitchen has been raided one too many times, he has seemingly hidden the eggs too carefully for our naked eyes.

This was referenced Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants