<?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 Leventbasaran on Medium]]></title>
        <description><![CDATA[Stories by Leventbasaran on Medium]]></description>
        <link>https://medium.com/@leventbasarann?source=rss-9b0cfe16c29f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vrh4oZVVlLAjVFSq</url>
            <title>Stories by Leventbasaran on Medium</title>
            <link>https://medium.com/@leventbasarann?source=rss-9b0cfe16c29f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 22:39:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leventbasarann/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[Moving Repos from GitLab to AWS CodeCommit]]></title>
            <link>https://medium.com/@leventbasarann/moving-repos-from-gitlab-to-aws-codecommit-3bfd6d04c94b?source=rss-9b0cfe16c29f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bfd6d04c94b</guid>
            <dc:creator><![CDATA[Leventbasaran]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 06:02:49 GMT</pubDate>
            <atom:updated>2023-07-10T09:11:39.466Z</atom:updated>
            <content:encoded><![CDATA[<p>AWS CodeCommit is a fully managed service that hosts Git-based repos in a secure and scalable way. In this article, I will explain step by step how you can migrate different repos and branches (master, staging, and development) on GitLab to AWS CodeCommit.</p><p>Git-based storage and version control systems such as AWS CodeCommit and GitLab offer different features and advantages. Here we can explain the good situations between AWS CodeCommit and GitLab with price, performance and other factors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*6fQ6qQQy4wcVEW00.png" /><figcaption>Aws CodeCommit</figcaption></figure><p><strong>AWS CodeCommit: Good Cases:</strong><br><strong>1- Ease of Integration and Management: </strong>AWS CodeCommit integrates strongly with other AWS services and can be easily managed through the AWS Management Console. Integration with your AWS account provides easy access to IAM authorization and other AWS services.</p><p><strong>2- High Security:</strong> CodeCommit encrypts the data and has security measures such as IAM roles, user authorization, login activity monitoring to protect the stored data. Also, because it is a fully managed service, data security and security updates are provided by AWS.</p><p><strong>3- Scalability:</strong> AWS CodeCommit manages your warehouses and responds to growth demands using Amazon’s scalable infrastructure. You can increase the warehouse size and optimize performance according to the needs of your project.</p><p><strong>4- Pricing:</strong> <a href="https://aws.amazon.com/en/codecommit/pricing">https://aws.amazon.com/en/codecommit/pricing</a> You can review the aws document for pricing.</p><p><strong>GitLab: Good Situations:</strong></p><p><strong>1- Comprehensive Collaboration Features: </strong>GitLab offers collaboration features such as project management, error tracking, continuous integration and deployment (CI/CD). As an integrated platform, you can manage your projects throughout a full life cycle.</p><p><strong>2- Customization and Flexibility: </strong>GitLab has a wide range in terms of customizability and flexibility. On your own server or on GitLab’s cloud service (GitLab.com ) you can use it. It can also be expanded with community-developed plugins and integrations.</p><p><strong>Bad Situations:</strong></p><p><strong>1- Management and Maintenance Requirement: </strong>GitLab, on your own server or GitLab.com as a software that can be run on it, it requires management and maintenance. Tasks such as server management, update management, backup are your responsibility.</p><p><strong>2- Scalability and Performance:</strong> GitLab may experience scalability and performance problems in large projects and intensive use. If you are running on your own server, you may need to be careful about infrastructure and resource management.</p><p><strong>3- Price: </strong>After 5 users, you will be charged $29 per user. For more price information <a href="https://about.gitlab.com/pricing">https://about.gitlab.com/pricing</a> / you can review the document.</p><p>As a result, AWS CodeCommit and GitLab are two different Git-based storage and version control systems that offer different advantages and disadvantages. When making a decision, it is important to pay attention to the needs of your project, scalability requirements, security concerns, and your budget. It is recommended that you evaluate the best option that meets your needs in terms of features, integrations, costs and performance.</p><p><strong>Step 1: Pulling Repos with GitLab API</strong></p><p>Get your GitLab API key. Log in to your GitLab account, go to the “Settings” page and create a new key in the “Access Tokens” section.<br>Open the terminal or command client and send a request to the GitLab API using the following cURL command:</p><blockquote>curl — header “PRIVATE-TOKEN: YOUR_PRIVATE_TOKEN” “<a href="https://gitlab.example.com/api/v4/projects">https://gitlab.example.com/api/v4/projects</a> “ | jq ‘.[].http_url_to_repo’ | tr-d’”’&gt;&gt; repo_list.txt</blockquote><p>Note: Replace the “YOUR_PRIVATE_TOKEN” section with the GitLab API key that you created.</p><p>When assigning requests to the API, it is important to make sure that the projects are listed and that the token you have created has the authority to assign API requests.<br>After submitting this request, we receive all our repos in a txt content. In txt</p><blockquote><a href="/service/mailto:git@gitlab.com">git@gitlab.com</a>:leventbasaran/gitlab-to-aws-1/example-1.git<br><a href="/service/mailto:git@gitlab.com">git@gitlab.com</a>:leventbasaran/gitlab-to-aws-2/example-2.git</blockquote><p>we will have sample repos like this.</p><p><strong>Step 2: Creating AWS CodeCommit Repos</strong></p><p>Here we will perform operations with the script to create all the repos.<br>First of all, you need to log in to the AWS CLI. For this <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html</a> you can log in by reviewing the document.</p><blockquote>#!/bin/bash<br>while reading repo; do<br># .git get the before and/or after<br>repo_name=”${repo%.*}” # .remove git<br>repo_name=”${repo_name##*/}” # get after the last/ character<br>echo “Creating repository: $repo_name”<br>git clone <a href="https://git-codecommit.eu-central-1.amazonaws.com/v1/repos">https://git-codecommit.eu-central-1.amazonaws.com/v1/repos</a> /”$repo_name”<br>done &lt;repo_list.txt</blockquote><p>In our edit on this script</p><p><a href="/service/mailto:git@gitlab.com">git@gitlab.com</a>:leventbasaran/gitlab-to-aws-1/example-1.git it will perform the repo creation process by simply taking the “example-1” section from the git address.</p><p><strong>Step 3: Pull GitLab Repos to Local</strong></p><p>Here we will use our repo list that we have created to attract all existing repos on gitlab to our local. With the script below, we will pull all the repos in one run.</p><blockquote>#!/bin/bash<br># Specify the file name and path containing the repo addresses<br>Repository=”repo_list.txt”<br># Read the repo addresses from the file<br>while IFS= read -r repoAdress<br>do<br># Convert the repo address to a folder<br>classnAme=$(basename “$repoAdress” “.git”)<br># Clone the repo to the local machine<br>git clone “$repoAdress” “$classnAme” -b branch-name<br># If the cloning was successful, show the message<br>if [$? -eq 0 ]; then<br>echo “Repo cloned successfully: $classnAme”<br>else<br>echo “An error occurred while cloning the repo: $classnAme”<br>fi<br>done &lt; “$Repository”</blockquote><p>When this script runs, repo_list.all repos contained in txt will be withdrawn together with the specified branch.</p><p><strong>Step 4: Pull Repos from AWS CodeCommit to Local</strong></p><blockquote>#!/bin/bash<br># Specify the file name and path containing the repo addresses<br>Repository=”repo_list.txt”<br># Read the repo addresses from the file<br>while IFS= read -r repoAdress<br>do<br># Convert the repo address to a folder<br>classnAme=$(basename “$repoAdress” “.git”)<br># Clone the repo to the local machine<br>git clone <a href="https://git-codecommit.eu-west-1.amazonaws.com/v1/repos">https://git-codecommit.eu-west-1.amazonaws.com/v1/repos</a> /”$classnAme”<br># If the cloning was successful, show the message<br>if [$? -eq 0 ]; then<br>echo “Repo cloned successfully: $classnAme”<br>else<br>echo “An error occurred while cloning the repo: $classnAme”<br>fi<br>done &lt; “$Repository”</blockquote><p>We are pulling all Aws Code Commit repos to our local with the script.</p><p><strong>Step 5: Editing on local Gitlab repos</strong></p><p>To do this, first of all, on the path we pulled all repos from gitlab</p><blockquote>find . -name “.git”</blockquote><p>by running the command .we are checking whether there are git files or not.<br>Then</p><blockquote>find . -name “.go” -exec rm -rf {} \;</blockquote><p>all by command .we are deleting our git extension files. In this way, we are making our repos that we have withdrawn ready for transfer.</p><p><strong>Step 6: Transferring Gitlab repos to Repos in AWS CodeCommit</strong><br>Here we will perform a copy operation for all our repos that we have taken two different paths.</p><blockquote>#!/bin/bash<br># Your folder paths<br>SOURCE_DIR=”/gitlab/”<br>DEST_DIR=”/aws/”<br>Loop all folders in #SOURCE_DIR<br>for folder in $SOURCE_DIR*; do<br># Get the folder name<br>folder_name=$(basename “$folder”)<br># Check if there is a folder with the same name in DEST_DIR<br>if [ -d “$DEST_DIR/$folder_name” ]; then<br># If any, copy the files from the SOURCE_DIR folder to the folder with the same name in DEST_DIR<br># -n option prevents overwriting of target files<br>cp -R “$folder/”* “$DEST_DIR/$folder_name”<br>fi<br>done</blockquote><p>This is how we add all our gitlab repos to our aws repos.</p><p><strong>Step 7: Commit and push Gitlab repos to Repos in AWS CodeCommit</strong><br>After moving all the repos, we will need to perform the commit and push steps for each repo.</p><blockquote>#!/bin/bash<br># The directory where the repos are located<br>REPOS_DIR=”/aws/”<br># Make a transaction for each repo<br>for repo in $REPOS_DIR*; do<br>if [-d “$repo” ]; then<br>echo “Processing repository $repo”<br>cd$repo<br># Check if Git has a repo in this folder<br>if git rev-parse — is-inside-work-tree &gt; /dev/null 2&gt;&amp;1; then<br># Your commit message<br>commit_message=”development”<br>if ! git show-ref — verify — quiet refs/heads/development; then<br># create a development branch<br>git checkout -b development<br>fi<br># October Add all changes<br>git add .<br># Create the Commit<br>git commit -m “$commit_message”<br># Push the changes to remote<br>git push origin development<br>echo “Changes in repository $repo have been pushed”<br>else<br>echo “$repo is not a git repository”<br>fi<br>fi<br>done</blockquote><p>With this script, you can perform batch push operations to all the branches we want by changing the branch name.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bfd6d04c94b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS CodeCommit’e GitLab’den Repoları Taşıma]]></title>
            <link>https://medium.com/@leventbasarann/aws-codecommite-gitlab-den-repolar%C4%B1-ta%C5%9F%C4%B1ma-76a3817c5b7e?source=rss-9b0cfe16c29f------2</link>
            <guid isPermaLink="false">https://medium.com/p/76a3817c5b7e</guid>
            <dc:creator><![CDATA[Leventbasaran]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 06:02:49 GMT</pubDate>
            <atom:updated>2023-07-10T06:02:49.215Z</atom:updated>
            <content:encoded><![CDATA[<p>AWS CodeCommit, güvenli ve ölçeklenebilir bir şekilde Git tabanlı repoları barındıran tam yönetimli bir hizmettir. Bu makalede, GitLab üzerindeki farklı repoları ve branch’leri (master, staging ve development) AWS CodeCommit’e nasıl taşıyabileceğinizi adım adım anlatacağım.</p><p>AWS CodeCommit ve GitLab gibi Git tabanlı depolama ve sürüm kontrol sistemleri, farklı özellikler ve avantajlar sunar. İşte AWS CodeCommit ve GitLab arasında iyi olan durumları, fiyat, performans ve diğer faktörlerle açıklayabiliriz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6fQ6qQQy4wcVEW00.png" /><figcaption>AWS CodeCommit</figcaption></figure><p><strong>AWS CodeCommit: İyi Durumlar:</strong></p><ol><li>Entegrasyon ve Yönetim Kolaylığı: AWS CodeCommit, diğer AWS hizmetleriyle güçlü bir şekilde entegre olur ve AWS Management Console üzerinden kolayca yönetilebilir. AWS hesabınızla entegrasyon, IAM yetkilendirmesi ve diğer AWS hizmetlerine kolay erişim sağlar.</li><li>Yüksek Güvenlik: CodeCommit, verileri şifreler ve depolanan verileri korumak için IAM rolleri, kullanıcı yetkilendirmesi, oturum açma etkinliği izleme gibi güvenlik önlemlerine sahiptir. Ayrıca, tamamen yönetilen bir hizmet olduğu için veri güvenliği ve güvenlik güncellemeleri AWS tarafından sağlanır.</li><li>Ölçeklenebilirlik: AWS CodeCommit, Amazon’un ölçeklenebilir altyapısını kullanarak depolarınızı yönetir ve büyüme taleplerine yanıt verir. Projenizin ihtiyaçlarına göre depo boyutunu artırabilir ve performansı optimize edebilirsiniz.</li><li><a href="https://aws.amazon.com/tr/codecommit/pricing/">https://aws.amazon.com/tr/codecommit/pricing/</a> Fiyatlandırma için aws dökümanını incleyebilirsiniz.</li></ol><p><strong>GitLab: İyi Durumlar:</strong></p><ol><li>Kapsamlı İşbirliği Özellikleri: GitLab, proje yönetimi, hata takibi, sürekli entegrasyon ve dağıtım (CI/CD) gibi işbirliği özellikleri sunar. Entegre bir platform olarak, projelerinizi tam bir yaşam döngüsü boyunca yönetebilirsiniz.</li><li>Özelleştirme ve Esneklik: GitLab, özelleştirilebilirlik ve esneklik açısından geniş bir yelpazeye sahiptir. Kendi sunucunuzda veya GitLab’in bulut hizmetinde (GitLab.com) kullanabilirsiniz. Ayrıca, topluluk tarafından geliştirilen eklentiler ve entegrasyonlarla genişletilebilir.</li></ol><p><strong>Kötü Durumlar</strong>:</p><ol><li>Yönetim ve Bakım Gereksinimi: GitLab, kendi sunucunuzda veya GitLab.com üzerinde çalıştırılabilen bir yazılım olarak yönetim ve bakım gerektirir. Sunucu yönetimi, güncelleme yönetimi, yedekleme gibi görevler sizin sorumluluğunuzdadır.</li><li>Ölçeklenebilirlik ve Performans: GitLab, büyük projelerde ve yoğun kullanımda ölçeklenebilirlik ve performans sorunları yaşayabilir. Kendi sunucunuzda çalıştırıyorsanız, altyapı ve kaynak yönetimi konusunda dikkatli olmanız gerekebilir.</li><li>Fiyat: 5 Kullanıcı sonrasında kullanıcı başına 29$ olarak ücretlendirilirsiniz. Daha fazla fiyat bilgisi için <a href="https://about.gitlab.com/pricing/">https://about.gitlab.com/pricing/</a> dökümanını inceleyebilirsiniz.</li></ol><p>Sonuç olarak, AWS CodeCommit ve GitLab, farklı avantajlar ve dezavantajlar sunan iki farklı Git tabanlı depolama ve sürüm kontrol sistemidir. Karar verirken, projenizin ihtiyaçlarına, ölçeklenebilirlik gereksinimlerine, güvenlik endişelerine ve bütçenize dikkat etmek önemlidir. Özellikler, entegrasyonlar, maliyetler ve performans açısından ihtiyaçlarınızı karşılayan en iyi seçeneği değerlendirmeniz önerilir.</p><p><strong>Adım 1: GitLab API ile Repoları Çekme</strong></p><ol><li>GitLab API anahtarınızı alın. GitLab hesabınıza giriş yapın, “Settings” (ayarlar) sayfasına gidin ve “Access Tokens” (erişim anahtarları) bölümünde yeni bir anahtar oluşturun.</li><li>Terminal veya komut istemcisini açın ve aşağıdaki cURL komutunu kullanarak GitLab API’sine istek gönderin:</li></ol><blockquote>curl --header “PRIVATE-TOKEN: YOUR_PRIVATE_TOKEN” “<a href="https://gitlab.example.com/api/v4/projects">https://gitlab.example.com/api/v4/projects</a>&quot; | jq ‘.[].http_url_to_repo’ | tr -d ‘“‘&gt;&gt; repo_list.txt</blockquote><p>Not: “YOUR_PRIVATE_TOKEN” kısmını oluşturduğunuz GitLab API anahtarınızla değiştirin.</p><p>API’a istek atarken projelerin listelendiğinden emin olmanız ve oluşturduğunuz token’in API isteklerine atma yetkisinin bulunması önemlidir.</p><p>Bu isteği attıktan sonra tüm repolarımızı bir txt içeriğine almış oluyoruz. Txt içerisinde</p><p><a href="/service/mailto:git@gitlab.com">git@gitlab.com</a>:leventbasaran/gitlab-to-aws-1/example-1.git<br><a href="/service/mailto:git@gitlab.com">git@gitlab.com</a>:leventbasaran/gitlab-to-aws-2/example-2.git</p><p>gibi örnek repolarımız olacaktır.</p><p><strong>Adım 2: AWS CodeCommit Repolarını Oluşturma</strong></p><ol><li>Burada tüm repoları oluşturmak için script ile işlemleri gerçekleştireceğiz.</li><li>Öncelikle AWS CLI’ya giriş yapılması gerekmektedir. Bunun için <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html</a> dökümanını inceleyerek giriş yapabilirsiniz.</li></ol><blockquote>#!/bin/bash</blockquote><blockquote>while read repo; do<br> # .git öncesi ve / sonrasını al<br> repo_name=”${repo%.*}” # .git’i kaldır<br> repo_name=”${repo_name##*/}” # en son / karakterinden sonrasını al</blockquote><blockquote>echo “Creating repository: $repo_name”<br> git clone <a href="https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/">https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/</a>&quot;$repo_name&quot;<br>done &lt;repo_list.txt</blockquote><p>Bu script üzerinde düzenlememizde <a href="/service/mailto:git@gitlab.com">git@gitlab.com</a>:leventbasaran/gitlab-to-aws-1/example-1.git git adresindeki “example-1” kısmını sadece alarak repo oluşturma işlemini gerçekleştirecektir.</p><p><strong>Adım 3: GitLab Repoları Local’e Çekme</strong></p><ol><li>Burada mevcut gitlab üzerindeki tüm repoları localimize çekmek için oluşturduğumuz repo listemizden faydalanacağız. Aşağıdaki script ile tüm repoları tek çalıştırmada çekeceğiz.</li></ol><blockquote>#!/bin/bash</blockquote><blockquote># Repo adreslerini içeren dosya adı ve yolunu belirtin<br>repoDosya=”repo_list.txt”</blockquote><blockquote># Repo adreslerini dosyadan okuyun<br>while IFS= read -r repoAdresi<br>do<br> # Repo adresini klasöre dönüştürün<br> klasorAdi=$(basename “$repoAdresi” “.git”)</blockquote><blockquote># Repo’yu yerel makineye klonlayın<br> git clone “$repoAdresi” “$klasorAdi” -b branch-name</blockquote><blockquote># Klonlama başarılıysa mesajı gösterin<br> if [ $? -eq 0 ]; then<br> echo “Repo başarıyla klonlandı: $klasorAdi”<br> else<br> echo “Repo klonlanırken bir hata oluştu: $klasorAdi”<br> fi<br>done &lt; “$repoDosya”</blockquote><p>Bu script çalıştığında repo_list.txt içerisinde bulunan tüm repolar belirtilen branch ile birlikte çekilecektir.</p><p><strong>Adım 4: AWS CodeCommit’teki Repoları Local’e Çekme</strong></p><blockquote>#!/bin/bash</blockquote><blockquote># Repo adreslerini içeren dosya adı ve yolunu belirtin<br>repoDosya=”repo_list.txt”</blockquote><blockquote># Repo adreslerini dosyadan okuyun<br>while IFS= read -r repoAdresi<br>do<br> # Repo adresini klasöre dönüştürün<br> klasorAdi=$(basename “$repoAdresi” “.git”)<br> # Repo’yu yerel makineye klonlayın<br> git clone <a href="https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/">https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/</a>&quot;$klasorAdi&quot;</blockquote><blockquote># Klonlama başarılıysa mesajı gösterin<br> if [ $? -eq 0 ]; then<br> echo “Repo başarıyla klonlandı: $klasorAdi”<br> else<br> echo “Repo klonlanırken bir hata oluştu: $klasorAdi”<br> fi<br>done &lt; “$repoDosya”</blockquote><p>Scriptiyle tüm Aws Code Commit repoları localimize çekiyoruz.</p><p><strong>Adım 5: Localdeki Gitlab repolarında düzenleme</strong></p><p>Bunun için öncelikle gitlabten tüm repoları çektiğimiz path üzerinde</p><blockquote>find . -name “.git”</blockquote><p>komutunu çalıştırarak .git dosyalarının olup olmadığının kontrolünü sağlıyoruz.</p><p>Ardından</p><blockquote>find . -name “.git” -exec rm -rf {} \;</blockquote><p>komutuyla tüm .git uzantılı dosyalarımızı siliyoruz. Bu şekilde çektiğimiz repolarımızı aktarıma hazır hale getiriyoruz.</p><p><strong>Adım 6: Gitlab repoları AWS CodeCommit’teki Repolara aktarma</strong></p><p>Burada iki farklı pathe çektiğimiz tüm repolarımız için kopyalama işlemi gerçekleştireceğiz.</p><blockquote>#!/bin/bash</blockquote><blockquote># Klasör yollarınız<br>SOURCE_DIR=”/gitlab/”<br>DEST_DIR=”/aws/”</blockquote><blockquote># SOURCE_DIR içerisindeki tüm klasörleri döngüye alın<br>for folder in $SOURCE_DIR*; do<br> # Klasör ismini alın<br> folder_name=$(basename “$folder”)</blockquote><blockquote># Aynı isimde klasör DEST_DIR’da var mı diye kontrol et<br> if [ -d “$DEST_DIR/$folder_name” ]; then<br> # Eğer varsa, SOURCE_DIR klasöründeki dosyaları DEST_DIR’deki aynı isimli klasöre kopyala<br> # -n seçeneği hedefteki dosyaların üzerine yazılmasını önler<br> cp -R “$folder/”* “$DEST_DIR/$folder_name”<br> fi<br>done</blockquote><p>Tüm gitlab repolarımızı bu şekilde aws repolarımızın içine eklemiş oluyoruz.</p><p><strong>Adım 7: Gitlab repoları AWS CodeCommit’teki Repolara commit ve push işlemleri</strong></p><p>Tüm repoları taşıma işlemimizin ardından her bir repo için commit ve push adımlarını gerçekleştirmemiz gerekecektir.</p><blockquote>#!/bin/bash</blockquote><blockquote># Repo’ların bulunduğu dizin<br>REPOS_DIR=”/aws/”</blockquote><blockquote># Her bir repo için işlem yap<br>for repo in $REPOS_DIR*; do<br> if [ -d “$repo” ]; then<br> echo “Processing repository $repo”<br> cd $repo</blockquote><blockquote># Git’in bu klasörde bir repo olup olmadığını kontrol et<br> if git rev-parse — is-inside-work-tree &gt; /dev/null 2&gt;&amp;1; then<br> # Commit mesajınız<br> commit_message=”development”</blockquote><blockquote>if ! git show-ref — verify — quiet refs/heads/development; then<br> # development branch’i oluştur<br> git checkout -b development<br> fi</blockquote><blockquote># Tüm değişiklikleri ekle<br> git add .</blockquote><blockquote># Commit’i oluştur<br> git commit -m “$commit_message”</blockquote><blockquote># Değişiklikleri remote’a push et<br> git push origin development</blockquote><blockquote>echo “Changes in repository $repo have been pushed”<br> else<br> echo “$repo is not a git repository”<br> fi<br> fi<br>done</blockquote><p>Bu script ile branch ismini değiştirerek tüm istediğimiz branchlere toplu push işlemlerini gerçekleştirebilirsiniz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76a3817c5b7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Graylog Log Parse Etme]]></title>
            <link>https://medium.com/@leventbasarann/graylog-log-parse-etme-d9fc8f6f7d84?source=rss-9b0cfe16c29f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9fc8f6f7d84</guid>
            <dc:creator><![CDATA[Leventbasaran]]></dc:creator>
            <pubDate>Sun, 18 Dec 2022 12:25:58 GMT</pubDate>
            <atom:updated>2022-12-18T12:25:58.488Z</atom:updated>
            <content:encoded><![CDATA[<p>Selamlar Ben Levent, bu makale içerisinde Graylog log parse edilmesi konusundan bahsediyor olacağım.</p><p>Öncelikle GrayLog Nedir ?</p><p>Tüm logların merkezi olarak toplandığı açık kaynak kodlu bir loglama yazılımıdır. Dashboard tarafı Opensearch’den biraz daha zayıftır. Açık kaynak kodlu olması tercih edilmesine sebep oluyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gLkzjMfYdcBc8W94npsDAg.jpeg" /></figure><p>Loglar her zaman istediğimiz şekilde gelmiyor ve görüntülenmek istendiğinde parametlere doğru şekilde ayrılmadığı için vakit kaybediliyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fx5AKxoQR_EgT0u4k7Z8Xw.png" /></figure><p>Bu şekilde gelen logları graylog üzerindeki toollar sayesinde parser işlemi gerçekleştirilerek daha sade ve okunaklı bir görünüme ulaşmasını sağlayabiliyoruz. Farklı fieldlar oluşturarak buradaki görünümü daha okunaklı hale getiriyoruz.</p><p>Bu işlemi gerçekleştirebilmek öncelikle System/Inputs menüsünden Inputs sekmesine geliyoruz. Manage extractors butonuna tıklayarak mevcut extractorları görüntülüyoruz. Burada işlemleri gerçekleştirirken REGEX kullanacağız.</p><p>REGEX Nedir ?</p><p>REGEX(Regular Expressions), aynı syntax’a sahip olan, aynı harflerden oluşan kelimelerin esnek olarak belirlenmesini sağlayan bir yapıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXOUJTDFSpFWIrzSkH5DMQ.png" /><figcaption>Graylog add Exractors</figcaption></figure><p>Get started butonuna tıkladıktan sonra karşımıza recent message ve message id kısmı gelecektir. Burada düzenli gelmesini istediğimiz mesajın id’sini girerek mesajı getiriyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*PFE0Z4Exv_Kzdx06y_t7Nw.png" /></figure><p>Regex tarafında kontroller yapabilmek adına aşağıdaki adresleri kullanabilirsiniz.</p><p><a href="https://regex101.com/">regex101: build, test, and debug regex</a></p><p><a href="https://regexr.com/">https://regexr.com</a>/</p><p><a href="https://www.regextester.com/">Regex Tester</a></p><p>Aşağıdaki gibi örnek bir Graylog regex kullanımını görebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-iYAJOuyPxvZfELuHN4nKw.png" /></figure><p>Burada ErrorGroup adı altında gelen messageları ayrı bir field altında gösterek hem görünümü hemde kolay okunabilmesi kolaylaştırılmıştır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/1*Bkdaygc854jTS2gjdZhs9Q.png" /><figcaption>Error Group</figcaption></figure><p>Bu sayede kritik öneme sahip logları message içerisinde çekerek ayrı bir field gösteriyoruz. Ayrı fieldlarda göstererek burada bizim için kritik olan mesajı her mesaj içerisinde arama yapmadan yalnızca filtreleme yöntemiyle gözlemleyebiliyoruz.</p><p>Bu Fieldlardan alarmlarlarda oluşturularak kritik öneme sahip loglarda kör noktayı minimum seviyeye indirgeyebiliriz.</p><p>Graylog log parse edilme işlemini elimden geldiğince anlatmaya çalıştım ufak bir örnek ile. Keyifli okumalar…</p><p>Levent Başaran</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9fc8f6f7d84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server Install User Client Access License (CAL)]]></title>
            <link>https://medium.com/@leventbasarann/windows-server-install-user-client-access-license-cal-8d03e64a4fca?source=rss-9b0cfe16c29f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d03e64a4fca</guid>
            <dc:creator><![CDATA[Leventbasaran]]></dc:creator>
            <pubDate>Sun, 16 Oct 2022 19:00:12 GMT</pubDate>
            <atom:updated>2022-10-16T19:00:12.268Z</atom:updated>
            <content:encoded><![CDATA[<p>Selamlar ben Levent, bu makale içerisinde Windows Server için User CAL Lisanslanmasından bahsedeceğim.</p><p>Öncelikle Windows CAL nedir ? Bundan bahsederek başlamak istiyorum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-c5xb3ev6hAndqG3IximNw.jpeg" /></figure><p>Eğer ki bir windows sunucunuz var ise ve bu windows sunucuya aynı anda 2 kişiden fazla user ile bağlanmak isterseniz aşağıdaki gibi bir uyarıyla karşılacaksınız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*_S6zNhVA9Sw7D19Q2-i1PA.png" /></figure><p>Bunun nedeni Windows sunucularına aynı anda yalnızca 2 userla girişin limitlenmiş olmasından kaynaklıdır. Eğer ki 2&#39;den fazla userla giriş yapmak isterseniz Client Access License satın almanız gerekmektedir.</p><p>Türkiye içerisinde microsoft mağazasından adres bazlı satın alınma mümkün olmayabilir. Türkiye içi <strong>distribütör<em> </em></strong>aracalığıyla bu lisansı alabilirsiniz.</p><p>Burada iki farklı tipte lisans satın alabilirsiniz.</p><p>1- Kullanıcı Bazlı Lisanslama</p><p>2- Sunucu Bazlı Lisanslama</p><p>Bu makale içerisinde kullanıcı bazlı lisanslama modelinden bahsedeceğim.</p><h3>Windows RDS CAL User Lisans Yüklenmesi</h3><p>Windows Server üzerinde bu işlemi yapabilmek mevcut sunucuda active directory kurulmuş olması ve bir domaine bağlı olmak gerekmektedir.</p><p>Server manager üzerinden <strong>Add Roles and Futures </strong>ile ilerleyerek<strong> Remote Desktop Services </strong>işaretlenmelidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*O5qc5A4aWezDLgG4ApdfaQ.png" /></figure><p>İlerleme kaydedilerek yükleme işlemi tamamlanmalı ve ardından sunucu restartlanmalıdır.</p><p>Sunucu restartlanmasının ardından server manager ekranında en alt sekmede remote desktop sekmesi aktif olacaktır.</p><p>Tıkladığımızda alttaki gibi bir ekranı görmüş olacağız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izwRHfoIcyI9QUzcXDU1_g.png" /></figure><p>Bu aşamadan sonra lisans eklemesi yapmamız gerekmektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VgIx_LxEwBe2E-lOSw24lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*67cynmgdG1UUU3uu.png" /></figure><p>Remote desktop licensing manager yada uzak masaüstü lisans yöneticisi yazılarak lisans uygulaması açılmalıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_663u0Z5aPXOk5Ohlm-tQ.png" /></figure><p>Server’a sağ click yapılarak install license denilmelidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*TeMo1V54wFQjujOceGk0qw.png" /></figure><p>Ardından karşımıza lisans eklenmesi için gerekli olan uygulama açılacaktır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVYVSlByFLjtXsGl4A33VA.png" /></figure><p>Burada distribütör firmadan aldığımız lisans kodu girilerek aktif edilmelidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fLVxQE5nxZLOob0qx09Dew.png" /></figure><p>Lisansın sağlıklı bir şekilde eklenmesinin ardından görseldeki gibi yeşil tik ile gözükmesi gerekmektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0B_jcI5EHmOsF-HbSnHXrQ.png" /></figure><p>Son olarak Lisansı kullanacak olan userlarımızın eklenmesi için <strong>Yerel Güvenlik İlkesi </strong>içerisinde bulunan Yerel İlkeler &gt; Kullanıcı Hakları Ataması &gt; Uzak Masaüstü Hizmetleri üzerinden oturum açmaya izin ver ilkesinin içerisinde izin vereceğimiz kullanıcıları girerek burada kullanıcılarımızın lisansı kullanmasına izin veriyoruz.</p><p>CAL yüklenilmesi ve kullanılması user başına bu makaledeki gibi gerçekleşmektedir. Eğer ki ilk seferde verilen 120 günlük süreyi aşar ve bu süre içerisinde sağlıklı olarak yüklemeyi yapmış olmazsanız bir çok problemle karşılaşabilir ve verilerinizi kurtarmakta güçlük çekebilirsiniz.</p><p>Windows CAL 120 günlük deneme süresinin bitmeden önce yapılması sağlıklı olacaktır.</p><p>Windows CAL yüklenilmesi ve kullanımını basit düzeyde elimden geldiğince anlatmaya çalıştım ufak bir örnek ile. Keyifli okumalar…</p><p>Levent Başaran</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d03e64a4fca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ArgoCD Nasıl Kurulur ? Nasıl Kullanılır ? Artıları Nelerdir ?]]></title>
            <link>https://medium.com/@leventbasarann/argocd-nas%C4%B1l-kurulur-nas%C4%B1l-kullan%C4%B1l%C4%B1r-art%C4%B1lar%C4%B1-nelerdir-145eddfb9d97?source=rss-9b0cfe16c29f------2</link>
            <guid isPermaLink="false">https://medium.com/p/145eddfb9d97</guid>
            <category><![CDATA[argo-cd]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <dc:creator><![CDATA[Leventbasaran]]></dc:creator>
            <pubDate>Tue, 25 Jan 2022 13:58:29 GMT</pubDate>
            <atom:updated>2022-01-25T13:58:29.976Z</atom:updated>
            <content:encoded><![CDATA[<h3>ArgoCD Nasıl Kurulur ? Nasıl Kullanılır ? Artıları Nelerdir ?</h3><p>Selamlar Ben Levent, bu makale içerisinde ArgoCD’den bahsedeceğim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*NzYsiftKweBfZhgYPU3P6A.png" /></figure><p>ArgoCD bir Continuous Deployment aracıdır. Mevcutta kullanılan bir CI tool’umuzun olduğu durumlarda ArgoCD CD süreçlerimiz için kullanabilir.</p><p><strong>ArgoCD Kurulumu</strong></p><blockquote>kubectl create namespace argocd<br>kubectl apply -n argocd -f <a href="https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml">https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml</a></blockquote><p>Ui üzerinden erişebilmemiz adına Service NodePort olarak güncellememiz gerekmektedir.</p><blockquote>kubectl patch svc argocd-server -n argocd -p ‘{“spec”: {“type”: “NodePort”}}’</blockquote><p>komutlarıyla ArgoCD kullanıma hazır hale gelecektir.</p><blockquote>kubectl port-forward svc/argocd-server -n argocd 8080:443</blockquote><p>Komutuyla arayüzden erişilebilir hale getireceğiz. Bu komutun ardından 127.0.0.1:8080 adresine tarayıcı üzerinden gittiğimizde ArgoCD arayüzüyle karşılacağız.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJXYwjoaqTIUg66eg_nJaQ.png" /><figcaption>ArgoCd Arayüz</figcaption></figure><blockquote>kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=”{.data.password}” | base64 -d; echo</blockquote><p>Komutuyla ArgoCD default password öğrenirilerek arayüze giriş yapılabilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*XmYWG5GZOoGhg9J22RN5rw.png" /></figure><p>Kubernetes podlarımızın running duruma geldiğini argocd namespace üzerinde kontrol edebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QIrEjXoN_KmqJITlMlzvUg.png" /></figure><p>Burada CD sürecimizi başlatmak için Repository eklememiz gerekecektir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yPhXeX1DNq4wvBX41TwnLA.png" /></figure><p>Burada 2 türlü repo ekleyebiliriz.</p><p><strong>GIT</strong></p><p>Bir git reposu ekleyerek direkt repomuzu entegre ederek kullanabiliriz.</p><p><strong>HELM</strong></p><p>Bir helm reposu ekleyerek public olan bir repo üzerinden ilerleme kaydedebiliriz.</p><p>Bu makale içeriğinde public bir helm reposu üzerinden örnek ile ilerleyeceğiz.</p><p>Connect Repo Using Https butonuna tıklıyoruz.</p><p>Ardından Helm seçerek ekleyeceğimiz repoya bir isim tanımlıyoruz.</p><p>Repo URL olarak</p><blockquote><a href="https://charts.bitnami.com/bitnami">https://charts.bitnami.com/bitnami</a></blockquote><p>Bitnami’nin public helm reposunu ekliyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQVJWvYggw0VYeiyotYQgQ.png" /></figure><p>Connect diyerek eklemizi tamamlıyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzo7HRekmhw9pcZjMhLtAQ.png" /></figure><p>Connection Status: Successful yazısını gördüğümüzde başarıyla ilerleyebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDexGgZvJfrqUTjNa7W4HQ.png" /></figure><p>Ardından görseldeki gibi Create application diyerek helm reposundan uygulama deployment’ı yapabiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwNWM11TvVL5rEycSAW4hA.png" /><figcaption>Bitnami Helm Repo</figcaption></figure><p>Burada yukarıdaki görselde de gözüktüğü gibi öncelikle Application Name ve project seçerek ilerleyebiliriz.</p><p>Tek seferlik yapacağımız için Sync Policy Manual olarak bırakıyoruz.</p><p>Burada sürekli kontrol etmesini ve herhangi bir durumda podumuz silinirse tekrar oluşturulmasını, bunun kontrolünü yapmasını istiyorsak Sync Policy Automatic olarak seçilebilir.</p><p>Chart üzerinde burada kullanabileceğimiz çok sayıda uygulama mevcut. Biz bunun kontrolünü nginx deploy ederek yapacağız.</p><p>Chart üzerinden nginx ve Version 9.7.3 seçebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytuzDtxXJOMhKgsX3U3mEQ.png" /><figcaption>NodePort</figcaption></figure><p>Values.yaml seçildikten sonra parametrelerimiz karşımıza çıkacaktır. Burada cluster üzerinden bağlanabilmek için</p><blockquote>service.type: NodePort</blockquote><p>olarak seçilmelidir. Ardından create butonuna basabiliriz. Karşımıza aşağıdaki gibi bir görsel gelecektir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yL7nULQIl5Hp-GgXm1GneQ.png" /></figure><p>Burada Sync işleminin tamamlanması gerekmektedir. Sync işlemini tamamlamak için Sync Butonuna tıklayarak açılan pencerede</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZyTlkTl5W8qeOw7gaOAQA.png" /></figure><p>SYNCHRONIZE butonuna tıklamız yeterli olacaktır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2yvE5MKKvZcBMLDJl4HQCw.png" /></figure><p>Ardından sync işlemi tamamlanacak ve uygulamız başarılı şekilde deploy olmuş olarak görülecektir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__-up4KgcGG9BdwokPk5hg.png" /></figure><p>Kubernetes üzerinde görütülemeye çalıştığımızda başarılı şekilde çalıştığını görebiliriz. Ardında port-forward yaparak</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*be4uMz2oMTlGPDhFhBnbRQ.png" /></figure><blockquote>127.0.0.1:30811 adresine gitmeye hazır getirdik.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8Y8cFvtvsoxDZ4Z6Oexdg.png" /></figure><p>Adrese giderek başarıyla deploy edildiğini görüyoruz.</p><h3>ArgoCD Faydaları</h3><p>1- Kolay bir şekilde entegre olabilir</p><p>2- CD süreçlerinde otomatik entegrasyon açılır ise sürekli olarak deploy edilen ile repository arasındaki farklılıkları takip eder. Herhangi bir şekilde silinmesi durumunda hızlıca geri oluşturur.</p><p>3- Deployment üzerinde bulunan Service,Pod,Replica Set, Config map vb. tek arayüzden yönetilir ve hangi uygulamanı nereye hit ettiğini görmek daha kolaydır.</p><p>4- CI süreçleriniz varsa ve CD süreçlerinizi geliştirmek ve daha görünür kılınmak isteniyorsa ArgoCD hızlı ve kolay anlaşılabilir arayüzü sayesinde tercih edilebilir.</p><p>5- Helm, git gibi istenilen repo ile kullanılabilir.</p><p>6- Yaptığınız bir değişikliği manual olarak sync ederek sorunsuz şekilde kubernetese yükleyebiliyorsunuz.</p><p>ArgoCD kullanımını basit düzeyde elimden geldiğince anlatmaya çalıştım ufak bir örnek ile. Keyifli okumalar…</p><p>Levent Başaran</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=145eddfb9d97" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>