Get started with your first Radius application
Skills:
Staying Current in AI70%
Key Takeaways
Gets started with the first Radius application, covering best practices and tips
Full Transcript
welcome back to another episode of open it Microsoft today we're going to be taking a look at radius a new Cloud native application platform and diving into how you can get up and running with your very first radius app stay [Music] tuned all right welcome in my name is Aaron crawfis and I'm joined by Ryan Noak and today we're going to be taking a look at how to author your very first radius application and some tips and tricks to get you going Ryan uh could you tell us a little bit about radius applications and kind of what you can do with them sure so the idea between applications and radius is that you're really telling us about the requirements of your applications so what are the things that you want running what are the dependencies you have on databases or message cues and and what are the requirements of the app like what what's the configuration how should it behave that kind of thing uh the hope is that it's it's high level it's declarative it's something that developers can can understand and and kind of use to uh to talk about how their app needs to work and and be helpful to you um and I think what we're going to do today is uh kind of pick up where like some of the radius tutorial content leaves off so imagine you've done a tutorial you've kind of deployed some of our applications and now you need to get something of yours working uh where would you start what would you need to do that sounds awesome yeah let's dive in I'd love to learn a little bit about why how we can get going okay so let's let's look at an example here and I'm I'm kind of picking up where the tutorial looks off leaves off this is again this is one of our images but I think some of these features are are obviously useful for your applications um and so I've got this bicep file here just a really quick tour um I've got this container called demo that's the container main container that we're working with and then I've got this redis cache database so I've got a to-do application here that talks to a database so pretty standard basic stuff that I think we can all get our head around perfect and this is like what the developer would describe when they're talking about their app that that's right that's right so you would you would describe your architecture here as well as how you want these things to run what dependencies you have on things like databases perfect so something you can probably notice right away is we've got a hardcoded version number here yep uh which you can get away with if you're building a tutorial or a sample but that's not great yeah I got it up and running but now I actually need to be able to publish this as soon as you need to have like a Ci or CD system hooked up you're going to have a real version number so let's let's do that let's make a real version number and let's let's make it so we can pass that in perfect so I'll declare a parameter here in bicep I'm going to call that I think I want to call it image tag it's a string um I'm not going to give that a default value if I wanted to I could you know put a nice description on this and say you know container image tag or some other kind of descriptive thing that I want and then as soon as I have this parameter I can start using string interpolation to use it so down here I'll just bring in image tag so you can see that we're using the parameter there Y and then I've got two ways that I could work with this one way that I could work with this is I could pass it in at the command line so I could run rad deploy and I could pass a parameter that way okay uh but a way that I really like um and I think a lot of people like these days is well let's actually check in that value so we can Version Control it that makes it easy for us to roll things back if we need to roll back what's in production so imagine we're doing GE Ops or some other kind of cicd system attached to this and let's put that here I think I think the value right now is is 0.32 yep we'll just put that here in this file perfect and then instead of passing that parameter in at the command line when we deploy we'll pass in the file say hey this this file is where you should be getting those parameters from makes sense so that's the image tag kind of done and dusted we figured that out okay now another thing that you may need to do is well maybe you need to set some environment variables maybe there are required settings maybe you have different behaviors depending on where you're deploying to um and a good example of that might be like different kinds of logging you do depending on the environment you're in yep so maybe I have an environment here like I'll say log log level sure let's just say log level and uh I could hardcode that to something like info I could um use bicep to declare some more conditional logic but probably what I really want is a parameter again so let's let's go ahead and do that so I'm going to declare a parameter for that param log level I I'll default that to info so we're going to be info by default if that's not passed in uh C co-pilot wanted to do that and I think it's a good idea so let's go ahead and do that uh if we want to also by the way uh co-pilot was wrong about these commas but we can also do things like restrict the set of allowed values so if somebody tries to pass in something invalid we're not going to debug or we're not going to work um and so I'm going to take out a couple of these but let's imagine that we support debug info and error and info is going to be the info is going to be our default def okay um let's parameterize this as well and we've got a got a default value here and let's say that when we're going to aure um I'm going to set the other parameter that we're using and let's declare another one log level here and let's say that if we're deploying to production it's going to be info and then let's also grab this parameter and let's saying that if we're deploying to Dev that it's going to be debug perfect so we'll just when we do deploy this later we'll just make sure that we're using the right parameter file depending on where we're where we're deploying to and that makes it easy for us to look at and compare what the settings are for different environments we're using gotcha uh what should we do next um so let's say that uh our our service now uh maybe we have another like backend service or maybe we have another uh service that we need this demo app to talk to how how can I make um an application have more than just one container so so you can just put whatever you need to in here that's the answer it's pretty easy if we if we put something else in this file it's just going to be part of the same application now I'm just going to do this quickly we'll we'll run the same container twice uh we'll just kind of close our eyes on that one I'll call this backend um and what I'm doing here is I'm declaring I'm giving it a name so the name that the system is going to have is is backend I'm going to clear out some of the things that we don't need here and uh we'll drop this connection to and I'll call this backend and I've also declared a variable name called backend that I can use as a reference inside the file if I want to M now if I want to declare a connection to this the way that I declare connections between my services is first of all I'll declare um a name for the connection connections are named because you can have a lot of them and then for the source I could I could put in an ID here but I'll also I can also put in a URL so let's say that I'm going to connect to backend 3000 gotta um and this is pretty cool because using a URL allows us to talk to things that aren't deployed as part of the same file radius will understand that this container is talking to that container include that in in something we call the app graph without those two things needing to be deployed at the same time so if we move our backend to another repo in the future that can still this can all still work the same way gotta so as your team kind of grows and like different microservices kind of like get more teams like it all still works and they can deploy as separate teams if they need to that's right we're not introducing any sort of order dependency in How We Do deployment and we're not introducing any sort of coupling of like this has to happen before that has to happen this team has to work together with that team perfect what radius is going to do with this by the way is it's going to do two things it's going to document the fact that the connection exists so anybody who's looking at that information can see there should be traffic flowing this way uh and the other thing that it's going to do is it's going to inject some environment variables based on this semantic name so that if in the future something like the URL would change we can write code that is independent of that cool um let's do something else um we've probably all heard about health checks before uh health checks are useful because health checks allow the runtime system to give you feedback about whether or not your application is working correctly and uh within radius we've kind of adopted the same terminology that the cloud native Community has used because we think it's a good terminology there's there's livess which says hey is this thing crashing should it be restarted and then there's Readiness which is like are my dependencies working am I ready for traffic gotcha and so we can just add a liveness check to this application I've got a little buffer here where I'm pasting things and so I'm defining a liveness probe it's going to do an HTTP get it's going to hit this URL in my app so if I want to customize the way Health checking works for my app I just need to handle this URL radius is going to pass this information through to the runtime where I'm running in this case it's kubernetes kubernetes is going to know that it should check that URL gotcha very cool uh now we mentioned kubernetes uh and one other thing that might be interesting to think about with the context of kubernetes is well what if I need to do something that kubernetes supports but radius doesn't have as part of its definition oh gotcha so kind of like punching through that abstraction punching through the abstraction because radius is a little higher level than kubernetes is meant to be a little bit simpler but I think we all have cases now and then where we no I really need it to work this way kind of thing um and let's let's do an example of one of those so the way that we approach we way that we've approached that in radius is we have this runtimes feature here and what runtimes allows us to do there's just kubernetes here right now what runtimes allows us to do is it allows us to specify information that only applies to that runtime so because we're using kubernetes in this case it means that this information is going to be passed through to kubernetes and so what I'm going to do here is I'm going to set some resource limits on the Pod we haven't implemented that feature yet in radius uh but it is implemented in kubernetes and so we can just kind of reach down to that layer and do what we need to do gotcha and so I can customize anything about the kubernetes podspec and anything inside of that you can customize anything about the kubernetes podspec we just pass that information through and I think I'm missing a brace here which is why it's unhappy so anything that goes inside this podspec is uh is a merge patch that's going to be applied if you don't know what that is just think about it as setting properties if I needed to set like a networking policy or capabilities or resource limits or scheduling behaviors or any of this really low-level stuff you can just kind of reach in there and do it cool yeah this is awesome it seems like it's pretty easy using bicep to just go in and like customize the settings that I need and like like you just showed punch through for those times when that's right and as we add more runtimes in the future you're going to be able to set those settings here so you can say things like I'm going to runtime a set these settings if I'm going to runtime B set these settings cool okay so we're done editing the uh aptop bicep let's deploy this and see if it works and I'm going to use Rad run for this app. bicep and then we need to remember to pass in that parameter file so I can do that with parameters and then app the file name I called it app. params dolev Jason and then if you were deploying into production Azure this would have been the prod Azure it would be the Azure one and I like to kind of put these next to each other so I can easily diff them and and see like okay this is what I actually changed to go to different environments perfect so what's happening right now is radius is processing that bicep file um it's completed deploying our backend container it's completed deploying Rus using that recipe and now it's going to deploy our container um our demo container which is kind of our front end and that's processing right now you can see that that finished and we should get a popup here looks like uh somebody blocked that for me very helpfully and so you can see that we've hit that container here in the uh oh we've actually hit the back end here in the oh we've actually hit the back end here in the code space um but anyway you can see that that worked so all these settings got applied we got the up and up and running and this is hopefully some helpful uh tips about how you can get started adapting radius and using it for some of your own projects oh that's awesome and so if I wanted to get kind of build off of this and start doing my own ratify my own applications uh what are some places I can go to get started the best place to go is rad app.io you can find our docs there and all of our our information tutorial content samples um we've got we've got the eShop on microservices Sample uh that we can point you towards that's a bigger more complicated sample if you want examples um we've also got a Discord you can find links on our website as well and there's a bunch of helpful people in the Discord that would love to answer your questions oh that's awesome well thank you so much for joining us today walking us through how we can get up and running with an application and thank you for joining us on open at Microsoft we're looking forward to having you join us on the next episode [Music]
Original Description
Join Aaron and Ryan to learn how to get up and running with your first Radius application. They'll cover best practices as well as some tips and tricks to help get your app up and running on Radius.
Chapters:
00:00 - Introduction
00:26 - What is Radius
01:20 - Radius Example
08:22 - Liveness
12:38 - Where to go Next
Resources:
Learn more at: https://radapp.io
Find the latest info about the open-source Radius project available at: https://github.com/radius-project
📌 Let's connect:
Aaron Crawfis | https://twitter.com/AaronCrawfis
Ryan Nowak | https://twitter.com/aVerySpicyBoi
📝Submit Your OSS Project for Open at Microsoft https://aka.ms/OpenAtMsCFP
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Prepare for the DP-300 exam & the Azure Database Administrator Associate cert | Data Exposed
Microsoft Developer
What I Wish I Knew ... about landing a job in tech
Microsoft Developer
Igniting Developer Innovation with Vector Search
Microsoft Developer
Combining the power of vector search with Azure OpenAI then revolutionize image search with vectors!
Microsoft Developer
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
Fluent UI React Insights: Accessible by default
Microsoft Developer
Signing Container Images with Notary Project
Microsoft Developer
What I Wish I Knew ... about finding your place in tech
Microsoft Developer
What programming languages does GitHub Copilot support?
Microsoft Developer
What I Wish I Knew ... about how much your job can change
Microsoft Developer
What I Wish I Knew ... about how much your job can change
Microsoft Developer
How do I become more confident about AI?
Microsoft Developer
How do I become more confident about AI?
Microsoft Developer
Performance Demos of SQL’s Intelligent Query Processing Feedback capabilities | Data Exposed
Microsoft Developer
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
What I Wish I Knew ... about coming to Microsoft
Microsoft Developer
Revolutionizing Image Search with Vectors
Microsoft Developer
Igniting developer innovation with Vector search and Azure OpenAI
Microsoft Developer
Getting Started with Azure AI Studio's Prompt Flow - Part 2
Microsoft Developer
What I Wish I Knew ... about finding my career path
Microsoft Developer
What I Wish I Knew ... about finding my career path
Microsoft Developer
Windows Terminal's journey to Open Source
Microsoft Developer
Can I trust the code that GitHub Copilot generates?
Microsoft Developer
What I Wish I Knew ... about interviewing
Microsoft Developer
What I Wish I Knew ... about interviewing
Microsoft Developer
What is the Microsoft TechSpark Program?
Microsoft Developer
SQL Server 2022: Accelerate query performance while reducing query compile time - w/ no code changes
Microsoft Developer
What I Wish I Knew ... about discovering computer science
Microsoft Developer
What I Wish I Knew ... about discovering computer science
Microsoft Developer
Call center transcription and analysis using Azure AI
Microsoft Developer
How to use Text Analytics for health in Azure AI Language
Microsoft Developer
Azure OpenAI-powered summarization in Azure AI Language
Microsoft Developer
Accelerate data labeling using Azure OpenAI and Azure AI Language
Microsoft Developer
Building a Private ChatGPT with Azure OpenAI
Microsoft Developer
What I Wish I Knew ... about how to interview
Microsoft Developer
What I Wish I Knew ... about how to interview
Microsoft Developer
Getting Started with Azure AI Studio's Prompt Flow - Part 3
Microsoft Developer
Intelligent Apps with Azure Kubernetes Service (AKS)
Microsoft Developer
Getting Started with Azure Blob Storage | Data Exposed: MVP Edition
Microsoft Developer
Chat + Your Data + Plugins
Microsoft Developer
What I Wish I Knew ... about different career paths
Microsoft Developer
What I Wish I Knew ... about different career paths
Microsoft Developer
Advanced Dev Tunnels Features | OD122
Microsoft Developer
Learn Live - Manage performance and availability in Azure Cosmos DB for PostgreSQL
Microsoft Developer
Plan your SQL Migration to Azure with confidence | Data Exposed
Microsoft Developer
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
What I Wish I Knew ... about social skills in a tech career
Microsoft Developer
All About Vectors, Search, and Function Calling in Azure OpenAI - Labor Day Special
Microsoft Developer
Introduction to project ORAS
Microsoft Developer
What I Wish I Knew ... about finding the right major
Microsoft Developer
What I Wish I Knew ... about finding the right major
Microsoft Developer
What I Wish I Knew ... about how to approach programming
Microsoft Developer
What I Wish I Knew ... about how to approach programming
Microsoft Developer
Learn Live - Scale from a single node to multiple nodes with Azure Cosmos DB for PostgreSQL
Microsoft Developer
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
What I Wish I Knew ... about diversity in tech #1
Microsoft Developer
Get started with SQL Server AGs across Windows, Linux and Container Replicas | Data Exposed
Microsoft Developer
Writing LLM Apps with Azure AI and PromptFlow
Microsoft Developer
What I Wish I Knew ... about how cool working in tech could be
Microsoft Developer
Open Source foundation models in Azure Machine Learning & optimization techniques behind the scenes
Microsoft Developer
More on: Staying Current in AI
View skill →Related Reads
📰
📰
📰
📰
I Priced an AI Side Hustle. It Runs $60 a Month.
Medium · AI
AI Development: Top 5 Trends Driving Innovation
Medium · AI
SpaceX to try its luck again with Starship Flight 13 after engines and weather say no
The Register
250 Eiffel Towers' worth of waste: The AI boom's toxic hardware problem
ZDNet
Chapters (5)
Introduction
0:26
What is Radius
1:20
Radius Example
8:22
Liveness
12:38
Where to go Next
🎓
Tutor Explanation
DeepCamp AI