<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Erfin Feluzy on Medium]]></title>
        <description><![CDATA[Stories by Erfin Feluzy on Medium]]></description>
        <link>https://medium.com/@erfin-feluzy?source=rss-92236fea730d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4rSHG1KopkMc6XZU.</url>
            <title>Stories by Erfin Feluzy on Medium</title>
            <link>https://medium.com/@erfin-feluzy?source=rss-92236fea730d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 12:22:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@erfin-feluzy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Agentic AI Made Simple: LangChain4j, Redis Vector, and MySQL in Action]]></title>
            <link>https://erfin-feluzy.medium.com/agentic-ai-made-simple-langchain4j-redis-vector-and-mysql-in-action-b58fe62b5374?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b58fe62b5374</guid>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[langchain4j]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 13:24:13 GMT</pubDate>
            <atom:updated>2026-10-20T13:24:13.555Z</atom:updated>
            <content:encoded><![CDATA[<p>Most RAG (Retrieval-Augmented Generation) tutorials these days are written in Python. Yet a large share of enterprise applications runs on Java. The good news is that the Java ecosystem is more than ready. With Quarkus and LangChain4j, you can build a RAG chatbot with concise code that starts fast and is easy to package as a container.</p><p>In this tutorial we will build a chatbot for a fictional company that can:</p><ul><li>Answer questions about office policies and products from text documents (RAG).</li><li>Answer questions about employee salaries by querying a MySQL database through tool calling.</li><li>Stream its answers, word by word, to a chat page in the browser.</li></ul><p>AI Agent can answer the question from 2 sources — <strong>static </strong>data source (*.txt), and <strong>dynamic </strong>data source (MySQL) without writting “if-else” logic inside the code, instead use an “human-readble instruction”.</p><p>All components used in this tutorial: OpenWeight LLM, vector database, the relational database, and the application itself, runs in container runtime, a.k.a Docker on your own machine. No API keys, no per-token cost, and no data leaving the box.</p><p>Full source code: <a href="https://github.com/erfinfeluzy/quarkus-rag-redis-demo">https://github.com/erfinfeluzy/quarkus-rag-redis-demo</a></p><p>Container image: <a href="https://quay.io/repository/efeluzy/quarkus-rag-redis">https://quay.io/repository/efeluzy/quarkus-rag-redis</a></p><h3>Architecture</h3><figure><img alt="Demo Architecture" src="https://cdn-images-1.medium.com/max/1011/1*Q9z_nSbK7e0HXN7Gzlgiiw.png" /><figcaption>Tutorial High Level Architecture</figcaption></figure><p>Four containers share a single Docker network called <em>demo-net</em>:</p><ul><li><strong>Agentic App </strong>— demo-app: Author use <strong>Quarkus </strong>+ <strong>LangChain4j </strong>application that connect to RAG and MCP Tools.</li><li><strong>Inferencing Server </strong>— <strong>ollama</strong> : serves two models:<strong> <em>llama3.1:8B</em></strong> for chat and <strong><em>nomic-embed-text</em></strong> for embeddings. I use llama3.1 because this model supports Indonesian Language and Tools calling. PS: Not all open weight LLM support tools calling.</li><li><strong>Vector Database</strong> — <strong>Redis 8</strong>. Since Redis 8, vector search (the Redis Query Engine, formerly RediSearch) is built in, so we can use plain redis:8 image from DockerHub.</li><li><strong>Legacy RDBMS</strong>— MySQL 8.4 with an employees information table.</li></ul><blockquote>Notes: this is for personal experimental only. For production environment you need enterprise scale inferencing server like vLLM or Red Hat AI Inference Server, etc.</blockquote><p>Because they all live on a user-defined bridge network, Docker provides internal DNS: containers reach each other by name, for example <a href="http://ollama:11434/"><strong>http://ollama:11434</strong></a> or <strong>jdbc:mysql://demo-mysql:3306/hr.</strong></p><p>A question flows through the system like this:</p><pre>1. The user sends a question to the /chat endpoint.<br>2. nomic-embed-text in Ollama turns the question into a vector.<br>3. Redis finds the 3 document segments whose vectors are most similar.<br>4. Those segments are inserted into the prompt, and llama3.1 answers - or decides to call a tool.<br>5. If the question is about salaries, a tool runs a query against MySQL.<br>6. The answer streams back to the browser as Server-Sent Events (SSE).</pre><h3>Prerequisite</h3><pre>1. Docker Desktop (or Podman)<br>2. JDK 25, to build the application with the Maven wrapper. <br>   You can skip this part if you just want to run from my registry <br>3. An NVIDIA GPU with recent drivers. <br>   Author uses a GPU with 8 GB of VRAM, which is enough for llama3.1:8b. <br>   It can also runs without a GPU, but the response will be very slow.<br>4. About 6 GB of disk space for the two models, LLM and Embedding Models</pre><h3>STEP 1: Library Dependencies</h3><p>In<strong> <em>pom.xml</em></strong> on the source code, we only need a handful of Quarkus extensions:</p><pre>quarkus-rest, quarkus-rest-jackson → REST endpoints + JSON<br>quarkus-langchain4j-ollama → chat and embedding models via Ollama<br>quarkus-langchain4j-easy-rag → reads, splits, and embeds documents<br>quarkus-langchain4j-redis → Redis as the embedding store<br>quarkus-jdbc-mysql, quarkus-agroal → MySQL connection</pre><p>The quarkus-langchain4j-redis extension creates the vector index in Redis and runs the similarity search. If you have used RedisVL in Python, the idea is the same, it relies on the same Redis feature.</p><h3>STEP 2: Configuration</h3><p>Everything is configured in <em>application.properties</em>. The important parts:</p><pre># Ollama<br>quarkus.langchain4j.ollama.base-url=http://ollama:11434<br>quarkus.langchain4j.ollama.chat-model.model-id=llama3.1:8b<br>quarkus.langchain4j.ollama.chat-model.temperature=0.2<br>quarkus.langchain4j.ollama.embedding-model.model-id=nomic-embed-tex<br><br># Easy RAG: read every .txt file in the rag-docs folder<br>quarkus.langchain4j.easy-rag.path=rag-docs<br>quarkus.langchain4j.easy-rag.path-matcher=glob:**.txt<br>quarkus.langchain4j.easy-rag.max-segment-size=300<br>quarkus.langchain4j.easy-rag.max-results=3<br>quarkus.langchain4j.easy-rag.ingestion-strategy=MANUAL<br><br># Redis as the vector store<br>quarkus.redis.hosts=redis://demo-redis:6379<br>quarkus.langchain4j.redis.dimension=768<br>quarkus.langchain4j.redis.index-name=rag-index<br><br># MySQL<br>quarkus.datasource.jdbc.url=jdbc:mysql://demo-mysql:3306/hr</pre><blockquote><strong>dimension=768</strong> must match the vector size produced by <strong>nomic-embed-text</strong>. If you switch embedding models, change this number too.</blockquote><h3><strong>STEP 3: Register AI Service</strong></h3><p>This is where LangChain4j on Quarkus really works. All we need is an interface <strong><em>Assistant.java </em></strong>:</p><pre>@RegisterAiService(tools = SalaryTools.class)<br>public interface Assistant {<br>  <br>  @SystemMessage(&quot;&quot;&quot;<br>    You are a helpful assistant. Answer concisely in the user&#39;s language.<br>    Questions about PT Kopi Senja Nusantara (its policies, offices, products and product prices) must be<br>    answered only from the knowledge base excerpts included in the user message; do not call any tool<br>    for them. If the answer is not in the excerpts, say you don&#39;t know.<br>    The only tools you have are the salary tools: use them only for questions about employee salaries,<br>    never guess salary numbers, and never invent or write out calls to tools that do not exist.<br>    Format amounts in Rupiah, e.g. Rp 14.500.000.<br>  &quot;&quot;&quot;)<br>  Multi&lt;String&gt; chat(@UserMessage String message);<br><br>}</pre><p>Quarkus generates the implementation at build time. The Multi&lt;String&gt; return type streams the answer token by token.</p><p>The system prompt is not decoration. An 8B model tends to get “creative”: without firm instructions it sometimes makes up salary figures or writes out calls to tools that do not exist. Spelling out when tools may be used helps a lot.</p><h3>STEP 4: Tool to read MYSQL</h3><p>A tool is a plain Java method annotated with<strong><em> @Tool</em></strong>. The LLM reads the so called “human-readable Instruction” to decide when to call it:</p><pre>@Tool(<br>  &quot;Find employees by (part of) their name and return their department, position, office, &quot;<br>  + &quot;monthly salary in Rupiah and join date.&quot;)<br><br>public List&lt;Map&lt;String, Object&gt;&gt; findEmployeeSalary(@P(&quot;Full or partial employee name&quot;) String name) {<br>  return query(<br>    &quot;SELECT &quot; + COLUMNS + <br>    &quot; FROM employees WHERE name LIKE ? ORDER BY name &quot;, <br>    &quot;%&quot; + name + &quot;%&quot;);<br>}</pre><p>There are three tools: look up a salary by name, list the employees of a department, and salary statistics per department.</p><p>The security principle is simple: the LLM never writes SQL. It only picks a tool and fills in its parameters; the queries are written by us and always use parameters (PreparedStatement). That leaves no room for SQL injection through the prompt, and the tools are read-only.</p><h3>STEP 5: RAG with Redis</h3><p>By default, Easy RAG ingests the documents every time the application starts. That is wasteful, because Redis stores the vectors permanently. So I set ingestion-strategy=MANUAL and wrote a small class:</p><pre>void onStart(@Observes StartupEvent event) {<br>  long segments = countSegments();<br>  if (segments == 0) {<br>    reindex();<br>  }<br>}<br><br>public synchronized long reindex() {<br>  store.deleteAll();<br>  ingestion.ingest();<br>  return countSegments();<br>}</pre><p>Documents are ingested only when Redis is still empty. When the contents of the <strong><em>rag-docs</em></strong> folder change, just call <strong><em>POST /rag/reindex.</em></strong></p><p>One more lesson: Easy RAG’s default prompt template tells the model to answer ONLY from the retrieved documents. As a result, general questions such as “what is Java?” get refused. I replaced it with my own RetrievalAugmentor and a more flexible prompt:</p><pre>private static final PromptTemplate PROMPT = PromptTemplate.from(&quot;&quot;&quot;<br>  Excerpts from the company knowledge base that may or may not be relevant:<br>   - -<br>  {{contents}}<br>   - -<br>  If the excerpts contain the answer to the question below, answer directly from them in plain text.<br>  If they are unrelated, ignore them completely and answer from general knowledge without mentioning them.<br>  Question: {{userMessage}}&quot;&quot;&quot;);</pre><h3>STEP 6: Streaming Endpoint</h3><pre>@POST<br>@Consumes(MediaType.TEXT_PLAIN)<br>@Produces(MediaType.SERVER_SENT_EVENTS)<br>@RestStreamElementType(MediaType.APPLICATION_JSON)<br>public Multi&lt;ChatChunk&gt; chat(String message) {<br>  return assistant.chat(message).map(ChatChunk::new);<br>}</pre><p>Why wrap each token in a ChatChunk record and send it as JSON instead of a plain string? Because SSE clients strip the first space after “data:”. LLM tokens often begin with a space (“ is”, “ CEO”), so if they are sent as plain text, the words run together in the browser. Wrapped in JSON, the spaces survive.</p><h3>STEP 7: Running on Your Local Machine</h3><p>You can skip all previous steps if you just want to try the application withou building the code yourself.</p><p>1) Create the network so we can call by service name from another service:</p><pre>docker network create demo-net</pre><p>2) MySQL — init.sql runs automatically while the data volume is still empty:</p><pre>docker run -d --name demo-mysql --network demo-net `<br>  -p 3306:3306 `<br>  -e MYSQL_ROOT_PASSWORD=rootpass `<br>  -e MYSQL_DATABASE=hr `<br>  -e MYSQL_USER=hr_app `<br>  -e MYSQL_PASSWORD=hr_app_pass `<br>  -v &quot;${PWD}/db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro&quot; `<br>  -v demo_mysql-data:/var/lib/mysql `<br>  mysql:8.4</pre><p>3) Redis:</p><pre>docker run -d --name demo-redis --network demo-net `<br>  -p 6379:6379 `<br>  -v demo_redis-data:/data `<br>  redis:8</pre><p>4) Ollama, then pull models: llama for LLM, nomic-embed-text for embedding model.</p><pre>docker run -d --name ollama --network demo-net --gpus all `<br>  -p 11434:11434 `<br>  -e OLLAMA_HOST=0.0.0.0:11434 `<br>  -e OLLAMA_CONTEXT_LENGTH=32768 `<br>  -v ollama:/root/.ollama `<br>  ollama/ollama<br><br>docker exec ollama ollama pull llama3.1:8b<br><br>docker exec ollama ollama pull nomic-embed-text</pre><p>5) AI ChatBot application. the image is already on public registry (Quay), so there is no need to build it yourself:</p><pre>docker run -d --name demo-app --network demo-net `<br>-p 8080:8080 `<br>-v &quot;${PWD}/rag-docs:/deployments/rag-docs:ro&quot; `<br>-e QUARKUS_LANGCHAIN4J_EASY_RAG_PATH=/deployments/rag-docs `<br>quay.io/efeluzy/quarkus-rag-redis:latest</pre><p>The rag-docs folder is mounted from the laptop, so you can add or edit documents without rebuilding the image.</p><p>Open <a href="http://localhost:8080/">http://localhost:8080</a> and the chat page is ready.</p><h3>Trying Out</h3><p>The sample data is in Indonesian, so the questions below are in Indonesian as well. the assistant answers in the language of the question.</p><p>A question answered from the documents:</p><pre>curl -N -X POST http://localhost:8080/chat -H &quot;Content-Type: text/plain&quot; -d &quot;Siapa CEO PT Angin Ribut?&quot;</pre><p><em>(EN: “Who is the CEO of PT Angin Ribut?”)</em></p><p>The model’s answer: “Erfin Feluzy adalah CEO PT Angin Ribut”</p><p><em>EN : Erfin Feluzy is the CEO of PT Angin Ribut.</em></p><p>A question that needs to call MCP Tools to the database:</p><pre>curl -N -X POST http://localhost:8080/chat -H &quot;Content-Type: text/plain&quot; -d &quot;Berapa rata-rata gaji di departemen Engineering?&quot;</pre><p>(“What is the average salary in the Engineering department?”)</p><p>The model’s answer: “Rata-rata gaji di departemen Engineering adalah Rp 17.050.000.” — the average salary in Engineering is Rp 17,050,000. That number is not made up: the model called a tool, the tool ran an AVG query against MySQL, and the model turned the result into a sentence.</p><p>Here are screenshot of web ui:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*LdsPEgcX7OQnRUKCQczMUQ.png" /></figure><p>The beauty of using multi language LLM, it can relate information from Indonesian language data on RAG, with English question.</p><p>I use vscode to inspect the vector store in Redis:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*Wjc-glNv65B3BY3WyFtHzw.png" /><figcaption>Vector data on Redis</figcaption></figure><p>Here is employee data from MySQL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fEYLFsCPtIig3iwIMVAzIQ.png" /><figcaption>Employee data on MySQL</figcaption></figure><h3>Lesson Learned</h3><ol><li>An 8B model is smart enough for RAG and Tool calling, as long as the system prompt is firm about when tools may be used.</li><li>The default RAG prompt is too strict for a general-purpose chatbot; replace it to suit your needs.</li><li>Don’t re-ingest documents on every start when your vector store is persistent.</li><li>Redis 8 ships with built-in vector search — no more redis-stack image needed.</li><li>Let the LLM choose tools by specify “task for each tools”. A new paradigm of coding.</li></ol><h3><strong>Wrapping UP</strong></h3><p>With about seven Java classes, we have a chatbot that answers from internal documents, reads a database safely, and runs entirely on a laptop. Natural next steps are adding PDF documents, trying a larger model, or deploying everything to Kubernetes/OpenShift.</p><p>The full source code is at my <a href="https://github.com/erfinfeluzy/quarkus-rag-redis-demo">GitHub </a><a href="https://github.com/erfinfeluzy/quarkus-rag-redis-demo.">.</a> Clone it, try it, and let me know in the comments if you have any questions. Check my other tutorials related to Quarkus and AI.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b58fe62b5374" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Supercharge Your AI Application with Memory and Tools using Quarkus, LangChain4j, and…]]></title>
            <link>https://erfin-feluzy.medium.com/tutorial-supercharge-your-ai-application-with-memory-and-tools-using-quarkus-langchain4j-and-b1d96900440d?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1d96900440d</guid>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[quarkus]]></category>
            <category><![CDATA[langchain4j]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 16:36:58 GMT</pubDate>
            <atom:updated>2025-04-28T05:57:22.547Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial: Supercharge Your AI Application with Memory and Tools using Quarkus, LangChain4j, and Redis</h3><p>Large-Language-Model (LLM) by default is stateless and can not remember past conversations with human. It also by default not able to interact with your database or other IT assets. For example: asking your AI to search your booking reference on your RDBMS and send it your email via SMTP.</p><p>To enhance our AI capability, we can add context and Tools to LLM, Thus it can provide more contextual and accurate result. This tutorial will guide your to build your first AI Chat bot with memory and tools on your local machine.</p><h4>The Goals :</h4><ul><li>Create Quarkus application and integrate with LLM(s) on local machine</li><li>Provide past conversations to LLM using Redis</li><li>Create sample Tools. This tools will be used by LLM to send the content to your email</li></ul><p>This tutorial will guide you to build application on your local with this tech stack:</p><ul><li><strong>Quarkus</strong> — Application framework. Using Langchain4j extension</li><li><strong>Redis</strong> — In memory NoSQL for storing chat memory</li><li><strong>Ollama</strong> — Inference and serve LLM</li><li><strong>LLama3</strong> — Large Language Model with Tools Support. Notes: not all private LLM support Tools Integration (eg: DeepSeek</li></ul><p>And here is the flow of this tutorial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KVDVRLRRhPxiRi_cL7nqdA.png" /></figure><blockquote>Disclaimer: This tutorial is for experimental and learning purpose only. Author uses open source tools for this tutorial. For production grade that need scalability and reliability, you may use product from respective stack (eg: Red Hat build of Quarkus, RedisLab, Red Hat OpenShift AI vLLM, etc).</blockquote><h4>Prerequisite</h4><ul><li>Skills: Java basic programming, Container (Podman or Docker)</li><li>Tools: VSCode, Maven, Git, Docker/Podman, Java 17 or higher. All are mandatory.</li><li>Gear: Laptop / server / vm with sufficient RAM and CPU. Author uses MBP M2 with 32GB RAM.</li></ul><h4>Step 1 : Prepare Your Environment</h4><p>Run Redis server as chat memory provider on docker or podman on your local machine. You may also use Redis on remote server with cluster mode.</p><pre>$ docker run -d --name redis -p 6379:6379 redis:latest</pre><p>Deploy Ollama as LLM inferencing server on Docker. We will use LLM from Llama3 inside “<em>ollama</em>” container.</p><pre>$ docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama<br><br>$ docker exec -it ollama bash<br><br>&gt; $ ollama pull llama3-groq-tool-use:8b</pre><p>Verify all prerequisites are deployed properly.</p><pre>docker ps --format &quot;table {{.ID}}\t{{.Names}}\t{{.Status}}&quot;<br><br>CONTAINER ID   NAMES    STATUS<br>4421ce985b32   redis    Up 2 days<br>f511a6f54d71   ollama   Up 2 days</pre><h4>Step 2 : Pull Source Code From Git and Let’s Code</h4><p>Clone source code from my <a href="https://github.com/erfinfeluzy/tutorial-quarkus-langchain4j-tools.git">GitHub</a></p><pre>$ git clone https://github.com/erfinfeluzy/tutorial-quarkus-langchain4j-tools.git</pre><p>we use maven library dependencies on<strong> <em>pom.xml</em></strong> :</p><pre>&lt;!-- open ai standard api, hence we will use local inferencing server --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;io.quarkiverse.langchain4j&lt;/groupId&gt;<br>    &lt;artifactId&gt;quarkus-langchain4j-openai&lt;/artifactId&gt;<br>&lt;/dependency&gt;<br><br>&lt;!-- Memory Store to redis --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;io.quarkiverse.langchain4j&lt;/groupId&gt;<br>    &lt;artifactId&gt;quarkus-langchain4j-memory-store-redis&lt;/artifactId&gt;<br>&lt;/dependency&gt;<br><br>&lt;!-- Send Email for Tools --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;io.quarkus&lt;/groupId&gt;<br>    &lt;artifactId&gt;quarkus-mailer&lt;/artifactId&gt;<br>&lt;/dependency&gt;<br><br>&lt;!-- Fake SMTP server for Development Purpose Only --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;io.quarkiverse.mailpit&lt;/groupId&gt;<br>    &lt;artifactId&gt;quarkus-mailpit&lt;/artifactId&gt;<br>    &lt;version&gt;1.6.2&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>Configurations of this application are stored in <strong><em>application.properties</em></strong>.</p><pre># LLM inference server config<br>quarkus.langchain4j.openai.api-key=not-mandatory-but-required<br>quarkus.langchain4j.openai.base-url=http://localhost:11434/v1/<br>quarkus.langchain4j.openai.chat-model.model-name=llama3-groq-tool-use:8b<br>quarkus.langchain4j.openai.timeout=60s<br>quarkus.langchain4j.openai.chat-model.temperature=0.3<br><br># for logging purpose<br>quarkus.langchain4j.openai.chat-model.log-requests=true<br>quarkus.langchain4j.openai.chat-model.log-responses=true<br><br># storing chat memory to redis<br>quarkus.redis.hosts=redis://localhost:6379<br><br>quarkus.mailer.from=ai_robot@bankerfin.com</pre><blockquote>Note: Author not using langchain4j-ollama extension. OpenAI API has standard rest structure. Ollama does not provide api key token, hence i put any value to api-key. You can use any inferencing server like vLLM or InstructLab by changin base-url properties.</blockquote><p>Create your first AI Agent with Quarkus Langchain4j. Review it on <strong><em>CustomerSupportAiAgent.java</em></strong></p><pre>import dev.langchain4j.service.MemoryId;<br>import dev.langchain4j.service.SystemMessage;<br>import dev.langchain4j.service.UserMessage;<br>import io.quarkiverse.langchain4j.RegisterAiService;<br>import io.quarkiverse.langchain4j.ToolBox;<br><br>@SessionScoped<br>@RegisterAiService<br>public interface CustomerSupportAiAgent {<br><br>    @SystemMessage(&quot;&quot;&quot;<br>            You are a customer support agent of a bank company &#39;Bank Erfin&#39;.<br>            You are friendly, funny, polite and concise.<br>            If the question is unrelated to Banking, you should politely redirect the customer to the right department.<br>            You can tell a joke to customer if they asked for it.<br>            You can send an email to the customer if they ask for it.<br>            &quot;&quot;&quot;)<br>    @ToolBox(EmailSenderTool.class)<br>    String chat(<br>        @MemoryId String id, <br>        @UserMessage String userMessage);<br>}</pre><h4>Explanation</h4><pre>@RegisterAiService -&gt; register ai service on Quarkus runtime<br><br>@SystemMessage -&gt; tell our LLM how to handle the customer<br><br>@ToolBox -&gt; register our tools to AI Agent<br><br>@MemoryId -&gt; identification of conversation that will be strored in redis<br><br>@UserMessage -&gt; message from human</pre><p>Create Web Socket Controller to handle chat conversation</p><pre>@WebSocket(path = &quot;/customer-support-agent&quot;)<br>public class CustomerSupportAgentWebSocket {<br><br>    @Inject<br>    CustomerSupportAiAgent customerSupportAiAgent;<br><br>    @OnOpen<br>    public String onOpen() {<br>        return &quot;Welcome to a Bank Erfin! How can I help you today?&quot;;<br>    }<br><br>    @OnTextMessage<br>    public String onTextMessage(String message) {<br>        <br>        return customerSupportAiAgent.chat(<br>            &quot;+6281xxxxxxx&quot;, //fake chat id that will be stored in Redis<br>            message);<br>    }<br>}</pre><p>Create AI Tools for sending Email.</p><pre>import dev.langchain4j.agent.tool.Tool;<br><br>@ApplicationScoped<br>public class EmailSenderTool {<br>    <br>    @Inject Mailer mailer;  <br><br>    @Tool(&quot;send the provided content or last message via email&quot;)<br>    public void sendAnEmail(String content){<br><br>        Log.info(&quot;====================== Sending email with content :\n&quot; + content);<br><br>        mailer.send(<br>            Mail.withText(<br>                &quot;erfin.feluzy@gmail.com&quot;, //to email<br>                &quot;Bank Erfin AI Jokes&quot;, // email subject<br>                content)); // email content<br>    }<br>}</pre><pre>@Tool(&quot;send the provided content or last message via email&quot;) <br><br>-&gt; Tell LLM to use this tool if user wants to send email </pre><h4>Step 3 : Run, Test, and Verify</h4><p>Now run your application on developer mode.</p><pre>$ mvn quarkus:dev</pre><p>open <a href="http://localhost:8080/">http://localhost:8080</a> on your favorite browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*c6dtMTGvQn_p8pWZY9saew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*cbuBqw07bHTgqSWYbySGUQ.png" /></figure><p>Now stop the quarkus application. Use <strong><em>Ctrl + C</em></strong> to stop the process. This time let’s verify chat on redis server. As we can see, quarkus-langchain4j automatically store chat on redis server. This value will be loaded when we start the application again. This practice is useful when our application is run on microservice fashion, when pods can have multiple replica and spread accross kubernetes worker.</p><pre>$ docker exec -it redis bash<br><br>$ redis-cli -u redis://localhost:6379<br><br>$ get chat-with:+62xxx<br><br>result:<br>&quot;[{\&quot;text\&quot;:\&quot;You are a customer support *********]&quot;</pre><p>Now let’s start the application again using same command “<strong>mvn quarkus:dev</strong>” and try to ask whats my name again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*OK5gF861bJvkB9SUvmEQyA.png" /><figcaption>AI Assistance still remember your name even after application restarted</figcaption></figure><p>Let’s try the tools. I will ask AI bot to tell me jokes and send the jokes to my email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sR5LP00LNmEjiFN8GteFjg.png" /><figcaption>We can ask AI bot to send email using our internal system using Tools</figcaption></figure><p>We can see on the logs that LLM use our own Tools to send email. In this tutorial i use SMTP server mock provided by quarkus called <strong><em>Mailpit</em></strong>. you can use your preferred SMTP server by adding properties on quarkus-mailer extension.</p><p>On your browser, go to <a href="http://localhost:8080/qdev-ui/extensions"><strong>http://localhost:8080/q/dev-ui/extensions</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*4sU13GBVihVvt04C3MaH1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*NLYwtRpi7dLncqaQigrtVw.png" /></figure><p>Voala! now you can supercharge your own AI.</p><h3>Summary</h3><ul><li>Quarkus extension for Langchain4j provides powerful yet handy framework to interact with AI ecosystem like LLM inference, Tools, Model-Context-Protocol (MCP), RAG, etc.</li><li>We can Supercharge our AI by adding context of conversation and tools to our LLM. We can leverage Redis to store chat on memory and create our on tools to any backend. eg: RDBMS</li><li>This application and all technology stacks are ready for enterprise grade microservice platform like kubernetes and OpenShift.</li><li>Lesson learnt. NOT ALL LLM support tools function. Currently, LLava:7b and DeepSeek-R1:8b are not support using tools.</li></ul><h3>Reference</h3><ul><li><a href="https://quarkus.io/quarkus-workshop-langchain4j/">https://quarkus.io/quarkus-workshop-langchain4j/</a></li><li><a href="https://www.youtube.com/watch?v=JM9M_fzc2aw">Demo by Sebastien Blanc</a></li><li><a href="https://www.linkedin.com/in/alief/">proof reading by Alief Nugraha</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1d96900440d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Deploy Your First Private Artificial Intelligence on OpenShift with Granite LLM, Ollama…]]></title>
            <link>https://erfin-feluzy.medium.com/tutorial-deploy-your-first-private-artificial-intelligence-on-openshift-with-granite-llm-ollama-96d739004e1e?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/96d739004e1e</guid>
            <category><![CDATA[open-webui]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 12:28:09 GMT</pubDate>
            <atom:updated>2025-04-08T13:09:31.275Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial: Deploy Your First Private Artificial Intelligence on OpenShift with Granite LLM, Ollama, and OpenWebUI</h3><p>This tutorial will guide you how to deploy your first on premise, private Artificial intelligence on OpenShift, as easy as 1–2–3. We will use Red Hat OpenShift as kubernetes platform, Granite as Large Language Model (LLM), Ollama as LLM provider and OpenWebUI as serving layer.</p><p>Ollama and OpenWebUI are quite popular in communities. They provide easy and user-friendly tools for developing AI.</p><p>This tutorial is designed for less-technical persons. All steps here are using OpenShift web console and Web browser. Zero YAML, CLI console or data science skillset. So buckled up your seat and deep dive.</p><blockquote><strong>Note: this is not an official documentation and for experimental purposes only.</strong></blockquote><p>Here is what we will go through in this tutorial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2ftL0G25QxeggtoV" /></figure><h3>Prerequisite</h3><ul><li>OpenShift 4.x</li><li>Configured StorageClass for PV (RWO) on OpenShift</li><li>Text files for RAG input. download on my <a href="https://github.com/erfinfeluzy/ocp-ollama-openwebui-tutorial">github</a></li></ul><h3>Steps</h3><ol><li>Create Project on OpenShift</li><li>Deploy Ollama on OpenShift</li><li>Deploy OpenWebUI on OpenShift</li><li>Add Model &amp; Knowledge with RAG</li></ol><h3>Let’s Start</h3><h4>1. Create Project on OpenShift</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/0*QsthXy1P7m19Pl0E" /></figure><h4>2. Deploy Ollama</h4><p>First of all, we will create Persistent Volume Claim for Ollama. I use AWS Elastic Block Storage and preconfigured as default StorageClass on my OpenShift cluster.</p><p>Ollama will store data like LLM’s metadata in this PV. We won’t lose any data if something happens on the containers like pod crashing, restarting or recreating. we will create PVC with name <strong><em>pvc-ollama.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/0*B_dhexCp0Z0zQBC3" /></figure><p>Deploy Ollama container image on OpenShift. On OpenShift, go to <strong>Developer &gt; + Add &gt; Add Container</strong>. We will use image from DockerHub as per Ollama documentation <a href="https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image">here</a>.</p><pre>docker.io/ollama/ollama:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/0*s_1BKq7PQAePwepc" /></figure><p>Attach PVC <strong><em>pvc-ollama </em></strong>to Ollama Deployment. Mount this PVC as <strong>/.ollama </strong>directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/0*7JFqdt--rKMHk241" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*jJFJZozlgscpJuvN" /></figure><p>Pull <a href="https://www.ibm.com/granite"><strong>Granite LLM</strong></a> on Ollama Pod. Select Ollama’s pod and pull granite LLM from Ollama library. We will use LLM from granite version 3.2 with 8 Billions parameters. This LLM will use around 4GB storage. If LLM does not exist on the list, ollama will download the LLM from internet.</p><pre>$ Ollama run granite3.2:8b</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*eAcVe_LfxTNOy6hp" /></figure><p>Let’s try Granite LLM. We will ask Granite “W<em>ho is Erfin Feluzy?</em>”. this step is to validate whether granite LLM is properly pulled on Ollama Pod. Default granite LLM doesn’t know who is Erfin Feluzy. We will add knowledge about Him to Granite later in this tutorial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zF4s8s6TPhcQNar_" /></figure><h4>3. Deploy OpenWebUI</h4><p>We will create PersistentVolumeClaim for OpenWebUI. For demo purpose, We will use 30GiB RWO with name <strong><em>pvc-openwebui.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*9YOduz6ikhFgQtvN" /></figure><p>Deploy OpenWebUI Container Image. We will use this parameters to deploy OpenWebUI on OpenShift.</p><pre>Image name from external registry : ghcr.io/open-webui/open-webui:main<br><br>Environment Variables :<br>  - OLLAMA_BASE_URL : http://ollama:11434<br>  - WEBUI_SECRET_KEY : erfin-secret-key<br><br>Create Secure Route : true</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*2Lz5PPVgLZd71lUL" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/0*g1Bz9g0hnl800Uen" /></figure><p>Add storage to open-webui deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*8Vav62y_XkKSh0x9" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/0*P1UYaC7nNNTWipRk" /><figcaption>Mount PV as <strong>/app/backend/data</strong> on OpenWebUI’s pod</figcaption></figure><p>Use OpenShift route to access OpenWebUI on your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/0*cMC9tw43RDWbk2QZ" /><figcaption>click arrow on open-webui deployment to access openshift route via https</figcaption></figure><p>Voala! now you can access OpenWebUI using openshift generated route securely. if this your first time access, create admin user and find all listed LLM taken from Ollama.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ewtq7tAhuhloEWWh" /><figcaption>see Granite3.2:8b on model dropdown list menu</figcaption></figure><h4>4. Add Model and Knowledge to LLM using RAG</h4><p>In this section, we will learn how to use Retrieval-Augmented Generation (RAG) with Open WebUI to load text documents as a knowledge base.</p><blockquote><strong>What is RAG?</strong>​ Retrieval-Augmented Generation (RAG) combines LLMs with retrieved knowledge from external sources. The system retrieves relevant data from uploaded documents or knowledge bases, enhancing the quality and accuracy of responses. [<a href="https://docs.openwebui.com/tutorials/tips/rag-tutorial/">link</a>]</blockquote><p><strong>Create Knowledge and upload some text files.</strong></p><p>Create New knowledge on OpenWebUI. Goto <strong>Workspace &gt; Knowledge Tab &gt; plus (+) button.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/0*V2Hut6-2jeyhu9nG" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1pFnP7Z084p6p_mJ" /><figcaption>Upload files or Add text content. sample files on my <a href="https://github.com/erfinfeluzy/ocp-ollama-openwebui-tutorial">github</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/0*ro-MtJ5zMsd2-d_d" /><figcaption>OpenWebUI will do batch process on the background to extract information and save it to internal vector database. see OpenWebUI pod’s log for detail information.</figcaption></figure><p>Create new model based on Granite LLM <strong>“RHID-membership-granite8b”</strong> and attached previously created knowledge <strong>“RHID Membershiip”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/0*EY5gx0dRFkr6WL-G" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/0*tKDvdkYoEfsCShZ2" /></figure><p>Try newly created Model. On OpenWebUI, create new chat, select <strong>“RHID-membership-granite8b”</strong> on the dropdown list. Ask <strong>“who is Erfin Feluzy? “. Voila! </strong>Now granite know who is Erfin Feluzy.</p><h3>Summary</h3><p>Simple and Easy isn’t? Finally we have successfully deployed our first private on premise Artificial Intellige- nce on Red Hat OpenShift. Some benefits of on-premise AI using kubernetes cluster are:</p><ol><li>Security and Privacy. Some organization might need to comply with data sovereignity rules for sensitive information</li><li>Flexibility. Pick your own stack at ease.</li><li>Use OpenShift as distributed resource for AI engineering team</li><li>Reliability and Scalability</li></ol><h3>References</h3><ul><li><a href="https://www.ibm.com/granite">https://www.ibm.com/granite</a></li><li><a href="https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image">https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image</a></li><li><a href="https://docs.openwebui.com/">https://docs.openwebui.com/</a></li><li><a href="https://gautam75.medium.com/deploy-ollama-and-open-webui-on-openshift-c88610d3b5c7">https://gautam75.medium.com/deploy-ollama-and-open-webui-on-openshift-c88610d3b5c7</a></li><li><a href="https://www.linkedin.com/in/alief/">Mr Alief Nugraha</a> for reviewing this post</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96d739004e1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial : Deploy Microsoft SQL Server 2017 (MSSQL) on OpenShift]]></title>
            <link>https://erfin-feluzy.medium.com/tutorial-deploy-microsoft-sql-server-2017-mssql-on-openshift-77916eb7eec7?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/77916eb7eec7</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[mssql]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 14:52:57 GMT</pubDate>
            <atom:updated>2022-11-27T14:55:46.497Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial : Deploy Microsoft SQL Server on OpenShift</h3><blockquote>Disclaimer: This tutorial is not an official guide and intended for home lab only. For production use, please find official guide on Microsoft website or your local reseller.</blockquote><p>One of my friends ask me whether we can deploy Microsoft SQL Server on OpenShift. After take a look at <a href="https://learn.microsoft.com/en-us/sql/linux/quickstart-sql-server-containers-kubernetes?view=sql-server-ver16">MSSQL documentation</a> [1], there is a section to deploy MSSQL on AKS but not on OpenShift. This tutorial will guide you step-by-step how to deploy MSSQL (Bonus: deploy .NetCore application as MSSQL client) on OpenShift as easy as 1–2–3.</p><h3>Step 1: Create new project on OpenShift</h3><p>Lets start with creating new project on OpenShift.</p><pre>$ oc new-project mssql</pre><h3>Step 2: Create MSSQL Secret for MSSQL password</h3><pre>$ oc create secret generic mssql --from-literal=SA_PASSWORD=&quot;Sql2017isfast&quot;</pre><h3>Step 3: Create Persistent Volume Claim for DB Storage</h3><pre>kind: PersistentVolumeClaim<br>apiVersion: v1<br>metadata:<br>  name: mssql-data<br>spec:<br>  accessModes:<br>  - ReadWriteOnce<br>  resources:<br>    requests:<br>      storage: 8Gi</pre><pre>$ oc apply -f https://raw.githubusercontent.com/erfinfeluzy/ocp4-notes/master/assets/mssql-storage.yaml</pre><h3>Step 4: Deploy MS SQL Server on OpenShift</h3><pre>$ oc apply -f https://raw.githubusercontent.com/erfinfeluzy/ocp4-notes/master/assets/mssql-deployment.yaml</pre><blockquote><em>note:</em></blockquote><blockquote>- deployment using image from Microsoft: <strong><em>mcr.microsoft.com/mssql/server:2017-CU8-ubuntu</em></strong></blockquote><blockquote>- expose service as Load Balancer or Port Forward</blockquote><h3>Step 6: Query on Pods</h3><p>Remote shell to mssql pods</p><pre>$ oc get pods<br><br>$ oc rsh mssql-deployment-XXXXXXX</pre><p>Try query inside pods</p><pre>$ cd /opt/mssql-tools/bin</pre><pre>$ ./sqlcmd -S localhost -U sa -P Sql2017isfast</pre><pre>1&gt; create database dbtest<br>2&gt; select name from sys.databases<br>3&gt; go<br>name                                                                                                                    <br>------------------------------<br>master                                                                                                                  <br>tempdb                                                                                                                  <br>model                                                                                                                   <br>msdb                                                                                                                    <br>dbtest<br>(5 rows affected)</pre><pre>1&gt; use dbtest<br>2&gt; create table tphone(id int, name nvarchar(50))<br>3&gt; insert into tphone values(100,&#39;Aina&#39;)<br>4&gt; go<br>Changed database context to &#39;dbtest&#39;.<br>(1 rows affected)</pre><pre>1&gt; select * from tphone<br>2&gt; go<br>id          name<br>----------- --------------------------------------------------<br>        100 Aina<br>(1 rows affected)<br>1&gt; quit</pre><h3>Bonus: Query from External OCP</h3><ol><li>Step Service Type:LoadBalancer*</li><li>check load balancer url</li></ol><pre>$ oc get svc</pre><pre>============<br>NAME            TYPE           CLUSTER-IP       EXTERNAL-IP                                                                    PORT(S)           AGE</pre><pre>mssql           LoadBalancer   172.30.229.233   xxx.ap-southeast-1.elb.amazonaws.com   1433:31107/TCP    4h23m</pre><pre>mssql-service   LoadBalancer   172.30.145.178   xxx.ap-southeast-1.elb.amazonaws.com   31433:31749/TCP   4h23m</pre><p>use mssql-service to access from outside cluster. for example: <em>xxx.ap-southeast-1.elb.amazonaws.com:1433.</em></p><p><strong><em>*currently our OpenShift lab is deployed on AWS, thus we can leverage AWS ELB as Load Balancer.</em></strong></p><p><strong>Or,</strong></p><p>you can simply use OpenShift pod port forwarding to your local machine</p><pre>$ oc port-forward mssql-deployment-XXXXXXX 1433:1433</pre><h3>Bonus: Deploy .NetCore Sample Application</h3><pre>$ oc apply -f https://raw.githubusercontent.com/erfinfeluzy/ocp4-notes/master/assets/dotnet-template-erfin.json</pre><h4>Select Template</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*tyyu9jGQrOBGFuOZ" /></figure><h4>Instantiate Template</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WoYWcqNzbKvmBAxF.png" /></figure><h4>Check database</h4><pre>$ oc get pods<br><br>$ oc rsh mssql-deployment-XXXXXXX</pre><p>Query inside mssql pods</p><pre>$ cd /opt/mssql-tools/bin<br>$ ./sqlcmd -S localhost -U sa -P Sql2019isfast<br>1&gt; use myContacts<br>2&gt; go<br>Changed database context to &#39;myContacts&#39;.<br>1&gt; select * from Customers<br>2&gt; go<br>Id          Name<br>----------- ---------------------------<br>          1 erfin2<br>          2 aryo<br><br>(2 rows affected)</pre><h4>Additional: Change icon dotnet and mssql</h4><p>Add label to mssql deployment</p><pre>app.kubernetes.io/name=mssql</pre><p>Add label to dotnet deployment</p><pre>app.kubernetes.io/name=dotnet</pre><h3>Conclusion</h3><p>Microsoft SQL Server can be deployed on OpenShift with traditional kubernetes components such as: Deployment, Service, etc. At time this post published, currently there is no Kubernetes Operator available for MSSQL server.</p><p><strong>References:</strong></p><p>[1] <a href="https://learn.microsoft.com/en-us/sql/linux/quickstart-sql-server-containers-kubernetes?view=sql-server-ver16">https://learn.microsoft.com/en-us/sql/linux/quickstart-sql-server-containers-kubernetes?view=sql-server-ver16</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77916eb7eec7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Install Confluent on Red Hat OpenShift]]></title>
            <link>https://medium.com/redhatid-engineering/tutorial-install-confluent-on-red-hat-openshift-efb1a4a69c7d?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/efb1a4a69c7d</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[confluent]]></category>
            <category><![CDATA[quarkus]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Fri, 12 Aug 2022 16:00:17 GMT</pubDate>
            <atom:updated>2022-08-12T16:23:24.079Z</atom:updated>
            <content:encoded><![CDATA[<p>This article will show you how to install Confluent for Kubernetes (CFK) on Red Hat OpenShift Container Platform using Operator, as simple as 1–2–3, without the need of Helm Chart (as on CFLT install guides). The flow of this tutorial will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*ujRfqy1ukCO1gLxidMSbqw.png" /></figure><h3><strong>Prerequisites:</strong></h3><ul><li>Red Hat OpenShift Container Platform (version 4.x)</li><li>RWO Persistent Volume (with Dynamic Provisioning)</li><li>Confluent for Kubernetes license key (it’s a MUST)</li></ul><h3><strong>Step 1 : Create new Namespace for CFK</strong></h3><pre>$ oc login --server=<a href="https://api.zm47k.ocp.lab:6443/">https://api.erfin.ocp.lab:6443</a></pre><pre>$ oc new-project <strong>erfin-demo</strong></pre><pre>$ oc project <strong>erfin-demo</strong></pre><h3><strong>Step 2 : Create Secret for Confluent Operator</strong></h3><p>Put your license key as <strong>license.txt</strong> on your working directory. The license key will look like this:</p><pre>$ vi <strong>license.txt</strong></pre><pre>eyJ0eXAiOiJKV1QiLCJhbGciOiJS.........</pre><pre>:wq! --&gt; write and quit</pre><p>Now create your secret on OpenShift. This secret will be used by the CFK operator to create Zookeeper, kafka, etc Custom Resource (CR). Make sure to name it as <strong><em>confluent-operator-licensing</em> </strong>not <em>confluent-license</em>.</p><p><strong><em>Note</em></strong>: as this article published, i only have the article to add license on component level which is <strong>NOT WORKING</strong> based on this <a href="https://docs.confluent.io/operator/current/co-license.html#co-license-key-in-secret"><strong>article</strong></a><strong>.</strong> Thus, by strolling around from the confluent operator’s logs, i found that operator is looking for kubernetes secret with name: confluent-operator-licensing.</p><pre>$ oc create secret generic <strong>confluent-operator-licensing</strong> \<br>  --from-file=license.txt=./license.txt \<br>  --namespace <strong>erfin-demo</strong></pre><h3>Step 3 : Prepare Security Context Constraint (SCC)</h3><pre>$ oc apply -f <a href="https://raw.githubusercontent.com/confluentinc/confluent-kubernetes-examples/master/security/openshift-security/scc.yaml">https://raw.githubusercontent.com/confluentinc/confluent-kubernetes-examples/master/security/openshift-security/scc.yaml</a></pre><p>on This SCC, the allowed user ID is configured to be between 1000 and 1005</p><h3>Step 4 : Install Confluent for Kubernetes (CFK) Operator</h3><p>Red Hat OpenShift OperatorHub already <strong>certify</strong> CFK operator on OCP web console. We will use CFK version 2.3 in this article.</p><p>Open the OCP web console, go to sidebar : <strong>Administrator &gt; Operators &gt; OperatorHub</strong>. Search “<em>Confluent</em>” as keyword. Click “Install”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*Nuo3K7e5zM-t1Ep9tVEWqQ.png" /></figure><p>Install operator on namespace: erfin-demo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*GW3-JprmL-6s6jJ-zhdNsQ.png" /></figure><p>After success install go to sidebar : Installed Operators. you can find CFK Operator has been successfully installed, or check the pods whether already Running state or not.</p><pre>$ oc get pods -n <strong>erfin-demo</strong></pre><pre>NAME                     READY   STATUS    RESTARTS   AGE<br>confluent-operator-xyz   1/1     Running   0          37s</pre><p>Check CFK operator logs to make sure whether there is no issue on licensing</p><pre>$ oc logs -f <strong>${CFK_POD_NAME}</strong> -n<strong> erfin-demo</strong></pre><pre><br>I0812 14:32:05.122525       1 request.go:665] Waited for 1.042771621s due to client-side throttling, not priority and fairness, request: GET:<a href="https://172.30.0.1/apis/apiserver.openshift.io/v1?timeout=32s">https://172.30.0.1:443/apis/apiserver.openshift.io/v1?timeout=32s</a><br>{&quot;level&quot;:&quot;INFO&quot;,&quot;time&quot;:&quot;2022-08-12T14:32:07.530Z&quot;,&quot;name&quot;:&quot;setup&quot;,&quot;caller&quot;:&quot;manager/main.go:363&quot;, <strong><em>&quot;msg&quot;:&quot;Starting Confluent Operator&quot;</em></strong><em>,</em> &quot;version&quot;:&quot;v0.435.12&quot;,&quot;build_time&quot;:&quot;2022-04-07T21:53:49Z&quot;,&quot;kubernetes_version&quot;:&quot;v1.23.5+012e945&quot;}</pre><h3>Step 5 : Create Zookeeper, Kafka Brokers and ControlCenter</h3><p>Create Zookeper, Kafka brokers, and Control Center with default configuration. Note: no need to put secret configuration in this step, since CFK license already put on operator level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*25iHi9fhO6RafHb90HHsgQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*CgcVJf7hvzb6x4WX2q77Yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*mauxvHAcG9uz2PmrPuo_fw.png" /></figure><p>Create Route for ControlCenter:</p><pre>$ <strong>oc expose svc/controlcenter -n erfin-demo</strong></pre><p>Voila.. after setup basic kafka cluster, will be seen on Red Hat OpenShift like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sBlL3ZH-T5HRal4w1ajamQ.png" /></figure><p>We will use kafka’s service <strong>port: external — Pod port : 9092</strong> to publish message from sample apps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*AmxlZ5FDnb49rid-zNZ-FA.png" /></figure><h3>Step 6 : Create Your First Topic</h3><p>Create your first Kafka Topic with name : <strong><em>mytopic</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*-KepsIJ2N06DoPFqWUzx_g.png" /></figure><h3>Step 7 FINAL : Try Your Kafka Cluster!</h3><p>Deploy Quarkus microservice apps to <strong>publish and subscribe</strong> kafka message to <strong>mytopic </strong>on CFK’s Topic. Source code of application can be found in this <a href="https://github.com/erfinfeluzy/quarkus-kafka-producer">link</a>.</p><p>Deploy Kafka producer apps:</p><pre>$ <strong>oc new-app quay.io/efeluzy/quarkus-kafka-producer:v3 \<br>-e kafka.bootstrap.servers=kafka:9092 \<br>-e mp.messaging.outgoing.mytopic-publisher.topic=mytopic</strong></pre><p>Deploy Kafka consumer apps:</p><pre>$ <strong>oc new-app quay.io/efeluzy/quarkus-kafka-consumer:v3 \<br>-e kafka.bootstrap.servers=kafka:9092 \<br>-e mp.messaging.incoming.mytopic-subscriber.topic=mytopic</strong></pre><pre>$ <strong>oc expose svc/quarkus-kafka-consumer</strong></pre><p>open route quarkus-kafka-consumer on the curl or browser:</p><pre>$ <strong>curl -kv </strong><a href="http://quarkus-kafka-consumer-erfin-demo.apps.zm47k.ocp.lab/stream"><strong>https://${QUARKUS_KAFKA_CONSUMER_ROUTE}/stream</strong></a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*uIN4wXlIdxj47rIQWUqw_A.png" /></figure><h3>Topology View: CFK on Red Hat OpenShift Container Platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sD_0IclRLtZXUoQET-JJCA.png" /></figure><p>Persistent Volume Claim (PVC) on OCP. All PV s is in ReadWriteOnce (RWO) mode. Make sure your storage class can dynamically provision RWO storage, or use Red Hat OpenShift Data Foundation (ODF) instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*5lnCGWu-iYFFYzT28Or1dw.png" /></figure><p>Confluent ControlCenter View</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kz7wsP-alGCBDWlu3Sjdg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efb1a4a69c7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/redhatid-engineering/tutorial-install-confluent-on-red-hat-openshift-efb1a4a69c7d">Tutorial: Install Confluent on Red Hat OpenShift</a> was originally published in <a href="https://medium.com/redhatid-engineering">Development using Red Hat Product. (This is an Unofficial Blog)</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial : Secure your API with x509 Mutual Authentication with Spring Boot on OpenShift4]]></title>
            <link>https://medium.com/redhatid-engineering/tutorial-secure-your-api-with-x509-mutual-authentication-with-spring-boot-on-openshift4-416a00a47af8?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/416a00a47af8</guid>
            <category><![CDATA[x509]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[red-hat-openshift]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 12:46:45 GMT</pubDate>
            <atom:updated>2022-11-27T14:57:11.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial : Secure your API with x509 Mutual Authentication on OpenShift</h3><blockquote><strong>Mutual authentication</strong> or <strong>two-way authentication</strong> refers to two parties <a href="https://en.wikipedia.org/wiki/Authenticating">authenticating</a> each other at the same time, being a default mode of <a href="https://en.wikipedia.org/wiki/Authentication_protocol">authentication</a> in some protocols (<a href="https://en.wikipedia.org/wiki/Internet_Key_Exchange">IKE</a>, <a href="https://en.wikipedia.org/wiki/Secure_Shell">SSH</a>) and optional in others (<a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">TLS</a>).</blockquote><blockquote>As it requires provisioning of the certificates to the clients and involves less user-friendly experience, it’s rarely used in end-user applications.</blockquote><blockquote>Mutual TLS authentication (<strong>mTLS</strong>) is much more widespread in <a href="https://en.wikipedia.org/wiki/Business-to-business">business-to-business</a> (B2B) applications, where a limited number of programmatic and homogeneous clients are connecting to specific web services, the operational burden is limited, and security requirements are usually much higher as compared to consumer environments. [2]</blockquote><p>This tutorial will guide you step by step to implement x509 mutual authentication. With Red Hat OpenShift we can leverage existing spring boot REST application to become a secured x509 mTLS application. Below is our tutorial flow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*poFpWY7q40Rv-1pTHUyQLw.png" /></figure><h3>Prerequisite</h3><ol><li>Pre-installed <strong><em>openssl</em></strong> cli tool on your OS.</li><li>Pre-installed <strong><em>keytool </em></strong>cli tool on your OS.</li><li>Pre-installed oc cli tool on your OS</li><li>Deploy Spring Boot sample apps on Openshift using s2i java:11. Source code <a href="https://github.com/erfinfeluzy/springboot-sample-apps">here</a>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZh8wyAitsrm2pu4hXG1Gg.png" /></figure><h3>Step 1 : Create Root CA</h3><p>To be able to sign our server-side and client-side certificates, we need to create our own self-signed root CA certificate first. On This tutorial <strong>we will act as our own certificate authority</strong>.</p><p>Let’s now create the CA certificate:</p><pre>$ openssl req -x509 -sha256 -days 3650 -newkey rsa:4096 -keyout rootCA.key -out rootCA.crt</pre><p>Note: for this tutorial i use “<strong>changeit</strong>” as rootCA passphrase and <strong>erfinfeluzy.com</strong> as Common Name (CN). the rest is empty</p><h3>Step 2 : Server-side Certificate</h3><p>Let’s start with creating a so-called certificate signing request (CSR):</p><pre>$ openssl req -new -newkey rsa:4096 -keyout localhost.key</pre><p>Similarly, as for the CA certificate, we have to provide the password for the private key. Additionally, let’s use <em>localhost</em> as a common name (CN). Copy-then-paste previous result to certificate signing request (.csr)</p><pre>$ vi localhost.csr<br>...<br>-----BEGIN CERTIFICATE REQUEST-----<br>...<br>-----END CERTIFICATE REQUEST-----<br>...</pre><p>Before we proceed, we need to create a configuration file — <em>localhost.ext</em>. It’ll store some additional parameters needed during signing the certificate.</p><pre>$ vi localhost.ext</pre><pre><br>authorityKeyIdentifier=keyid,issuer<br>basicConstraints=CA:FALSE<br>subjectAltName = <a href="http://twitter.com/alt_names">@alt_names</a><br>[alt_names]<br>DNS.1 = localhost</pre><p>Now, it’s time to <strong>sign the request with our <em>rootCA.crt</em> certificate and its private key</strong>:</p><pre>$ openssl x509 -req -CA rootCA.crt -CAkey rootCA.key -in localhost.csr -out localhost.crt -days 365 -CAcreateserial -extfile localhost.ext</pre><p><strong>we finally have a ready to use <em>localhost.crt</em> certificate signed by our own certificate authority.</strong></p><p>To print our certificate’s details in a human-readable form we can use the following command:</p><pre>$ openssl x509 -in localhost.crt -text</pre><h3>Step 3 : Create KeyStore</h3><p>A keystore is a repository that our Spring Boot application will use to hold our server’s private key and certificate. In other words, <strong>our application will use the keystore to serve the certificate to the clients during the SSL handshake [1].</strong></p><p>We’ll use the <a href="https://en.wikipedia.org/wiki/PKCS_12">PKCS 12 archive</a>, to <strong>package our server’s private key together with the signed certificate</strong>. Then we’ll import it to the newly created <em>keystore.jks</em></p><pre>$ openssl pkcs12 -export -out localhost.p12 -name “localhost” -inkey localhost.key -in localhost.crt</pre><p>import <strong>localhost.p12</strong> file to <strong>keystore.jks</strong></p><pre>$ keytool -importkeystore -srckeystore localhost.p12 -srcstoretype PKCS12 -destkeystore keystore.jks -deststoretype JKS</pre><h3>Step 4 : Create TrustStore</h3><p>A truststore in some way is the opposite of a keystore. <strong>It holds the certificates of the external entities that we trust</strong>. [1]</p><p>In our case, it’s enough to keep the root CA certificate in the truststore.</p><p>Let’s see how to create a <em>truststore.jks</em> file and import the <em>rootCA.crt</em> using keytool:</p><pre>$ keytool -import -trustcacerts -noprompt -alias ca -ext san=dns:localhost,ip:127.0.0.1 -file rootCA.crt -keystore truststore.jks</pre><h3>Step 5 : Enable Mutual Authentication on Your Spring Boot Application on OpenShift</h3><p>upload your keystore and truststore on your local machine as configmap on OpenShift, then mount it to your application deployment</p><pre>$ cp keystore.jks security-config/keystore.jks</pre><pre>$ cp truststore.jks security-config/truststore.jks</pre><pre>$ oc create configmap my-x509-config --from-file=security-config/</pre><p><strong>Note: Only copy keystore.jks and truststore.jks files.</strong></p><p>add config map to your deployment, mount it to pods with mount-path:</p><p><em>/my-x509-config</em></p><pre>$ oc get deployments<br>...</pre><pre>NAME                         READY     UP-TO-DATE   AVAILABLE   AGE<br>springboot-sample-apps-git   1/1       1            1           6h28m<br>...</pre><pre>$ oc set volume deployment/springboot-sample-apps-git \<br>--add \<br>--type=configmap \<br>--configmap-name=my-x509-config \<br>--mount-path=/my-x509-config</pre><p><strong>Set Environment Variable on Deployment</strong></p><p>current Spring Boot apps will enable https and x509 client authentication</p><pre>server.port=8443</pre><pre>server.ssl.enabled=true<br>server.ssl.client-auth=need</pre><pre>server.ssl.key-store=/my-x509-config/keystore.jks<br>server.ssl.key-store-password=changeit</pre><pre>server.ssl.trust-store=/my-x509-config/truststore.jks<br>server.ssl.trust-store-password=changeit</pre><p><strong>Create Secure Route with Passthrough mode</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*54gqtfPpO0j7dfJS5ziM-Q.png" /></figure><p>Open routes on browser, it will ask for client certificate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*j3_IeO715nFgO078p4nYJQ.png" /></figure><p>if you use wrong certificate, Browser will not allow you to access</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*IGIjWl4wZ4bDttIb6QSZRA.png" /></figure><h3>Step 6 : Create Client Certificate</h3><pre>$ openssl req -new -newkey rsa:4096 -nodes -keyout clientErfin.key</pre><p>In this tutorial i use “ClientErfin” as Common Name (CN), rest left blank. copy from begin certificate reqeust to end cert request from output to new certifcate sign request (.csr) file</p><pre>$ vi clientErfin.csr</pre><pre>-----BEGIN CERTIFICATE REQUEST-----<br><br>...</pre><pre>-----END CERTIFICATE REQUEST-----</pre><p>Generate Client Certificate (.crt) file</p><pre>$ openssl x509 -req -CA rootCA.crt -CAkey rootCA.key -in clientErfin.csr -out clientErfin.crt -days 365 -CAcreateserial</pre><p>Last step, package client key (.key) and client signed certificate (.crt) in PKCS format</p><pre>$ openssl pkcs12 -export -out clientErfin.p12 -name “clientErfin” -inkey clientErfin.key -in clientErfin.crt</pre><p>Again, i use “changeit” as client password.</p><p><strong>Note:</strong> in reality you can give this p12 file to your api consumer.</p><h3>Step 7 : Import Client Certificate to Browser</h3><p>writer use macOS on this tutorial, thus i use KeyChain and add new certificate, add clientErfin.p12 file on KeyChain, it will ask you for password of p12 file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*9eEJyPpY_d_vYSU-ta7YdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*luWlt4sdGyqqivCIRvkNFQ.png" /></figure><p>Now you can successfully open the Apps on your favorite browser after input the right certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*dxg4L-yxePg2qcth5pN1sg.png" /></figure><p><strong>Test it on Postman</strong></p><p>You can add certificate on PostMan &gt; settings &gt; choose clientErfin.p12 as PFX file, input passphrase for the file &gt; Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*XqMtXoVUXKwJy_zw4laktw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*abiKGOP1r1x_XOZtU5Zicw.png" /></figure><h3>Conclusions</h3><p>Rd Hat OpenShift can be used for application that need custom security mechanism like X509 Mutual Authentication. This is one of use case when to use passthrough method as TLS termination on OpenShift route. TLS termination not happened on the edge, but directly handled by the application inside the pod.</p><h3>References</h3><ul><li>[1] <a href="https://www.baeldung.com/x-509-authentication-in-spring-security">https://www.baeldung.com/x-509-authentication-in-spring-security</a></li><li>[2] <a href="https://en.wikipedia.org/wiki/Mutual_authentication">https://en.wikipedia.org/wiki/Mutual_authentication</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=416a00a47af8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/redhatid-engineering/tutorial-secure-your-api-with-x509-mutual-authentication-with-spring-boot-on-openshift4-416a00a47af8">Tutorial : Secure your API with x509 Mutual Authentication with Spring Boot on OpenShift4</a> was originally published in <a href="https://medium.com/redhatid-engineering">Development using Red Hat Product. (This is an Unofficial Blog)</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debug Spring Boot Apps on Red Hat OpenShift4]]></title>
            <link>https://erfin-feluzy.medium.com/debug-spring-boot-apps-on-red-hat-openshift4-7a6ee7bd7f50?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a6ee7bd7f50</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 07:52:58 GMT</pubDate>
            <atom:updated>2020-09-30T07:52:58.233Z</atom:updated>
            <content:encoded><![CDATA[<p>This story begins with a question from an OpenShift user about how to debug a Spring Boot application that runs as a container in OpenShift. Considering that quite a lot of coder friends use this framework as a microservice application, so I tried to make a tutorial for remote debugging java applications on OpenShift4.</p><p>Below picture shows this tutorial flow</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*BRLxvS1eHIC1ImRiBy_JKg.png" /></figure><h3>Prerequisite</h3><ol><li>Preinstalled <a href="http://openshift.com/"><strong>OpenShift Container Platform 4</strong></a> (OCP4)</li><li>OpenShift client command line tools (oc tools) atau k8s cli. Download <a href="https://docs.openshift.com/container-platform/4.5/cli_reference/openshift_cli/getting-started-cli.html"><strong>here</strong></a>.</li><li>Your favorite IDE. Publisher uses <a href="https://developers.redhat.com/products/codeready-studio/download"><strong>Red Hat CodeReady Studio</strong></a> (Eclipse based) and VSCode for this tutorial.</li><li>Deploy your Springboot apps on OpenShift (<a href="https://github.com/erfinfeluzy/springboot-sample-apps.git"><strong>sample apps on GitHub</strong></a>). This time i use s2i method on OpenShift web console.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZh8wyAitsrm2pu4hXG1Gg.png" /></figure><h3>Step 1 : Set Debug Mode as Environment Variable</h3><p>Add new environment variable <strong><em>JAVA_DEBUG=true</em></strong> on your <em>Deployment</em> or <em>DeploymentConfig. </em>Below picture use OpenShift web console to add environment variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQ15meVOp-Pc6KIam5Q4sQ.png" /></figure><p>Or, using <em>oc</em> or <em>kubectl</em> command line below:</p><pre>$ <strong>kubectl set env deployment/springboot-sample-apps-git JAVA_DEBUG=true</strong></pre><p>on startup log, find below information for debug port.</p><pre>Listening for transport dt_socket at address: 5005</pre><p>Note: s2i java use port 5005 as default debug port. it might different based on your preferred base image.</p><h3>Step 2 : Port Forward Debug port to Your Local Machine</h3><p>find running pods on your namespace:</p><pre>$ <strong>kubectl get pods | grep Running</strong></pre><pre>....</pre><pre>springboot-sample-apps-git-XXXX   1/1       Running</pre><p>Port forward the debug port on target pod</p><pre>$ <strong>kubectl port-forward springboot-sample-apps-git-XXXX 5005:5005</strong></pre><pre>....</pre><pre>Forwarding from 127.0.0.1:5005 -&gt; 5005<br>Forwarding from [::1]:5005 -&gt; 5005</pre><h3>Step 3 : Setup Remote Debug on Your IDE</h3><p>Go to Debug Configuration &gt; Remote Java Application</p><p>Connection Type: <strong><em>Standard (Socket Attach)</em></strong></p><p>Host:<em> </em><strong><em>localhost</em></strong></p><p>Port: <strong><em>5005</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*3GHxdYlZeY6IWIepqrUCkw.png" /></figure><p>if you use VSCode, add below configuration <em>launch.json</em> on <em>.vscode </em>folder.</p><pre>{</pre><pre>   &quot;version&quot;: &quot;0.2.0&quot;,</pre><pre>   &quot;configurations&quot;: [</pre><pre>      {</pre><pre>         &quot;type&quot;: &quot;java&quot;,</pre><pre>         &quot;name&quot;: &quot;Debug (Attach)&quot;,</pre><pre>         &quot;projectName&quot;: &quot;springboot-sample-apps&quot;,</pre><pre>         &quot;request&quot;: &quot;attach&quot;,</pre><pre>         &quot;hostName&quot;: &quot;localhost&quot;,</pre><pre>         &quot;port&quot;: 5005</pre><pre>      }<br>   ]</pre><pre>}</pre><h3>Step 4 : Voila! Debug Your Applications</h3><p>Open apps on browser <a href="http://$your_apps_route/swagger-ui.html"><em>http://$YOUR_APPS_ROUTE/swagger-ui.html</em></a><em> , </em>try<em> </em>to execute <em>/api/v1/home </em>on swagger sandbox</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*WFZknoEuQfHBe0GAGJZheQ.png" /></figure><p>Debug breakpoint on VSCode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hs-7dj72MT3yaHL3FEz_Dg.png" /></figure><h3>References</h3><ul><li><a href="https://www.openshift.com/blog/debugging-java-applications-on-openshift-kubernetes">https://www.openshift.com/blog/debugging-java-applications-on-openshift-kubernetes</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a6ee7bd7f50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debug Spring Boot Apps on Red Hat OpenShift4 (Bahasa)]]></title>
            <link>https://medium.com/redhatid-engineering/debug-spring-boot-apps-on-red-hat-openshift4-bahasa-a910ee8552ef?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a910ee8552ef</guid>
            <category><![CDATA[openshift-4]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Wed, 30 Sep 2020 06:44:27 GMT</pubDate>
            <atom:updated>2020-09-30T06:44:27.923Z</atom:updated>
            <content:encoded><![CDATA[<p>Kisah ini berawal dari sebuah pertanyaan dari salah satu pengguna OpenShift tentang bagaimana cara debug aplikasi <a href="http://spring.io/"><em>Spring Boot</em></a> yang berjalan sebagai container di OpenShift. Mengingat cukup banyak teman-teman coder yang menggunakan framework ini sebagai aplikasi microservice, maka saya coba buat tutorialnya untuk remote debug aplikasi java pada OpenShift4.</p><p>Flow nya seperti gambar berikut.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*BRLxvS1eHIC1ImRiBy_JKg.png" /></figure><h3>Prerequisite</h3><ol><li>Preinstalled <a href="http://openshift.com/"><strong>OpenShift Container Platform 4</strong></a> (OCP4)</li><li>OpenShift client command line tools (oc tools) atau k8s cli. Download <a href="https://docs.openshift.com/container-platform/4.5/cli_reference/openshift_cli/getting-started-cli.html"><strong>disini</strong></a>.</li><li>IDE favorit mu. Mimin menggunakan <a href="https://developers.redhat.com/products/codeready-studio/download"><strong>Red Hat CodeReady Studio</strong></a> (Eclipse based) dan VSCode pada tutorial ini.</li><li>Deploy aplikasi Springboot mu ke OpenShift (<a href="https://github.com/erfinfeluzy/springboot-sample-apps.git"><strong>sample apps on GitHub</strong></a>). Tutorial kali ini saya menggunakan s2i untuk deploy aplikasinya.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZh8wyAitsrm2pu4hXG1Gg.png" /></figure><h3>Step 1 : Set Debug Mode as Environment Variable</h3><p>Tambahkan environment variable <strong><em>JAVA_DEBUG=true</em></strong> pada Deployment atau Deployment Config</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tQ15meVOp-Pc6KIam5Q4sQ.png" /></figure><p>Atau, menggunakan <em>oc</em> atau <em>kubectl</em> command line:</p><pre>$ <strong>kubectl set env deployment/springboot-sample-apps-git JAVA_DEBUG=true</strong></pre><p>pada log startup akan ada info debug port aplikasi.</p><pre>Listening for transport dt_socket at address: 5005</pre><h3>Step 2 : Port Forward Debug port to Your Local Machine</h3><p>lihat pod aplikasi yang Running:</p><pre>$ <strong>kubectl get pods | grep Running</strong></pre><pre>....</pre><pre>springboot-sample-apps-git-XXXX   1/1       Running</pre><p>Port forward port debug pada pod target</p><pre>$ <strong>kubectl port-forward springboot-sample-apps-git-XXXX 5005:5005</strong></pre><pre>....</pre><pre>Forwarding from 127.0.0.1:5005 -&gt; 5005<br>Forwarding from [::1]:5005 -&gt; 5005</pre><h3>Step 3 : Setup Remote Debug on Your IDE</h3><p>Go to Debug Configuration &gt; Remote Java Application</p><p>Connection Type: <strong><em>Standard (Socket Attach)</em></strong></p><p>Host:<em> </em><strong><em>localhost</em></strong></p><p>Port: <strong><em>5005</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*3GHxdYlZeY6IWIepqrUCkw.png" /></figure><p>jika kamu menggunakan VSCode. tambahkan konfigurasi <em>launch.json</em> pada folder <em>.vscode</em></p><pre>{</pre><pre>   &quot;version&quot;: &quot;0.2.0&quot;,</pre><pre>   &quot;configurations&quot;: [</pre><pre>      {</pre><pre>         &quot;type&quot;: &quot;java&quot;,</pre><pre>         &quot;name&quot;: &quot;Debug (Attach)&quot;,</pre><pre>         &quot;projectName&quot;: &quot;springboot-sample-apps&quot;,</pre><pre>         &quot;request&quot;: &quot;attach&quot;,</pre><pre>         &quot;hostName&quot;: &quot;localhost&quot;,</pre><pre>         &quot;port&quot;: 5005</pre><pre>      }<br>   ]</pre><pre>}</pre><h3>Step 4 : Voila! Debug Aplikasi Mu</h3><p>buka pada browser <a href="http://$your_apps_route/swagger-ui.html"><em>http://$YOUR_APPS_ROUTE/swagger-ui.html</em></a><em> dan coba /api/v1/home</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*WFZknoEuQfHBe0GAGJZheQ.png" /></figure><p>Debug pada VSCode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hs-7dj72MT3yaHL3FEz_Dg.png" /></figure><p>Semoga bermanfaat.</p><h3>Pranala Luar</h3><ul><li><a href="https://www.openshift.com/blog/debugging-java-applications-on-openshift-kubernetes">https://www.openshift.com/blog/debugging-java-applications-on-openshift-kubernetes</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a910ee8552ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/redhatid-engineering/debug-spring-boot-apps-on-red-hat-openshift4-bahasa-a910ee8552ef">Debug Spring Boot Apps on Red Hat OpenShift4 (Bahasa)</a> was originally published in <a href="https://medium.com/redhatid-engineering">Development using Red Hat Product. (This is an Unofficial Blog)</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: Deploy Camel-K on Openshift 4 using Tekton]]></title>
            <link>https://erfin-feluzy.medium.com/tutorial-deploy-camel-k-on-openshift-4-using-tekton-f9210e047f86?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9210e047f86</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[tekton]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[camelk]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Sun, 12 Jul 2020 06:13:31 GMT</pubDate>
            <atom:updated>2020-07-12T06:13:31.651Z</atom:updated>
            <content:encoded><![CDATA[<p>Tekton is an open source project that provides a framework to create cloud-native CI/CD pipelines quickly. As a Kubernetes-native framework, Tekton makes it easier to deploy across multiple cloud providers or hybrid environments. By leveraging the Custom Resource Definitions (CRDs) in Kubernetes, Tekton uses the Kubernetes control plane to run pipeline tasks. By using standard industry specifications, Tekton will work well with existing CI/CD tools such as Jenkins, Jenkins X, Skaffold, and Knative.[1]</p><p><a href="https://camel.apache.org/camel-k/latest/">Apache Camel K</a> is a lightweight cloud-integration platform that runs natively on Kubernetes and, in particular, lets you automate your cloud configurations. Based on the famous Apache Camel, Camel K is designed and optimized for serverless and microservices architectures.[2]</p><p>This article will guide you to deploy sample camel-K application, written in groovy, to Red Hat OpenShift 4 using OpenShift Pipeline based on Tekton.</p><h3>Prerequisite</h3><p>This tutorial assumes the following requirements are met:</p><ul><li>OpenShift 4+ cluster and oc binary tool. See docs <a href="https://try.openshift.com/">here</a>.</li><li>Openshift Pipeline Operator. See docs <a href="https://github.com/openshift/pipelines-tutorial">here</a>.</li><li>Camel K Client Tools — Kamel. See docs <a href="https://camel.apache.org/camel-k/latest/cli/cli.html">here</a>.</li><li>Optional: Tekton CLI. See docs <a href="https://github.com/tektoncd/cli">here</a>.</li></ul><p>Login to OpenShift</p><pre>oc login $OCP_CONSOLE</pre><h3>Step 1: Cluster setup</h3><p>This step will install camel operator on your ocp cluster</p><pre>kamel install --cluster-setup</pre><h3>Step 2: Create namespace</h3><pre>$ oc new-project camel-pipelines</pre><h3>Step 3: Create permission for serviceaccounts</h3><p>Use this file on <a href="https://raw.githubusercontent.com/erfinfeluzy/ocp4-notes/master/assets/camel-k-pipeline-permissions.yaml">assets/camel-k-pipeline-permissions.yaml</a></p><pre>$ oc apply -f camel-k-pipeline-permissions.yaml</pre><h3>Step 4: Create tekton pipeline</h3><p>Use this file on <a href="https://raw.githubusercontent.com/erfinfeluzy/ocp4-notes/master/assets/camel-k-pipeline-task-definition.yaml">assets/camel-k-pipeline-task-definition.yaml</a></p><pre>$ oc apply -f camel-k-pipeline-task-definition.yaml</pre><p>pipeline result below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HiPlE4RZJKr5tLaq" /></figure><p>source code for camel-k groovy <a href="https://github.com/erfinfeluzy/camel-k/tree/master/examples/tekton">here</a>:</p><pre>from(‘timer:groovy?period=1000’)<br> .log(‘Hello Camel K from Tekton pipelines’)</pre><h3>Step 5: Triggering a Pipeline execution</h3><p>Use this file on <a href="https://raw.githubusercontent.com/erfinfeluzy/ocp4-notes/master/assets/pipeline-task-run.yaml">assets/pipeline-task-run.yaml</a></p><pre>oc apply -f camel-k-pipeline-task-run.yaml</pre><p>This files contains:</p><pre>apiVersion: tekton.dev/v1alpha1<br>kind: PipelineRun<br>metadata:<br>  name: camel-k-pipeline-run-1<br>spec:<br>  pipelineRef:<br>    name: camel-k-pipeline<br>  serviceAccountName: &#39;camel-k-pipeline&#39; <br>  resources:<br>    - name: source-repo<br>      resourceRef:<br>        name: camel-k-examples-git</pre><blockquote><em>Notes: originally it used field serviceAccount, changed to serviceAccountName due to error on tekton parsing the field serviceAccount</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a7ujk7Nee_ie26iP" /></figure><p>After successfully build and deploy, you can find deployed apps on Topology</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/0*KhpUrWz4tRR-f74N" /></figure><h3>Step 6 (Optional) : see your deployment using Tekton cli</h3><pre>$ tkn pipeline ls</pre><p>result will be something like this</p><pre>NAME               AGE          LAST RUN                  STARTED      DURATION    STATUS<br>camel-k-pipeline   1 hour ago   camel-k-pipeline-d4vyhr   1 hour ago   3 minutes   Succeeded</pre><h3>Source</h3><ul><li>[1] <a href="https://www.openshift.com/learn/topics/pipelines">https://www.openshift.com/learn/topics/pipelines</a></li><li>[2] <a href="https://developers.redhat.com/blog/2020/05/12/six-reasons-to-love-camel-k/">https://developers.redhat.com/blog/2020/05/12/six-reasons-to-love-camel-k/</a></li><li><a href="https://camel.apache.org/camel-k/latest/tutorials/tekton/tekton.html#_triggering_a_pipeline_execution">https://camel.apache.org/camel-k/latest/tutorials/tekton/tekton.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9210e047f86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Quarkus Application to OpenShift 4 with Helm]]></title>
            <link>https://erfin-feluzy.medium.com/deploy-quarkus-application-to-openshift-4-with-helm-6123cf4e8221?source=rss-92236fea730d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6123cf4e8221</guid>
            <category><![CDATA[red-hat-openshift]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[quarkus]]></category>
            <dc:creator><![CDATA[Erfin Feluzy]]></dc:creator>
            <pubDate>Mon, 06 Jul 2020 09:35:41 GMT</pubDate>
            <atom:updated>2020-07-06T09:54:42.881Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://helm.sh/">Helm</a> is a package manager for <a href="https://kubernetes.io/">Kubernetes</a> which helps users create templated packages called Helm Charts to include all Kubernetes resources that are required to deploy a particular application. Helm then assists with installing the Helm Chart on Kubernetes, and afterwards it can upgrade or rollback the installed package when new versions are available. Helm Charts are particularly useful for installation and upgrade of stateless applications given that the Kubernetes resources and the application image can simply be updated to newer versions.[1]</p><p>This tutorial will show yout step by step how to deploy Quarkus application on Quay.io to OpenShift4 using Helm 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mckZrchw4xZPpf-TUwc5bA.png" /></figure><h3>Prerequisites:</h3><ol><li>Install helm on local workstation. Example below is using Homebrew on Mac:</li></ol><pre>$ brew install helm</pre><pre>$ helm version</pre><pre>version.BuildInfo{Version:&quot;v3.2.4&quot;, GitCommit:&quot;...&quot;, GitTreeState:&quot;dirty&quot;, GoVersion:&quot;go1.14.3&quot;}</pre><ol><li>login to Openshift and select designated namespace</li></ol><pre>$ oc login &lt;$OPENSHIFT_CLUSTER_URL&gt;</pre><pre>$ oc new-project my-project</pre><pre>$ oc project my-project</pre><h3>Step 1: Generate Helm chart on local</h3><pre>$ helm create quarkus-helm</pre><blockquote><em>This command will generate helm chart and template, with below structure</em></blockquote><pre>quarkus-helm<br>|____Chart.yaml<br>|____charts<br>|____.helmignore<br>|____templates<br>| |____deployment.yaml<br>| |____NOTES.txt<br>| |____ingress.yaml<br>| |____tests<br>| | |____test-connection.yaml<br>| |____service.yaml<br>| |____hpa.yaml<br>| |____serviceaccount.yaml<br>| |_____helpers.tpl<br>|____values.yaml</pre><h3>Step 2: Modify Image Repository</h3><p>Edit values.yaml and use quarkus sample image from my repository on <strong>quay.io/efeluzy/quarkus-rest-health:v1</strong></p><pre>$ vim values.yaml</pre><pre>...<br>image:<br>  <strong>repository: quay.io/efeluzy/quarkus-rest-health</strong><br>  pullPolicy: IfNotPresent<br>  <strong>tag: &quot;v1&quot;</strong><br>...</pre><blockquote><em>Notes: This is by default will use port 80 for service. You can change on service.port:8080</em></blockquote><h4>Modify Deployment to use Application port on 8080</h4><pre>$ vim template/deployment.yaml</pre><pre>...<br>          ports:<br>            - name: http<br>              <strong>containerPort: 8080</strong><br>              protocol: TCP<br>          livenessProbe:<br>            httpGet:<br>              <strong>path: /health/live</strong><br>              port: http<br>          readinessProbe:<br>            httpGet:<br>              <strong>path: /health/ready</strong><br>              port: http<br>...</pre><p><strong>Notes:</strong> For this application, i have prepared liveness and readiness probe. <strong>Must be configured</strong> on deployment.yaml, or application will note that application not healthy and will <strong>PullBackOff</strong>.</p><h3>Step 3: Add Openshift Secure Routes to Helm Template</h3><p>We will use Openshift secure route instead of ingress controller. Create route.yaml on <strong>template/</strong> folder</p><pre>$ vim template/route.yaml</pre><pre>kind: Route<br>apiVersion: route.openshift.io/v1<br>metadata:<br>  name: quarkus-helm<br>  namespace: erfin-demo<br>spec:<br>  to:<br>    kind: Service<br>    name: quarkus-helm<br>    weight: 100<br>  port:<br>    targetPort: http<br>  tls:<br>    termination: edge<br>    insecureEdgeTerminationPolicy: Redirect<br>  wildcardPolicy: None</pre><h3>Step 4: Verify Helm Chart on your local</h3><pre>$ helm lint ./quarkus-helm</pre><pre>==&gt; Linting ./quarkus-helm<br>[INFO] Chart.yaml: icon is recommended</pre><pre>1 chart(s) linted, 0 chart(s) failed</pre><h3>Step 5: Verify Template before deployment</h3><pre>$ helm template ./quarkus-helm<br>...<br>---<br># Source: quarkus-helm/templates/deployment.yaml<br>apiVersion: apps/v1<br>kind: Deployment<br>...<br>spec:<br>  replicas: 1<br>  template:<br>    spec:<br>      serviceAccountName: RELEASE-NAME-quarkus-helm<br>      securityContext:<br>        {}<br>      containers:<br>        - name: quarkus-helm<br>          securityContext:<br>            {}<br>          <strong>image: &quot;quay.io/efeluzy/quarkus-rest-health:v1&quot;</strong><br>          imagePullPolicy: IfNotPresent<br>          ports:<br>            - name: http<br>              <strong>containerPort: 8080</strong><br>              protocol: TCP</pre><pre>---<br>...</pre><h3>Step 5 : Deploy to OpenShift</h3><pre>$ helm install quarkus-helm ./quarkus-helm</pre><p>Result on OpenShift Topology :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yFiCnt8uBSRpCG6gT1XYbg.png" /></figure><p>Find Quarkus application’s log:</p><pre>$ oc logs -f $POD_NAME</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjXgjOn1YBicm1nt7isb_Q.png" /></figure><h3>Try it on your browser!</h3><pre>$ curl <strong>https://${YOUR_OCP_ROUTE}/person</strong><br>...<br>{&quot;name&quot;:&quot;Erfin Feluzy&quot;,&quot;id&quot;:&quot;1234&quot;}</pre><h3>Upgrade Service</h3><p>if you modify helm chart and need to redeploy it, you can use below commands:</p><pre>$ helm upgrade quarkus-helm ./quarkus-helm</pre><p>result:</p><pre>Release &quot;quarkus-helm&quot; has been upgraded. Happy Helming!<br>NAME: quarkus-helm<br>LAST DEPLOYED: Mon Jul  6 15:53:16 2020<br>NAMESPACE: my-project<br>STATUS: deployed<br>REVISION: 3<br>NOTES:<br>1. Get the application URL by running these commands:<br>  export POD_NAME=$(kubectl get pods --namespace erfin-demo -l &quot;app.kubernetes.io/name=quarkus-helm,app.kubernetes.io/instance=quarkus-helm&quot; -o jsonpath=&quot;{.items[0].metadata.name}&quot;)<br>  echo &quot;Visit <a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a> to use your application&quot;<br>  kubectl --namespace erfin-demo port-forward $POD_NAME 8080:80</pre><h3>Source:</h3><ul><li>[1] <a href="https://www.openshift.com/blog/openshift-4-3-deploy-applications-with-helm-3">https://www.openshift.com/blog/openshift-4-3-deploy-applications-with-helm-3</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6123cf4e8221" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>