<?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 Bilgehan NAL on Medium]]></title>
        <description><![CDATA[Stories by Bilgehan NAL on Medium]]></description>
        <link>https://medium.com/@bilgehannal?source=rss-869ba781ed04------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uB1vEg5FzJz0_37omx-GCg.jpeg</url>
            <title>Stories by Bilgehan NAL on Medium</title>
            <link>https://medium.com/@bilgehannal?source=rss-869ba781ed04------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 05:15:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bilgehannal/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[Building a Dynamometer for RC Cars (GearGauge)]]></title>
            <link>https://bilgehannal.medium.com/building-a-dynamometer-for-rc-cars-geargauge-cd93c6293163?source=rss-869ba781ed04------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd93c6293163</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[rc-cars]]></category>
            <dc:creator><![CDATA[Bilgehan NAL]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 19:26:00 GMT</pubDate>
            <atom:updated>2024-01-28T19:26:00.647Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FvZsIBKr5KFg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvZsIBKr5KFg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FvZsIBKr5KFg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2299dd35072e518442add5459832b73/href">https://medium.com/media/c2299dd35072e518442add5459832b73/href</a></iframe><p>In an exciting venture, I constructed a dynamometer tailored specifically for RC cars, meticulously designed to gauge essential metrics such as speed, power, and torque. Throughout this endeavor, I diligently chronicled my progress on Reddit, offering real-time insights into the development stages. Now, consolidating all my Reddit posts into this comprehensive Medium article, I aim to provide a cohesive narrative that merges every aspect of the project seamlessly.</p><h3>Building a Dyno for RC Cars (Part 0)</h3><p>I am RC enthusiast, I have an RC Car and was eager to discover its maximum speed. Initially, I thought about purchasing a speedometer, but after some contemplation, I decided to take a more hands-on approach and build my own solution.</p><p>After a bit of research and brainstorming, I’ve decided to take on the exciting project of building a homemade dynamometer (dyno) specifically designed for RC cars. This way, I can not only determine the top speed of my RC Car but also have a fun DIY project to work on.</p><p>My plan is to create a Dyno (short for dynamometer) tailored for RC cars. This dynamometer will allow me to measure not only the top speed but also power consumption, and ultimately, visualize the data through various analysis and graphs.</p><p>The project will consist of several key components:</p><ol><li><strong>Building the Dyno Mechanism:</strong> This will involve constructing a reliable and accurate dynamometer setup that can effectively measure the Traxxas Slash’s performance.</li><li><strong>Designing the Electronic Component:</strong> The electronic aspect of the project is crucial. I’ll be working on sensors and data acquisition systems to gather precise measurements.</li><li><strong>Software Development:</strong> To process and visualize the data in a professional manner, I will be developing custom software. This software will enable me to calculate and display performance metrics, allowing for a deeper understanding of my RC car’s capabilities.</li></ol><p>Throughout this project, I’m excited to share my progress with this community. I believe that by documenting each step of the process, we can all learn and grow together. Additionally, I’d greatly appreciate any advice, tips, or suggestions from the experienced members here.</p><p>I’m excited to share the first steps of my dyno project, particularly the development of the mechanism. To bring my design to life, I’ve been utilizing Fusion360 for the design phase and a 3D printer to fabricate the components. Please note that the project is still a work in progress, and the printing is ongoing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rDNPGq5gxsO9bFm9YPNj_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eoNi7ZzKX4nQq38dvl9ICA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOfqgxUXRizxJstxc9AM9w.png" /></figure><h3>Building a Dyno for RC Cars (Part 1)</h3><p>Hello,</p><p>In the previous post, I shared the beginning of my new dyno printing journey. Now, after dedicating 1.5 weeks to this project, I’m thrilled to announce that the dyno printing is nearly complete.</p><ul><li>The stability of the dyno has exceeded my expectations. During a test drive with my RC car on it, the performance was flawless without binding the car to the dyno. The car remained stationary on the dyno, showcasing its robust functionality.</li><li>Looking ahead, I envision the possibility of adjusting the dyno’s size in the future. However, for the time being, I possess only one RC car, so I’ve opted for a static size configuration.</li><li>My next step involves focusing on the electronic components. I plan to initiate a proof of concept (PoC) for reading rotations using an encoder, followed by processing the PoC. Once complete, I’ll proceed to design a PCB board.</li></ul><p>Upon finalizing the PCB design, I will print a piece to attach to the encoder on the dyno.</p><p>As mentioned earlier, achieving this milestone has fueled my enthusiasm to delve into the electronic aspect of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ob1IIFlOurx3M_8uVae9lQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzrszwiZUDLnZ0pTtf70Ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qi-L3HTswCru-_jA9Q--rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yuIW2ZnRPHT7a5zhbXGYJw.png" /></figure><h3>Building a Dyno for RC Cars (Part 2)</h3><p><em>Hello from Part2 ,</em><br>In the provided link above, you’ll observe significant progress in completing the mechanical aspect outlined in part 1. Following part 1, I made several critical changes and continued the development of the dyno. This involved enhancing the wheel system of the dyno, creating more stabilized pieces for smoother rolling. Additionally, I produced specialized pieces to immobilize the hall effect sensor and designed a magnet holder for improved functionality. On the electronics front, I designed a preliminary electronic setup using a breadboard for proof of concept, and successfully began reading initial data and conducting essential calculations. The project is steadily advancing, and I’m eager to share these exciting updates with you.</p><p>Here is some details about the progress…</p><h4><strong>Wheel Holder Revision</strong></h4><p>While my old wheel holders may have been capable of handling the task, they comprised three distinct pieces that were fused together, resulting in an unfortunate loss of stabilization. Recognizing this issue, I decided to create a new wheel holder designed and 3D-printed as a single piece. This approach significantly mitigated the stability problem, minimizing any potential disruptions in the system. The enhanced design promises to optimize performance and streamline the overall functionality of the setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6MXiPgzifMFeZjYsRjxjDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mhJFPT4RbFsbcCGoEqU_5g.png" /></figure><h4>Producing the piece to immobilize the hall effect sensor</h4><p>In my pursuit of effective data reading, I initially attempted to utilize encoders but faced challenges with data loss and imperfect results. Recognizing this hurdle, I opted for an alternative approach and decided to use magnets in conjunction with hall-effect sensors to capture the data accurately. To facilitate this, I crafted a specialized sensor holder and successfully produced two pieces, each tailored for the respective wheels. This adjustment in approach promises to enhance data capture reliability, addressing the issues encountered earlier and enabling a more robust system for data acquisition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s4eGD5nPeQ9Ooow2jL5keA.png" /></figure><h4>Magnet Holder</h4><p>During the magnet holder design phase, I initially opted for strip magnets, believing they would suffice for my project requirements. However, upon testing, I observed a recurring issue of data loss. To address this, I decided to invest in new neodymium magnets and redesign the magnet holder accordingly. This adjustment proved successful, eliminating any data loss and ensuring seamless and accurate data reading. The upgrade has significantly enhanced the functionality and reliability of the system, allowing for a smoother project progression.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDi3lHwaEFSh5Pf19Y0tdg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6NZtsPultuqs_jl2_h9Pg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2veFImY_UDMs3hjKL8KeDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUCxTaXXuRUueP_g1ufXYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ux0787wUVn88x7FjZlK9Og.png" /></figure><h4>Electronic Part and First Measurements</h4><p>I successfully designed the electronics and tested them on a breadboard. As a next step, I plan to design and produce a PCB for a more refined setup. The Arduino program has been completed, enabling me to efficiently retrieve data from the sensors and calculate the speed. Excitingly, I’ve even managed to calculate the maximum speed of my Traxxas Slash for the first time, hitting 36 kph in slow gears! :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uDETyTetUqmBgT7J0KoEQ.png" /></figure><p>I’ve successfully completed outlining the calculations for speed, acceleration, force, power, and torque. Currently, I’m in the process of both software development and dashboard design, aiming to present my results comprehensively. Of course, I plan to further enhance the project by designing a PCB. All in all, I’m thrilled to share that I’ve obtained my initial results, and their accuracy brings me immense joy. Stay tuned for more updates in subsequent parts. I’m eagerly open to any advice, questions, or engaging discussions. See you in the upcoming posts!</p><h3>Building a Dyno for RC Cars (Part 3)</h3><p>I wanted to share the latest developments in my ongoing project. If you’ve been following my previous posts, you’ll notice that in Part 2, I successfully extracted data from Arduino. Following that, I made some minor adjustments in the mechanical aspect of the project.</p><p>Now, let’s dive into the details of Part 3, where my primary focus has been on the software side of things.</p><p>Mechanical Updates</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAhpOH7uZ4Vt87jrHgUDTw.png" /></figure><p>Specifically, I’ve made a crucial enhancement in reading the rotation value of the wheel holder. In the earlier stages, I designed 4 magnets per rotation, but now, I’ve successfully increased the count to 10 magnets per rotation. This modification has significantly boosted the sensitivity of the dynamometer.</p><h4>Software</h4><p>The software part of the dyno consists of two fundamental elements: the User Interface (UI) and the Backend.</p><ul><li>The UI plays a pivotal role in displaying the current state of the dynamometer (dyno).</li><li>Users can easily access speed information and interact with the UI to input essential vehicle details.</li><li>While it doesn’t showcase detailed values, the UI focuses on presenting clear states and basic speed information.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ra-XuJXzFrttDEsgcDIPgw.png" /></figure><p>IAfter the user finishes the measurement process, they can initiate the report generation by clicking the “Generate Report” button on the user interface. This will produce a comprehensive PDF-format report encompassing a wealth of information and graphical representations.</p><p>The report includes dynamic friction details and corresponding graphs, speed information presented in units of kph, mph, and meters per second, acceleration data, force metrics, power information in both horsepower and wattage, as well as torque specifics.</p><p>All this data is meticulously displayed in tables and graphs, each section dedicated to a specific wheel. Additionally, a table highlighting the maximum values attained during the measurements is incorporated for quick reference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*wR7ddaQdDAddN_5fT-Dnyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*vjuhWYQkRdhAVZNSKXKS_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*yY30nm0OLM8zjDk8UmB3_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*29kNqLd5xHQWn2aMjC2viw.png" /></figure><p>Note: These data are sample data, it cannot be correct.</p><p>The final stage of the project, there are several crucial steps to take for further improvement. Firstly, on the software front, I’ll prioritize fixing any existing bugs and implement a comprehensive testing strategy to catch potential issues early in the process. I’ll also consider user feedback to enhance the overall user experience and explore ways to optimize performance. Turning to the mechanical aspects, especially in the area housing the sensors on the dyno, I’ll evaluate potential upgrades to boost accuracy and reliability. It’s essential to ensure that mechanical components are robust enough to withstand the intended usage conditions. In the electronic realm, I’m gearing up to design my own PCB. I’ll focus on meticulous layout planning to optimize signal paths, minimize interference, and carefully select components that align with my project’s requirements.</p><h3>Building a Dyno for RC Cars (Part 4)</h3><h4>End of the Process</h4><p>This post is likely the last one in the series. I’ve been sharing the step-by-step process of my project in earlier Reddit posts, so you can catch up on the details there. Now, as we near the end of the project, my future posts will mainly feature videos and promotions about the dyno. This marks the final technical update about the dyno project, closing this chapter in the series.</p><h4>Goal</h4><p>In the earlier posts, I showcased the dyno with all its technical features in action. You can watch a video of the dyno in action [<a href="https://www.reddit.com/r/rccars/comments/181j47a/work_in_progress_project_dyno/">video of dyno</a>]. However, in this post, the focus shifts towards cosmetic improvements aimed at enhancing the dyno’s usability. Tune in to witness the adjustments and enhancements that make the dyno not only functional but also more user-friendly.</p><h4>Process</h4><p><strong>Cable Mess</strong>The initial challenge addressed was the tangled mess of cables. Previously, sensors were connected to the control unit using jumper cables, resulting in a chaotic arrangement. To remedy this, a more organized approach was adopted by utilizing 3-pin cables. Additionally, a cable stabilizer, crafted through 3D printing, was introduced, relocating the sensor pins to the rear of the dyno in a tidy and transparent manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W1jaTxMmD19SPdRcKvjcxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dEwJghuEl5AOnfpDRPFgMw.png" /></figure><p>To further enhance the aesthetics and eliminate any visible cable clutter, I printed a cable hider with 3d printer. This innovation ensures that there is no unsightly cable mess, contributing to a cleaner and more polished appearance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gHvmwAepm33YlTZ6ABaa_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QJmQsRfaH6Pq00-OnxAScA.png" /></figure><p><strong>Control Unit</strong></p><p>As previously noted, the dyno communicates with the computer through its control unit, which initially resided on a breadboard. To enhance efficiency and organization, a printed circuit board (PCB) was designed for the control unit. This allowed for the soldering of all components onto the PCB, streamlining the configuration and minimizing clutter. Additionally, a dedicated controller stand was 3D printed, serving as a centralized management point for all dyno operations through the integrated control unit. This systematic upgrade contributes to a more robust and orderly setup for seamless communication between the dyno and computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*mymgrnONza1rgmV0LTYaeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*vxxNmc9z3yUklubsMTS3Dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80jCADf2dW0KnF_le4LBXQ.png" /></figure><h4>Coming to the end</h4><p>In summary, my recent efforts have primarily focused on addressing cosmetic concerns. With these enhancements, I believe the dyno is now accessible and user-friendly for anyone interested in utilizing it. The introduction of the PCB and revamped cable system not only enhances stability but also significantly improves ease of use</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ddoz_YarbMGHmuDjfCiNg.png" /></figure><p>Appreciate all your input and support. The technical opinions shared by Reddit users have been invaluable, and I genuinely value the insights provided. Taking the time to reflect on these comments has been a crucial part of my process, and I’m grateful for the constructive input received.</p><h3>Original Reddit Posts</h3><ul><li><a href="https://www.reddit.com/r/rccars/comments/16fy4vp/building_a_dyno_for_rc_cars_part_0/">Building a Dyno for RC Cars (Part 0)</a></li><li><a href="https://www.reddit.com/r/rccars/comments/16or4b6/building_a_dyno_for_rc_cars_part_1/">Building a Dyno for RC Cars (Part 1)</a></li><li><a href="https://www.reddit.com/r/rccars/comments/17386xu/building_a_dyno_for_rc_cars_part_2/">Building a Dyno for RC Cars (Part 2)</a></li><li><a href="https://www.reddit.com/r/rccars/comments/17t4t7h/building_a_dyno_for_rc_cars_part_3/">Building a Dyno for RC Cars (Part 3)</a></li><li><a href="https://www.reddit.com/r/rccars/comments/19dyea7/building_a_dyno_for_rc_cars_part_4_end_of_the/">Building a Dyno for RC Cars (Part 4)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd93c6293163" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How is Our Development Process of Modern Frontend Applications]]></title>
            <link>https://bilgehannal.medium.com/how-isour-development-process-of-modern-frontend-applications-fc76565ee082?source=rss-869ba781ed04------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc76565ee082</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Bilgehan NAL]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 17:39:53 GMT</pubDate>
            <atom:updated>2024-01-29T20:53:45.751Z</atom:updated>
            <content:encoded><![CDATA[<p><em>One of the projects we are most proud of in the company that I worked is transition to React based modern frontend architecture. Of course this is a process and we did not come to the end of this process, maybe we could not finish our process but I think we made a really efficient development process. We gained lots of experience in this process. We stabilized our CI/CD pipelines, we stabilized our development process, we stabilized the running of these projects with the other projects in the company for every single environment.</em></p><p>In this blog post you can find out the informations about how we manage the development process, how we handled the problems that we encountered and basically how is the development process of modern frontend applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*QODcBM5M5717rjUeTAwxTw.png" /></figure><p>We can basically separate the development process of an issue in three stages. These stages are:</p><ul><li>Development of the issue</li><li>Coming the acceptance stage of the development and acceptance.</li><li>Deploying of the project with the new development.</li></ul><p>The rest of this post will explore the tools and processes used at each of these stages. You can find solutions we apply for the challenges that we encountered with the reasons and the solutions that we tried but we could not get the expected results. Of course we cannot separate the CI process from the development process. Therefore you will see the details of the CI pipelines. So, let’s check the detail of the stages.</p><h3>Tools</h3><p>Before we dive into the details of the stages, mentioning about the tools, that we used, would be helpful to understand.</p><p>First of all, All the projects that we mention about in this post are running in containers, so you will see the process of building the container images.</p><p>We use two different container registry which are test and prod.</p><p>Kubernetes is the container orchestration tool we used in production, test and preprod environments, you will see how we use test and preprod environments in the development.</p><p>We use Jenkins in automation, all CI process running in Jenkins.</p><p>Spinnaker is the tool we chose for the deployment of the project to prod environment.</p><p>We use GitLab to manage the project repositories.</p><p>The last tool we used is kctl, kctl is a tool we developed internally for deploying the projects to preprod and test environments.</p><p>Independently of the development process, we use JIRA to track and manage the issues.</p><h3>Development</h3><p>Before the starting of the development, the developer opens a branch according to the type and name of the issue mentioned in JIRA and the notation we used in frontend application projects. (<em>Example branch name: improvement/BZG-4770</em>) The importance of the branch naming is providing the JIRA and GitLab connection successfully and providing the Jenkins and GitLab connection, only the branches which is suitable for the notation can trig the pipelines in Jenkins.</p><p>We develop these frontend applications based on domain oriented frontend architecture, so theoretically, all frontend applications are independent and developing process independent. This situation provides lots of convenience to a developer but as we mentioned in the beginning of the post, these frontend applications are the part of the process and we already have hundreds of apps (microservices, monolithic applications etc.). Sometimes a connection between the frontend project and the other projects could be necessary in local development.</p><p>A developer can develop the frontend project using mock data as independent of the other projects or s/he can provide a connection between frontend project in local environment and necessary bff(backend for frontend)running in kubernetes test or preprod cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*B2BrdaCc6boKHuKGqspx_Q.png" /></figure><p>As we can see in the figure above, all teams have their own namespace in kubernetes test and preprod cluster, also the developers can deploy any version of the projects to their own namespace and the other all projects with the live versions already deployed in common namespace. Connection between the projects in the team namespace and common namespace handled while deploying a project in team namespace using kctl.</p><p>If the developer wants to see the running of his/her development in test or preprod environment during the development, s/he can push the commits to GitLab server. In Jenkins there are two types of pipeline ( MR pipeline and Push pipeline). When a developer push a commit to issue branch, gitlab trigs the push pipeline in Jenkins. Duty of Jenkins for the push pipeline of the issue branch is building a container image and pushing it into test docker registry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*JiFtViEOR6M7kBfStbWfGQ.png" /><figcaption>Pipeline of a issue branch after pushing to GitLab</figcaption></figure><p>In the pipeline, first of all we are setting the variables and environment according to the project. Then, we have dependency install stage, dependency installation is made by Jenkins using a base container image generated by us for development. We use two different base container images for development and prod. Dependency installation and test stages can need extra dependencies in the image, because of that we use two different container images. In other words, we want to keep prod container image simple. Of course we can use multistage Dockerfile, we tried to use multistage Dockerfile but, during MR pipeline, in the static code analysis stage, connection between the building container image and Sonarqube was not healthy and pipeline completion time was a little bit longer. Therefore, building container image is made by single-stage Dockerfile, dependency installation is made previous stages to run the tests etc. After that, Jenkins push the container image to test docker registry tagged by branch name and build number. Developers can deploy the project to their own team namespace in test or preprod cluster using kctl and they can reach the environment to see or test it.</p><h3>Acceptance</h3><p>After opening a merge request, acceptance process starts. When a developer open a merge request or push his/her commits if the merge request opens, GitLab trigs the MR pipeline differently. In acceptance stage manual tests, user acceptance tests done, in addition end to end tests, unit tests, static code analysis are done by Jenkins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6o86F6XTXN3fb0w_c6lYFg.png" /><figcaption>Example failed MR pipeline in static code analysis stage</figcaption></figure><p>As the push pipeline, there are checkout and installation dependency stages running by Jenkins. Static code analysis, unit tests and integration test stages run. If any stage fails, pipeline fails and the error is written as a comment to GitLab MR by Jenkins and MR status set as failed in GitLab. When there is no failed stage up to here, Jenkins starts end to end tests. Because of the structure and the running of the end to end tests, this stage can take more time compare to other stages.</p><p>To start the end to end tests written in Cypress, first of all Jenkins need a running environment in kubernetes preprod cluster. For this reason, Jenkins create a dynamic namespace and deploy the development (generated container image) to this dynamic namespace using kctl, other non-deployed necessary applications and services using from common namespace via a connection. After the deployment of frontend application to dynamic namespace, end to end tests run, when there is a fail, pipeline fails, but if there is no fail, MR status set as success in GitLab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*s96OGCaipNUs2uW_CvHUUg.png" /><figcaption>Dynamic namespace diagram for end to end tests</figcaption></figure><p>After the manual test processes are over deploying and testing over the team namespace in kubernetes test and preprod cluster, the merge request needs an approve and merge by an authorized person.</p><h3>Deployment</h3><p>Only thing that we need to deploy our development to production is merging the development branch to master branch. After the authorized person approved and merged the merge request, push pipeline trigged by master branch. Unlike the development branch, when the master branch trigs the push pipeline, generated container image pushed to prod docker registry with the test docker registry. Then, there is an updating stage, in this stage new git tag is generated and updated version info in package.json by Jenkins. After the JIRA issue and version updating, deployments start.</p><p>There are three different deployments at the end of the push pipeline in Jenkins. preprod and test cluster common namespace deployments handled by Jenkins itself but after the pushing container image to prod registry, Spinnaker trigged and prod deployment begins but the topic of prod deployments and running of the applications in environments is the another blog post topics. In this way, we came to the end of the development process. The development can be observed in the production environment successfully.</p><p><em>When all is said and done, we keep the ball rolling with the ways above. Maybe we can realize better ways and try them in another company with another project.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc76565ee082" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘ksync’ ile Kubernetes Üzerinde Uygulama Geliştirme]]></title>
            <link>https://bilgehannal.medium.com/ksync-ile-kubernetes-%C3%BCzerinde-uygulama-geli%C5%9Ftirme-2221441db568?source=rss-869ba781ed04------2</link>
            <guid isPermaLink="false">https://medium.com/p/2221441db568</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Bilgehan NAL]]></dc:creator>
            <pubDate>Wed, 16 Dec 2020 23:55:23 GMT</pubDate>
            <atom:updated>2020-12-17T05:49:56.447Z</atom:updated>
            <content:encoded><![CDATA[<h3>‘ksync’ ile Kubernetes Üzerinde Proje Geliştirme</h3><p><em>Yazılım dünyasında ‘microservice’ kavramıyla birlikte daha birçok kavrama ve teknolojiye aşina olmaya başladık. ‘Container’, ‘Kubernetes’, ‘Docker’ gibi teknolojiler vazgeçilmezlerimizin arasına girdi. Evet belki ‘monolitic’ uygulamalardan buralara gelmek çok fazla sorunu çözmüş olabilir ancak şu da bir gerçek ki, her çözüm yeni bir sorun doğurur. Günümüzde çoğu proje aslında birçok projenin birbiriyle senkronize ve haberleşerek çalışması sonucunda ayakta olabilmektedir. Tabi bu projelerin geliştirme aşaması da değişik süreç ve aşamalara sahip olabilmektedir. Bu yazıda ‘kctl’ kullanarak kubernetes üzerinde çalışan bir container ile bağlantı kurup, bu containerı tekrar tekrar deploy etmeden onun üzerinde geliştirme yapıp bu geliştirmenin sonuçlarını anlık izleme ile ilgili temel bilgilere ulaşabilirsiniz.</em></p><h3>Hızlı Soru &amp; Cevap</h3><p><strong>Ksync nedir?</strong></p><ul><li>Kubernetes üzerinde çalışan bir containerın çalışma dizini ile kendi makinemizde bulunan çalışma dizinini senkronize tutmak için yardımcı bir araçtır.</li></ul><p><strong>Faydaları Nedir?</strong></p><ul><li>Değişikliklerimizi kubernetes üzerinde görebilmek için, image oluştur, container registryye gönder, deployu gerçekleştir gibi adımları hiç uygulamadan var olan containerda değişiklik yaparak işimizi hızlandırmaktadır.</li><li>Kendi makinemizde birden fazla proje çalıştırmaya veya kendi makinemizdeki uygulamayı kubernetes üzerinde çalışan diğer uygulamalara bağlama gibi zorluklara girmeden hazır bağlantıları gerçekleşmiş, ortamı hazır bir yerde denemelerimizi gerçekleştirebiliriz.</li><li>Özellikle scripting dillerde geliştiriciye aşırı kolaylık sağlamaktadır.</li></ul><h3><strong>Kurulum</strong></h3><p><strong>&gt;</strong> MacOS ve Linux için aşağıdaki komutu terminalde çalıştırmamız kendi makinemizde ksync kurulumu için yeterli olacaktır.</p><pre><em>$ curl </em><a href="https://ksync.github.io/gimme-that/gimme.sh"><em>https://ksync.github.io/gimme-that/gimme.sh</em></a><em> | bash</em></pre><p>Windows işletim sistemi için ksync projesinin GitHub hesabından son versiyonu <a href="https://github.com/ksync/ksync/releases">indirebilirsiniz</a>.</p><p><strong>&gt; </strong>‘ksync’ projesini sistemimize dahil edip server komponentlerini clusterımıza yüklemek için aşağıdaki komutu ilk kurulum için bir kere çalıştırmamız yeterli olacaktır.</p><pre><em>$ ksync init --upgrade</em></pre><p>&gt; Versiyon kontrolü yaparak yüklenip yüklenmediğine emin olabilirsiniz.</p><pre><em>$ ksync version</em></pre><h3>Kullanım</h3><p>&gt; Öncelikle kendi bilgisayarımızda bulunan dizindeki değişiklikleri ksync’in takip edip dinleyebilmesi için aşağıdaki komutu çalıştırmamız gerekmektedir.</p><pre><em>$ ksync watch<br>$ ksync watch &amp;</em></pre><p>İsteğimize göre ikinci komutu çalıştırarak dinleme işlemini arka planda çalışmasını sağlayabiliriz.</p><p><strong>&gt;</strong> Uygulama dizinlerini bağlamak için tek yapmamız gereken ksync ile ‘create’ komutunu çalıştırarak yeni bir bağlantı oluşturmak. Burada hangi pod ile bağlantı kurulacaksa podun ismi veya podun sahip olduğu label yardımıyla ksync’e podu vermek gerekmektedir. Bunun yanında container üzerindeki ve kendi makinemizdeki dizinlerin de pathlerini girerek bağlantıyı gerçekleştirebiliriz. Örnek bir bağlantı kodunu aşağıda bulabilirsiniz.</p><pre><em>$ ksync create -n ksync-demo -l app=ksync-demo $(pwd) /app/src</em></pre><p><strong>&gt;</strong> Aktif olan bağlantılarımızı aşağıdaki komutlar ile görüp sonlandırma işlemini gerçekleştirebiliriz.</p><pre><em>$ ksync get<br>$ ksync delete $bağlantı_ismi</em></pre><h3>Demo</h3><p>Ksync aracının nasıl çalıştığını daha iyi anlamak için basit bir NodeJS projesi kullanılan aşağıdaki örneği inceleyebilirsiniz.</p><p><strong>Proje İsmi:</strong> ksync-demo<br><strong>Proje Tipi:</strong> NodeJS Server<br><strong>Proje Dizini:</strong><br>.<br>├── Dockerfile<br>├── deploy.yaml<br>├── docker<br>│ └── start-for-docker.sh<br>├── package.json<br>├── server.js</p><p>Yukarıda demo olarak gösterilmek üzere hazırlanan dockerized bir NodeJS server projesinin dosya dizinini görebilirsiniz.</p><p>&gt; Dockerfile bu projeden Docker imageı oluşmak için gereken talimatların bulunduğu dosyadır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*grP2x_hySfCRM70p9qJk3A.png" /><figcaption>Dockerfile</figcaption></figure><p>&gt; Kubernetes üzerinde bir container çalıştırmak için gerekli configleri bulunduran bir adet deploy.yaml dosyamız mevcuttur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*rmkhnRp0kZCCLr61A0lzyg.png" /><figcaption>deploy.yaml</figcaption></figure><p>&gt; Uygulamamızın Çalışması için gerekli sh scripti ve NodeJS kodunun içeriğini de aşağıda görebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDj_FK7_eE3blpqgrR9AUA.png" /><figcaption>start-for-docker.sh &amp; server.js &amp; package.json</figcaption></figure><p>Yapılan değişiklikleri anlık olarak anlayıp NodeJS uygulamasını baştan başlatan yardımcı bir araç olan <em>nodemon’u </em>bu uygulamayı geliştirme aşamasında kullanılacak şekilde ayarladık.</p><p>Aşağıda yer alan demo videosunun içeriği:</p><p>&gt; ksync-demo projesinden bir adet image oluşturulması<br>&gt; Projenin Kubernetes üzerine deployu<br>&gt; ksync kullanarak kendi makinemiz ile containerdaki dizini bağlama<br>&gt; Yapılan değişikliklerin anlık k8s ye yansımasının demosu</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkCaCZPW7Xls%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkCaCZPW7Xls&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkCaCZPW7Xls%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2417ca0422f966260331135067034b4a/href">https://medium.com/media/2417ca0422f966260331135067034b4a/href</a></iframe><p>Sonuç olarak, geliştirme yaptığınız uygulama ve geliştirme şeklinize göre ksync işinize yarayacak güzel bir yardımcı araç olabilir. Kubernetes üzerinde çalışacak uygulamalarınızın geliştirilmesinde daha hızlı bir süreç sağlayıp odağınızın daha fazla geliştirme üzerinde kalmasına yardımcı olabilir.</p><p><strong>Kaynaklar:</strong><br><a href="https://github.com/ksync/ksync">https://github.com/ksync/ksync</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2221441db568" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python — Dosya Okuma veYazma (bios)]]></title>
            <link>https://bilgehannal.medium.com/python-dosya-okuma-veyazma-bios-646c0c30f38d?source=rss-869ba781ed04------2</link>
            <guid isPermaLink="false">https://medium.com/p/646c0c30f38d</guid>
            <category><![CDATA[python-libraries]]></category>
            <category><![CDATA[input-output]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Bilgehan NAL]]></dc:creator>
            <pubDate>Sun, 23 Jun 2019 21:47:22 GMT</pubDate>
            <atom:updated>2019-06-23T21:56:21.828Z</atom:updated>
            <content:encoded><![CDATA[<h3>Python — Dosya Okuma ve Yazma (bios)</h3><p>Her programlama dilinde olan ve bilinmesi gereken en temel konuların başında input ve output işlemleri gelir. Bir veri dosyaya nasıl yazılır ve bir veri dosyadan nasıl okunur?</p><p>Python, neredeyse diğer tüm işlemler gibi I/O işlemlerinde de çok fazla kolaylık sağlamakta. Ancak bu kolaylığın da üzerinde geliştiriciye hiçbir iş yaptırmayacak kütüphaneler mevcut. Bu yazıda bu kütüphanelerden biri olan ‘bios’ üzerine kısa bir tanıtım ve bu kütüphanenin nasıl kullanıldığına dair bilgiler göreceksiniz.</p><p>‘bios’ input ve output işlemlerini olabildiğince kolaylaştıran ve dosya çeşitleri ve veri tiplerine göre özelleştirilebilir bir kullanım sunmaktadır. Herhangi bir dosyadan bir veriyi tek bir fonksiyonla okuyup bir değişke e atabileceğiniz gibi, aynı fonksiyonla bir csv dosyasının içeriğini daha iyi işleyebilmek için bir list objesine atayabilirsiniz veya bir json dosyasının içeriğini dict objesine rahatlıkla atayabilirsiniz. Aynı şekilde çeşitli veri tiplerindeki değerleri istenilen dosya formatında yazmak için bu kütüphaneyi kullanabilirsiniz.</p><h3>Nasıl Yüklenir?</h3><pre>pip install bios</pre><p>Python’un standart paket yöneticisi pip i kullanarak bios u rahatlıkla bilgisayarınıza yükleyebilirsiniz. Kütüphanenin son sürümüne ve github sayfasına aşağıdaki linkleri takip ederek ulaşabilirsiniz.</p><pre>import bios<br># bios u kullanmaya başlamadan önce scriptimize eklememiz gerekmekte.</pre><ul><li><a href="https://pypi.org/project/bios/">bios</a></li><li><a href="https://github.com/bilgehannal/bios">bilgehannal/bios</a></li></ul><h3><strong>Nasıl Kullanılır?</strong></h3><pre>import bios<br>data = bios.read(&#39;file.csv&#39;)<br>bios.write(&#39;file2.csv&#39;, data)</pre><p>Yukarıdaki örnekte görebileceğiniz gibi standart bir veriyi okuyup, bir string tipindeki değişkene atamak tek bir fonksiyonla yapılabilmektedir. Ancak bios un yeteneklerini dosya tipleriyle birlikte ayrı ayrı aşağıda örnekleriyle görebilirsiniz.</p><p>Desteklenen dosya formatları:</p><ul><li>CSV</li><li>JSON</li><li>YAML</li><li>Diğerleri</li></ul><h4>Standart Dosya Kullanımı</h4><p>CSV, JSON veya YAML formatındaki dosyalar haricinde parametre olarak dosya formatı belirtilmemişse eğer ‘read’ fonksiyonu dosyayı okur ve içeriğini string olarak döndürür veya herhangi bir dosyayı formatından bağımsız olarak string olarak okumak istiyorsak parametre olarak bunu belirtebiliriz.</p><pre># Standart okuma işlemi<br>data = bios.read(&#39;file.txt&#39;)</pre><pre># Dosya formatını belirterek okuma işlemi<br>data = bios.read(&#39;file.txt&#39;, file_type=&#39;standart&#39;)</pre><p>Elimizde bulunan bir string değişkeninin değerini dosyaya yazmak için yapmamız gereken tek şey aynı read fonksiyonunda yaptığımız gibi, dosya uzantısını verip ‘write’ fonksiyonunu çağırmak. Bu fonksiyonda da aynı read fonksiyonu gibi gerekirse dosya formatını belirtebilmekteyiz.</p><pre># Standart yazma<br>bios.write(&#39;file.txt&#39;, data)</pre><pre># Dosya formatını belirterek yazma işlemi<br>bios.write(&#39;file.txt&#39;, data, file_type=&#39;standart&#39;)</pre><p>Elimizdeki string değerini zaten hali hazırda var olan bir dosyanın sonuna veya belirli bir kısmına eklemek için ‘append’ fonksiyonunu kullanabiliriz. Dosya formatını diğer fonksiyonlardaki gibi ‘append’ fonksiyonunda da belirtebilmekteyiz.</p><pre># data değişkeninin değeri file.txt nin sonuna eklenir<br>bios.append(&#39;file.txt&#39;, data)</pre><pre># data değişkeninin değeri file.txt nin 2. satırına eklenir<br>bios.append(&#39;file.txt&#39;, data, line=2)</pre><pre># data değişkeninin değeri file.txt nin 2. satırına eklenir<br>bios.append(&#39;file.txt&#39;, data, line=2, file_type=&#39;standart&#39;)</pre><h4>CSV Dosya Kullanımı</h4><p>Eğer bir dosyanın uzantısı ‘csv’ ise veya dosya formatı csv olarak belirtilmişse formatından bağımsız olarak dosyanın içeriği 2 boyutlu list objesi olarak okunur.</p><p>Ayrıca iki veriyi birbirinden ayıran karakteri parametre olarak belirtebilmekteyiz. Belirtmediğimiz taktirde virgül (,) karakteri kullanılmaktadır.</p><pre># Standart okuma<br>data = bios.read(&#39;file.csv&#39;)</pre><pre># Dosya formatını belirterek yazma işlemi<br>data = read(&#39;file.txt&#39;, file_type=&#39;csv&#39;)</pre><pre># Veri ayırıcı karakteri belirterek okuma<br>data = read(&#39;file.txt&#39;, file_type=&#39;csv&#39;, delimiter=&#39;;&#39;)</pre><pre># data değişkeninin içeriği örnek olarak:<br># [[&#39;a&#39;, &#39;b&#39;, &#39;c&#39;]<br>#  [&#39;d&#39;, &#39;e&#39;, &#39;f&#39;]]</pre><p>Yazma işleminde ise dosya formatı csv ise veya csv olarak fonksiyona tanımlanmışsa vereceğiniz 2 boyutlu bir array virgül veya belirtilmişse başka bir ayırıcı noktalama işaretiyle ayrılarak csv dosyası formatında dosyaya yazılmaktadır.</p><pre># Standart yazma<br>bios.write(&#39;file.csv&#39;, data)</pre><pre># Dosya formatını belirterek yazma<br>bios.write(&#39;file.csv&#39;, data, file_type=&#39;csv&#39;)</pre><pre># Ayırıcı karakteri belirterek yazma<br>bios.write(&#39;file.csv&#39;, data, file_type=&#39;csv&#39;, delimiter=&#39;;&#39;)</pre><p>Var olan csv dosyasına ekleme yapmak için ‘write’ fonksiyonunu ‘append’ ile değiştirmek yeterli olackatır. Ek olarak hangi satıra ekleme yapmak istiyorsak ‘line’ parametresini kullanabiliriz. Bu parametreyi kullanmadığımız taktirde veri en sona eklenmektedir.</p><pre># Standart ekleme<br>bios.append(&#39;file.csv&#39;, data)</pre><pre># Dosya formatını belirterek ekleme<br>bios.append(&#39;file.csv&#39;, data, file_type=&#39;csv&#39;)</pre><pre># Ayırıcı karakteri belirterek ekleme<br>bios.append(&#39;file.csv&#39;, data, file_type=&#39;csv&#39;, delimiter=&#39;;&#39;)</pre><pre># Eklenilecek satırı belirtme (3)<br>bios.append(&#39;file.csv&#39;, data, delimiter=&#39;;&#39;, line=3)</pre><h4>JSON ve YAML Dosya Kullanımı</h4><p>JSON ve YAML dosyaları verileri hiyerarşik olarak saklamak için kullanılmakta. Yani temel olarak aynı işlemi gerçekleştirmektedir. İki dosya formatında da kullanacağımız fonksiyonlar hemen hemen aynı olacaktır.</p><p>Okuma işlemini gerçekleştirmek için, diğer dosya formatlarında olduğu gibi dosya formatından otomatik olarak ‘read’ fonksiyonu yaml veya json dosyasını anlayarak gerekli obje tipindeki değişkene dosya içeriğini atmaktadır veya dosya formatından bağımsız olarak dosya formatını parametre olarak verebilmekteyiz. Okunan veri array formatında ise list objesi olarak, tek bir obje ise, dict objesi içerisinde tutulmaktadır.</p><pre># data objesi list veya dict objesi olarak tutulmaktadır<br>data = bios.read(&#39;data.json&#39;)<br>data = bios.read(&#39;data.yml&#39;)<br>data = bios.read(&#39;data.json&#39;, file_type=&#39;son&#39;)<br>data = bios.read(&#39;data.yml&#39;, file_type=&#39;yams&#39;)</pre><p>Yazma işleminde ise yapılması gereken tek şey, write fonksiyonuna dosyanın adresi ve verinin içeriği verilmektedir. Gerekirse dosya tipi de ‘file_type’ parametresi ile verilebilir.</p><pre>bios.write(&#39;data.json&#39;, data)<br>bios.write(&#39;data.yaml&#39;, data)<br>bios.write(&#39;data.json&#39;, data, file_type=&#39;json&#39;)<br>bios.write(&#39;data.yaml&#39;, data, file_type=&#39;yams&#39;)</pre><p>Bu dosya formatları ‘append’ fonksiyonunu desteklememektedir.</p><p>‘bios’ kütüphanesini kullanarak okuma ve yazma işlemlerini gerçekleştirmek yukarıda belirtildiği gibi gerçekten kolay bir şekilde yapılabilmekte.Kendi ihtiyaçlarım doğrultusunda geliştirmeyi umut ediyorum ancak projeye katkıda bulunmak isterseniz projenin github reposuna pull request açarak bunu gerçekleştirebilirsiniz.</p><p>İhtiyacı olan herkese iyi kullanmalar diliyorum :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=646c0c30f38d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mosh mu? O da ne?]]></title>
            <link>https://bilgehannal.medium.com/mosh-mu-o-da-ne-2c8c1aa0196d?source=rss-869ba781ed04------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c8c1aa0196d</guid>
            <category><![CDATA[tcp]]></category>
            <category><![CDATA[udp]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[mosh]]></category>
            <dc:creator><![CDATA[Bilgehan NAL]]></dc:creator>
            <pubDate>Sun, 05 May 2019 15:19:24 GMT</pubDate>
            <atom:updated>2019-05-05T15:19:24.900Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Bu blog yazısında yaygın olarak kullanılan ve canlı ağ bağlantısı oluşturmamızı sağlayan bir terminal uygulaması olan SSH’in sahip olduğu dezavantajlar ve bu dezavantajların bazılarını gideren uygulama olan Mosh üzerine küçük bilgiler vereceğim.</em></p><p>Uzun yıllar uzaktaki bir sisteme erişebilmek için <strong>Telnet</strong> kullanıldı. Ancak <strong>Telnet</strong>’in sahip olduğu güvenlik açıklarından dolayı yerini zaman geçtikçe <strong>SSH</strong> aldı ve <strong>SSH</strong> hala en sık kullanılan uzak bağlantı uygulaması konumunda.</p><p><strong>SSH</strong>, kullanıcısına uzaktaki bir sisteme şifreli veya şifresiz olarak bağlantı yapma olanağı sunmaktadır. Bu bağlantının güvenliği açık-kapalı anahtar şifreleme metoduyla güçlendirilmiştir ve <strong>SSH’</strong>in getirdiği en büyük özellik <strong>Telnet</strong>’in aksine bağlantı esnasında oluşan veri alışverişini tamamen şifrelenmiş bir şekilde gerçekleştirmesidir.</p><p>Tıpkı <strong>Telnet’de</strong> olduğu gibi <strong>SSH</strong>’de de TCP bağlantısı sağlanmaktadır. Ancak iki sistem arasındaki tüm paketler şifrelenmiş bir şekilde gönderilmektedir. Orta katmanda herhangi bir bilgiyi muhafaza etme veya işleme mekanizması bulunmamaktadır. Uzaktaki sisteme, istenilen komutlar gönderildikten sonra sistemin tepkisi de şifrelenmiş paketler halinde kullanıcının makinesine gönderilmektedir.</p><p>Eminim birçoğumuzun başına gelmiştir, ağ bağlantımızı değiştirmek durumunda kaldığımız zamanlar veya bağlantımızın zayıf olduğu durumlarda iki sistem arasında <strong>SSH</strong> bağlantımızın sonlandığını görmek işten bile değil. Maalesef <strong>SSH</strong> bu ve bunun gibi aşağıda yer alan bir takım dezavantajlara sahip.</p><p>Temel olarak <strong>SSH</strong>’in dezavantajları</p><ul><li>Uzun süreli beklemelerde, internet bağlantısının zayıfladığı veya koptuğu durumlarda tekrar <strong>SSH</strong> bağlantısı oluşturmak gerekmekte.</li><li>Her terminal ekranı kendi <strong>SSH</strong> bağlantısına sahip olmak zorunda.</li><li>Yavaş bir bağlantıda yüksek bant genişliği gerektiren komutlara cevap verme konusunda <strong>SSH</strong> yavaş kalmaktadır.</li></ul><p>Evet, bu gibi küçük görünen ancak bazı zamanlar başımızın belası haline gelebilen sorunları çözmenin bir yolu var desem…</p><p><strong>Tmux</strong>, <strong>Eternal Terminal</strong> ve <strong>Mosh</strong> gibi terminal uygulamaları bize bu sorunların bir kısmına çözüm olmakta. Ancak bu yazıda sadece <strong>Mosh</strong> ve <strong>Mosh</strong>’un getirdikleri, <strong>SSH</strong> ve <strong>Mosh</strong>’un kısa karşılaştırılması üzerine bilgiler mevcut. İyi öğrenmeler.</p><p>‘MObile SHell’ in kısaltması olan <strong>Mosh</strong> tıpkı <strong>SSH</strong> gibi uzaktaki bir sistemi terminal üzerinden kontrol edebilmemize olanak sağlayan bir program olarak çıktı ve <strong>SSH</strong>’in yerini almayı hedeflemektedir.</p><p>Tekerleği yeniden icat etmeye gerek yok, öyle değil mi? Bundan dolayı, <strong>Mosh</strong> zaten verimli bir şekilde çalışan <strong>SSH</strong>’in kimlik doğrulama mekanizmasını kullanmakta. Durun! <strong>SSH</strong> bağlantısında kullandığınız giriş bilgilerini, anahtar eşlerini vs. sakın atmayın. <strong>Mosh</strong> bunların hepsini kullanmaya izin veriyor. Bu sayede, <strong>SSH</strong>’in bize sunduğu tüm güvenlik avantajları <strong>Mosh</strong> için de geçerli. Güvenli <strong>SSH</strong> bağlantımızı kurduktan sonra <strong>Mosh</strong> tüm veri alışverişleri için <strong>SSH</strong>’in aksine TCP yerine UDP ve State Synchronization Protocol kullanmakta.</p><p>Peki, bu <strong>Mosh</strong> bize ne avantajlar sağlamakta?</p><ul><li>Cidden verimli bir bağlantı sunmakta.</li><li>Düşük bant genişliğine sahip veya kopma problemi olan bağlantılarda daha iyi performans sergilemekte.</li><li>Bağlantınızın kopması, yeni bağlantıya geçmeniz veya IP adresinizin dahi değişmesi bağlantınızın kopmasına engel değil.</li><li>Komutunuzu yazarken karşı makineden gelecek tepkiyi beklemek zorunda değilsiniz. Gönül rahatlığıyla, bağlantının performansından bağımsız komutunuzu yazıp bitirebilirsiniz. (Komutu göndermek için bağlantının performansına muhtacız ama :)</li></ul><p>Yaygın olarak kullanılan tüm linux dağıtımlarında ve OSX işletim sisteminde <strong>Mosh</strong>’u kullanmaya hemen başlayabilirsiniz. <strong>Mosh</strong>’un destek verdiği tüm sistemleri görüntülemek için <a href="https://mosh.org/">resmi websiteyi</a> ziyaret etmeniz yeterlidir. Bu yazıda örnek olması açısından sadece <strong>Mosh</strong>’un Ubuntu (Debian) ve OSX üzerine kurulumu/kullanımını görebilirsiniz.</p><p><strong>Mosh</strong>’u yükleyebilmemiz için sistemimizde <strong>SSH</strong>’in yüklü olması gerekmekte. Yüklü olup olmadığını kontrol etmek için terminalde ssh komutunuzu çalıştırmanız yeterlidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V0NzkkL4T-yjJTzYeO--2A.png" /></figure><p>Sisteminizde ssh yüklü ise ekranınızda nasıl kullanılacağına dair detaylar göreceksiniz. Yüklü değilse internet üzerinde küçük bir araştırma ile <strong>SSH</strong>’i sisteminize yükleyebilirsiniz.</p><p>Sıra geldi <strong>Mosh</strong>’u yüklemeye, kullandığınız sistemin paket yöneticisi ile <strong>Mosh</strong>’u rahatlıkla yükleyebilirsiniz.</p><ul><li>OSX için: brew install mosh</li><li>Ubuntu için: sudo apt update -&gt; sudo apt install mosh</li></ul><p>Evet, <strong>Mosh</strong>’u yüklemek bu kadar. Artık kullanmaya başlayabiliriz.</p><p>Unutmadan, <strong>Mosh</strong>’un UDP kullandığını belirtmiştim. Bundan dolayı bağlanacağımız sunucunun 60000–61000 portlarının erişiminin açık olması gerekmekte. Eğer sisteminizde bir firewall vs. varsa bu firewall kurallarını tekrar belirlemek iyi olacaktır. Bunu da ‘ufw’ isimli firewall yöneticisi ile rahatlıkla yapabiliriz.</p><ul><li>sudo ufw allow 60000:61000/udp</li></ul><p>Peki, kullanımı nasıl? Bir SSH kullanıcısı için o kadar basit ki</p><ul><li>mosh root@192.168.1.80</li><li>mosh root@192.168.1.80 --ssh=”ssh -p 2222”</li></ul><p>Tıpkı SSH’da ki gibi <strong>Mosh</strong> kullanarak sunucumuza rahatlıkla bağlanabiliriz. Ya da spesifik bir port üzerinden bağlantımızı yapmak istiyorsak, tıpkı SSH’da yaptığımız gibi komutumuza --ssh parametresi vererek bağlantımızı gerçekleştirebiliriz.</p><p>Tebrikler! <strong>Mosh</strong> ile bağlantı kurmak bu kadardı. Son olarak, bağlantınızı kurun ve ağ bağlantınızı kapatıp açın lütfen. <strong>Mosh</strong>’un hala çalıştığını göreceksiniz. Çok iyi değil mi?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c8c1aa0196d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>