<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kumail Rizvi</title>
    <description>The latest articles on DEV Community by Kumail Rizvi (@kumail1232).</description>
    <link>https://dev.to/kumail1232</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F988160%2F5c6f2849-4beb-4211-a9b2-6686cbb7871e.jpeg</url>
      <title>DEV Community: Kumail Rizvi</title>
      <link>https://dev.to/kumail1232</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kumail1232"/>
    <language>en</language>
    <item>
      <title>Getting started with Radius: Run your first app</title>
      <dc:creator>Kumail Rizvi</dc:creator>
      <pubDate>Sun, 21 Jan 2024 08:44:35 +0000</pubDate>
      <link>https://dev.to/kumail1232/getting-started-with-radius-run-your-first-app-2i08</link>
      <guid>https://dev.to/kumail1232/getting-started-with-radius-run-your-first-app-2i08</guid>
      <description>&lt;p&gt;This guide will show you how to quickly get started with Radius. You’ll walk through both installing Radius and running your first Radius app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnyjutcbda46vb7mlb2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnyjutcbda46vb7mlb2j.png" alt="First Application" width="800" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we have a basic container which consist of our application and a Redis as Database . &lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;1. Have your Kubernetes cluster handy&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you don’t have a preferred way to create Kubernetes clusters, you could try using &lt;a href="https://k3d.io/"&gt;k3d&lt;/a&gt;, which runs a minimal Kubernetes distribution in Docker.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Ensure your cluster is set as your current context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl config current-context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;&lt;strong&gt;2. Install Radius CLI&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;For installation of radius cli , you can check the previous post for details about radius cli and installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/kumail1232/radius-a-new-open-source-application-platform-for-cloud-native-apps-by-microsoft-143"&gt;Installation of Radius CLI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;3. Initialize Radius&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Create a new directory for your app and navigate into it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir first-app
cd first-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize Radius. For this example, accept all the default options (press ENTER to confirm):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rad init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Initializing Radius...

✅ Install Radius v0.29
    - Kubernetes cluster: k3d-k3s-default
    - Kubernetes namespace: radius-system
✅ Create new environment default
    - Kubernetes namespace: default
    - Recipe pack: local-dev
✅ Scaffold application docs
✅ Update local configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Initialization complete! Have a RAD time 😎&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In addition to starting Radius services in your Kubernetes cluster, this initialization command creates a default application (app.bicep) as your starting point. It contains a single container definition (demo).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Import the set of Radius resources (Applications.*) into Bicep
import radius as radius

@description('The app ID of your Radius Application. Set automatically by the rad CLI.')
param application string

resource demo 'Applications.Core/containers@2023-10-01-preview' = {
  name: 'demo'
  properties: {
    application: application
    container: {
      image: 'ghcr.io/radius-project/samples/demo:latest'
      ports: {
        web: {
          containerPort: 3000
        }
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This file will run the &lt;code&gt;ghcr.io/radius-project/samples/demo:latest&lt;/code&gt; image. This image is published by the Radius team to a public registry, you do not need to create it.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;4. Run the app&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Use the below command to run the app in your environment, then access the application by opening &lt;a href="http://localhost:3000"&gt;http://localhost:3000&lt;/a&gt; in a browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rad run app.bicep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Runs the application in your Kubernetes cluster&lt;/li&gt;
&lt;li&gt;Creates a port-forward from localhost to port 3000 inside the container so you can navigate to the app’s frontend UI&lt;/li&gt;
&lt;li&gt;Streams container logs to your terminal&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In your browser you should see the demo app:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7nkc74nbu4vxf5v37n07.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7nkc74nbu4vxf5v37n07.png" alt="Demo App" width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congrats! You’re running your first Radius app. When you’re ready to move on to the next step, use &lt;code&gt;CTRL+ C&lt;/code&gt; to exit the command.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;5. Add Database&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;This step will add a database (Redis Cache) to the application.&lt;/p&gt;

&lt;p&gt;You can create a Redis Cache using Recipes provided by Radius. The Radius community provides Recipes for running commonly used application dependencies, including Redis.&lt;/p&gt;

&lt;p&gt;In this step you will:&lt;/p&gt;

&lt;p&gt;Add Redis to the application using a &lt;a href="https://docs.radapp.io/guides/recipes/overview/"&gt;Recipe&lt;/a&gt;.&lt;br&gt;
Connect to Redis from the &lt;code&gt;demo&lt;/code&gt; container using environment variables that Radius automatically sets.&lt;/p&gt;

&lt;p&gt;Open &lt;code&gt;app.bicep&lt;/code&gt; in your editor and get ready to edit the file.&lt;/p&gt;

&lt;p&gt;First add some new code to &lt;code&gt;app.bicep&lt;/code&gt; by pasting in the content below at the end of the file. &lt;br&gt;
This code creates a Redis Cache using a Radius Recipe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@description('The environment ID of your Radius Application. Set automatically by the rad CLI.')
param environment string

resource db 'Applications.Datastores/redisCaches@2023-10-01-preview' = {
  name: 'db'
  properties: {
    application: application
    environment: environment
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, update your container definition to include &lt;code&gt;connections&lt;/code&gt; inside &lt;code&gt;properties&lt;/code&gt;. This code creates a connection between the container and the database. Based on this connection, Radius will inject &lt;a href="https://docs.radapp.io/guides/author-apps/containers/overview/#connections"&gt;environment variables&lt;/a&gt; into the container that inform the container how to connect. You will view these in the next step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource demo 'Applications.Core/containers@2023-10-01-preview' = {
  name: 'demo'
  properties: {
    application: application
    container: {
      image: 'ghcr.io/radius-project/samples/demo:latest'
      ports: {
        web: {
          containerPort: 3000
        }
      }
    }
    connections: {
      redis: {
        source: db.id
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE:-&lt;/strong&gt; Check the connection block in the above code block ,we will provide the redis connection with the demo application &lt;/p&gt;

&lt;p&gt;our updated &lt;code&gt;app.bicep&lt;/code&gt; will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Import the set of Radius resources (Applications.*) into Bicep
import radius as radius

@description('The app ID of your Radius Application. Set automatically by the rad CLI.')
param application string

resource demo 'Applications.Core/containers@2023-10-01-preview' = {
  name: 'demo'
  properties: {
    application: application
    container: {
      image: 'ghcr.io/radius-project/samples/demo:latest'
      ports: {
        web: {
          containerPort: 3000
        }
      }
    }
    connections: {
      redis: {
        source: db.id
      }
    }
  }
}

param environment string
resource db 'Applications.Datastores/redisCaches@2023-10-01-preview' = {
  name: 'db'
  properties: {
    application: application
    environment: environment
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;&lt;strong&gt;6. Rerun the application with a database&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Use the command below to run the updated application again, then open the browser to &lt;a href="http://localhost:3000"&gt;http://localhost:3000&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rad run app.bicep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrd7p6slkbn9l7wdnkyz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrd7p6slkbn9l7wdnkyz.png" alt="Demo App with Redis DB" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the Todo List tab and test out the application. Using the Todo page will update the saved state in Redis:&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;CTRL+ C&lt;/code&gt; when you are finished with the website.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;7. View the application connections&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Radius Connections are more than just environment variables and configuration. You can also access the “application graph” and understand the connections within your application with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rad app connections
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the following output, detailing the connections between the &lt;code&gt;demo&lt;/code&gt; container and the &lt;code&gt;db&lt;/code&gt; Redis Cache, along with information about the underlying Kubernetes resources running the app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Displaying application: demo

Name: demo (Applications.Core/containers)
Connections:
  demo -&amp;gt; db (Applications.Datastores/redisCaches)
Resources:
  demo (kubernetes: apps/Deployment)
  demo (kubernetes: core/Secret)
  demo (kubernetes: core/Service)
  demo (kubernetes: core/ServiceAccount)
  demo (kubernetes: rbac.authorization.k8s.io/Role)
  demo (kubernetes: rbac.authorization.k8s.io/RoleBinding)

Name: db (Applications.Datastores/redisCaches)
Connections:
  demo (Applications.Core/containers) -&amp;gt; db
Resources:
  redis-r5tcrra3d7uh6 (kubernetes: apps/Deployment)
  redis-r5tcrra3d7uh6 (kubernetes: core/Service)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, we have Completed Building our First Application on Radius Successfully &lt;/p&gt;

&lt;p&gt;if you have any comments or questions feel free to drop down below . &lt;/p&gt;

&lt;p&gt;Thank You &lt;/p&gt;

</description>
      <category>devops</category>
      <category>microsoft</category>
      <category>microservices</category>
      <category>infrastructureascode</category>
    </item>
    <item>
      <title>Radius, a new open-source application platform for cloud-native apps by Microsoft</title>
      <dc:creator>Kumail Rizvi</dc:creator>
      <pubDate>Sun, 17 Dec 2023 09:48:54 +0000</pubDate>
      <link>https://dev.to/kumail1232/radius-a-new-open-source-application-platform-for-cloud-native-apps-by-microsoft-143</link>
      <guid>https://dev.to/kumail1232/radius-a-new-open-source-application-platform-for-cloud-native-apps-by-microsoft-143</guid>
      <description>&lt;p&gt;&lt;em&gt;""Teaching meant for the hands enters most easily through the eyes.""&lt;br&gt;
Morgan Llywelyn&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;INTRODUCTION&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For developers, the complexity of managing infrastructure and lack of visibility into the resources that make up their applications are major roadblocks for productivity. For operators, the lack of standardization and automation in the deployment process can lead to loss of control over the infrastructure, and degradation of confidence in the applications that are deployed. At the end of the day, development teams are left with a disjointed experience between platforms and cloud providers. Developers and operators alike find themselves struggling to make sense of how their application comes together across disparate sets of tools that provide little more than a list of their deployed artifacts.&lt;/p&gt;

&lt;p&gt;The Microsoft Azure Incubations team is excited to announce a new open application platform called Radius that places the application at the center of every stage of development—redefining how applications are built, managed, and understood.Radius is open-source and multi-cloud from the start, allowing for applications that can be written once and, using the same toolset and workflows, deployed to any cloud or on-premises infrastructure. To get started or learn more about Radius, visit &lt;a href="//radapp.io"&gt;radapp.io&lt;/a&gt; . &lt;/p&gt;

&lt;p&gt;Lets dive deep into understanding what's radius is and what it is capible of , &lt;strong&gt;&lt;em&gt;Radius&lt;/em&gt;&lt;/strong&gt; in short can be described as a single tool to describe, deploy, and manage your entire application&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What Radius Focus on the most&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Focus of Radius&lt;/strong&gt;:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Addresses platform engineering challenges in supporting application deployments across on-premises infrastructure and major cloud providers like Microsoft Azure and Amazon Web Services.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Compatibility and Integration:&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Built-in support for popular app development tools like Dapr.&lt;/li&gt;
&lt;li&gt;Integration with infrastructure as code (IaC) languages such as Terraform and Bicep.&lt;/li&gt;
&lt;li&gt;Designed to meet developers and operators at their current workflow, integrating seamlessly into existing development tasks and CI/CD pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Developer-Friendly Approach:&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Aims to enhance developers' understanding of their applications by managing all components efficiently.&lt;/li&gt;
&lt;li&gt;Takes care of platform configurations, including permissions and connection strings, to simplify developers' tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Non-Disruptive Implementation:&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Designed to fit into existing development tasks and CI/CD pipelines without causing disruption.&lt;/li&gt;
&lt;li&gt;Works alongside developers and operators, streamlining their workflows rather than requiring them to overhaul their processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Compliance and Policy Management:&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Enables operators to ensure that all applications are deployed in compliance with organizational policies.&lt;/li&gt;
&lt;li&gt;Offers a centralized solution for managing applications and their resources, providing a comprehensive approach to compliance and policy adherence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BXbB1EE---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/otowgez7c65uwtpv3urb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BXbB1EE---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/otowgez7c65uwtpv3urb.png" alt="Diagrammatic representation of Radius with other tools and services" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Radius First Release Features
&lt;/h2&gt;

&lt;p&gt;In this first release, the focus is on the features that are most foundational to the Radius platform and its goals of improving the productivity of application development workflows. These include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplified and consistent application development experience&lt;/strong&gt;: Deploy to any cloud provider or on-premises using the same application definition, all with a consistent set of tooling and experience. These include capabilities to automate resource access and provisioning, as well as the ability to configure environments that meet the needs of each phase of development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recipes and environments&lt;/strong&gt;: Standardize and scale deployments with clear separation of concerns between developers and operators. Radius Recipes are pre-definable templates that automate the provisioning of infrastructure resources and environment configurations that can be designed to adhere to cost, security, and compliance standards.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application graph&lt;/strong&gt;: Gain visibility into the resources and relationships that make up an application. Radius captures the relationships between resources in an application as a part of the development activities, which can in turn be queried and understood.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For More Details check the offical docs &lt;a href="https://blog.radapp.io/posts/2023/10/18/introducing-radius-a-new-open-source-application-platform-for-cloud-native-apps/"&gt;https://blog.radapp.io/posts/2023/10/18/introducing-radius-a-new-open-source-application-platform-for-cloud-native-apps/&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up Radius
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;STEP 1:&lt;/strong&gt; &lt;strong&gt;Installation of Radius CLI&lt;/strong&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For installation of Radius CLI (LINUX/MAC/WINDOWS)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://dev.tourl"&gt;https://docs.radapp.io/installation/#step-1-install-the-rad-cli&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Verify the rad CLI is installed correctly by running &lt;code&gt;rad version&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RELEASE     VERSION     BICEP       COMMIT
0.28.0      v0.28        0.11.13     2e60bfb46de73ec5cc70485d53e67f8eaa914ba7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;STEP 2:&lt;/strong&gt; &lt;strong&gt;Install the VS Code extension&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To install the Radius Bicep extension, search for Radius Bicep in the Extensions tab in VSCode or in the Visual Studio marketplace&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9pE_uPrG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7ylkdr0ofuqz9g9rbch.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9pE_uPrG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7ylkdr0ofuqz9g9rbch.png" alt="Screenshot of Radius Bicep extension in VSCode Marketplace" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select Install&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To verify you’ve installed the extension, open any file with the .bicep file extension and start authoring Radius application to verify the auto-complete and other validation features.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;STEP 3:&lt;/strong&gt; &lt;strong&gt;Initializing Radius&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Initializing Radius installs the Radius control-plane and creates a Radius Environment. The control-plane is a set of services that provide the core functionality of Radius, running in the &lt;code&gt;radius-system&lt;/code&gt;namespace.&lt;/p&gt;

&lt;p&gt;Create a Kubernetes cluster&lt;/p&gt;

&lt;p&gt;Radius runs inside &lt;a href="https://docs.radapp.io/guides/operations/kubernetes/"&gt;Kubernetes&lt;/a&gt;. Create one from the &lt;a href="https://docs.radapp.io/guides/operations/kubernetes/overview/#supported-kubernetes-clusters"&gt;supported k8s clusters&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don’t have a preferred way to create Kubernetes clusters, you could try using &lt;a href="https://k3d.io/v5.6.0/"&gt;k3d&lt;/a&gt;, which runs a minimal Kubernetes distribution in Docker.&lt;/p&gt;

&lt;p&gt;Ensure your cluster is set as your current context:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl config current-context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize a new &lt;a href="https://docs.radapp.io/guides/deploy-apps/environments/overview/"&gt;Radius Environment&lt;/a&gt; with &lt;a href="https://docs.radapp.io/reference/cli/rad_init/"&gt;rad init&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rad init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select &lt;code&gt;Yes&lt;/code&gt; to setup the app.bicep in the current directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Initializing Radius...

🕔 Install Radius v0.28
   - Kubernetes cluster: kind
   - Kubernetes namespace: radius-system
⏳ Create new environment default
   - Kubernetes namespace: default
   - Recipe pack: local-dev
⏳ Scaffold application
⏳ Update local configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the initialization by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deployments -n radius-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You should see:

NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
applications-rp           1/1     1            1           53s
bicep-de                  1/1     1            1           53s
controller                1/1     1            1           53s
ucp                       1/1     1            1           53s
contour-contour           1/1     1            1           46s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use &lt;a href="https://docs.radapp.io/reference/cli/rad_env_list/"&gt;rad env list&lt;/a&gt; to view your environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rad env list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;We are now done setting up radius on our local machine&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;In the next part we will check a tutorial of creating an app using radius and its features in deep &lt;/p&gt;

&lt;p&gt;Thank you &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;References&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://docs.radapp.io/"&gt;Offical Radius Documentation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>infrastructureascode</category>
      <category>cloudnative</category>
      <category>containers</category>
    </item>
    <item>
      <title>Deploy Kubernetes Cluster via Ansible and Kind</title>
      <dc:creator>Kumail Rizvi</dc:creator>
      <pubDate>Wed, 15 Feb 2023 09:47:25 +0000</pubDate>
      <link>https://dev.to/kumail1232/deploy-kubernetes-via-ansible-and-kind-271o</link>
      <guid>https://dev.to/kumail1232/deploy-kubernetes-via-ansible-and-kind-271o</guid>
      <description>&lt;p&gt;Kubernetes has become the go-to solution for container orchestration, allowing developers to easily manage and scale their containerized applications. However, setting up and managing a Kubernetes cluster can be a complex task. This is where Ansible comes in – it is a powerful automation tool that can simplify the deployment and management of Kubernetes clusters. In this blog, we will explore how to use Ansible to deploy a Kubernetes cluster using KIND (Kubernetes IN Docker).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is KIND?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;KIND is a tool that allows you to run Kubernetes clusters inside Docker containers. It is lightweight and easy to set up, making it an ideal choice for testing and development environments. KIND also supports creating multi-node clusters, making it a good choice for more complex environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting up the environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before we can deploy a Kubernetes cluster using Ansible and KIND, we need to set up the environment. First, we need to install Docker and Ansible on our system. Then, we need to install KIND. We can do this by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
$ chmod +x ./kind
$ sudo mv ./kind /usr/local/bin/kind
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once we have KIND installed, we can use it to create a new Kubernetes cluster. We can create a cluster with a single node by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kind create cluster --name my-cluster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new Kubernetes cluster named "my-cluster" with a single node (you can use any name while creating a new cluster )&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploying Kubernetes using Ansible&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we have our environment set up, we can use Ansible to deploy Kubernetes. Ansible allows us to automate the process of installing and configuring Kubernetes on our cluster.&lt;/p&gt;

&lt;p&gt;First, we need to create an Ansible inventory file that specifies the hosts we want to configure. We can create a file named inventory.ini with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[kubernetes-nodes]
localhost ansible_connection=local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This specifies that we want to configure the localhost host as a Kubernetes node.&lt;/p&gt;

&lt;p&gt;Next, we need to create an Ansible playbook that defines the tasks we want to perform. We can create a file named deploy.yml with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: Install Kubernetes
  hosts: kubernetes-nodes
  tasks:
  - name: Install kubeadm, kubelet, and kubectl
    become: true
    apt:
      name: ['kubelet','kubeadm','kubectl']
      state: present

  - name: Initialize Kubernetes cluster
    become: true
    command: kubeadm init --pod-network-cidr=10.244.0.0/16

  - name: Copy kubeconfig to user's home directory
    become: true
    copy:
      src: /etc/kubernetes/admin.conf
      dest: /home/user/.kube/config
      remote_src: yes

  - name: Install Calico CNI
    become: true
    command: kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; &lt;br&gt;
Here iam using CNI ( Container Network Interface ) as Calico , you can use any different CNI such as Flannel, Canal etc &lt;/p&gt;

&lt;p&gt;This playbook installs the necessary packages (kubelet, kubeadm, and kubectl), initializes the Kubernetes cluster using kubeadm, copies the kubeconfig file to the user's home directory, and installs the Calico CNI.&lt;/p&gt;

&lt;p&gt;We can then run the playbook using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ansible-playbook -i inventory.ini deploy.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will run the deploy.yml playbook on the localhost host, configuring it as a Kubernetes node and deploying the necessary components.&lt;/p&gt;

&lt;p&gt;That's it and we are done. We created an Kubernetes cluster with the help of ansible and kind&lt;/p&gt;

&lt;p&gt;Thank you and I hope you enjoy it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html" rel="noopener noreferrer"&gt;https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kind.sigs.k8s.io/" rel="noopener noreferrer"&gt;https://kind.sigs.k8s.io/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.suse.com/c/rancher_blog/comparing-kubernetes-cni-providers-flannel-calico-canal-and-weave/#:%7E:text=In%20this%20article%2C%20we'll,containers%20are%20created%20or%20destroyed" rel="noopener noreferrer"&gt;https://www.suse.com/c/rancher_blog/comparing-kubernetes-cni-providers-flannel-calico-canal-and-weave/#:~:text=In%20this%20article%2C%20we'll,containers%20are%20created%20or%20destroyed&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
