Day zero with DRAFT

Microsoft Developer · Beginner ·☁️ DevOps & Cloud ·2y ago

Key Takeaways

Introduces DRAFT, a tool for simplifying Kubernetes experience

Full Transcript

hi everyone in today's episode of openet Microsoft we are going to talk about AKs draft 2 which is a day Zero AKs developer experience tool hi David welcome hi David welcome how are you hi tats I'm doing fine how are you thanks for having me pretty good so tell us something about draft tool and how how does it work sure so draft was a tool originally made by the firon team and now it's been re-imagined and it is a day Zero open- Source tool and so what that means is it helps you get your app from your local computer up and running on Azure kubernetes service or any other kubernetes service nice so do you have any working demo on if you can show us how this tool works I do so let's go ahead and take a look at my terminal here so here we can see I have installed draft from Homebrew so you can do that if you're a Mac User however if you're using Windows or Linux you can use WSL and we have an install script supporting major Linux dros you will need to have the a CLI and the GitHub CLI installed in order to use draft pretty cool and once downloaded you're going to run this tool exactly so let's take a look here we just have a go program so in here we have our main.go and we set up an HTTP server we're just going to say hello from draft so to get started with it we're going to run draft create what draft does here is it uses linguist and it tries to detect what language you're using in this case it's correct we are using go however we're not using go modules so we have to let it know now we just tell it what port we were running on which was 880 and we can accept our version so now we have a choice what kind of deployment do we want to make with draft in this case we'll use plain kubernetes manifests but it does support Helm and customize so now we just have to tell it the port one more time and we can name our app we're going to the default namespace image name and tag and here we go oh that's pretty cool so you had a project which had only one file and now you are making that project uh Deployable into AKs cluster using this tool and I can see at the end of this command there's a recommendation of draft setup GH there is so the next available option is to set up oidc or open ID connect between our GitHub repo and Azure so what that's going to do is let us connect the GitHub repo to AKs so that it can deploy those images and deploy new manifests so let's go ahead and do that now we're just going to call it draft demo so this is when it's using that a CLI and GH CLI so it's setting up that connection between our GitHub repo and our AKs cluster so that it can push new manifests and it can also push new images to your ACR that's pretty cool and I can see it is doing a whole lot of heavy lifting for the user and providing that seamless experience exactly and so now we just have to tell it which AKs cluster resource we're going to put this in and which repo we want to connect I've already set up a repo and cluster both called draft demo and that's pretty much it now it's going to start setting up that connection for us making a service principle and associating those in a secretless way using oidc which means you don't have to rotate secrets and the authentication will stay secure oh wow so it kind of saves time and it kind of avoids going and finding the best practices for workflows and to even squander around and find out what deployments to be used so this tool is pretty much just One Stop Shop up for getting your uh deployment ready for the cluster all right so I think it's because we already have this before yeah yeah the cluster was already connected so we're going to have to redo that one that's okay yeah all right and so now we pick a name for our app registration now we just pick our subscription and we tell it which resource Group and the organization in repo on GitHub we want to use that's awesome and what it is doing right now is doing all the heavy lifting for the user and I can see how this could be a very seamless experience for the user and without squandering around and finding what workflow to be used and what deployment file to be used for individual projects to get project ready from what it was to deploy it in your AKs cluster absolutely all right well fortunately for us I already set this up ahead of time so it should pretty much be good to go and we can now move on to our last command so after you run oidc we can generate a workflow which it will also prompt you at the end of so the last step we can do is we can do draft generate workflow and so now that your cluster is connected with oidc you can use generate workflow which will create a GitHub action workflow that deploys your new manifests from GitHub directly to your AKs cluster so once again the workflow depends on what kind of K8 deployment you're using since we picked manifests we'll pick it again just tell it which Azure container registry you want to save your image to you can name your image and then pick which cluster you want now for this last step we're picking which branch from GitHub we want to automatically deploy which is going to set up that continuous deployment for us and there we go now if we take a look we can see that in our GitHub folder we have this fresh workflow which will deploy using our Azure GitHub actions so it will l in using that oidc setup that we did before and then it will deploy manifests using our k8's deploy action that's awesome and I can see how we started with main.go file which was the project file and now it has automatically provided whole lot of scaffolding which is needed for deployment to your AKs cluster absolutely and so now all we need to do is add commit and push our changes and now we should be ready to hop on over so I already deployed one ahead of time since it takes a minute for these images to build and deploy onto your cluster that's awesome and so in here we can take a look we can see that I have my deployment running this was triggered automatically from your GitHub repo when you push and it will be updated when you update your code in your GitHub repo automatically using those GitHub workflows which authenticate with that oidc so just to take a look we can port forward that service that draft defined for us earlier so now we can hop on over here and take a look at what's running in our cluster here we can see our pods running that got deployed from GitHub using those oidc secrets and that K deploy action now we can go go ahead and port forward the service that draft made for us and if we hit our endpoint here we go we get hello from draft that's awesome so I can see this has now the app is now deployed to your cluster and we can see the output um that's awesome do you have any resources to be shared and how people can reach out for this open source tool I do so here's the read me on the draft repo which is azure draft we have getting started information we have a way to report bugs and request features and we welcome any Community contributions and ideas thank you so much David and I look forward for the future development around this tool really appreciate it absolutely thanks for having me TS

Original Description

Draft is a tool made for users who are just getting started with Kubernetes, or users who want to simplify their experience with Kubernetes. By simplifying the day-zero process of generating Dockerfiles and Kubernetes manifests (including helm and customize templates) , Draft streamlines getting your app onto Kubernetes. Draft can set up OIDC authentication between Azure Kubernetes Service and your GitHub repo, and even generate GitHub Action workflows to deploy new app changes to your cluster automatically by leveraging Azure k8s GitHub Actions like k8s-deploy. Find the latest info about the open-source DRAFT project available at: Chapters: 00:00 Introduction 00:57 Demo Draft in action 09:26 Get started with Draft Resources: Find the latest info about the open-source DRAFT project available at: https://github.com/Azure/draft You can find more information with this resource K8s-deploy repo Azure/k8s-deploy: GitHub Action for deploying to Kubernetes clusters: https://github.com/Azure/k8s-deploy 📌 Let's connect: David Gamero | David Gamero LinkedIn Tatsat Mishra | Tatsat LinkedIn Subscribe to the Open at Microsoft: https://aka.ms/OpenAtMicrosoft Open at Microsoft Playlist: https://aka.ms/OpenAtMicrosoftPlaylist New episode every Tuesday!
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Microsoft Developer · Microsoft Developer · 0 of 60

← Previous Next →
1 Prepare for the DP-300 exam & the Azure Database Administrator Associate cert | Data Exposed
Prepare for the DP-300 exam & the Azure Database Administrator Associate cert | Data Exposed
Microsoft Developer
2 What I Wish I Knew ... about landing a job in tech
What I Wish I Knew ... about landing a job in tech
Microsoft Developer
3 Igniting Developer Innovation with Vector Search
Igniting Developer Innovation with Vector Search
Microsoft Developer
4 Combining the power of vector search with Azure OpenAI then revolutionize image search with vectors!
Combining the power of vector search with Azure OpenAI then revolutionize image search with vectors!
Microsoft Developer
5 What I Wish I Knew ... about finding your place in tech
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
6 Fluent UI React Insights: Accessible by default
Fluent UI React Insights: Accessible by default
Microsoft Developer
7 Signing Container Images with Notary Project
Signing Container Images with Notary Project
Microsoft Developer
8 What I Wish I Knew ... about finding your place in tech
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
9 What programming languages does GitHub Copilot support?
What programming languages does GitHub Copilot support?
Microsoft Developer
10 What I Wish I Knew ... about how much your job can change
What I Wish I Knew ... about how much your job can change
Microsoft Developer
11 What I Wish I Knew ... about how much your job can change
What I Wish I Knew ... about how much your job can change
Microsoft Developer
12 How do I become more confident about AI?
How do I become more confident about AI?
Microsoft Developer
13 How do I become more confident about AI?
How do I become more confident about AI?
Microsoft Developer
14 Performance Demos of SQL’s Intelligent Query Processing Feedback capabilities | Data Exposed
Performance Demos of SQL’s Intelligent Query Processing Feedback capabilities | Data Exposed
Microsoft Developer
15 What I Wish I Knew ... about coming to Microsoft
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
16 What I Wish I Knew ... about coming to Microsoft
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
17 Revolutionizing Image Search with Vectors
Revolutionizing Image Search with Vectors
Microsoft Developer
18 Igniting developer innovation with Vector search and Azure OpenAI
Igniting developer innovation with Vector search and Azure OpenAI
Microsoft Developer
19 Getting Started with Azure AI Studio's Prompt Flow - Part 2
Getting Started with Azure AI Studio's Prompt Flow - Part 2
Microsoft Developer
20 What I Wish I Knew ... about finding my career path
What I Wish I Knew ... about finding my career path
Microsoft Developer
21 What I Wish I Knew ... about finding my career path
What I Wish I Knew ... about finding my career path
Microsoft Developer
22 Windows Terminal's journey to Open Source
Windows Terminal's journey to Open Source
Microsoft Developer
23 Can I trust the code that GitHub Copilot generates?
Can I trust the code that GitHub Copilot generates?
Microsoft Developer
24 What I Wish I Knew ... about interviewing
What I Wish I Knew ... about interviewing
Microsoft Developer
25 What I Wish I Knew ... about interviewing
What I Wish I Knew ... about interviewing
Microsoft Developer
26 What is the Microsoft TechSpark Program?
What is the Microsoft TechSpark Program?
Microsoft Developer
27 SQL Server 2022: Accelerate query performance while reducing query compile time - w/ no code changes
SQL Server 2022: Accelerate query performance while reducing query compile time - w/ no code changes
Microsoft Developer
28 What I Wish I Knew ... about discovering computer science
What I Wish I Knew ... about discovering computer science
Microsoft Developer
29 What I Wish I Knew ... about discovering computer science
What I Wish I Knew ... about discovering computer science
Microsoft Developer
30 Call center transcription and analysis using Azure AI
Call center transcription and analysis using Azure AI
Microsoft Developer
31 How to use Text Analytics for health in Azure AI Language
How to use Text Analytics for health in Azure AI Language
Microsoft Developer
32 Azure OpenAI-powered summarization in Azure AI Language
Azure OpenAI-powered summarization in Azure AI Language
Microsoft Developer
33 Accelerate data labeling using Azure OpenAI and Azure AI Language
Accelerate data labeling using Azure OpenAI and Azure AI Language
Microsoft Developer
34 Building a Private ChatGPT with Azure OpenAI
Building a Private ChatGPT with Azure OpenAI
Microsoft Developer
35 What I Wish I Knew ... about how to interview
What I Wish I Knew ... about how to interview
Microsoft Developer
36 What I Wish I Knew ... about how to interview
What I Wish I Knew ... about how to interview
Microsoft Developer
37 Getting Started with Azure AI Studio's Prompt Flow - Part 3
Getting Started with Azure AI Studio's Prompt Flow - Part 3
Microsoft Developer
38 Intelligent Apps with Azure Kubernetes Service (AKS)
Intelligent Apps with Azure Kubernetes Service (AKS)
Microsoft Developer
39 Getting Started with Azure Blob Storage | Data Exposed: MVP Edition
Getting Started with Azure Blob Storage | Data Exposed: MVP Edition
Microsoft Developer
40 Chat + Your Data + Plugins
Chat + Your Data + Plugins
Microsoft Developer
41 What I Wish I Knew ... about different career paths
What I Wish I Knew ... about different career paths
Microsoft Developer
42 What I Wish I Knew ... about different career paths
What I Wish I Knew ... about different career paths
Microsoft Developer
43 Advanced Dev Tunnels Features | OD122
Advanced Dev Tunnels Features | OD122
Microsoft Developer
44 Learn Live - Manage performance and availability in Azure Cosmos DB for PostgreSQL
Learn Live - Manage performance and availability in Azure Cosmos DB for PostgreSQL
Microsoft Developer
45 Plan your SQL Migration to Azure with confidence | Data Exposed
Plan your SQL Migration to Azure with confidence | Data Exposed
Microsoft Developer
46 What I Wish I Knew ... about social skills in a tech career
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
47 What I Wish I Knew ... about social skills in a tech career
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
48 All About Vectors, Search, and Function Calling in Azure OpenAI - Labor Day Special
All About Vectors, Search, and Function Calling in Azure OpenAI - Labor Day Special
Microsoft Developer
49 Introduction to project ORAS
Introduction to project ORAS
Microsoft Developer
50 What I Wish I Knew ... about finding the right major
What I Wish I Knew ... about finding the right major
Microsoft Developer
51 What I Wish I Knew ... about finding the right major
What I Wish I Knew ... about finding the right major
Microsoft Developer
52 What I Wish I Knew ... about how to approach programming
What I Wish I Knew ... about how to approach programming
Microsoft Developer
53 What I Wish I Knew ... about how to approach programming
What I Wish I Knew ... about how to approach programming
Microsoft Developer
54 Learn Live - Scale from a single node to multiple nodes with Azure Cosmos DB for PostgreSQL
Learn Live - Scale from a single node to multiple nodes with Azure Cosmos DB for PostgreSQL
Microsoft Developer
55 What I Wish I Knew ... about diversity in tech #1
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
56 What I Wish I Knew ... about diversity in tech #1
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
57 Get started with SQL Server AGs across Windows, Linux and Container Replicas | Data Exposed
Get started with SQL Server AGs across Windows, Linux and Container Replicas | Data Exposed
Microsoft Developer
58 Writing LLM Apps with Azure AI and PromptFlow
Writing LLM Apps with Azure AI and PromptFlow
Microsoft Developer
59 What I Wish I Knew ... about how cool working in tech could be
What I Wish I Knew ... about how cool working in tech could be
Microsoft Developer
60 Open Source foundation models in Azure Machine Learning & optimization techniques behind the scenes
Open Source foundation models in Azure Machine Learning & optimization techniques behind the scenes
Microsoft Developer

Related Reads

Chapters (3)

Introduction
0:57 Demo Draft in action
9:26 Get started with Draft
Up next
AWS, Azure, GCP: The One Thing Every Business Gets Wrong
AI Daily
Watch →