<?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: Sina Tavakkol</title>
    <description>The latest articles on DEV Community by Sina Tavakkol (@sina14).</description>
    <link>https://dev.to/sina14</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%2F420698%2F62dd2832-d79d-45e0-a53e-99d4f0d328af.PNG</url>
      <title>DEV Community: Sina Tavakkol</title>
      <link>https://dev.to/sina14</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sina14"/>
    <language>en</language>
    <item>
      <title>Building Local AI Agents: A Practical Guide to Frameworks and Deployment</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Wed, 19 Feb 2025 18:27:25 +0000</pubDate>
      <link>https://dev.to/sina14/building-local-ai-agents-a-practical-guide-to-frameworks-and-deployment-4hi1</link>
      <guid>https://dev.to/sina14/building-local-ai-agents-a-practical-guide-to-frameworks-and-deployment-4hi1</guid>
      <description>&lt;h2&gt;
  
  
  Part 2/3
&lt;/h2&gt;

&lt;p&gt;Welcome back to our three-part series on AI Agents. In the first article, "&lt;a href="https://dev.to/sina14/ai-agents-explained-architecture-benefits-and-real-world-applications-technical-deep-dive-17f5"&gt;AI Agents Explained: Architecture, Benefits, and Real-World Applications&lt;/a&gt;" we established a solid understanding of what AI Agents are, their internal components, and the advantages they offer.&lt;/p&gt;

&lt;p&gt;Now, we move into the practical realm. In this second article, we'll explore how to build and deploy AI Agents locally using popular frameworks and tools.&lt;/p&gt;

&lt;p&gt;We'll also present a step-by-step guide and a simple code example to get you started. The final article will dive into real world examples with in-depth explanations and sample codes. This hands-on guide will empower you to create your own AI Agents and leverage their capabilities on your own hardware.&lt;/p&gt;




&lt;h2&gt;
  
  
  Introduction to Local AI Agent Deployment
&lt;/h2&gt;

&lt;p&gt;Deploying AI Agents locally offers several key benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Privacy&lt;/strong&gt;: Data is processed on your machine, keeping sensitive information under your control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Low Latency&lt;/strong&gt;: Local processing removes network delays, allowing for quicker response times, which is crucial for real-time applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Offline Access&lt;/strong&gt;: Agents can work without an internet connection, making them perfect for remote areas.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost Savings&lt;/strong&gt;: You can save on ongoing cloud computing costs by running agents on your own setup.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This article highlights practical tools and techniques to take advantage of these benefits.&lt;/p&gt;




&lt;h2&gt;
  
  
  Frameworks and Tools for Local AI Agent Development
&lt;/h2&gt;

&lt;p&gt;Several frameworks and tools simplify the process of building and deploying AI Agents locally. We'll focus on three prominent options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ollama&lt;/strong&gt;: Ollama simplifies the process of deploying and running Large Language Models (LLMs) locally. It handles the complexities of model management, allowing you to quickly deploy and experiment with different LLMs without worrying about underlying infrastructure. Ollama is designed to work with a wide array of models, so we can easily integrate this with the other options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LangChain&lt;/strong&gt;: LangChain is a powerful framework for building applications powered by language models. It provides a modular and flexible architecture for model integration, data connection, agent creation, and more. Its modular design allows you to customize every aspect of your agent's behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AutoGen (Microsoft)&lt;/strong&gt;: AutoGen enables the development of LLM applications with multiple agents that can converse with each other to solve tasks. It simplifies the orchestration, optimization, and automation of complex workflows involving multiple LLMs and tools.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choosing the right framework depends on your specific needs and the complexity of your project. For simple agents, LangChain might suffice, while AutoGen is better suited for multi-agent systems. LangChain and AutoGen are more complete tools, so Ollama can be used as a module for these.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting up Your Environment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Create a Virtual Environment:
&lt;/h3&gt;

&lt;p&gt;Let's walk through the process of setting up your development environment using LangChain, as it's very powerful for deploying agents. These instructions assume you have Python 3.7+ installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv venv
&lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate  &lt;span class="c"&gt;# On Linux/macOS&lt;/span&gt;
venv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate  &lt;span class="c"&gt;# On Windows&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Explanation&lt;/strong&gt;: A virtual environment isolates your project's dependencies from the system-wide Python installation, preventing conflicts and ensuring reproducibility.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Install Dependencies:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;langchain openai chromadb python-dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Explanation&lt;/strong&gt;: pip is Python's package installer. This command installs the following packages:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;langchain&lt;/strong&gt;: The LangChain framework.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;openai&lt;/strong&gt;: *OpenAI'*s Python library, used for interacting with OpenAI models (you'll need an API key).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;chromadb&lt;/strong&gt;: A vector database for storing embedding. ChromaDB is lightweight and easy to use for local development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;python-dotenv&lt;/strong&gt;: For loading environment variables from a &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Install Ollama:
&lt;/h3&gt;

&lt;p&gt;Follow Ollama's steps to install it at &lt;a href="https://ollama.com/" rel="noopener noreferrer"&gt;ollama.com&lt;/a&gt;.&lt;br&gt;
Make sure to download and test your local LLM before continue.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Set up API Keys:
&lt;/h3&gt;

&lt;p&gt;Create a &lt;code&gt;.env&lt;/code&gt; file in your project directory. This file will store sensitive information like API keys separately from your code.&lt;/p&gt;

&lt;p&gt;Add your OpenAI API key and Ollama URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
OLLAMA_BASE_URL="http://localhost:11434"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Load Environment Variables:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dotenv&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dotenv&lt;/span&gt;

&lt;span class="nf"&gt;load_dotenv&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;openai_api_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ollama_base_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OLLAMA_BASE_URL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Explanation&lt;/strong&gt;: This code snippet loads the environment variables from the .env file into your Python script, making them accessible for use.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: You will need an account at OpenAI to use its models with API KEY. You can use the Ollama URL if you want to use one of the local models you have previously downloaded with Ollama.&lt;/p&gt;




&lt;h2&gt;
  
  
  Designing Your Agent's Architecture
&lt;/h2&gt;

&lt;p&gt;Before diving into code, let's outline the key architectural considerations for our simple AI Agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Defining Goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our agent's goal is to answer questions based on a local document. This is a common use case for information retrieval and knowledge management.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Choosing appropriate LLMs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will use OpenAI's gpt-3.5-turbo model or a local model, such as llama2, depending on your configuration.&lt;/li&gt;
&lt;li&gt;Consider the model's capabilities, cost, and latency when making your choice.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Choosing Memory/Storage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will load a document and create a vector embedding to respond to the questions. A vector embedding is a numerical representation of the text that captures its semantic meaning.&lt;/li&gt;
&lt;li&gt;ChromaDB will be used to store these embedding.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Selecting Tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We do not need any external tools for this basic example. However, in more complex scenarios, agents might require access to tools like web search, calculators, or external databases.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Basic Code Example: Question Answering Agent
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dotenv&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dotenv&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.document_loaders&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TextLoader&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.embeddings&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAIEmbeddings&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.vectorstores&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Chroma&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.llms&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Ollama&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.chains&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;RetrievalQA&lt;/span&gt;

&lt;span class="nf"&gt;load_dotenv&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;openai_api_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ollama_base_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OLLAMA_BASE_URL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 1. Load the Document
&lt;/span&gt;&lt;span class="n"&gt;loader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TextLoader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_document.txt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# Replace with your document path
&lt;/span&gt;&lt;span class="n"&gt;documents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;loader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Create Embeddings and Store in ChromaDB
&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAIEmbeddings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;openai_api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;openai_api_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# or HuggingFaceEmbeddings
&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Chroma&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_documents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 3. Choose LLM and Create RetrievalQA Chain
&lt;/span&gt;
&lt;span class="n"&gt;use_local_model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt; &lt;span class="c1"&gt;# Set it to false if you want to use OpenAI Model.
&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;use_local_model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;llm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Ollama&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ollama_base_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;llama2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# Replace with your model
&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;llm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;openai_api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;openai_api_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;qa&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;RetrievalQA&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_chain_type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chain_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stuff&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;retriever&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;as_retriever&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="c1"&gt;# 4. Ask Questions
&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is the main topic of this document?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;qa&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Explanation&lt;/strong&gt;:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Load the Document&lt;/strong&gt;: This code loads a text document using TextLoader. Replace "&lt;em&gt;your_document.txt&lt;/em&gt;" with the path to your local file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create Embedding&lt;/strong&gt;: It creates embedding from the document using OpenAI's embedding (or you can select another embedding model). Embedding are numerical representations of the text, allowing the agent to understand the semantic meaning of the document. These embedding are stored in a ChromaDB vector database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Choose LLM and Create QA Chain&lt;/strong&gt;: Here is where we change between OpenAI model or a local model with Ollama. Just select the variable use_local_model to true or false. Change the local model to the one you have available. The RetrievalQA chain combines the LLM with the ChromaDB retriever.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ask Questions&lt;/strong&gt;: The code prompts the agent with a question. The qa.run(query) method retrieves relevant information from the ChromaDB and uses the LLM to generate an answer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Before running&lt;/strong&gt;:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Replace "&lt;em&gt;YOUR_OPENAI_API_KEY&lt;/em&gt;" in your &lt;em&gt;.env&lt;/em&gt; file with your actual OpenAI API key or use local models with Ollama.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replace "&lt;em&gt;your_document.txt&lt;/em&gt;" with the path to a local text file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure Ollama is running and your local model is downloaded.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Troubleshooting Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API Key Errors&lt;/strong&gt;: Double-check that your OpenAI API key is correctly set in the .env file. If you're using a local model, ensure that you haven't set OPENAI_API_KEY accidentally. Common errors include missing keys, incorrect formatting, or expired keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dependency Issues&lt;/strong&gt;: If you encounter ModuleNotFoundError errors, ensure that all required packages are installed using &lt;code&gt;pip install&lt;/code&gt;. If you recently updated Python or pip, try upgrading pip with &lt;code&gt;pip install --upgrade pip&lt;/code&gt; and then reinstalling the dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model Loading Errors&lt;/strong&gt;: If you're using a local LLM and encounter errors related to loading the model, verify that Ollama is running correctly and that the specified model (llama2 in the example) is downloaded. Check Ollama's logs for detailed error messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Out of Memory Errors&lt;/strong&gt;: LLMs can be memory-intensive. If you encounter "out of memory" errors, try reducing the size of the document you're loading, using a smaller LLM, or increasing your system's RAM.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article, we've explored the practical steps for building and deploying AI Agents locally. We've discussed key frameworks, setting up the environment, and provided a basic code example. By using these tools, you can begin creating your own AI Agents and use their capabilities as you wish. In the next and final article, we'll look into advanced use cases and techniques to optimize AI Agent performance.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>rag</category>
    </item>
    <item>
      <title>AI Agents Explained: Architecture, Benefits, and Real-World Applications (Technical Deep Dive)</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Wed, 12 Feb 2025 19:38:57 +0000</pubDate>
      <link>https://dev.to/sina14/ai-agents-explained-architecture-benefits-and-real-world-applications-technical-deep-dive-17f5</link>
      <guid>https://dev.to/sina14/ai-agents-explained-architecture-benefits-and-real-world-applications-technical-deep-dive-17f5</guid>
      <description>&lt;p&gt;Part 1/3&lt;/p&gt;




&lt;p&gt;Welcome to the first article in a three-part series exploring the fascinating world of AI Agents. In this series, we will dive into the details of AI Agents, including their definition, architecture, deployment strategies, and real-world applications.&lt;/p&gt;

&lt;p&gt;In this first article, we will lay the foundation by providing a detailed overview of what AI Agents are, their internal components, and the benefits they offer across various industries.&lt;/p&gt;

&lt;p&gt;In the following articles, we'll move on to practical implementation, focusing on local deployment using tools like Ollama, LangChain, and AutoGen, and then explore advanced techniques and real-world use cases. Let's start by demystifying AI Agents and understanding their core principles.&lt;/p&gt;

&lt;p&gt;Artificial Intelligence is rapidly becoming a part of many aspects of our lives, and one of its most dynamic forms is the AI Agent. This article provides a detailed exploration of AI Agents, covering their definition, internal architecture, key algorithms, and real-world applications, with an emphasis on understanding their functionality and capabilities.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is an AI Agent? (Technical Definition)
&lt;/h2&gt;

&lt;p&gt;An AI Agent is a software entity characterized by its autonomy, reactivity, pro-activeness, and social ability. Unlike passive AI systems, AI Agents actively perceive their environment, reason about it using internal models, and take actions designed to achieve pre-defined goals. This autonomy is implemented through a cycle of sense-think-act.&lt;/p&gt;

&lt;h4&gt;
  
  
  Technically:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Autonomy&lt;/strong&gt;: Achieved through internal control structures that make decisions without constant external input. Often implemented using finite state machines, hierarchical task networks (HTNs), or behavior trees.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reactivity&lt;/strong&gt;: Agents respond to changes in the environment in a timely manner, using event-driven programming or reactive planning techniques.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pro-activeness&lt;/strong&gt;: Agents initiate actions to achieve their goals, using planning algorithms like &lt;em&gt;A*&lt;/em&gt;, &lt;em&gt;Monte Carlo Tree Search (MCTS)&lt;/em&gt;, or reinforcement learning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Social Ability&lt;/strong&gt;: Agents can communicate and interact with other agents or humans, using agent communication languages (&lt;em&gt;ACLs&lt;/em&gt;) like &lt;em&gt;KQML&lt;/em&gt; or &lt;em&gt;FIPA-ACL&lt;/em&gt; or APIs and standard internet protocols.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;** &lt;em&gt;FIPA-ACL&lt;/em&gt; is stands for Foundation for Intelligent Physical Agents - Agent Communication Language.&lt;/p&gt;

&lt;p&gt;** &lt;em&gt;KQML&lt;/em&gt; is stands for Knowledge Query and Manipulation Language.&lt;/p&gt;

&lt;p&gt;The core distinction between an AI Agent and a regular AI system is its goal-directed behavior and the ability to adapt its actions based on its perceptions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Components of an AI Agent (Technical Breakdown)
&lt;/h2&gt;

&lt;p&gt;Let's dissect the key components of an AI Agent from a technical perspective:&lt;/p&gt;

&lt;h4&gt;
  
  
  Perception (Sensors and Data Ingestion):
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;: Agents receive data through sensors or APIs. This can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Direct Sensors&lt;/strong&gt;: Physical sensors (cameras, microphones, LiDAR) that provide raw data. This data often requires pre-processing using techniques like image recognition (using convolutional neural networks - CNNs) or speech-to-text conversion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Ingestion&lt;/strong&gt;: Retrieving structured data from external services (e.g., weather APIs, stock market APIs). Requires handling authentication, data parsing (JSON, XML), and error handling.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Structures&lt;/strong&gt;: Perceived data is typically represented using structured data types like dictionaries, objects, or knowledge graphs.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Reasoning (Decision Making and Planning):
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Knowledge Representation&lt;/strong&gt;: Agents store knowledge about the world using various techniques:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Logical Representation&lt;/strong&gt;: Using propositional logic, first-order logic, or description logic to represent facts and rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Probabilistic Representation&lt;/strong&gt;: Using Bayesian networks, Markov models, or hidden Markov models (HMMs) to represent uncertainty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic Networks and Knowledge Graphs&lt;/strong&gt;: Representing relationships between entities using graph structures.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Planning Algorithms&lt;/strong&gt;: Agents use algorithms to plan actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Classical Planning&lt;/strong&gt;: Using algorithms like A*, STRIPS, or partial-order planning (POP) to find optimal plans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reinforcement Learning (RL)&lt;/strong&gt;: Training agents to learn optimal policies through trial and error. Algorithms include Q-learning, SARSA, and deep Q-networks (DQNs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rule-Based Systems&lt;/strong&gt;: Implementing decision-making using if-then-else rules.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Action (Effectors and API Interaction):
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;: Agents interact with the environment through effectors or API calls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Effectors&lt;/strong&gt;: Physical actuators (motors, robotic arms) that directly manipulate the environment. Requires low-level control and feedback mechanisms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Calls&lt;/strong&gt;: Making requests to external services (e.g., sending emails, posting to social media). Requires handling API authentication, request formatting, and response parsing.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  Learning (Adaptation and Optimization):
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supervised Learning&lt;/strong&gt;: Training agents on labeled data to predict future outcomes. Algorithms include linear regression, logistic regression, support vector machines (SVMs), and neural networks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unsupervised Learning&lt;/strong&gt;: Discovering patterns and structures in unlabeled data. Algorithms include clustering (k-means, hierarchical clustering) and dimensionality reduction (principal component analysis - PCA).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reinforcement Learning (RL)&lt;/strong&gt;: Training agents to optimize their behavior through rewards and penalties. Algorithms include Q-learning, SARSA, deep Q-networks (DQNs), and actor-critic methods.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Types of AI Agents (Technical Categorization)
&lt;/h2&gt;

&lt;p&gt;Here's a more technical breakdown of AI Agent types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simple Reflex Agents&lt;/strong&gt;: Implemented using simple conditional statements or look-up tables. Easy to implement but limited in complex environments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model-Based Reflex Agents&lt;/strong&gt;: Maintain an internal model of the world, typically implemented using state machines or Bayesian networks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Goal-Based Agents&lt;/strong&gt;: Use search algorithms like A* or planning algorithms like STRIPS to find optimal plans.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Utility-Based Agents&lt;/strong&gt;: Maximize expected utility, often using Markov decision processes (MDPs) or partially observable Markov decision processes (POMDPs).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning Agents&lt;/strong&gt;: Employ machine learning techniques like reinforcement learning, supervised learning, or unsupervised learning to adapt and improve their performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Benefits of Using AI Agents (Quantifiable Advantages)
&lt;/h2&gt;

&lt;p&gt;The benefits of AI Agents can be quantified and measured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased Efficiency&lt;/strong&gt;: Agents can automate tasks, reducing processing time and resource consumption by X% (where X depends on the specific application).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Accuracy&lt;/strong&gt;: Agents can perform tasks with greater precision and consistency than humans, reducing error rates by Y% (where Y depends on the task and the quality of the training data).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Personalization&lt;/strong&gt;: Agents can tailor experiences to individual users, increasing customer satisfaction by Z% (where Z depends on the quality of the personalization algorithm and the user's preferences).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: Agents can be easily scaled to handle increasing workloads, allowing organizations to grow without adding headcount.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost Reduction&lt;/strong&gt;: By automating tasks and improving efficiency, AI Agents can significantly reduce operational costs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Real-World Applications (Technical Examples)
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Virtual Assistants:
&lt;/h4&gt;

&lt;p&gt;Technical Details: Use natural language processing (NLP) techniques (e.g., BERT, GPT) for speech recognition, natural language understanding (NLU), and natural language generation (NLG). Employ dialogue management systems to handle conversations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Autonomous Vehicles:
&lt;/h4&gt;

&lt;p&gt;Technical Details: Use computer vision (CNNs) for object detection and tracking, sensor fusion algorithms (e.g., Kalman filters) to combine data from multiple sensors (cameras, LiDAR, radar), and path planning algorithms (e.g., A*, RRT) to navigate roads.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fraud Detection:
&lt;/h4&gt;

&lt;p&gt;Technical Details: Use machine learning algorithms (e.g., logistic regression, support vector machines, neural networks) to identify fraudulent transactions based on historical data.&lt;/p&gt;

&lt;h4&gt;
  
  
  Personalized Recommendations:
&lt;/h4&gt;

&lt;p&gt;Technical Details: Use collaborative filtering algorithms, content-based filtering algorithms, or matrix factorization techniques to recommend products and services based on user preferences and browsing history.&lt;/p&gt;

&lt;h4&gt;
  
  
  Robotics:
&lt;/h4&gt;

&lt;p&gt;Technical Details: Use reinforcement learning algorithms to train robots to perform complex tasks autonomously in manufacturing, healthcare, and exploration.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This technical deep dive has provided a comprehensive overview of AI Agents, covering their definition, architecture, key algorithms, and real-world implementations. By understanding the underlying technical principles, you can appreciate the power and versatility of AI Agents and their potential to transform various industries.&lt;/p&gt;

&lt;p&gt;In the next article, we will delve into the practical aspects of building and deploying your own AI Agents locally.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>nlp</category>
      <category>llm</category>
      <category>agents</category>
    </item>
    <item>
      <title>Your Guide to Local LLMs: Ollama Deployment, Models, and Use Cases</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Wed, 05 Feb 2025 16:15:57 +0000</pubDate>
      <link>https://dev.to/sina14/your-guide-to-local-llms-ollama-deployment-models-and-use-cases-2jng</link>
      <guid>https://dev.to/sina14/your-guide-to-local-llms-ollama-deployment-models-and-use-cases-2jng</guid>
      <description>&lt;p&gt;Part 2/2&lt;/p&gt;




&lt;p&gt;Deploying Large Language Models (LLMs) locally with Ollama offers significant benefits in performance, security, and customization, addressing challenges like privacy concerns, latency, and recurring costs associated with cloud-based AI.&lt;/p&gt;

&lt;p&gt;Ollama is a groundbreaking tool that lets you run powerful LLMs on your local machine, and this guide covers everything you need to know, from requirements and deployment to model selection and use cases.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3n0us84km5lc80w1hpzb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3n0us84km5lc80w1hpzb.jpg" alt="OLLAMA-LOCAL-GUIDE" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Introduction: Embracing the Local AI Revolution
&lt;/h2&gt;

&lt;p&gt;Ollama is a game-changer for anyone seeking to explore the capabilities of large language models without the limitations of cloud-based solutions. As we briefly covered in a &lt;a href="https://dev.to/sina14/unlocking-ais-potential-ollamas-local-revolution-in-ai-development-1945"&gt;Unlocking AI's Potential: Ollama's Local Revolution in AI Development&lt;/a&gt;, this tool simplifies the process of setting up and managing LLMs locally.&lt;/p&gt;

&lt;p&gt;With Ollama, you can take advantage of privacy, offline capabilities, and the low latency that comes with running AI on your own hardware. This guide is designed to equip you with the practical knowledge needed to start harnessing the power of local LLMs with Ollama today.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Minimum Requirements: What You Need to Get Started
&lt;/h2&gt;

&lt;p&gt;Before you begin your journey with Ollama, let's examine the essential hardware and software components needed for a smooth experience. Keep in mind that these requirements are general guidelines, and the specific demands may vary based on the model you choose and the complexity of your use cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hardware Requirements
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;RAM&lt;/strong&gt;: Random Access Memory (RAM) is crucial for running LLMs. Aim for a minimum of 8GB, but 16GB is highly recommended. Some larger models will require even more RAM. The more RAM you have, the more fluent your model will be without lagging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CPU&lt;/strong&gt;: A modern CPU is needed to run Ollama. While the model itself primarily relies on RAM, the CPU will play a role in general speed. (Intel i5 or equivalent, preferably i7 or higher).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disk Space&lt;/strong&gt;: The LLM models are large and can consume a significant amount of disk space, so plan accordingly. Each model can easily range from a few to several gigabytes. Ensure your system has enough storage available. 50GB is a good start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPU (Optional, but Highly Recommended)&lt;/strong&gt;: While not strictly required, a compatible GPU will greatly accelerate model inference. If you have a NVIDIA GPU with CUDA support or an Apple Silicon GPU (M1/M2/M3), you should certainly leverage it for faster speeds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Software Requirements
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Operating System&lt;/strong&gt;: Linux and macOS are preferred. Windows users should use Windows Subsystem for Linux (WSL2) for compatibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containerization&lt;/strong&gt;: Docker is recommended for isolating dependencies and ensuring reproducibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Programming Environment&lt;/strong&gt;: A stable Python setup with current versions of machine learning libraries (e.g., PyTorch or TensorFlow).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Internet Connectivity&lt;/strong&gt;: Required for initial setup, updates, and integration, though the core deployment runs locally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The requirements above are minimums and will change drastically based on the chosen model. For example, a small, lightweight model like phi-2 will work well with 8GB of RAM, but larger models like llama2:13b will need more. Always check the model's documentation for detailed requirements.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. How to Deploy a Model with Ollama (Minimal Steps)
&lt;/h2&gt;

&lt;p&gt;Here are the fundamental steps to get a model up and running:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;: First, ensure you have Ollama installed on your system. Visit the official Ollama website &lt;em&gt;&lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;https://ollama.com&lt;/a&gt;&lt;/em&gt; to download the correct version for your OS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download a Model&lt;/strong&gt;: Open your terminal and use the command &lt;code&gt;ollama run &amp;lt;model_name&amp;gt;&lt;/code&gt;. For example, to download and run the llama2 model, you would type &lt;code&gt;ollama run llama2&lt;/code&gt;. Ollama will automatically download the required model files if they are not already present.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interact with the Model&lt;/strong&gt;: After the model is loaded, you can start interacting with it by typing your prompts directly into the terminal. The model will generate text responses based on your input. For example, you can ask "&lt;em&gt;Hello, who are you&lt;/em&gt;?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop the Model&lt;/strong&gt;: To stop the running model, simply close the terminal window or use &lt;code&gt;CTRL+C&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Top 5 Open-Source LLMs for Ollama: A Curated List
&lt;/h2&gt;

&lt;p&gt;Ollama provides a wide array of available models. Here are five popular open-source LLMs that are excellent for local deployment, each selected for their versatility and performance:&lt;/p&gt;

&lt;h3&gt;
  
  
  Llama 2 (Various Sizes):
&lt;/h3&gt;

&lt;p&gt;Description: Llama 2, developed by Meta, is a powerful general-purpose language model with multiple size variants (7B, 13B, 70B).&lt;/p&gt;

&lt;p&gt;Use Cases: Text generation, summarization, content creation, and more.&lt;/p&gt;

&lt;p&gt;Ollama usage: You can select the different variations using tags in Ollama (e.g. llama2, llama2:13b, llama2:70b).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why it's here: Provides good overall performance and several size options for different needs.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistral 7B:
&lt;/h3&gt;

&lt;p&gt;Description: Mistral 7B is a small, efficient model that achieves impressive performance.&lt;/p&gt;

&lt;p&gt;Use Cases: General-purpose tasks, fast inference, and is more efficient than the baseline Llama2.&lt;/p&gt;

&lt;p&gt;Ollama usage: Download the model with &lt;code&gt;ollama run mistral&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why it's here: It provides a good balance between performance and low resource usage.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Gemma (Google):
&lt;/h3&gt;

&lt;p&gt;Description: Gemma, developed by Google, is the newest model in Google's lineup of open models. It provides a good range of performance and sizes.&lt;/p&gt;

&lt;p&gt;Use Cases: General-purpose tasks and experimenting with Google's latest model.&lt;/p&gt;

&lt;p&gt;Ollama usage: Download the model with &lt;code&gt;ollama run gemma&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why it's here: Gives the opportunity to experiment with one of the most recent open-source LLMs.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Phi-2 (Microsoft):
&lt;/h3&gt;

&lt;p&gt;Description: Phi-2 is a compact model that can perform complex language tasks.&lt;/p&gt;

&lt;p&gt;Use Cases: Efficient for mobile devices or devices with limited resources, can still perform complex task with impressive results.&lt;/p&gt;

&lt;p&gt;Ollama usage: Download the model with &lt;code&gt;ollama run phi&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why it's here: Offers a great option for resource-constrained environments.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CodeLlama (Various Sizes):
&lt;/h3&gt;

&lt;p&gt;Description: CodeLlama, also from Meta, is specifically designed for code generation and understanding.&lt;/p&gt;

&lt;p&gt;Use Cases: Code completion, bug finding, programming language assistance, generating new code snippets.&lt;/p&gt;

&lt;p&gt;Ollama usage: You can select the different variations using tags in Ollama (e.g. codellama, codellama:7b).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why it's here: An excellent tool for developers to assist with daily tasks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Always check the Ollama library for the latest models and versions: &lt;a href="https://ollama.com/library" rel="noopener noreferrer"&gt;https://ollama.com/library&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Top 5 Common Usages for Local LLMs
&lt;/h2&gt;

&lt;p&gt;Now that you have your model running, what can you do with it? Here are five popular use cases for local LLMs, along with a suggested model for each:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Text Generation &amp;amp; Creative Writing&lt;/strong&gt;: Generate articles, stories, poems, or creative marketing copy.&lt;/p&gt;

&lt;p&gt;Suggested Model: *&lt;em&gt;llama2 *&lt;/em&gt; is a good general purpose model for this task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Assistance&lt;/strong&gt;: Generate code snippets, find bugs, or provide documentation.&lt;/p&gt;

&lt;p&gt;Suggested Model: *&lt;em&gt;codellama *&lt;/em&gt; is specifically designed for code-related tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Information Extraction &amp;amp; Summarization&lt;/strong&gt;: Summarize long documents, extract relevant data points, create short analysis from long texts.&lt;/p&gt;

&lt;p&gt;Suggested Model: &lt;strong&gt;mistral&lt;/strong&gt; is known for its good summarization capabilities, while being efficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Text Translation&lt;/strong&gt;: Perform translations without relying on online APIs, maintaining your privacy.&lt;/p&gt;

&lt;p&gt;Suggested Model: &lt;strong&gt;gemma&lt;/strong&gt; is trained in multiple languages and can perform very well in translations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Personalized Chatbots&lt;/strong&gt;: Create custom chatbots with your own specific instructions, personality, style, and prompts.&lt;/p&gt;

&lt;p&gt;Suggested Model: &lt;strong&gt;phi-2&lt;/strong&gt; is great for creating a custom chatbot thanks to its efficiency, and is easy to customize.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other suggestions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;- GPT-Neo/GPT-J&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overview: Renowned for robust text generation and flexibility across various NLP tasks.&lt;/p&gt;

&lt;p&gt;Strengths: Delivers human-like text and is highly adaptable to different applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- LLaMA&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overview: Balances efficiency with high performance, ideal for both research and practical applications.&lt;/p&gt;

&lt;p&gt;Strengths: Optimized for resource-constrained environments without compromising on accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- GPT-2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overview: An established model with extensive community support and reliable performance.&lt;/p&gt;

&lt;p&gt;Strengths: Versatile and well-documented, making it a dependable choice for many conversational applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- BLOOM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overview: A multilingual model adept at processing inputs in multiple languages.&lt;/p&gt;

&lt;p&gt;Strengths: Its multilingual capabilities make it a prime choice for global applications and diverse datasets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- T5 (Text-to-Text Transfer Transformer)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overview: Converts all NLP tasks into a text-to-text format, offering a unified approach.&lt;/p&gt;

&lt;p&gt;Strengths: Exceptionally versatile, handling tasks ranging from translation to summarization with ease.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Related Features and Tips
&lt;/h2&gt;

&lt;p&gt;Ollama has many features worth exploring.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Model Management:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Downloading Models: Easily download different models using the command &lt;code&gt;ollama run &amp;lt;model_name&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Listing Models: Use &lt;code&gt;ollama list&lt;/code&gt; to see all downloaded models.&lt;/p&gt;

&lt;p&gt;Removing Models: Use &lt;code&gt;ollama rm &amp;lt;model_name&amp;gt;&lt;/code&gt; to remove a specific model.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Customization:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Custom Prompts: Adjust the behavior of the LLM with custom prompts and specific instructions.&lt;/p&gt;

&lt;p&gt;Changing Parameters: Experiment with parameters like temperature and top p to get different types of responses.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;API and Integration:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ollama provides an API that can be integrated into other applications. Check the docs for more information.&lt;/p&gt;

&lt;p&gt;It's straightforward to integrate it with other projects in your local environment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Security and Privacy:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Local LLMs do not send your data to the cloud by default. Everything happens on your local machine, so no data is shared by default.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Community:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ollama's community is growing, and you can find lots of help and ideas on their GitHub page.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Conclusion
&lt;/h2&gt;

&lt;p&gt;Deploying local LLMs with Ollama offers a powerful and flexible way to use advanced AI technologies while keeping control over your data and infrastructure. By meeting the necessary hardware and software requirements, following a simple deployment process, and choosing from top open-source models for specific needs, you can create custom AI solutions that boost innovation and efficiency.&lt;/p&gt;

&lt;p&gt;Whether you aim to automate customer support, streamline content creation, improve personal assistance, enhance educational tools, or speed up data analysis, Ollama gives you the tools to fully utilize modern language models. Embrace the future of local AI deployment and transform how you tackle real-world challenges.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>ollama</category>
      <category>nlp</category>
    </item>
    <item>
      <title>Unlocking AI's Potential: Ollama's Local Revolution in AI Development</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Wed, 29 Jan 2025 16:57:17 +0000</pubDate>
      <link>https://dev.to/sina14/unlocking-ais-potential-ollamas-local-revolution-in-ai-development-1945</link>
      <guid>https://dev.to/sina14/unlocking-ais-potential-ollamas-local-revolution-in-ai-development-1945</guid>
      <description>&lt;p&gt;Part 1/2&lt;/p&gt;




&lt;p&gt;Artificial Intelligence (AI) is no longer limited to high-powered servers and cloud platforms. With the introduction of Ollama, an open-source large language model (LLM), AI is now available to anyone with a regular laptop or desktop. Ollama is built to run locally, providing powerful AI features without needing internet access or cloud services. This article covers Ollama's history, main features, versions, use cases, and alternatives, offering a complete guide to this innovative tool.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Ollama?
&lt;/h2&gt;

&lt;p&gt;Ollama is a transformer-based large language model that is great at natural language processing (NLP) tasks. Unlike many AI models that need cloud infrastructure, Ollama is made to run on local hardware. This makes it perfect for developers, researchers, and businesses that value data privacy and security. Being open-source, it encourages community-driven improvements and customization, promoting innovation and collaboration.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Brief History of Ollama
&lt;/h2&gt;

&lt;p&gt;Ollama was developed by a team of researchers and engineers who wanted to create a powerful yet accessible AI model. The project started with a focus on natural language processing (NLP) and grew to include advanced techniques like transformer-based architectures, reinforcement learning, and fine-tuning for specific industries.&lt;br&gt;
Over time, Ollama has released several versions, each improving on the last with better features, performance, and capabilities.&lt;br&gt;
The open-source nature of Ollama has been crucial to its fast development. Community contributions have significantly refined the model, making it more efficient and versatile. This collaborative approach has kept Ollama at the forefront of AI innovation, providing users with a tool that is both powerful and adaptable.&lt;/p&gt;




&lt;h2&gt;
  
  
  AI Type and Core Features
&lt;/h2&gt;

&lt;p&gt;Ollama is built on transformer-based architecture, which has transformed NLP by enabling models to process and understand complex text sequences. This architecture allows Ollama to perform various tasks, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Text Generation&lt;/strong&gt;: Ollama can create human-like text, such as stories, poems, articles, and even code snippets. This makes it a valuable tool for content creators, developers, and researchers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Translation&lt;/strong&gt;: The model can accurately translate text between different languages, making it useful for global businesses and multilingual applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Summarization&lt;/strong&gt;: Ollama can condense long pieces of text into concise summaries, saving time for professionals who need to handle large amounts of information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Question Answering&lt;/strong&gt;: The model provides comprehensive and informative answers to a wide range of questions, making it a useful tool for educational and research purposes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Generation&lt;/strong&gt;: Ollama can help developers by generating code snippets, debugging code, and offering solutions to programming problems. This feature is particularly useful for speeding up software development.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Useful Use Cases for Ollama
&lt;/h2&gt;

&lt;p&gt;Ollama's versatility makes it applicable across a wide range of industries and tasks. Here are some of the most impactful use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI-Powered Development&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code Generation&lt;/strong&gt;: Ollama can automate the process of writing code, offering autocompletion and bug detection within integrated development environments (IDEs).&lt;br&gt;
&lt;strong&gt;Text-to-Code Conversion&lt;/strong&gt;: Developers can generate code snippets based on natural language prompts, speeding up the development process.&lt;br&gt;
API Integration: Ollama can be seamlessly integrated into software applications, enabling AI-powered features without relying on external services.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Research and Experimentation&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Natural Language Processing (NLP)&lt;/strong&gt;: Researchers can use Ollama to explore various NLP tasks, such as sentiment analysis, text summarization, and question answering.&lt;br&gt;
&lt;strong&gt;Machine Learning (ML) Research&lt;/strong&gt;: Ollama is ideal for conducting ML experiments and prototyping locally, without the need for cloud resources.&lt;br&gt;
&lt;strong&gt;Data Analysis&lt;/strong&gt;: The model can preprocess data and identify patterns using AI techniques, making it a valuable tool for data scientists.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creative Tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Content Creation&lt;/strong&gt;: Ollama can generate text, poems, scripts, and other creative content, helping writers overcome writer's block and explore new styles.&lt;br&gt;
&lt;strong&gt;Image Generation&lt;/strong&gt;: The model can be used to create original visuals, making it a useful tool for artists and designers.&lt;br&gt;
&lt;strong&gt;Music Generation&lt;/strong&gt;: Ollama can experiment with music generation based on custom datasets, offering new possibilities for musicians and composers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Personal AI Assistants&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Local AI Chatbots&lt;/strong&gt;: Users can create personalized chatbots that run locally, ensuring data privacy and security.&lt;br&gt;
&lt;strong&gt;Personal Knowledge Bases&lt;/strong&gt;: Ollama can be used to develop custom knowledge bases that learn and adapt to individual needs, offering personalized assistance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Accessibility and Education&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI Education&lt;/strong&gt;: Ollama can be used to teach students AI concepts through hands-on experiments, making it a valuable tool for educators.&lt;br&gt;
&lt;strong&gt;Supporting People with Disabilities&lt;/strong&gt;: The model can be used to develop tools like text-to-speech applications, assisting individuals with disabilities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Offline Applications&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mobile Applications&lt;/strong&gt;: Ollama can run AI features within mobile apps without requiring an internet connection, making it ideal for offline use.&lt;br&gt;
&lt;strong&gt;Embedded Systems&lt;/strong&gt;: The model can be implemented on edge devices with limited processing power, enabling AI capabilities in resource-constrained environments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Security&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sensitive Data Analysis&lt;/strong&gt;: Ollama can process sensitive information locally, ensuring that data is not exposed to external services.&lt;br&gt;
&lt;strong&gt;Privacy-Preserving AI&lt;/strong&gt;: The model can implement secure algorithms for private data analysis, making it ideal for industries that prioritize data privacy.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Testing and Prototyping&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Local AI Application Testing&lt;/strong&gt;: Developers can test AI features locally before deploying them to cloud platforms, reducing the risk of errors.&lt;br&gt;
&lt;strong&gt;Rapid Prototyping&lt;/strong&gt;: Ollama enables quick iteration on prototypes, allowing developers to experiment with AI capabilities without extensive setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-world Examples or Case Studies
&lt;/h2&gt;

&lt;p&gt;For example, a software development company might use Ollama to automate code generation and debugging, which can reduce development time and improve code quality. By sharing specific metrics, like a 30% reduction in development time or a 20% increase in code efficiency, the article can show Ollama's real impact.&lt;/p&gt;

&lt;p&gt;Similarly, an educational institution could use Ollama to create personalized learning materials and virtual tutors, which can enhance student engagement and performance.&lt;/p&gt;

&lt;p&gt;Case studies showing how students achieved higher test scores or completed assignments more efficiently with Ollama's help would make the benefits clearer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Versions and Updates
&lt;/h2&gt;

&lt;p&gt;Ollama has gone through several updates, with each version bringing major improvements in performance, efficiency, and features. Key versions include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Version 1.0&lt;/strong&gt;: Focused on basic NLP functions, allowing simple text-based interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version 2.0&lt;/strong&gt;: Introduced transformer-based models, improving accuracy and understanding of context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version 3.0&lt;/strong&gt;: Added multimodal capabilities and real-time adaptability for complex scenarios.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latest Release&lt;/strong&gt;: Offers advanced fine-tuning, integration with third-party apps, and improved scalability for enterprise-level applications.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Upcoming Features or Developments
&lt;/h2&gt;

&lt;p&gt;Ollama is actively being developed, and several exciting features and developments are on the horizon:&lt;/p&gt;

&lt;h3&gt;
  
  
  Enhanced Model Support:
&lt;/h3&gt;

&lt;p&gt;Expect the addition of even more cutting-edge models to the Ollama ecosystem. This could include newer versions of existing models like Llama, as well as entirely new models from various research institutions and organizations.&lt;br&gt;
Improved support for diverse model architectures, such as those specializing in specific tasks like code generation, translation, or multi-modal understanding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance and Efficiency:
&lt;/h3&gt;

&lt;p&gt;Ongoing optimizations to improve the speed and efficiency of running LLMs locally. This could involve advancements in hardware acceleration, more efficient memory usage, and optimized inference techniques.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Experience:
&lt;/h3&gt;

&lt;p&gt;Refinements to the user interface and developer experience, making it easier to interact with models, manage configurations, and integrate Ollama into various applications.&lt;br&gt;
Potentially more user-friendly tools for fine-tuning models on specific datasets or tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Community and Ecosystem Growth:
&lt;/h3&gt;

&lt;p&gt;Continued expansion of the Ollama community, fostering collaboration, knowledge sharing, and the development of innovative applications built on the platform.&lt;br&gt;
Increased support for third-party tools and integrations, enabling users to seamlessly connect Ollama with other software and services.&lt;/p&gt;

&lt;h3&gt;
  
  
  Focus on Safety and Ethics:
&lt;/h3&gt;

&lt;p&gt;Continued efforts to address safety and ethical considerations, such as mitigating bias, preventing the generation of harmful content, and ensuring responsible AI development.&lt;/p&gt;

&lt;p&gt;Please note that this is not an exhaustive list, and specific features and timelines may change. The best way to stay updated on the latest developments is to follow the official Ollama channels, such as their website, GitHub repository, and social media.&lt;/p&gt;

&lt;p&gt;By staying informed about these upcoming features, you can leverage the full potential of Ollama and stay at the forefront of the evolving LLM landscape.&lt;/p&gt;




&lt;h2&gt;
  
  
  Alternatives to Ollama
&lt;/h2&gt;

&lt;p&gt;While Ollama is a powerful tool, several other open-source and proprietary LLMs are worth considering based on specific needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stable Diffusion&lt;/strong&gt;: A text-to-image model that generates stunning visuals from simple text descriptions. It's particularly popular in creative industries for generating art and design assets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Llama 2&lt;/strong&gt;: A family of large language models developed by Meta, offering a range of sizes and capabilities. Llama 2 is known for its versatility and is widely used in research and commercial applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GPT-NeoX&lt;/strong&gt;: A large-scale open-source transformer model developed by EleutherAI, designed to replicate the capabilities of closed-source models like GPT-3. It's popular among researchers and developers for its flexibility and open-source nature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BLOOM&lt;/strong&gt;: An open-source multilingual LLM developed by BigScience. BLOOM is designed to support multiple languages and is particularly useful for global applications requiring multilingual support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ChatGPT by OpenAI&lt;/strong&gt;: A widely known conversational AI model that excels in generating human-like text and engaging in interactive dialogues. It's accessible via API and is used in various applications, from customer support to content creation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google Gemini&lt;/strong&gt;: Google's conversational AI model, designed to compete with ChatGPT. Gemini integrates with Google's ecosystem and is particularly strong in providing real-time information and search capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hugging Face Transformers&lt;/strong&gt;: A library offering a wide range of pre-trained models for NLP tasks. Hugging Face is known for its ease of use and extensive model repository, making it a go-to resource for developers and researchers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cohere&lt;/strong&gt;: A platform offering powerful language models for text generation, classification, and summarization. Cohere is known for its enterprise-grade solutions and ease of integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jurassic-1 by AI21 Labs&lt;/strong&gt;: A large language model designed for high-quality text generation and understanding. It's used in applications ranging from content creation to customer support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Falcon by TII (Technology Innovation Institute)&lt;/strong&gt;: An open-source LLM known for its high performance and efficiency. Falcon is designed for both research and commercial use, offering a strong alternative to other large models.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Ollama marks a major step forward in making AI accessible to everyone. It can run on regular consumer hardware and is open-source, making it available to many users. Whether you're a developer, researcher, or creative professional, Ollama provides a powerful tool to explore AI's possibilities. As the project grows, we can look forward to more innovative applications and advancements in the future.&lt;/p&gt;




&lt;h2&gt;
  
  
  Stay Ahead of the Curve
&lt;/h2&gt;

&lt;p&gt;Explore Ollama today and see how it can transform your interactions with AI, whether you're involved in development, research, creative tasks, or personal assistance. With its versatility, accessibility, and strong capabilities, Ollama is set to become an important part of the rapidly changing world of AI-driven solutions.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ollama</category>
      <category>llm</category>
      <category>nlp</category>
    </item>
    <item>
      <title>Understanding Observability</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Thu, 23 Jan 2025 09:55:42 +0000</pubDate>
      <link>https://dev.to/sina14/understanding-observability-2k9j</link>
      <guid>https://dev.to/sina14/understanding-observability-2k9j</guid>
      <description>&lt;p&gt;The realm of observability and proactive monitoring in IT operations is undergoing rapid transformation, propelled by key trends and factors that are redefining this field.&lt;/p&gt;

&lt;p&gt;Observability in IT operations is about gaining deep insights into the health and performance of systems and applications. It involves a comprehensive approach to collecting, analyzing, and interpreting various types of data to ensure systems run smoothly and efficiently.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The landscape of observability and proactive monitoring in IT operations is rapidly evolving, driven by advancements in technology and methodologies. Key trends include the use of eBPF and OpenTelemetry for deeper insights, AI and machine learning for enhanced anomaly detection and predictive analysis, and full-stack and cloud-native observability for comprehensive visibility. The focus is shifting to proactive monitoring strategies, aligning IT operations with business needs, and leveraging automated and intelligent tools for improved system reliability and performance. This dynamic field emphasizes preventing issues before they impact users, ensuring high-quality service delivery.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The concept of observability in IT operations has evolved significantly over the years.&lt;/p&gt;

&lt;h3&gt;
  
  
  Early Beginnings
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1950s&lt;/strong&gt;: The roots of observability trace back to control theory, introduced by Rudolf E. Kálmán in 1959. Kálmán's work focused on understanding and managing complex systems by inferring their internal states from external outputs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Telemetry and Early Applications
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Early 20th Century&lt;/strong&gt;: Telemetry, the process of collecting data from remote or inaccessible systems, was used in aerospace and defense. This laid the groundwork for modern observability practices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Evolution in IT
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1980s-1990s&lt;/strong&gt;: As computer systems became more complex, the need for better monitoring tools grew.&lt;br&gt;&lt;br&gt;
Early monitoring tools focused on tracking predefined metrics and alerting when thresholds were breached.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2000s&lt;/strong&gt;: The rise of the internet and distributed systems led to the development of more sophisticated monitoring tools.&lt;br&gt;&lt;br&gt;
These tools began to provide deeper insights into system performance and reliability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modern Observability
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;2010s-Present&lt;/strong&gt;: The shift to cloud computing and microservices architectures introduced new challenges in maintaining system health.&lt;br&gt;&lt;br&gt;
Observability tools evolved to provide real-time insights, predictive analysis, and automated alerting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI and Machine Learning&lt;/strong&gt;: The integration of AI and machine learning has further enhanced observability, enabling predictive analysis and automated issue resolution.&lt;/p&gt;




&lt;h2&gt;
  
  
  I. &lt;strong&gt;Key Components of Observability&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Metrics&lt;/strong&gt;: These are numerical data points that measure various aspects of system performance, such as CPU usage, memory consumption, network throughput, etc. Metrics help you track and quantify the health of your systems over time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logs&lt;/strong&gt;: Logs are records of events that happen within your systems. They provide detailed information about what happened, when it happened, and why it happened. Logs are crucial for troubleshooting and identifying the root cause of issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Traces&lt;/strong&gt;: Traces track the flow of requests through your systems, from start to finish. They help you understand how different components interact and where delays or errors might be occurring. Traces are especially useful in distributed systems and microservices architectures.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  II. &lt;strong&gt;Benefits of Observability&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Unlocking the Core: Metrics, Logs, and Traces in Observability&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proactive Issue Detection&lt;/strong&gt;: With observability, you can detect and address issues before they impact users. By continuously monitoring metrics, logs, and traces, you can identify anomalies and potential problems early on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Faster Troubleshooting&lt;/strong&gt;: Observability provides detailed insights into system behavior, making it easier to diagnose and resolve issues quickly. This reduces downtime and improves system reliability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better Performance Optimization&lt;/strong&gt;: By analyzing performance data, you can identify bottlenecks and optimize your systems for better efficiency and scalability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Customer Experience&lt;/strong&gt;: Ensuring your systems are running smoothly and efficiently leads to a better experience for your users. Observability helps you maintain high levels of service quality and reliability.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  III. &lt;strong&gt;How It Works&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Mechanics of Observability: From Data Collection to Automation&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Collection&lt;/strong&gt;: Observability tools collect data from various sources, including system metrics, application logs, and traces. This data is gathered in real-time and stored for analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Analysis&lt;/strong&gt;: The collected data is analyzed to identify patterns, anomalies, and trends. Advanced analytics and machine learning techniques can be used to predict potential issues and recommend solutions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visualization&lt;/strong&gt;: Observability platforms provide dashboards and visualizations to help you understand and interpret the data. These visualizations make it easy to see the overall health of your systems and identify areas that need attention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Alerting and Automation&lt;/strong&gt;: Automated alerts notify you of any issues or anomalies detected by the observability tools. Some platforms also offer automation capabilities to take corrective actions automatically.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmltajywfdb144xw3dmoy.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmltajywfdb144xw3dmoy.jpeg" alt="img1" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Observability in IT operations is evolving rapidly, driven by advancements in technology and methodologies. It focuses on gaining deep insights into system health and performance through metrics, logs, and traces. Key trends include the use of eBPF and OpenTelemetry for deeper insights, AI and machine learning for enhanced anomaly detection, and full-stack and cloud-native observability for comprehensive visibility. The emphasis is on proactive monitoring, aligning IT operations with business needs, and leveraging automated tools to prevent issues before they impact users, ensuring high-quality service delivery.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  IV. Observability Trends:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Trending Now: The Future of Observability in IT Operations&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;eBPF (Extended Berkeley Packet Filter)&lt;/strong&gt;: This powerful technology allows you to run sandboxed programs within the Linux kernel. It's gaining popularity for its ability to provide low-overhead, deep visibility into system behavior, network traffic, and application performance, making it ideal for fine-grained observability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: High performance, low overhead, real-time insights without modifying applications.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenTelemetry (OTel)&lt;/strong&gt;: This CNCF project is rapidly becoming the standard for generating, collecting, and exporting telemetry data (traces, metrics, logs). It aims to unify observability by providing vendor-neutral APIs, SDKs, and tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Vendor-neutrality, interoperability, reduced lock-in, community driven.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Service Mesh Observability&lt;/strong&gt;: With the rise of microservices, service meshes (like &lt;em&gt;Istio&lt;/em&gt;, &lt;em&gt;Linkerd&lt;/em&gt;) are essential. Observability is moving towards deeper integration with service mesh capabilities, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Traffic Analysis&lt;/strong&gt;: Understanding communication patterns between services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency Analysis&lt;/strong&gt;: Pinpointing slow communication paths.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request Tracing&lt;/strong&gt;: Following requests as they move across services.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Enhanced understanding of microservice interactions and dependencies.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Synthetic Monitoring for Observability&lt;/strong&gt;: Beyond monitoring real user traffic, synthetic monitoring (using scripts to emulate user behavior) is becoming critical for proactively detecting availability and performance issues in specific workflows. It can be used with observibility tools to gain insights and detect early warning signs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Proactive detection, testing specific paths, identifying problems before they impact real users.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI-Powered Observability (AIOps)&lt;/strong&gt;: Machine learning and AI algorithms are being used to analyze observability data for anomaly detection, root cause analysis, predictive alerting, and capacity planning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Automates tasks, reduces human intervention, enables faster insights, improves predictive capabilities.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full-Stack Observability&lt;/strong&gt;: The push for complete visibility across all layers of the technology stack (infrastructure, network, application, user experience) rather than just focusing on one area.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Provides a holistic view of the system, helping to identify issues spanning multiple layers.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-Native Observability&lt;/strong&gt;: Solutions tailored for cloud environments, integrating with cloud-specific services and features. This is critical as cloud deployments become standard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Native support for cloud services, automated deployment, increased flexibility and scalability.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shift-Left Observability&lt;/strong&gt;: Incorporating observability principles and tools earlier in the software development lifecycle, allowing developers to monitor application performance during development, testing, and deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Faster feedback loops, earlier issue detection, reduces the chance of production issues.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Contextual Observability&lt;/strong&gt;: Integrating various data points with the application context to make the monitoring data more valuable. For example, combining observability data with deployment metadata, code versioning, and business-related metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Provides a more comprehensive understanding of the application and its environment.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost-Aware Observability&lt;/strong&gt;: As the volume of data grows, so do the costs. New approaches are focused on optimizing data ingestion, storage, and analysis to reduce costs while maintaining observability quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Helps manage and optimize the costs associated with monitoring large-scale systems.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  V. Proactive Monitoring Trends:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Staying Ahead: Proactive Monitoring Strategies for IT Success&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Predictive Monitoring&lt;/strong&gt;: Utilizing machine learning to analyze historical patterns and identify potential problems before they occur. This shifts the focus from reacting to incidents to preventing them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Reduces downtime, improves service reliability, increases efficiency.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Engineering&lt;/strong&gt;: Intentionally introducing controlled failures into the system to test its resilience and uncover weaknesses. This helps with building more robust systems that are less likely to fail in production.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Verifies resilience, identifies blind spots, improves the overall stability of systems.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automated Remediation&lt;/strong&gt;: Triggering automated actions based on alerts, such as restarting services, scaling resources, or rolling back deployments. This reduces the need for manual intervention and accelerates the resolution of issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Faster recovery, reduced downtime, improved efficiency, lower operational costs.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Telemetry-Driven Alerting&lt;/strong&gt;: Moving beyond traditional threshold-based alerts by using telemetry data to trigger more sophisticated and context-aware alerts. This helps to reduce alert fatigue and focus on genuinely important issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Reduced alert noise, improves focus on crucial problems, more effective alert management.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Intent-Based Monitoring&lt;/strong&gt;: Defining monitoring objectives based on business needs and user requirements. This ensures that monitoring is aligned with business goals rather than just focusing on technical metrics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Links IT operations to business needs, ensures monitoring is relevant and effective.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Site Reliability Engineering (SRE) Principles&lt;/strong&gt;: Implementing SRE practices and methodologies, including service level objectives (SLOs), service level indicators (SLIs), and error budgets, to ensure consistent performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Promotes a disciplined and proactive approach to operations.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Self-Healing Systems&lt;/strong&gt;: Creating systems that can automatically detect and resolve issues without human intervention. This involves combining automated monitoring, alerting, and remediation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Maximizes uptime, minimizes impact of failures, reduces need for manual intervention.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security Observability&lt;/strong&gt;: Integrating security metrics and events into the same observability platform to gain a unified view of performance and security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Why it's trending: Enhances security posture, allows detection of security incidents within performance monitoring.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  VI. Some Other Key Terms:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Decoding Observability: Essential Terms You Need to Know&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Telemetry&lt;/strong&gt;: The collection of data (metrics, traces, logs, events) used for monitoring and observability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SLO (Service Level Objective)&lt;/strong&gt;: A target for the desired performance or reliability of a service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SLI (Service Level Indicator)&lt;/strong&gt;: A metric used to measure the actual performance or reliability of a service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Error Budget&lt;/strong&gt;: The acceptable level of unreliability a service can experience before it negatively impacts users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AIOps&lt;/strong&gt;: Applying artificial intelligence and machine learning to IT operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;eBPF (Extended Berkeley Packet Filter)&lt;/strong&gt;: A powerful kernel technology for tracing and monitoring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenTelemetry (OTel)&lt;/strong&gt;: A standard for observability telemetry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synthetic Monitoring&lt;/strong&gt;: Monitoring by emulating user behavior.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy07ifvy482wngqn94id1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy07ifvy482wngqn94id1.jpeg" alt="img2" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  In Summary
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Evolving Landscape of Observability: Key Takeaways&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The landscape of observability and proactive monitoring in IT operations is dynamic and fast-paced. The trends are pointing towards:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deeper Insights&lt;/strong&gt;: Using new technologies like eBPF and OpenTelemetry to gain deeper visibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automation and Intelligence&lt;/strong&gt;: Using AI and machine learning for anomaly detection and predictive analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Holistic Views&lt;/strong&gt;: Combining performance metrics, traces, logs, and security data for comprehensive understanding.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proactive Strategies&lt;/strong&gt;: Moving towards proactive and predictive monitoring through predictive analysis and chaos engineering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Business Alignment&lt;/strong&gt;: Aligning IT monitoring with business needs and user requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Comprehensive Coverage&lt;/strong&gt;: Modern observability tools offer comprehensive coverage across various systems, applications, and infrastructure components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Actionable Insights&lt;/strong&gt;: These tools provide detailed information to help diagnose and resolve issues quickly, improving overall system reliability and performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These trends and terms represent a shift towards a more proactive, automated, and intelligent approach to managing IT systems, focusing on preventing problems rather than just reacting to them. Keeping up with these advancements is crucial for staying competitive and maintaining reliable IT services.&lt;/p&gt;

</description>
      <category>observability</category>
      <category>proactivemonitoring</category>
      <category>aiops</category>
      <category>cloudnative</category>
    </item>
    <item>
      <title>Go Harbor: A Deep Dive</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Fri, 17 Jan 2025 19:01:09 +0000</pubDate>
      <link>https://dev.to/sina14/go-harbor-a-deep-dive-2mn</link>
      <guid>https://dev.to/sina14/go-harbor-a-deep-dive-2mn</guid>
      <description>&lt;p&gt;Often referred to simply as &lt;strong&gt;Harbor&lt;/strong&gt;, it is an open-source registry designed for storing, managing, and distributing container images and other cloud-native artifacts. As a project under the Cloud Native Computing Foundation (&lt;strong&gt;CNCF&lt;/strong&gt;), it is a robust and well-supported solution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Harbor&lt;/strong&gt; is especially suitable for enterprise environments because of its comprehensive set of features.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Harbor is a robust open-source container registry ideal for enterprises due to its comprehensive security features and scalability. As part of the Cloud Native Computing Foundation, it offers image storage, vulnerability scanning, and role-based access control among other features, making it suitable for organizations with strict compliance needs. However, its rich feature set and complexity may be overkill for simpler use cases. Alternatives like Docker Hub, GitLab Registry, AWS ECR, Google Container Registry, and Azure Container Registry may be better suited for different requirements. Installation on Ubuntu, while straightforward, requires attention to setup details and security configurations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What I Have to Say About Harbor:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Powerful but Complex:&lt;/em&gt; Harbor is feature-rich, but that also means it can be more complex to set up and manage compared to simpler registries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Great for Enterprises:&lt;/em&gt; Its strong focus on security and enterprise features makes it a good fit for organizations with strict compliance requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Active Community:&lt;/em&gt; The large and active community provides ample resources, documentation, and support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Regular Updates:&lt;/em&gt; It receives regular updates and improvements, ensuring it stays relevant in the ever-evolving cloud-native landscape.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figgx40ioehydsl2ymk5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figgx40ioehydsl2ymk5z.png" alt="GoharborLogo" width="800" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Harbor: An Enterprise-Grade Solution&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Harbor&lt;/em&gt; stands out due to its robust feature set aimed at providing secure, scalable, and enterprise-ready image management. Key highlights include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Comprehensive Features:&lt;/em&gt;- &lt;em&gt;Harbor&lt;/em&gt; offers extensive functionality covering image storage, role-based access control (RBAC), vulnerability scanning, image signing with Notary, replication, garbage collection, and more. This makes it ideal for organizations with demanding security and compliance needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Security Focus:&lt;/em&gt; Harbor prioritizes security through RBAC, vulnerability scanning, content trust, and audit logs, ensuring image integrity and controlling access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Open Source and CNCF Project:&lt;/em&gt; Being open source and backed by CNCF guarantees transparency, community support, and long-term sustainability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Scalability and Extensibility:&lt;/em&gt; Harbor's architecture allows horizontal scaling for large deployments and supports plugins for custom integrations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=4zZiBcvZmgQ" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2F4zZiBcvZmgQ%2F0.jpg" alt="Webinar" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature-Rich:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Image Storage and Distribution:&lt;/em&gt; Core functionality for storing, managing, and distributing container images.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Role-Based Access Control (RBAC):&lt;/em&gt; Granular control over who can access and manage images, enhancing security.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Vulnerability Scanning:&lt;/em&gt; Integrates with vulnerability scanners to identify security flaws in container images.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Image Signing and Notary:&lt;/em&gt; Ensures the integrity and authenticity of images using digital signatures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Replication:&lt;/em&gt; Supports replicating images across multiple Harbor instances or other registries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Garbage Collection:&lt;/em&gt; Automatically removes unused images to free up storage space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;User Management:&lt;/em&gt; Allows managing users, groups, and their permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Web UI and API:&lt;/em&gt; Provides a user-friendly interface and API for interacting with the registry.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Integration with CI/CD Pipelines:&lt;/em&gt; Seamlessly integrates into CI/CD workflows for automated image builds and deployments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Helm Chart Support:&lt;/em&gt; Can also be used to store and manage Helm charts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Open Source and CNCF Project:&lt;/em&gt; Being open source means it's free to use, modify, and contribute to. Its CNCF backing ensures its long-term sustainability and community support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Scalable and Reliable:&lt;/em&gt; Designed for production environments and capable of handling a large number of images and requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Designed for Enterprise:&lt;/em&gt; Offers the features and security required by larger organizations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Detailed Feature Breakdown&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here's a more detailed look at some of Harbor's key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Core Functionality:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Image Storage &amp;amp; Management:&lt;/em&gt; Stores and organizes container images, Helm charts, and other cloud-native artifacts. Supports multiple formats and versions.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Registry API:&lt;/em&gt; Provides a standard Docker Registry API (v2), making it compatible with Docker clients and other tools.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Multi-Tenancy:&lt;/em&gt; Supports multiple projects (organizations or teams) within a single Harbor instance, each with its own users, access control, and repositories.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Role-Based Access Control (RBAC):&lt;/em&gt; Allows fine-grained access control, letting you define different roles and permissions for users and groups at the project and global levels.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Vulnerability Scanning:&lt;/em&gt; Integrates with scanners like Trivy to scan container images for security vulnerabilities. Reports and dashboards help you address identified issues.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Image Signing &amp;amp; Notary:&lt;/em&gt; Uses Notary to sign images, ensuring their integrity and preventing tampering. This ensures that images come from a trusted source.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Content Trust:&lt;/em&gt; Can enforce policies that only allow signed images to be pulled and deployed.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Audit Logging:&lt;/em&gt; Tracks all actions performed within the registry, providing audit trails for security and compliance.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;LDAP/AD Integration:&lt;/em&gt; Integrates with existing LDAP or Active Directory systems for user authentication.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Replication &amp;amp; Distribution:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Replication Policies:&lt;/em&gt; Enables automated replication of images between Harbor instances or other registries. Useful for multi-region deployments and disaster recovery.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;P2P Distribution:&lt;/em&gt; Supports P2P image distribution through projects like Dragonfly to reduce the load on the registry and improve image pull speeds.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Garbage Collection (GC):&lt;/em&gt; Automatically removes unused or unreferenced images and layers to reclaim storage space.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Quota Management:&lt;/em&gt; Set storage quotas for projects to manage disk space usage and prevent overutilization.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;CI/CD Integration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Webhook Integration:&lt;/em&gt; Supports webhooks to trigger actions when images are pushed or deleted. This allows you to integrate Harbor into your CI/CD workflows for automated image building and deployments.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Helm Chart Support:&lt;/em&gt; Allows storing and managing Helm charts alongside container images.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;User Interface (UI):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Intuitive Web UI:&lt;/em&gt; Provides a user-friendly web interface for managing projects, users, images, scanning results, and other aspects of the registry.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Customizable Dashboard:&lt;/em&gt; Provides a customizable dashboard for monitoring the status of the registry.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;API Access:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Comprehensive REST API:&lt;/em&gt; Provides a fully documented REST API for programmatic interaction with the registry.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Performance and Scalability:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;High Availability:&lt;/em&gt; Designed for high availability deployments to ensure continuous operation.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Scalability:&lt;/em&gt; Supports scaling horizontally by adding more Harbor instances or scaling the underlying database and storage.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Detailed Pros and Cons&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Pros:&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Robust Feature Set:&lt;/em&gt; Offers a wide array of enterprise-grade features, including RBAC, vulnerability scanning, image signing, replication, and more.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Security Focused:&lt;/em&gt; Designed with security in mind, providing features like RBAC, vulnerability scanning, content trust, and audit logs to secure your container images and registry.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Enterprise Ready:&lt;/em&gt; Suitable for large organizations with complex requirements for security, compliance, and scalability.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Open Source and CNCF Project:&lt;/em&gt; Benefits from the transparency and community support associated with being an open-source project under the Cloud Native Computing Foundation (CNCF).
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Scalability:&lt;/em&gt; Can be scaled horizontally to handle a large number of images, projects, and users.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Extensibility:&lt;/em&gt; Supports plugins and integrations to customize functionality and connect with other tools.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Active Community:&lt;/em&gt; Has a large and active community providing extensive documentation and support.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Regular Updates:&lt;/em&gt; Gets regular updates and improvements, ensuring it stays relevant and secure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Cons:&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Complexity:&lt;/em&gt; Harbor's rich feature set makes it more complex to set up, configure, and manage compared to simpler registries.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Resource Intensive:&lt;/em&gt; Can require significant resources (CPU, memory, storage) to run, especially for larger deployments.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Steeper Learning Curve:&lt;/em&gt; Requires a deeper understanding of container registries and related concepts.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Overkill for Simple Use Cases:&lt;/em&gt; Might be too heavy and complex for individuals or small teams with basic needs.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Initial Setup:&lt;/em&gt; The initial setup process can be more involved compared to some simpler registries.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Potential Cost:&lt;/em&gt; While the software itself is free, running Harbor in a production environment will require infrastructure resources that come with costs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmq2jp56stx4acc89ptjz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmq2jp56stx4acc89ptjz.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Best Alternative: Container Registry Options&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While &lt;em&gt;Harbor&lt;/em&gt; is powerful, it might not be the right fit for every situation. Here are some of the best alternatives to consider, along with their pros and cons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Docker Registry (Docker Hub / Docker Trusted Registry)&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Simplicity&lt;/em&gt;: Very easy to set up and use, especially the public Docker Hub.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Widely Adopted&lt;/em&gt;: Most developers are already familiar with Docker Hub.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Free Tier (Docker Hub)&lt;/em&gt;: Offers a free tier for public repositories.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Docker Trusted Registry (DTR)&lt;/em&gt;: Enterprise-grade registry from Docker with additional features (now part of Docker Desktop).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Docker Hub Limits&lt;/em&gt;: The free tier has limitations on storage and private repositories.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;DTR Licensing&lt;/em&gt;: Docker Trusted Registry requires licensing.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Fewer Enterprise Features&lt;/em&gt;: Might lack some advanced features compared to Harbor (e.g., more granular RBAC, advanced replication).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;GitLab Container Registry&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Integrated with GitLab&lt;/em&gt;: Seamless integration with GitLab's CI/CD pipelines.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Easy to Set Up&lt;/em&gt;: Relatively straightforward to configure if you already use GitLab.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Free with GitLab&lt;/em&gt;: Included as part of the GitLab package.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Tightly Coupled to GitLab&lt;/em&gt;: Best used if you are already using GitLab for source control.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Limited Feature Set&lt;/em&gt;: Might not have all the advanced enterprise features of Harbor.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Elastic Container Registry (ECR)&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Managed Service&lt;/em&gt;: Fully managed by AWS, reducing operational overhead.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Scalability&lt;/em&gt;: Scales automatically to handle increased demand.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Tight Integration with AWS Ecosystem&lt;/em&gt;: Seamlessly integrates with other AWS services.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Security&lt;/em&gt;: Inherits the security features of the AWS platform.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Vendor Lock-in&lt;/em&gt;: You are locked into the AWS ecosystem.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Cost&lt;/em&gt;: Can be more expensive than self-hosted options, especially at scale.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Google Container Registry (GCR) / Artifact Registry&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Managed Service&lt;/em&gt;: Fully managed by Google Cloud Platform.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Scalability&lt;/em&gt;: Designed to scale for large deployments.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Integration with GCP&lt;/em&gt;: Well-integrated with other Google Cloud services.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Artifact Registry&lt;/em&gt;: Supports various artifacts (not just containers).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Vendor Lock-in&lt;/em&gt;: You are locked into the Google Cloud Platform.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Cost&lt;/em&gt;: Similar to ECR, can become costly with high usage.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Azure Container Registry (ACR)&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Managed Service&lt;/em&gt;: Fully managed by Azure.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Scalability&lt;/em&gt;: Highly scalable to meet enterprise demands.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Integration with Azure Ecosystem&lt;/em&gt;: Deeply integrated with other Azure services.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Vendor Lock-in&lt;/em&gt;: You are locked into the Microsoft Azure ecosystem.
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Cost&lt;/em&gt;: Can be expensive based on storage and usage.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Which Alternative is "Best"?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The "best" alternative depends on your specific needs and context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;For Individual Developers or Small Teams:&lt;/em&gt;- &lt;em&gt;Docker Hub&lt;/em&gt; is a good starting point for ease of use and the free tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;For Teams Using GitLab:&lt;/em&gt;- &lt;em&gt;GitLab Container Registry&lt;/em&gt; is a great option due to its seamless integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;For Organizations Using Cloud Platforms:&lt;/em&gt;- &lt;em&gt;ECR, GCR/Artifact Registry, and ACR&lt;/em&gt; are excellent choices due to their scalability and managed nature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;For Organizations Requiring Advanced Features and Control:&lt;/em&gt;- &lt;em&gt;Harbor&lt;/em&gt; is often the preferred choice due to its robustness and feature-rich nature.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Considerations When Choosing a Registry:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Scale:&lt;/em&gt; How many images will you be storing and distributing?
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Security:&lt;/em&gt; What are your security and compliance requirements?
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Integration:&lt;/em&gt; How well does the registry integrate with your CI/CD pipelines and other tools?
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Cost:&lt;/em&gt; What is your budget and how will the registry impact costs?
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Ease of Use:&lt;/em&gt; How easy is it to set up, manage, and use the registry?
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Community and Support:&lt;/em&gt; What level of community support is available?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Harbor Installation on Ubuntu 24.04: A Basic Guide&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is a basic guide for installing Harbor using Docker Compose on Ubuntu 24.04. This method is suitable for development or test environments. For production, you'll need to consider a more robust deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Prerequisites:&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A clean Ubuntu 24.04 server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Docker Engine and Docker Compose installed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To install Docker on Ubuntu:
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
&lt;/span&gt;&lt;span class="gp"&gt;echo "deb [arch=$&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;dpkg &lt;span class="nt"&gt;--print-architecture&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; signed-by&lt;span class="o"&gt;=&lt;/span&gt;/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu &lt;span class="si"&gt;$(&lt;/span&gt;lsb_release &lt;span class="nt"&gt;-cs&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; stable&lt;span class="s2"&gt;" | sudo tee /etc/apt/sources.list.d/docker.list &amp;gt; /dev/null
&lt;/span&gt;&lt;span class="go"&gt;sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify Docker is working:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;sudo docker run hello-world
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To install Docker Compose:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;sudo apt install docker-compose
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;A domain name or IP address that you will use to access Harbor.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;Steps:&lt;/em&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Download Harbor Installer:&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;curl -LO https://github.com/goharbor/harbor/releases/latest/download/harbor-offline-installer-v2.10.0.tgz
tar xzvf harbor-offline-installer-v*.tgz
cd harbor
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Configure harbor.yml:&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Copy the default config file and customize it:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;    cp harbor.yml.example harbor.yml
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Edit harbor.yml:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;    nano harbor.yml
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Key Parameters to configure:&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;hostname&lt;/em&gt;: This should be your domain name or IP address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;http.port&lt;/em&gt;: Default is 80, change it if necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;https.port&lt;/em&gt;: Default is 443. For production use, you'll usually want HTTPS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;ssl.cert and ssl.key&lt;/em&gt;: If using HTTPS, point to your SSL certificate and private key. For testing, you can generate self-signed certificates but this is not recommended for production.&lt;br&gt;&lt;br&gt;
You can use &lt;em&gt;LetsEncrypt&lt;/em&gt; for a valid certificate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;harbor_admin_password&lt;/em&gt;: Set the initial password for the Harbor administrator account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;database.password&lt;/em&gt;: Set a strong password for the database user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example basic configuration:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;    &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;your-domain-or-ip&lt;/span&gt;
    &lt;span class="na"&gt;https&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;certificate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/path/to/your/certificate.crt&lt;/span&gt; &lt;span class="c1"&gt;#Path to the certificate&lt;/span&gt;
      &lt;span class="na"&gt;private_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/path/to/your/private.key&lt;/span&gt; &lt;span class="c1"&gt;# Path to the private key&lt;/span&gt;
      &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;443&lt;/span&gt;
    &lt;span class="na"&gt;http&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
    &lt;span class="na"&gt;harbor_admin_password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strongpassword&lt;/span&gt;
    &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dbstrongpassword&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Prepare SSL Certificates:&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you are going to use the https protocol for production set the &lt;code&gt;ssl.cert&lt;/code&gt; and &lt;code&gt;ssl.key&lt;/code&gt; parameters to point to the correct certificates&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you don't have a certificate, for testing purposes you can use a self-signed certificate with these steps:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;    sudo mkdir -p /etc/harbor/certs
&lt;/span&gt;&lt;span class="gp"&gt;    sudo openssl req -x509 -newkey rsa:4096 -keyout /etc/harbor/certs/harbor.key -out /etc/harbor/certs/harbor.crt -sha256 -days 365 -nodes -subj "/CN=$&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;hostname&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Change the ssl.cert and ssl.key to &lt;code&gt;/etc/harbor/certs/harbor.crt&lt;/code&gt; and &lt;code&gt;/etc/harbor/certs/harbor.key&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Install and Start Harbor:&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;    sudo ./install.sh
&lt;/span&gt;&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;This will start all necessary containers. It can take a few minutes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Access Harbor:&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open your web browser and go to&lt;br&gt;
&lt;em&gt;&lt;a href="https://your-domain-or-ip" rel="noopener noreferrer"&gt;https://your-domain-or-ip&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
(or &lt;em&gt;&lt;a href="http://your-domain-or-ip" rel="noopener noreferrer"&gt;http://your-domain-or-ip&lt;/a&gt;&lt;/em&gt; if you configured for HTTP only).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log in with username admin and the password set in &lt;code&gt;harbor.yml&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Important Notes:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Production Readiness:&lt;/em&gt; This installation is for basic setup. For a production environment, you'll need to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using a proper database like PostgreSQL.
&lt;/li&gt;
&lt;li&gt;Externalizing storage for registry data.
&lt;/li&gt;
&lt;li&gt;Configuring a load balancer.
&lt;/li&gt;
&lt;li&gt;Implementing proper backup and disaster recovery strategies.
&lt;/li&gt;
&lt;li&gt;Securing the environment with firewalls and network segmentation.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;em&gt;Docker Compose Version:&lt;/em&gt; Ensure you are using a compatible version of Docker Compose.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;em&gt;Port Conflicts:&lt;/em&gt; Ensure that the chosen ports (80 and 443) are not already in use on your system.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;em&gt;Firewall:&lt;/em&gt; Configure your firewall to allow traffic on the ports used by Harbor.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Further Configuration and Customization:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After installation, you can further configure &lt;em&gt;Harbor&lt;/em&gt; through its web interface or by editing &lt;code&gt;harbor.yml&lt;/code&gt; and using &lt;code&gt;sudo docker-compose up -d&lt;/code&gt; to restart the service.&lt;/p&gt;

&lt;p&gt;You might need to consult the official &lt;em&gt;Harbor&lt;/em&gt; documentation to understand more advanced configurations and customization options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://goharbor.io/" rel="noopener noreferrer"&gt;Official Website&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;In Conclusion:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Harbor&lt;/em&gt; is a powerful, feature-rich, and enterprise-grade container registry that excels in environments with stringent security and compliance needs. However, it might be overkill for simpler use cases. Understanding your own requirements and exploring the alternatives will help you choose the best container registry for your projects.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerregistry</category>
      <category>cloudnative</category>
      <category>harbor</category>
    </item>
    <item>
      <title>The Rise of AIOps: How AI is Transforming IT Operations</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Thu, 09 Jan 2025 19:50:27 +0000</pubDate>
      <link>https://dev.to/sina14/the-rise-of-aiops-how-ai-is-transforming-it-operations-4n1d</link>
      <guid>https://dev.to/sina14/the-rise-of-aiops-how-ai-is-transforming-it-operations-4n1d</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Is your IT operations team struggling to keep up with the growing complexity of systems? AIOps might just be the answer.&lt;/p&gt;

&lt;p&gt;Artificial Intelligence for IT Operations (AIOps) is revolutionizing how organizations manage their IT infrastructure and applications.&lt;/p&gt;

&lt;p&gt;By combining the power of AI, machine learning (ML), and big data analytics, AIOps is enabling a shift from reactive, manual processes to proactive, automated workflows.&lt;/p&gt;

&lt;p&gt;This transformation is not just about implementing new technology; it's about fundamentally changing how IT teams operate, improve efficiency, and drive strategic business outcomes.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxu4ow8v6h173ii91hb4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxu4ow8v6h173ii91hb4p.png" alt="Image description" width="718" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Functionality of AIOps
&lt;/h2&gt;

&lt;p&gt;AIOps automates and improves IT processes through several key functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Collection and Aggregation&lt;/strong&gt;: AIOps platforms begin by ingesting data from diverse sources across the IT environment. This includes structured data like logs and metrics from applications, databases and systems, and unstructured data like tickets, events, and even emails. This ability to gather comprehensive data from various systems and tools is crucial for the platform's ability to see the full picture.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Advanced Analytics and Machine Learning&lt;/strong&gt;: Once data is collected, AIOps platforms use advanced AI and ML algorithms to identify patterns, anomalies, and trends. Techniques like anomaly detection, pattern recognition, and predictive analysis help filter out "noise" and identify underlying issues that may not be apparent with traditional methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Event Correlation and Root Cause Analysis&lt;/strong&gt;: AIOps goes beyond identifying issues, by digging deeper to understand the underlying cause of incidents. By correlating events across different data sources, AIOps can quickly pinpoint the root cause of problems, significantly reducing the time it takes to resolve issues (MTTR).&lt;br&gt;
AIOps helps reduce MTTR (Mean Time to Repair) by providing engineers with more context and better solutions which allows faster reaction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Intelligent Automation and Remediation&lt;/strong&gt;: AIOps automates responses to events and incidents, using AI-driven workflows for tasks like incident triage, alerting, ticketing, and remediation. This allows for automatic resolution of recurring issues, freeing up IT staff to focus on more strategic and value-added activities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Predictive Analytics and Forecasting&lt;/strong&gt;: By analyzing historical data, AIOps platforms can predict future trends and potential challenges. This foresight allows IT teams to proactively allocate resources, prevent bottlenecks, and optimize resource utilization, ensuring the overall health of their IT environment.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Benefits of AIOps
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcn3gkz656qq5m7rxcqrq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcn3gkz656qq5m7rxcqrq.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By leveraging the features mentioned above, AIOps delivers several significant benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proactive Issue Resolution&lt;/strong&gt;: AIOps enables businesses to move from reactive to proactive IT management. By analyzing real-time data and predicting potential problems before they impact business operations, it minimizes downtime and maintains high service availability and performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Decision-Making&lt;/strong&gt;: By sifting through large amounts of data from various sources, AIOps can provide IT teams with actionable insights and a deeper understanding of their infrastructure, enabling better, data-driven decisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased Efficiency and Automation&lt;/strong&gt;: AIOps automates routine and time-consuming tasks, including monitoring, alerting, and incident response. This allows IT staff to focus on strategic initiatives and innovation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Scalability and Flexibility&lt;/strong&gt;: AIOps can integrate with existing infrastructure and scale according to business needs. This allows IT operations to remain efficient and effective regardless of the organization's size and complexity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Strengthened Security and Compliance&lt;/strong&gt;: AIOps continuously monitors network traffic, user behavior, and system activities, detecting and responding to security threats in real-time. AIOps also helps ensure compliance with industry standards and regulations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90moiit8zrw5iy6aha3f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90moiit8zrw5iy6aha3f.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AIOps Across Various Industries
&lt;/h2&gt;

&lt;p&gt;AIOps is increasingly being adopted across diverse industries globally. Some notable examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Financial Services&lt;/strong&gt;: In the Financial sector AIOps helps prevent transaction disruptions by detecting anomalies in real time, ensuring the smooth operation of banking and investment systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retail and E-commerce&lt;/strong&gt;: Ensuring seamless customer experiences during peak shopping times by monitoring online store performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Healthcare&lt;/strong&gt;: Optimizing IT infrastructure for efficient data access and processing, such as detecting anomalies in health monitoring systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Energy and Utilities&lt;/strong&gt;: Managing critical infrastructure and reducing downtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Telecommunications&lt;/strong&gt;: Improving network performance and service reliability.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  AIOps as the Next Evolution of DevOps
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0k5syt7qnkid7o7f9wbm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0k5syt7qnkid7o7f9wbm.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While DevOps focuses on collaboration, automation, and continuous delivery, AIOps builds upon those principles by integrating AI and ML to analyze large datasets and automate decision-making in real time.&lt;br&gt;
AIOps can be seen as the next evolution of DevOps, enabling a more intelligent and proactive approach to IT operations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Implementing AIOps: A Phased Approach
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvcgtqa2zxmu4c66imk1r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvcgtqa2zxmu4c66imk1r.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the initial implementation, it's important to continuously monitor, learn, and adapt your AIOps strategy to maximize its effectiveness.&lt;br&gt;
Implementing AIOps successfully involves taking a phased approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identify Key Use Cases&lt;/strong&gt;: Determine specific areas where AIOps can deliver the most value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select the Right Platform&lt;/strong&gt;: Evaluate different AIOps vendors and solutions based on your specific needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start Small and Iterate&lt;/strong&gt;: Begin with a pilot project or a limited deployment to test and refine your AIOps strategy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gradually Scale Up&lt;/strong&gt;: Once the initial implementation proves successful, expand AIOps adoption to other areas of your IT operations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu5psa57p3ubc9ep3hfun.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu5psa57p3ubc9ep3hfun.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of AIOps
&lt;/h2&gt;

&lt;p&gt;AIOps is expected to evolve rapidly in the coming years. Future advancements include increased automation and autonomous IT operations, enhanced predictive capabilities, integration with emerging technologies, and democratization of AI, making it more user-friendly and accessible to a wide range of IT professionals.&lt;/p&gt;

&lt;p&gt;In the future we will see AIOps to become more user friendly and accessible to a wider range of IT professionals and even non-technical staff.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;AIOps is transforming IT operations from a reactive and manual approach to a more strategic and automated one. Its ability to deliver deep, real-time, and context-rich insights is driving proactive decision-making, leading to more efficient, reliable, and innovative IT systems.&lt;br&gt;
AIOps represents a strategic imperative for organizations seeking to thrive in today's dynamic digital landscape.&lt;/p&gt;




</description>
      <category>aiops</category>
      <category>operations</category>
      <category>datadrivenit</category>
      <category>ai</category>
    </item>
    <item>
      <title>40 Days Of Kubernetes (40/40)</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Tue, 17 Sep 2024 14:29:45 +0000</pubDate>
      <link>https://dev.to/sina14/40-days-of-kubernetes-4040-2n9d</link>
      <guid>https://dev.to/sina14/40-days-of-kubernetes-4040-2n9d</guid>
      <description>&lt;h2&gt;
  
  
  Day 40/40
&lt;/h2&gt;

&lt;h1&gt;
  
  
  JSONPath Tutorial - Advanced Kubectl Commands
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=l9_UDSaiFj4" rel="noopener noreferrer"&gt;Video Link&lt;/a&gt;&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/piyushsachdeva"&gt;@piyushsachdeva&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/piyushsachdeva/CKA-2024/" rel="noopener noreferrer"&gt;Git Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sina14/40daysofkubernetes" rel="noopener noreferrer"&gt;My Git Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this section we will deep dive into JSONPath from the beginners perspective and see how you can write advanced kubectl commands using JSONPATH&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzmnqbik5uvz5calvy3o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgzmnqbik5uvz5calvy3o.png" alt="Image description" width="666" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return result in &lt;code&gt;json&lt;/code&gt; format by &lt;code&gt;api-server&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get nodes -o json

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Return result in &lt;code&gt;yaml&lt;/code&gt; format by &lt;code&gt;api-server&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get nodes -o yaml

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Sample of jsonpath:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get nodes &lt;span class="nt"&gt;-o&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;jsonpath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'{.items[*].status.nodeInfo.osImage}{"\n"}'&lt;/span&gt;
Ubuntu 24.04.1 LTS Ubuntu 22.04.2 LTS Ubuntu 22.04.4 LTS

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;With custom column:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get nodes &lt;span class="nt"&gt;-o&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'custom-columns=OsType:{.status.nodeInfo.osImage},KubeletVersion:{.status.nodeInfo.kubeletVersion}'&lt;/span&gt;
OsType               KubeletVersion
Ubuntu 24.04.1 LTS   v1.30.4
Ubuntu 22.04.2 LTS   v1.30.0
Ubuntu 22.04.4 LTS   v1.30.4

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;With custom column and statement:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get nodes &lt;span class="nt"&gt;-o&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;custom-columns&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'Host:{.status.addresses[?(@.type=="Hostname")].address},OsType:{.status.nodeInfo.osImage}'&lt;/span&gt;
Host         OsType
cloudy.net   Ubuntu 24.04.1 LTS
jolly-net    Ubuntu 22.04.2 LTS
sinaops      Ubuntu 22.04.4 LTS

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Sort by an item:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get nodes
NAME         STATUS                     ROLES           AGE     VERSION
cloudy.net   Ready                      worker          6d      v1.30.4
jolly-net    Ready,SchedulingDisabled   worker          7d22h   v1.30.0
sinaops      Ready                      control-plane   8d      v1.30.4
root@sinaops:~# kubectl get nodes &lt;span class="nt"&gt;--sort-by&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;.status.nodeInfo.kubeletVersion
NAME         STATUS                     ROLES           AGE     VERSION
jolly-net    Ready,SchedulingDisabled   worker          7d22h   v1.30.0
cloudy.net   Ready                      worker          6d      v1.30.4
sinaops      Ready                      control-plane   8d      v1.30.4

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

&lt;/div&gt;



</description>
      <category>kubernetes</category>
      <category>40daysofkubernetes</category>
    </item>
    <item>
      <title>40 Days Of Kubernetes (39/40)</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Mon, 16 Sep 2024 14:31:07 +0000</pubDate>
      <link>https://dev.to/sina14/40-days-of-kubernetes-3940-3po5</link>
      <guid>https://dev.to/sina14/40-days-of-kubernetes-3940-3po5</guid>
      <description>&lt;h2&gt;
  
  
  Day 39/40
&lt;/h2&gt;

&lt;h1&gt;
  
  
  Troubleshooting Worker Nodes Failures in Kubernetes
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=U6PRwv7dJ-U" rel="noopener noreferrer"&gt;Video Link&lt;/a&gt;&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/piyushsachdeva"&gt;@piyushsachdeva&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/piyushsachdeva/CKA-2024/" rel="noopener noreferrer"&gt;Git Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sina14/40daysofkubernetes" rel="noopener noreferrer"&gt;My Git Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have troubleshoot and fix worker node-related issues in Kubernetes in this video.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl86mh5yr5l1a7nmf6j4n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl86mh5yr5l1a7nmf6j4n.png" alt="Image description" width="733" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rkjrliokin0z31l848a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rkjrliokin0z31l848a.png" alt="Image description" width="800" height="131"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Photos from the video)&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>40daysofkubernetes</category>
    </item>
    <item>
      <title>40 Days Of Kubernetes (38/40)</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Sun, 15 Sep 2024 16:09:57 +0000</pubDate>
      <link>https://dev.to/sina14/40-days-of-kubernetes-3840-pic</link>
      <guid>https://dev.to/sina14/40-days-of-kubernetes-3840-pic</guid>
      <description>&lt;h2&gt;
  
  
  Day 38/40
&lt;/h2&gt;

&lt;h1&gt;
  
  
  Troubleshooting control plane failure in kubernetes
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=z6XjbuRl6LE" rel="noopener noreferrer"&gt;Video Link&lt;/a&gt;&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/piyushsachdeva"&gt;@piyushsachdeva&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/piyushsachdeva/CKA-2024/" rel="noopener noreferrer"&gt;Git Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sina14/40daysofkubernetes" rel="noopener noreferrer"&gt;My Git Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this section we will troubleshoot control plane components failure in a Kubernetes cluster such as ApiServer, scheduler, and controller manager, and how to fix those issues.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z0th90urdu9hmb2irxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z0th90urdu9hmb2irxf.png" alt="Image description" width="762" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0evhkw8kfyg8idbla8dr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0evhkw8kfyg8idbla8dr.png" alt="Image description" width="800" height="85"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgpjziqb4wxml5z8n6a5v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgpjziqb4wxml5z8n6a5v.png" alt="Image description" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8w8zfffif2k37jgmtz46.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8w8zfffif2k37jgmtz46.png" alt="Image description" width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>40daysofkubernetes</category>
    </item>
    <item>
      <title>40 Days Of Kubernetes (37/40)</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Sat, 14 Sep 2024 19:34:26 +0000</pubDate>
      <link>https://dev.to/sina14/40-days-of-kubernetes-3740-38co</link>
      <guid>https://dev.to/sina14/40-days-of-kubernetes-3740-38co</guid>
      <description>&lt;h2&gt;
  
  
  Day 37/40
&lt;/h2&gt;

&lt;h1&gt;
  
  
  Application Failure Troubleshooting From CKA
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=Mil0HUtPg6I" rel="noopener noreferrer"&gt;Video Link&lt;/a&gt;&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/piyushsachdeva"&gt;@piyushsachdeva&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/piyushsachdeva/CKA-2024/" rel="noopener noreferrer"&gt;Git Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sina14/40daysofkubernetes" rel="noopener noreferrer"&gt;My Git Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this section, we're looking at application failures.&lt;/p&gt;

&lt;p&gt;We have a sample app for instance&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/piyushsachdeva/example-voting-app.git

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

&lt;/div&gt;



&lt;p&gt;As it mentioned in the source &lt;a href="https://github.com/piyushsachdeva/example-voting-app" rel="noopener noreferrer"&gt;repository&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A front-end web app in Python which lets you vote between two options&lt;/li&gt;
&lt;li&gt;A Redis which collects new votes&lt;/li&gt;
&lt;li&gt;A .NET worker which consumes votes and stores them in…&lt;/li&gt;
&lt;li&gt;A Postgres database backed by a Docker volume&lt;/li&gt;
&lt;li&gt;A Node.js web app which shows the results of the voting in real time
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:/opt/example-voting-app# docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
...
root@sinaops:/opt/example-voting-app# docker compose ps
NAME                          IMAGE                       COMMAND                  SERVICE   CREATED          STATUS                    PORTS
example-voting-app-db-1       postgres:15-alpine          &lt;span class="s2"&gt;"docker-entrypoint.s…"&lt;/span&gt;   db        32 seconds ago   Up 31 seconds &lt;span class="o"&gt;(&lt;/span&gt;healthy&lt;span class="o"&gt;)&lt;/span&gt;   5432/tcp
example-voting-app-redis-1    redis:alpine                &lt;span class="s2"&gt;"docker-entrypoint.s…"&lt;/span&gt;   redis     32 seconds ago   Up 31 seconds &lt;span class="o"&gt;(&lt;/span&gt;healthy&lt;span class="o"&gt;)&lt;/span&gt;   6379/tcp
example-voting-app-result-1   example-voting-app-result   &lt;span class="s2"&gt;"nodemon --inspect=0…"&lt;/span&gt;   result    32 seconds ago   Up 25 seconds             127.0.0.1:9229-&amp;gt;9229/tcp, 0.0.0.0:5001-&amp;gt;80/tcp, :::5001-&amp;gt;80/tcp
example-voting-app-vote-1     example-voting-app-vote     &lt;span class="s2"&gt;"python app.py"&lt;/span&gt;          vote      32 seconds ago   Up 25 seconds &lt;span class="o"&gt;(&lt;/span&gt;healthy&lt;span class="o"&gt;)&lt;/span&gt;   0.0.0.0:5000-&amp;gt;80/tcp, :::5000-&amp;gt;80/tcp
example-voting-app-worker-1   example-voting-app-worker   &lt;span class="s2"&gt;"dotnet Worker.dll"&lt;/span&gt;      worker    32 seconds ago   Up 26 seconds

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

&lt;/div&gt;



&lt;p&gt;Run in &lt;code&gt;Kubernetes&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:/opt/example-voting-app# kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt;  k8s-specifications/
deployment.apps/db created
service/db created
networkpolicy.networking.k8s.io/access-redis created
deployment.apps/redis created
service/redis created
deployment.apps/result created
service/result created
deployment.apps/vote created
service/vote created
deployment.apps/worker created

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:/opt/example-voting-app# kubectl get pods,deploy,svc &lt;span class="nt"&gt;-o&lt;/span&gt; wide
NAME                          READY   STATUS    RESTARTS   AGE   IP           NODE         NOMINATED NODE   READINESS GATES
pod/db-597b4ff8d7-h4flp       1/1     Running   0          21m   10.85.0.10   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
pod/redis-796dc594bb-dgglw    1/1     Running   0          21m   10.85.0.11   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
pod/result-d8c4c69b8-ffc8n    1/1     Running   0          21m   10.85.0.16   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
pod/vote-69cb46f6fb-ln4np     1/1     Running   0          21m   10.85.0.12   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
pod/worker-5dd767667f-4csr5   1/1     Running   0          21m   10.85.0.15   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
pod/worker-5dd767667f-l2589   1/1     Running   0          21m   10.85.0.13   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;
pod/worker-5dd767667f-m6xk2   1/1     Running   0          21m   10.85.0.14   cloudy.net   &amp;lt;none&amp;gt;           &amp;lt;none&amp;gt;

NAME                     READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES                                  SELECTOR
deployment.apps/db       1/1     1            1           21m   postgres     postgres:15-alpine                      &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;db
deployment.apps/redis    1/1     1            1           21m   redis        redis:alpine                            &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;redis
deployment.apps/result   1/1     1            1           21m   result       dockersamples/examplevotingapp_result   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;result
deployment.apps/vote     1/1     1            1           21m   vote         dockersamples/examplevotingapp_vote     &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vote
deployment.apps/worker   3/3     3            3           21m   worker       dockersamples/examplevotingapp_worker   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;worker

NAME                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT&lt;span class="o"&gt;(&lt;/span&gt;S&lt;span class="o"&gt;)&lt;/span&gt;          AGE   SELECTOR
service/db           ClusterIP   10.110.219.117   &amp;lt;none&amp;gt;        5432/TCP         21m   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;db
service/kubernetes   ClusterIP   10.96.0.1        &amp;lt;none&amp;gt;        443/TCP          2d    &amp;lt;none&amp;gt;
service/redis        ClusterIP   10.109.149.22    &amp;lt;none&amp;gt;        6379/TCP         21m   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;redis
service/result       NodePort    10.100.83.247    &amp;lt;none&amp;gt;        5001:31001/TCP   21m   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;results
service/vote         NodePort    10.98.179.36     &amp;lt;none&amp;gt;        5000:31000/TCP   21m   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vote

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

&lt;/div&gt;



</description>
      <category>kubernetes</category>
      <category>40daysofkubernetes</category>
    </item>
    <item>
      <title>40 Days Of Kubernetes (36/40)</title>
      <dc:creator>Sina Tavakkol</dc:creator>
      <pubDate>Fri, 13 Sep 2024 06:51:26 +0000</pubDate>
      <link>https://dev.to/sina14/40-days-of-kubernetes-3640-300n</link>
      <guid>https://dev.to/sina14/40-days-of-kubernetes-3640-300n</guid>
      <description>&lt;h2&gt;
  
  
  Day 36/40
&lt;/h2&gt;

&lt;h1&gt;
  
  
  Kubernetes Logging and Monitoring
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=cNPyajLASms" rel="noopener noreferrer"&gt;Video Link&lt;/a&gt;&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/piyushsachdeva"&gt;@piyushsachdeva&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/piyushsachdeva/CKA-2024/" rel="noopener noreferrer"&gt;Git Repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sina14/40daysofkubernetes" rel="noopener noreferrer"&gt;My Git Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because we will start to troubleshooting some issues like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application failures&lt;/li&gt;
&lt;li&gt;Control-plane issues&lt;/li&gt;
&lt;li&gt;Worker nodes issues&lt;/li&gt;
&lt;li&gt;Cluster components issues
And so on, we need to know about how &lt;code&gt;logging&lt;/code&gt; or &lt;code&gt;monitoring&lt;/code&gt; is in &lt;code&gt;Kubernetes&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As we discussed, we know that &lt;code&gt;Kubernetes&lt;/code&gt; doesn't come with an embedded monitoring tools, so we use &lt;code&gt;metrics-server&lt;/code&gt; as add-on for getting some exposed metrics from our cluster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

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

&lt;/div&gt;



&lt;p&gt;There's also another daemon running on nodes, named &lt;code&gt;cAdvisor&lt;/code&gt; which is collecting and aggregating the metrics from container runtime and then publish them to the &lt;code&gt;kubelet&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But because only &lt;code&gt;kubelet&lt;/code&gt; has authority to expose the data, and collect &lt;code&gt;pod&lt;/code&gt; data as well, it sends them to the &lt;code&gt;metrics-server&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;metrics-server&lt;/code&gt; with the help of &lt;code&gt;metrics-api&lt;/code&gt; can expose the data to &lt;code&gt;api-server&lt;/code&gt; and when we call &lt;code&gt;kubectl top&lt;/code&gt; we can reach out the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; we may face an error when we apply the &lt;code&gt;metrics-server&lt;/code&gt; manifest, so let's troubleshoot and fix the issue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
NAME                              READY   STATUS    RESTARTS      AGE
coredns-7db6d8ff4d-2gdsx          1/1     Running   0             22h
coredns-7db6d8ff4d-tck9c          1/1     Running   0             22h
etcd-sinaops                      1/1     Running   0             22h
kube-apiserver-sinaops            1/1     Running   0             22h
kube-controller-manager-sinaops   1/1     Running   0             22h
kube-proxy-5t5bv                  1/1     Running   0             20h
kube-proxy-gt7vh                  1/1     Running   0             22h
kube-scheduler-sinaops            1/1     Running   0             22h
metrics-server-7ffbc6d68-9rw8z    0/1     Running   3 &lt;span class="o"&gt;(&lt;/span&gt;18m ago&lt;span class="o"&gt;)&lt;/span&gt;   22m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As we can see the &lt;code&gt;metrics-server&lt;/code&gt; isn't ready yet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                              READY
metrics-server-7ffbc6d68-9rw8z    0/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;let's take a look at its logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...
E0827 16:09:23.312687       1 scraper.go:149] "Failed to scrape node" err="Get \"https://{JOLLY-NET-IP}:10250/metrics/resource\": tls: failed to verify certificate: x509: cannot validate certificate for {JOLLY-NET-IP} because it doesn't contain any IP SANs" node="jolly-net"
I0827 16:09:23.331929       1 server.go:191] "Failed probe" probe="metric-storage-ready" err="no metrics to serve"
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@sinaops:~# kubectl describe pod metrics-server-7ffbc6d68-9rw8z -n kube-system
...
Events:
  Type     Reason     Age                  From               Message
  ----     ------     ----                 ----               -------
  Normal   Scheduled  26m                  default-scheduler  Successfully assigned kube-system/metrics-server-7ffbc6d68-9rw8z to jolly-net
  Normal   Pulling    26m                  kubelet            Pulling image "registry.k8s.io/metrics-server/metrics-server:v0.7.1"
  Normal   Pulled     24m                  kubelet            Successfully pulled image "registry.k8s.io/metrics-server/metrics-server:v0.7.1" in 1.301s (2m22.567s including waiting). Image size: 68346568 bytes.
  Normal   Killing    23m (x2 over 23m)    kubelet            Container metrics-server failed liveness probe, will be restarted
  Warning  Unhealthy  23m (x4 over 23m)    kubelet            Readiness probe failed: Get "https://10.85.0.5:10250/readyz": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
...  
  Warning  Unhealthy  77s (x143 over 22m)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 500

...

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

&lt;/div&gt;



&lt;p&gt;So we're facing error code 500, because&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;failed to verify certificate: x509: cannot validate certificate for {JOLLY-NET-IP} because it doesn't contain any IP SANs" node="jolly-net"

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

&lt;/div&gt;



&lt;p&gt;As it mentioned in the &lt;a href=""&gt;github repository&lt;/a&gt; of &lt;code&gt;metrics-server&lt;/code&gt;, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Kubelet&lt;/code&gt; certificate needs to be signed by cluster Certificate Authority (or disable certificate validation by passing &lt;code&gt;--kubelet-insecure-tls&lt;/code&gt; to Metrics Server)&lt;br&gt;
And we are going to edit the &lt;code&gt;deployment&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get deployment &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
NAME             READY   UP-TO-DATE   AVAILABLE   AGE
coredns          2/2     2            2           22h
metrics-server   0/1     1            0           31m
root@sinaops:~# kubectl edit deployment metrics-server &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system
deployment.apps/metrics-server edited

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

&lt;/div&gt;



&lt;p&gt;And in the &lt;code&gt;spec&lt;/code&gt; of containers, add the option &lt;code&gt;--kubelet-insecure-tls&lt;/code&gt;, then save and exit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;...&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--kubelet-insecure-tls&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--cert-dir=/tmp&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--secure-port=10250&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--kubelet-use-node-status-port&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;--metric-resolution=15s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we are ready :)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system &lt;span class="nt"&gt;-w&lt;/span&gt;
NAME                              READY   STATUS    RESTARTS   AGE
coredns-7db6d8ff4d-2gdsx          1/1     Running   0          22h
coredns-7db6d8ff4d-tck9c          1/1     Running   0          22h
etcd-sinaops                      1/1     Running   0          22h
kube-apiserver-sinaops            1/1     Running   0          22h
kube-controller-manager-sinaops   1/1     Running   0          22h
kube-proxy-5t5bv                  1/1     Running   0          20h
kube-proxy-gt7vh                  1/1     Running   0          22h
kube-scheduler-sinaops            1/1     Running   0          22h
metrics-server-8455d49879-5mqr2   1/1     Running   0          2m46s

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

&lt;/div&gt;



&lt;p&gt;We have to wait some time to it collects the metrics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@sinaops:~# kubectl top nodes
error: Metrics API not available
root@sinaops:~# kubectl top pods
error: Metrics API not available

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

&lt;/div&gt;



</description>
      <category>kubernetes</category>
      <category>40daysofkubernetes</category>
    </item>
  </channel>
</rss>
