<?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 Ahmet Kasım Erbay on Medium]]></title>
        <description><![CDATA[Stories by Ahmet Kasım Erbay on Medium]]></description>
        <link>https://medium.com/@ahmetkasim2?source=rss-bc477c9cbc3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Mx8BfCKrzHOhJICckIKrsQ.jpeg</url>
            <title>Stories by Ahmet Kasım Erbay on Medium</title>
            <link>https://medium.com/@ahmetkasim2?source=rss-bc477c9cbc3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 20:30:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ahmetkasim2/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[A Docker AI Agent Story]]></title>
            <link>https://medium.com/@ahmetkasim2/a-docker-ai-agent-story-aeaa029175ac?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/aeaa029175ac</guid>
            <category><![CDATA[ai-agents-army]]></category>
            <category><![CDATA[smolagents]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Thu, 30 Jan 2025 00:13:09 GMT</pubDate>
            <atom:updated>2026-05-20T07:56:01.346Z</atom:updated>
            <content:encoded><![CDATA[<p>You can find the latest version of this post on my personal blog page.</p><p><a href="https://devops-enginar.gitlab.io/site/posts/a-docker-ai-agent-story/">A Docker Ai Agent Story</a></p><p>While the AI developments are getting faster, security and complience concerns arouses on top of it. I think the main developers or path finders of AI tried to find a way around this security concerns and let us decide where to give the wheel to AI and where not! It is funny that they also let ChatGPT to be fired (it’s Deep Seek), lol.</p><p>This year, 2025, is declared as “<strong>agent year</strong>”, as Andrew Ng stated; and the latest developments agrees with the tools at hand. The big bang of agents just happened around the middle of last year and we have so many tools and libraries already such as smolagents from Huggingface,phidata, crew.ai and more…</p><p><strong>smolagents </strong>is the most straightforward compared to phidata and crew.ai at hand when it comes to writing your own agents. As it requires only an API key to HuggingFace Model repositories, installation steps are also easy to start and build upon.</p><h3>Automate with Ansible</h3><p>Before the age of AI agents, we were talking about automation by code based scripts. It is planed to be managed by this scripts. With this scripts repetative tasks would be nothing at all. The most famous of all is Ansible.</p><p>The one tool to rule them all…</p><p>You could install it easily with pip . The usage is so intuitional and community support does not exist even in your family. One of the great things about Ansible was that it does not require agents to be exist on the remote host. Baam! it is the second funny fact that I bind the Ansible with agents :) However, we still does not need any agents to be installed remotely. We rule Ansible with AI agents instead…</p><h3>What is Docker Agent?</h3><p>Docker Agent is a tool to manage your local and remote docker installations and images via prompts. It utilizes the capabilities of Ansible and combine it with AI Agents. Prompts like follows is enough to install to either remote or local servers:</p><pre>&gt; pull jenkins and haproxy to my machine (or to &lt;remote_machine&gt;)</pre><p>We provide predefined Ansible scripts as “Agent Tools” to</p><p>docker-agent tool finds the related Ansbile script and runs</p><h3>How it works?</h3><p>Firstly, we have smolagents , it connects to HuggingFace to use the LLMs for prompts. -It is like LLMs’ Github for model serving publicly and privitely.-</p><p>When you give a task to AI, it tries the result from LLM and evaluates with output. If there is an error, it tries better LLM searches recursively. This is where the security and complience concerns may have a point. When AI tries better results, it may damage the system while trying. However, smolagents has a solution to this; ToolCallingAgent . The Agent can run tasks with just the tools you provided. This feature is provided by other Agent providers like phidata and Crew.ai, of course.</p><p>Next, you prepare your Ansible automation tasks. Remember to test them on the same path where your agent is called with python3 command.</p><pre>- hosts: localhost<br>  tasks:<br>    - name: Pull an image<br>      community.docker.docker_image_pull:<br>        name: &quot;{{ image_name }}:{{ image_tag | default(&#39;latest&#39;) }}&quot;</pre><p>Finally, smolagents calls your Ansible scripts converting your prompts to argumants for your tasks. This way you are sure about what is going to happen.</p><pre>agent = ToolCallingAgent(<br>    tools=[<br>        pull_image,<br>        remove_image,<br>        pull_images,<br>        remove_images,<br>    ],<br>    model=model, <br><br>)</pre><h3>How to install docker-agent?</h3><p>Create a virtual environment for your requirements;</p><pre>python3 -m venv venv-agent<br><br>git clone https://github.com/kasimerbay/docker-agent.git<br><br>cd docker-agent<br><br>pip install -r requirements.txt<br><br>pip install ansible:2.18<br><br>ansible-galaxy collection install community.docker</pre><p>Create an access token from HuggingFace for free. It is really free…</p><p>Pass it to your agent for LLM connection,</p><pre>model = HfApiModel(<br>    model=&quot;qwen2.5&quot;,<br>    token=&quot;&lt;YOUR_HUGGINGFACE_TOKEN&gt;&quot;<br>)</pre><p>😃 you can command your docker images with your docker-agent .</p><pre>python3 agent.py</pre><p>It will ask you prompt for your task:</p><pre>(venv-agent) ➜  docker-agent git:(master) python3 agent.py      <br>How can I serve you?<br>- </pre><p>You can tell it to pull jenkins and haproxy to your local;</p><pre>(venv-agent) ➜  docker-agent git:(master) ✗ python3 agent.py<br>How can I serve you?<br>- pull haproxy image to my local</pre><p>Here are the results from you docker-agent;</p><pre>╭──────────────────────────────────────────────────────────────────────── New run ─────────────────────────────────────────────────────────────────────────╮<br>│                                                                                                                                                          │<br>│ pull haproxy image to my local                                                                                                                                 │<br>│                                                                                                                                                          │<br>╰─ HfApiModel - Qwen/Qwen2.5-Coder-32B-Instruct ───────────────────────────────────────────────────────────────────────────────────────────────────────────╯<br>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 0 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br>╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮<br>│ Calling tool: &#39;pull_image&#39; with arguments: {&#39;image_tag&#39;: &#39;latest&#39;, &#39;image_name&#39;: &#39;haproxy&#39;}                                                              │<br>╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯<br>Observations: PLAY |localhost] ***************************************************************<br><br>TASK |Gathering Facts] *********************************************************<br>ok: |localhost]<br><br>TASK |Pull an image] ***********************************************************<br>changed: |localhost]<br><br>PLAY RECAP *********************************************************************<br>localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0<br>[Step 0: Duration 9.78 seconds| Input tokens: 1,593 | Output tokens: 29]<br>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━<br>╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮<br>│ Calling tool: &#39;final_answer&#39; with arguments: {&#39;answer&#39;: &#39;The haproxy:latest image has been successfully pulled to your local machine.&#39;}                  │<br>╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯<br>Final answer: The haproxy:latest image has been successfully pulled to your local machine.<br>[Step 1: Duration 1.22 seconds| Input tokens: 3,316 | Output tokens: 64]<br>(venv-agent) ➜  docker-agent git:(master) ✗ docker images<br>REPOSITORY        TAG       IMAGE ID       CREATED        SIZE<br>jenkins/jenkins   latest    119e9decb712   34 hours ago   803MB<br>haproxy           latest    46158355f629   3 weeks ago    181MB</pre><p>This way you can be sure that no AI generated script or code block will be executed on your servers. You will be providing the methods to agents.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aeaa029175ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Seamlessly BackupYour Bitbucket Data Center Projects with Our New Tool]]></title>
            <link>https://medium.com/@ahmetkasim2/seamlessly-transfer-your-bitbucket-data-center-projects-with-our-new-tool-e676d2ce3a07?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e676d2ce3a07</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[bitbucket-data-cent]]></category>
            <category><![CDATA[interbank-card-center]]></category>
            <category><![CDATA[bitbucket-mirror]]></category>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Wed, 03 Jul 2024 05:52:17 GMT</pubDate>
            <atom:updated>2024-07-05T16:52:25.704Z</atom:updated>
            <content:encoded><![CDATA[<p>In the fast-paced world of software development, managing and migrating projects efficiently is crucial. Introducing our latest tool, designed specifically to transfer your projects from one Bitbucket Data Center instance to another. This powerful tool not only serves as an excellent alternative to Bitbucket Mirror but also brings several unique features to the table.</p><h3>Key Features</h3><h3>Effortless Project Transfer Between Data Centers</h3><p>The primary capability of our tool is to enable seamless project transfers between different Bitbucket Data Center instances. Whether you’re migrating to a new server or setting up a backup, this tool ensures your projects are moved with minimal hassle.</p><h4>Why is this important?</h4><p>Project migration can often be a complex and time-consuming task. Our tool simplifies this process by providing an automated solution that reduces the potential for errors and downtime. With the ability to handle large volumes of data efficiently, you can trust that your projects will be transferred securely and accurately.</p><h3>Alternative to Bitbucket Mirror</h3><p>While Bitbucket Mirror is a great tool for some use cases, our solution offers additional flexibility and functionality, making it a robust alternative. It simplifies the process and provides more control over your project transfers.</p><h4>Key Advantages:</h4><ul><li><strong>Increased Flexibility:</strong> Our tool provides more options for customization, allowing you to tailor the migration process to your specific needs.</li><li><strong>Enhanced Control:</strong> Gain greater control over your project data and how it is managed during the transfer.</li><li><strong>Cost-Effective:</strong> By offering a free, open-source solution, you can reduce expenses associated with commercial tools.</li></ul><h3>Integration with OpenShift</h3><p>Our tool can be easily configured as a CronJob in an OpenShift environment. This integration allows you to automate the migration process, ensuring regular updates and backups without manual intervention.</p><h4>Benefits of OpenShift Integration:</h4><ul><li><strong>Automation:</strong> Schedule regular migrations to ensure your data is always up-to-date.</li><li><strong>Scalability:</strong> Handle large-scale migrations with ease, thanks to the robust infrastructure provided by OpenShift.</li><li><strong>Reliability:</strong> Ensure consistent and reliable performance through automated, scheduled tasks.</li></ul><h3>Utilizes Bitbucket Data Center Rest API 2.0</h3><p>By leveraging the Bitbucket Data Center Rest API 2.0, our tool ensures a smooth and reliable transfer process. The API integration guarantees that all data is accurately migrated, maintaining the integrity and consistency of your projects.</p><h4>Why Use Rest API 2.0?</h4><ul><li><strong>Consistency:</strong> Ensure that all project data, including repositories, pull requests, and issues, is accurately transferred.</li><li><strong>Efficiency:</strong> Leverage the powerful capabilities of the Rest API to handle complex migrations quickly and efficiently.</li><li><strong>Security:</strong> Benefit from the robust security features built into the API, protecting your data throughout the migration process.</li></ul><h3>Compatible with Python &gt; 3.8</h3><p>The tool is designed to work with Python versions greater than 3.8. It utilizes essential Python modules such as os and sys, ensuring compatibility and ease of use for developers familiar with these libraries.</p><h4>Technical Specifications:</h4><ul><li><strong>Python Compatibility:</strong> Works seamlessly with Python 3.8 and above.</li><li><strong>Modules Used:</strong> Utilizes os and sys modules for handling system operations and configurations.</li><li><strong>Cross-Platform Support:</strong> While optimized for Linux, the tool can be adapted for other environments with minor modifications.</li></ul><h3>Optimized for Linux</h3><p>Our tool is optimized for Linux environments and has been rigorously tested on RHEL 8 and Ubuntu. This ensures stability and performance, making it a reliable solution for your project migration needs.</p><h4>Tested and Verified:</h4><ul><li><strong>RHEL 8:</strong> Ensures compatibility and optimal performance on Red Hat Enterprise Linux 8, a popular choice for enterprise environments.</li><li><strong>Ubuntu:</strong> Verified to work seamlessly on Ubuntu, one of the most widely used Linux distributions, ensuring broad accessibility and usability.</li></ul><h3>Publicly Available on GitHub</h3><p>We believe in the power of open-source software. Our tool is publicly available on GitHub, allowing you to review the code, contribute to its development, and customize it to fit your specific requirements. Check it out <a href="https://github.com/kasimerbay/transfer-project">here</a>.</p><h4>Open-Source Benefits:</h4><ul><li><strong>Transparency:</strong> Review the source code to understand how the tool works and verify its security.</li><li><strong>Community Collaboration:</strong> Join a community of developers contributing to the ongoing improvement and enhancement of the tool.</li><li><strong>Customization:</strong> Modify the code to tailor the tool to your specific needs and use cases.</li></ul><h3>Developed for Interbank Card Center</h3><p>This tool was created with the specific needs of the Interbank Card Center in mind. However, its flexibility and robust functionality make it suitable for any organization looking to manage their Bitbucket Data Center projects effectively.</p><h4>Use Case Highlight:</h4><ul><li><a href="https://bkm.com.tr/en/"><strong>Interbank Card Center</strong></a><strong>:</strong> The tool has been specifically tailored to meet the stringent requirements of the Interbank Card Center, ensuring reliable and secure project migrations.</li></ul><h3>Getting Started</h3><p>Ready to get started? Follow these simple steps to begin using our tool:</p><h3>Prerequisites</h3><ul><li><strong>Python 3.8 or above:</strong> Ensure you have Python installed on your system.</li><li><strong>Linux Environment:</strong> The tool is optimized for Linux, with specific testing on RHEL 8 and Ubuntu.</li><li><strong>Bitbucket Data Center Instances:</strong> You’ll need access to both the source and destination Bitbucket Data Center instances available via https connection.</li><li><strong>Admin User:</strong> You need to create the same local user with the same password in both source and target instances with the <em>read privilege on source </em><strong><em>project</em></strong> and <em>admin privileges on the </em><strong><em>target instance</em></strong><em>.<br></em>From now on, this local user and password will be used as an environment variable called USER which is actually USER:PASSWORD . For security reasons, it is suggested to have access token created for this user and given as PASSWORD above.</li></ul><h3>Installation</h3><ol><li><strong>Clone the Repository:</strong></li></ol><pre>git clone https://github.com/kasimerbay/transfer-project.git<br>cd transfer-project</pre><ol><li><strong>Install Dependencies:</strong> This project already works with default libraries, os and sys</li></ol><h3>Create a Docker Container</h3><p>To streamline deployment, you can create a Docker container for the project and push it to an artifact repository.</p><p>Create a Dockerfile in the project directory with the following content:</p><pre># Use the official Python image as a base<br>FROM python:3.9<br><br># Set user<br>USER root<br><br># Add certificates to the container<br>ADD &lt;your_local_certs&gt; /etc/pki/ca-trust/source/anchors # Modify the cert location<br>RUN update-ca-trust<br><br><br># Set the working directory<br>WORKDIR &lt;path_to_project&gt;/transfer-project<br><br># Copy the project files to the working directory<br>COPY . /&lt;path_to_project&gt;<br><br># Set deafult user privileges<br>RUN chown -R deafult:0 /&lt;path_to_project&gt; &amp;&amp; chmod +x start-transfer.sh<br><br>USER default<br><br># Set the command to run the migration script<br>CMD [&quot;./start-transfer.sh&quot;, &quot;$USER&quot;, &quot;$KEY&quot;, &quot;$SOURCE_SCM&quot;, &quot;$TARGET_SCM&quot;]</pre><p><strong>Build the Docker Image:</strong></p><p>Build the Docker image using the following command:</p><pre>docker build -t bitbucket-migration-tool .</pre><p><strong>Push the Docker Image to an Artifact Repository:</strong></p><p>Tag and push the Docker image to your preferred artifact repository (e.g., Docker Hub, Artifactory, Azure Container Registry).</p><pre>docker tag bitbucket-migration-tool &lt;your-repository&gt;/bitbucket-migration-tool:latest<br>docker push &lt;your-repository&gt;/bitbucket-migration-tool:latest</pre><h3>Configuration</h3><ol><li><strong>Edit the Configuration File:</strong> Modify the configuration file to specify your source and destination Bitbucket Data Center instances, along with any other necessary settings.</li><li><strong>Schedule the CronJob (if using OpenShift):</strong> Create and configure a CronJob in your OpenShift environment to automate the migration process.</li></ol><pre>apiVersion: batch/v1<br>kind: CronJob<br>metadata:<br>  name: transfer<br>  namespace: devops<br>spec:<br>  schedule: &#39;@hourly&#39;<br>  successfulJobsHistoryLimit: 3<br>  jobTemplate:<br>    spec:<br>      template:<br>        spec:<br>          containers:<br>            - name: transfer-container<br>              image: &lt;IMAGE_CREATED_ABOVE&gt;<br>              env:<br>                - name: USER<br>                  value: &#39;&lt;USER:PASSWORD&gt;&#39;<br>                - name: KEY<br>                  value: SWC<br>                - name: SOURCE_SCM<br>                  value: source-bitbucket.&lt;your_domain&gt;.com<br>                - name: TARGET_SCM<br>                  value: target-bitbucket.&lt;your_domain&gt;.com<br>          restartPolicy: OnFailure</pre><p>The migration will be triggered hourly in your OpenShift instance and will transfer the specified project KEY from source to target.</p><h3>Usage</h3><ol><li><strong>Run the Migration Script:</strong> Alternatively, the transfer your project locally.</li></ol><pre>python3 main.py $USER $KEY $SOURCE_SCM $TARGET_SCM</pre><ol><li><strong>Monitor the Progress:</strong> Keep an eye on the logs to monitor the progress and ensure the migration is proceeding smoothly.</li></ol><h3>Conclusion</h3><p>Migrating projects between Bitbucket Data Center instances has never been easier. With our new tool, you can ensure seamless transfers, automate the process with OpenShift, and rely on a solution that’s optimized for Linux environments. Explore the tool on GitHub and join the community of developers contributing to its ongoing improvement.</p><p>Try it out today and experience the future of Bitbucket Data Center project management!</p><p>For any queries or support, feel free to reach out through our GitHub repository’s issue tracker or contact us directly.</p><p>Feel free to customize and expand this blog post to better fit your specific needs and audience. If you need further assistance or modifications, let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e676d2ce3a07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create TLS Connection using OpenSSL on Linux]]></title>
            <link>https://medium.com/@ahmetkasim2/create-tls-connection-using-openssl-on-linux-215942cd198a?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/215942cd198a</guid>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Fri, 17 May 2024 06:22:56 GMT</pubDate>
            <atom:updated>2026-05-20T07:59:16.103Z</atom:updated>
            <content:encoded><![CDATA[<p>You can read latest version of this post from my personal blog page.</p><p><a href="https://devops-enginar.gitlab.io/site/posts/create-tls-connection-openssl-linux/">Create TLS Connection using OpenSSL on Linux</a></p><p>In the modern world of computers, secure connection is more important than before. TLS is a good way to achieve this secure communication.</p><p>This paper will guide you through the steps for creating TLS certificates signed by a local CA.</p><p><strong>Note</strong>: When you copy paste files below to the terminal directly, be careful about hidden characters. You should be checking this characters via some text editor.</p><h4>Create .cnf File</h4><pre>[atlbender@app_server ~]# cat &lt;application_name&gt;.cnf<br><br>[req]<br>default_bits = 2048<br>distinguished_name = dn<br>prompt             = no<br>req_extensions = req_ext<br> <br>[dn]<br>C=&quot;&lt;Country Code&gt;&quot;<br>ST=&quot;&lt;Country&gt;&quot;<br>L=&quot;&lt;City&gt;&quot;<br>O=&quot;&lt;Your Company&gt;&quot;<br>OU=&quot;&lt;Your Compnay Abbreviated&gt;&quot;<br>CN=&quot;&lt;DOMAIN_NAME&gt;&quot;<br> <br>[req_ext]<br>subjectAltName = @alt_names<br> <br>[alt_names]<br>DNS.0 = &lt;DOMAIN_NAME&gt;<br>IP.0 = &lt;IP_ADDRESS&gt;</pre><h4>Create .csr to Send to CA</h4><pre>[atlbender@app_server ~]# openssl req -out &lt;application_name&gt;.csr -newkey rsa:2048 -nodes -keyout &lt;application_name&gt;.key -config &lt;application_name&gt;.cnf</pre><p>In this step, you will have the following files,</p><ul><li>&lt;application_name&gt;.cnf : Created by you</li><li>&lt;application_name&gt;.key : Created by you</li><li>&lt;application_name&gt;.csr : Created by you using above files</li><li>&lt;application_name&gt;.cer : Send to you by your local authority</li></ul><p>Your application now has its own certificate assigned to the specified IP with specified DN.</p><h4>Add your Certificate to System and Java</h4><p>With your trusted certificate, you can reach your system and application securely. However, we need to add it to system. The below application is for RHEL8. You need to search for your version of commands,</p><pre>[atlbender@app_server ~]# cp &lt;application_name&gt;.cer /etc/pki/ca-trust/source/anchors<br>[atlbender@app_server ~]# update-ca-trust</pre><p>And to your application,</p><pre>[atlbender@app_server ~]# path/to/java/jre/bin/keytool -import -alias &lt;cert_alias&gt; -file path/to/cert.crt  -keystore path/to/java/jre/lib/security/cacerts</pre><p>Enter password “changeit” when you are asked.</p><p>In case you want to list all the certificates in the cacerts , you can use below command;</p><pre>path/to/java/jre/bin/keytool -list -keystore path/to/java/jre/lib/security/cacerts</pre><p>That is all! Now you can reach your application through SSL connection.</p><p>Do not hesitate to be in contact!</p><p><em>You don’t understand anything until you learn it more than one way.</em></p><p>– Marvin Minsky</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=215942cd198a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrade Bitbucket Server 7.0.1 to Bitbucket 7.21.9 on Centos/RHEL 8]]></title>
            <link>https://medium.com/@ahmetkasim2/upgrade-bitbucket-server-7-0-1-to-bitbucket-7-21-9-on-centos-rhel-8-778f266c27b3?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/778f266c27b3</guid>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 13:16:12 GMT</pubDate>
            <atom:updated>2024-03-13T11:20:16.994Z</atom:updated>
            <content:encoded><![CDATA[<p>Your company may have more than one Bitbucket instances available. I will share instructions where you have Bitbucket and the MySQL 8 DB is in the same server.</p><h3>Preparation</h3><h4>Send Certificates to the Server</h4><pre>scp &#39;&lt;YOUR_CERT&gt;&#39; &lt;USER_NAME&gt;@&lt;APP_SERVER&gt;:/var/tmp</pre><h4>Send Installer</h4><pre>scp atlassian-bitbucket-7.21.9-x64.bin &lt;USER_NAME&gt;@&lt;APP_SERVER&gt;:/var/tmp</pre><pre>chmod +x /var/tmp/atlassian-bitbucket-7.21.9-x64.bin</pre><h4>Send MySQL Connector</h4><pre>scp mysql-connector-j-8.0.33.jar &lt;USER_NAME&gt;@&lt;APP_SERVER&gt;:/var/tmp</pre><p>Change the owner of the connector,</p><pre>chown -R atlbitbucket:atlbitbucket mysql-connector-j*</pre><pre>chmod 774 mysql-connector-j*</pre><h3>Upgrade Steps</h3><h4>Stop the Service</h4><pre>systemctl stop atlbitbucket</pre><h4>Backup Home Directory</h4><pre>cp -rp /var/atlassian/application-data /&lt;SOME_PATH&gt;/bitbucket_backup_&lt;DATE_TIME&gt;/</pre><h4>Backup Installation Directory</h4><pre>cp -rp /opt/atlassian/bitbucket/ /&lt;SOME_PATH&gt;/bitbucket_backup_&lt;DATE_TIME&gt;/</pre><h4>Take MySQL Backup</h4><pre>mysqldump -u&lt;DB_USER&gt; –p&lt;DB_PASSWD&gt; &lt;DB_NAME&gt; &gt; /&lt;SOME_PATH&gt;/bitbucket_backup_&lt;DATE_TIME&gt;/db_dump_file.sql</pre><h4>Run the Installer</h4><p>Go to your directory containing the installer,</p><pre>cd /var/tmp</pre><p>Run the installer,</p><pre>./atlassian-bitbucket-7.21.9-x64.bin</pre><h4>Follow the Installation Steps from the CLI</h4><p>Copy your JDBC connector to its new place,</p><pre>cp /var/tmp/mysql-connector-j-8.0.33.jar /opt/atlassian/bitbucket/7.21.9/app/WEB-INF/lib</pre><p>Update your keystore as folows with new certificates,</p><pre>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64/jre/bin/keytool -import -alias &lt;ALIAS&gt; -file &#39;/var/tmp/certs/&lt;YOUR_CERT&gt;.crt&#39; -keystore /&lt;SOME_PATH&gt;/jdk-11.0.15.1/lib/security/cacerts</pre><pre>systemctl start atlbitbucket</pre><p>We are done!</p><p>Please share your thoughts and do not hesitate to be in contact!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=778f266c27b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrade Confluence Server 7.15.2 to 8.6.2]]></title>
            <link>https://medium.com/@ahmetkasim2/upgrade-confluence-server-7-15-2-to-8-6-2-ade0adc30c10?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ade0adc30c10</guid>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 12:58:13 GMT</pubDate>
            <atom:updated>2024-03-22T19:53:36.025Z</atom:updated>
            <content:encoded><![CDATA[<p>As the documentation is not clear for unexperienced engineer, I will share the steps to upgrade Atlassian Confluence 7.15.2 to 8.6.2, which was the final version at that time I have upgraded. They are versioning so fast :)</p><p><strong>Note</strong>: If you have any update on your licence, please complete it before upgrade.</p><h4>Pre-Upgrade Checks</h4><p>In this step, you will take a note of all your User-Installed applications along with vendor and version numbers.</p><p>Your applications might be lost during the upgrade.</p><p>Also copy your company specific SSL certificates and MySQL Connector 5.47.xx to the server.</p><h4>Backup</h4><p>As we will take full backup of the application, we can <a href="https://confluence.atlassian.com/confkb/how-to-disable-upgrade-recovery-file-generation-in-confluence-1047534410.html">disable the automatic generation of an upgrade recovery file</a>.</p><p>Why is this step important?</p><p>In the backup step, after I press the backup button from the UI, I realized that there are two files being created on the server. At first glance, I could not understand the reason but when check the automatic backup section from the scheduled jobs, it was there. Like a shining Kebap! Confluence automated backup job has been triggered at the same time with my backup. A job that would normally take 2 hours maximum, ended on 5 a.m. :( Just close the backup.</p><p>This is also recommended by the Atlassian Team as well, <a href="https://confluence.atlassian.com/confkb/cannot-create-or-restore-xml-backup-due-to-outofmemory-errors-128843918.html">here</a>. I guess there will be some further fix in a future version.</p><p>Copy your /Atlassian folder to another directory for backup.</p><h4>Install the Installer</h4><p>My local computer is windows but I run this command from MobXterm.</p><p>Go to this address and download specific version of Confluence</p><pre>wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-8.6.2-x64.exe</pre><p>After download is complete, send it to the Windows server.</p><h4>Run the Installer</h4><p>“Run as Administrator” the installer.</p><p>Follow the prompts to upgrade Confluence:</p><ol><li>When prompted choose <strong>Upgrade an existing Confluence installation</strong></li><li>Make sure the <strong>Existing Confluence installation directory</strong> suggested by the wizard is correct</li><li>Disable the Backupo home directory because we have already taken it.</li><li>If Installer can not, Stop your Confluence service.</li></ol><h4>Start the new Confluence</h4><p>After the installation is complete, you will be prompted to start the Confluence service.</p><ul><li>Update conf/server.xml</li><li>Update keystore if necessary!</li></ul><h4>Copy Database Connector,</h4><ul><li>Under confluence /WEB-INF/lib</li></ul><h4>Some Errors I Faced</h4><p>First,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LN1__1IsfAc5c2XrPsaL_w.png" /></figure><p>This error is a version specific. In this version, we need more seat to connect the database. You can reach the solution <a href="https://confluence.atlassian.com/confkb/startup-check-http-maxthreads-configuration-939930122.html?utm_source=Install&amp;utm_medium=in-product&amp;utm_campaign=csseng_fy18_q3_server_confluence_errorstate">here</a>.</p><p>Second,</p><p>If there is a network error while connecting to Jira, please follow <a href="https://medium.com/@ahmetkasim2/create-and-manage-keystore-for-confluence-on-windows-cb88b2e01111">this paper</a> to add the necessary certificates to the system.</p><p>We are done with the upgrade!</p><p>Please share your thoughts and do not hesitate to be in contact!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ade0adc30c10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrate Confluence MySQL 8 to PostgreSQL 15]]></title>
            <link>https://medium.com/@ahmetkasim2/migrate-confluence-mysql-8-to-postgresql-14-0486a8e020bf?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/0486a8e020bf</guid>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 12:56:30 GMT</pubDate>
            <atom:updated>2024-03-13T10:08:31.300Z</atom:updated>
            <content:encoded><![CDATA[<p>In my early journey as a DevOps Engineer, I am trying to change the infrastructure with Open Source alternatives and maintain the latest versions of this applications for the company. In this paper, I will migrate Confluence 8.6.2 instance from MySQL 8 to PostgreSQL 15 database.</p><p>At first, we had Confluence 7.15.2 and MySQL 5.7. Now, we have already done the following upgrade,</p><ul><li><a href="https://medium.com/@ahmetkasim2/install-and-configure-postgresql-15-for-confluence-on-centos-rhel-8-189083760588">Install and Configure PostgreSQL 15 for Confluence</a></li><li><a href="https://medium.com/@ahmetkasim2/confluence-7-15-2-mysql-5-7-to-mysql-8-migration-6390b02db9c4">Migrate Confluence MySQL 5.7 to MySQL 8</a></li><li><a href="https://medium.com/@ahmetkasim2/upgrade-confluence-server-7-15-2-to-8-6-2-ade0adc30c10">Upgrade Confluence 7.15.2 to 8.6.2</a></li></ul><p>I run the Confluence on Windows. So the following instructions can be specific to Windows. If you see <strong>*</strong> sign next to the title of the step, this instructions need modification to be used in Linux.</p><h4>Install the Installer</h4><p>My local computer is windows but I run this command from MobXterm.</p><p>Go to this address and download specific version of Confluence</p><pre>wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-8.6.2-x64.exe</pre><p>After download is complete, send it to the Windows server.</p><h4>Check Database Connectivity</h4><p>In an enterprise environment, usually, you open a ticket for your database need. Please follow the paper above for PostgreSQL setup and take a look at the Atlassian documentation for your version specific setup!</p><p>Here you can try the network connectivity between application server and your PostgreSQL 15 database,</p><pre>curl -v &lt;IP_ADDRESS_OF_DB&gt;:5432</pre><p>Default port number is 5432 for PostgreSQL. If your DB team configured different port, please use that port for testing.</p><h4>Backup Site Data</h4><p>This step requires you to open the following address and take your backup as shown in the image,</p><p><a href="https://confluence.bkm.com.tr/plugins/servlet/backup-and-restore/backup">https://&lt;YOUR_ADDRESS&gt;/plugins/servlet/backup-and-restore/backup</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*Cvz-Jnxn2Q5t7LoQXMApvw.png" /></figure><p>You can download your backup from the UI after backup process is complete or you can reach it from the server under /&lt;HOME_DIR&gt;/restore/site</p><p>This step will take some time and check the logs in case you face any error.</p><h4>Stop the Confluence</h4><p>After taking the backup from the UI, we do not want any changes to the site. Migration of this data is not possible because it is not saved in the backup.</p><p>Go to the “Task Manager&gt;Services&gt;Confluence&lt;SERVICE_NUMBER&gt;” and stop it. Sometimes your service stuck as “Stopping”. In this case, stop the Web Server (Apache) directly from Task Manager and refresh the services tab.</p><p>In this step, take a note of your Confluence service number as you may need it later.</p><p>You will see the service stopped.</p><h4>Prepare for New Installation</h4><p>Unlike Bitbucket, Confluence does not have a “Database Migrator”. Also, for database migration we need to install Confluence from ground up. So, We will just rename the old data. If you used the default path configurations, you will see the /Atlassian directory under C: directory. This paper will follow the default locations for simplicity.</p><p>Rename the old /Atlassian as /Atlassian-old . There are two pros for this method;</p><ul><li>This way you will not lose any data from your old instance.</li><li>In case of failure, you will just restore /Atlassian-old to /Atlassian and run the related service again. This is why I mentioned above to take a note of the service number.</li></ul><h4>Take a Snapshot</h4><p>I always use snapshot option for a better recovery option. Until now, we have taken into account the failures for the application. Taking snapshot is for failure in the server level.</p><p>In case of failure, you will just follow the second option from the above step.</p><h4>Run the Installer</h4><p>Run the installer with “Run As Administrator” option. And select the following prompts in each step,</p><ul><li>Production</li><li>Non-Clustered</li><li>Test DB Connection</li></ul><p>In the Load Content step, choose “Empty Site”. We will be recovering after the setup is complete.</p><p>You will create an admin user as the final step before moving on to the restoration of the old data.</p><h4>Side Note for Connections</h4><p>As we have run the installer again, we have lost the keystore for java and the application. If you have specific certificates for your company, you need to add them to the keystore of Confluence and the Java keystore.</p><p>Please follow the following paper if needed for Confluence keystore,</p><ul><li><a href="https://medium.com/@ahmetkasim2/create-and-manage-keystore-for-confluence-on-windows-cb88b2e01111">Create and Manage keystore for Confluence</a></li></ul><h4>Restore Old Data</h4><p>In this step we will have our site back. Since we took the backup with the old installation, we need to move the XML backup to the new place. Go to your /Atlassian-old and copy the XML to the /restore directory under new installation directory.</p><p>You have now entered into an empty site. Go to the “Backup &amp; Restore” section. Choose your XML backup from below and restore your site.</p><p>As the final step, copy your Attachments to new installation directory and check them after loading is complete.</p><p>Voila! We are done with Confluence database migration.</p><p>Please share your thoughts and do not hesitate to be in contact!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0486a8e020bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install and Configure PostgreSQL 15 for Confluence on Centos/RHEL 8]]></title>
            <link>https://medium.com/@ahmetkasim2/install-and-configure-postgresql-15-for-confluence-on-centos-rhel-8-189083760588?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/189083760588</guid>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 12:39:49 GMT</pubDate>
            <atom:updated>2026-05-20T07:54:53.318Z</atom:updated>
            <content:encoded><![CDATA[<p>You can find the latest version of this post on my personal blog page.</p><p><a href="https://devops-enginar.gitlab.io/site/posts/install-and-configure-postgresql-15-for-confluence-on-centos-rhel8/">Install and Configure PostgreSQL 15 for Confluence on Centos/RHEL 8</a></p><p>It is just the 6th month in my journey in the <a href="https://www.tcmb.gov.tr/wps/wcm/connect/EN/TCMB+EN/Main+Menu/Core+Functions/Payment+Systems/Payment+Systems+in+Turkey/Interbank+Card+Center+%28BKM%29">Interbank Card Center</a> , yet I have just figured out how to install, configure and maintain the Atlassian applications such as Bitbucket, Confluence and Jira… Altough, they share the same application logic, they also have great differences.</p><p>Each has a great list of dependencies and resources to maintain. Databases is one of them, of course.</p><p>In this paper, I will give you the instructions to setup a PostgreSQL 15 as an external database for your Confluence instance. Let’s get started…</p><h3>PostgreSQL 15 Setup</h3><p>First of all we need to install PostgreSQL to our DB server. I have already tested and implemented the instructions on <a href="https://kodekloud.com/topic/playground-centos-stream-8/">KodeKloud’s Playgroud</a>.</p><p>PostghreSQL are already added to the repos by default. However, when you use yum install postgresql command, this will install the default PostgreSQL version, which is PostgreSQL 10, as below,</p><pre>[atlbender@db-server ~]# yum module list postgresql<br>CentOS Stream 8 - AppStream                                                                                                                                                                  16 MB/s |  28 MB     00:01    <br>CentOS Stream 8 - BaseOS                                                                                                                                                                    5.7 MB/s |  10 MB     00:01    <br>CentOS Stream 8 - Extras                                                                                                                                                                    5.2 kB/s |  18 kB     00:03    <br>CentOS Stream 8 - Extras common packages                                                                                                                                                    8.9 kB/s | 7.2 kB     00:00    <br>Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                                               14 MB/s |  16 MB     00:01    <br>Extra Packages for Enterprise Linux 8 - Next - x86_64                                                                                                                                       546 kB/s | 368 kB     00:00    <br>CentOS Stream 8 - AppStream<br>Name                                            Stream                                      Profiles                                                Summary                                                                 <br>postgresql                                      9.6                                         client, server [d]                                      PostgreSQL server and client module                                     <br>postgresql                                      10 [d]                                      client, server [d]                                      PostgreSQL server and client module                                     <br>postgresql                                      12                                          client, server [d]                                      PostgreSQL server and client module                                     <br>postgresql                                      13                                          client, server [d]                                      PostgreSQL server and client module                                     <br>postgresql                                      15                                          client, server                                          PostgreSQL server and client module                                     <br>postgresql                                      16                                          client, server [d]                                      PostgreSQL server and client module                                     <br><br>Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled </pre><h4>Enable PostgreSQL</h4><p>This is why we need to change the default PostgreSQL for installation,</p><pre>[atlbender@db-server ~]# yum module enable postgresql:15 -y</pre><h4>Install PostgreSQL</h4><p>Now, we can install PostgreSQL Server 15,</p><pre>[atlbender@db-server ~]# yum install postgresql-server -y</pre><h4>Initialize Database</h4><p>After installation, I would expected to be able start the postgresql service, we need to setup also the environment for postgresql to be operational,</p><pre>[atlbender@db-server ~]# postgresql-setup --initdb<br> * Initializing database in &#39;/var/lib/pgsql/data&#39;<br> * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log</pre><p>You can see the important directories to be taken into account.</p><h4>Update Config File</h4><p>In the below config file, we will use scram-sha-256since this is the safest authentication method in hand.</p><pre>[atlbender@db-server ~]# cat /var/lib/pgsql/data/pg_hba.conf</pre><pre># PostgreSQL Client Authentication Configuration File<br># ===================================================<br>#<br># Refer to the &quot;Client Authentication&quot; section in the PostgreSQL<br># documentation for a complete description of this file.  A short<br># synopsis follows.<br>#<br># This file controls: which hosts are allowed to connect, how clients<br># are authenticated, which PostgreSQL user names they can use, which<br># databases they can access.  Records take one of these forms:<br>#<br># local         DATABASE  USER  METHOD  [OPTIONS]<br># host          DATABASE  USER  ADDRESS  METHOD  [OPTIONS]<br># hostssl       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]<br># hostnossl     DATABASE  USER  ADDRESS  METHOD  [OPTIONS]<br># hostgssenc    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]<br># hostnogssenc  DATABASE  USER  ADDRESS  METHOD  [OPTIONS]<br>#<br># (The uppercase items must be replaced by actual values.)<br>#<br># The first field is the connection type:<br># - &quot;local&quot; is a Unix-domain socket<br># - &quot;host&quot; is a TCP/IP socket (encrypted or not)<br># - &quot;hostssl&quot; is a TCP/IP socket that is SSL-encrypted<br># - &quot;hostnossl&quot; is a TCP/IP socket that is not SSL-encrypted<br># - &quot;hostgssenc&quot; is a TCP/IP socket that is GSSAPI-encrypted<br># - &quot;hostnogssenc&quot; is a TCP/IP socket that is not GSSAPI-encrypted<br>#<br># DATABASE can be &quot;all&quot;, &quot;sameuser&quot;, &quot;samerole&quot;, &quot;replication&quot;, a<br># database name, or a comma-separated list thereof. The &quot;all&quot;<br># keyword does not match &quot;replication&quot;. Access to replication<br># must be enabled in a separate record (see example below).<br>#<br># USER can be &quot;all&quot;, a user name, a group name prefixed with &quot;+&quot;, or a<br># comma-separated list thereof.  In both the DATABASE and USER fields<br># you can also write a file name prefixed with &quot;@&quot; to include names<br># from a separate file.<br>#<br># ADDRESS specifies the set of hosts the record matches.  It can be a<br># host name, or it is made up of an IP address and a CIDR mask that is<br># an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that<br># specifies the number of significant bits in the mask.  A host name<br># that starts with a dot (.) matches a suffix of the actual host name.<br># Alternatively, you can write an IP address and netmask in separate<br># columns to specify the set of hosts.  Instead of a CIDR-address, you<br># can write &quot;samehost&quot; to match any of the server&#39;s own IP addresses,<br># or &quot;samenet&quot; to match any address in any subnet that the server is<br># directly connected to.<br>#<br># METHOD can be &quot;trust&quot;, &quot;reject&quot;, &quot;md5&quot;, &quot;password&quot;, &quot;scram-sha-256&quot;,<br># &quot;gss&quot;, &quot;sspi&quot;, &quot;ident&quot;, &quot;peer&quot;, &quot;pam&quot;, &quot;ldap&quot;, &quot;radius&quot; or &quot;cert&quot;.<br># Note that &quot;password&quot; sends passwords in clear text; &quot;md5&quot; or<br># &quot;scram-sha-256&quot; are preferred since they send encrypted passwords.<br>#<br># OPTIONS are a set of options for the authentication in the format<br># NAME=VALUE.  The available options depend on the different<br># authentication methods -- refer to the &quot;Client Authentication&quot;<br># section in the documentation for a list of which options are<br># available for which authentication methods.<br>#<br># Database and user names containing spaces, commas, quotes and other<br># special characters must be quoted.  Quoting one of the keywords<br># &quot;all&quot;, &quot;sameuser&quot;, &quot;samerole&quot; or &quot;replication&quot; makes the name lose<br># its special character, and just match a database or username with<br># that name.<br>#<br># This file is read on server startup and when the server receives a<br># SIGHUP signal.  If you edit the file on a running system, you have to<br># SIGHUP the server for the changes to take effect, run &quot;pg_ctl reload&quot;,<br># or execute &quot;SELECT pg_reload_conf()&quot;.<br>#<br># Put your actual configuration here<br># ----------------------------------<br>#<br># If you want to allow non-local connections, you need to add more<br># &quot;host&quot; records.  In that case you will also need to make PostgreSQL<br># listen on a non-local interface via the listen_addresses<br># configuration parameter, or via the -i or -h command line switches.<br> <br> <br> <br># TYPE  DATABASE        USER            ADDRESS                 METHOD<br> <br># &quot;local&quot; is for Unix domain socket connections only<br>local   all             all                                     trust<br># IPv4 local connections:<br>host    all             all             127.0.0.1/32            scrum-sha-256<br># IPv6 local connections:<br>host    all             all             ::1/128                 scrum-sha-256<br># Allow replication connections from localhost, by a user with the<br># replication privilege.<br>local   replication     all                                     scrum-sha-256<br>host    replication     all             127.0.0.1/32            scrum-sha-256<br>host    replication     all             ::1/128                 scrum-sha-256</pre><h4>Update Daemon</h4><p>Changes in the configuration files need to be recognized by the system,</p><pre>[atlbender@db-server ~]# systemctl daemon-reload</pre><h4>Start the PostgreSQL Service</h4><pre>[atlbender@db-server ~]# systemctl start postgresql</pre><p>After starting the service, we are done with the server side configurations. Except for the pg_hba.conf file!</p><h3>Database Configurations</h3><p>In this step we will enter the postgresql server and create our Confluence specific database.</p><h4>Login to PostgreSQL as Admin</h4><pre>[atlbender@db-server ~]# su - postgres</pre><h4>Switch to PostgreSQL CLI</h4><pre>[postgres@db-server ~]$ psql</pre><h4>Create Database Objects</h4><p>Change the below parameters for your company. Confluence setup wizard will ask you to provide those information,</p><pre>CREATE USER &lt;confluence_user&gt; WITH ENCRYPTED PASSWORD &#39;&lt;confluence_password&gt;&#39;;<br><br>-- since postgres 15 (before db creation) <br>GRANT ALL ON SCHEMA public TO &lt;confluence_user&gt;;<br><br>-- now create objects<br>CREATE DATABASE &lt;database_name&gt; WITH TEMPLATE template0;<br><br>GRANT ALL PRIVILEGES ON DATABASE &lt;database_name&gt; TO &lt;confluence_user&gt;;<br><br>-- also needed for postgres 15<br>ALTER DATABASE &lt;database_name&gt; OWNER TO &lt;confluence_user&gt;;</pre><p>Before testing, change pg_hba.conf as below,</p><pre>[atlbender@db-server ~]# cat /var/lib/pgsql/data/pg_hba.conf<br><br>.<br>.<br>.<br><br># TYPE  DATABASE        USER            ADDRESS                 METHOD<br> <br># &quot;local&quot; is for Unix domain socket connections only<br>local   all             all                                     md5<br># IPv4 local connections:<br>host    all             all             127.0.0.1/32            md5<br># IPv6 local connections:<br>host    all             all             ::1/128                 md5<br># Allow replication connections from localhost, by a user with the<br># replication privilege.<br>local   replication     all                                     md5<br>host    replication     all             127.0.0.1/32            md5<br>host    replication     all             ::1/128                 md5</pre><h4>Test Connection</h4><p>Go to your application nodes and run the below command to test your database connection,</p><ul><li>curl -v telnet://&lt;postgres_server&gt;:5432</li></ul><p>Finally, we have completed the PostgreSQL 15 setup on Centos/RHEL 8 for our Confluence instance.</p><p>Please share your comments and feel free to be in contact!</p><p>Together is better for growth!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=189083760588" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install and Configure Bitbucket Data Center on Centos8/RHEL8]]></title>
            <link>https://medium.com/@ahmetkasim2/install-and-configure-bitbucket-data-center-on-centos8-rhel8-efd2fc17ff9c?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/efd2fc17ff9c</guid>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[bitbucket-cluster]]></category>
            <category><![CDATA[bitbucket-data-center]]></category>
            <category><![CDATA[atlassian-apps]]></category>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 20:21:19 GMT</pubDate>
            <atom:updated>2026-05-20T07:57:38.325Z</atom:updated>
            <content:encoded><![CDATA[<h3>Upgrade Bitbucket Server to Bitbucket Data Center on Centos8/RHEL8</h3><p>You can find the latest version of this post on my personal blog page.</p><p><a href="https://devops-enginar.gitlab.io/site/posts/upgrade-bitbucket-server-to-bitbucket-data-center-centos8-rhel8/">Upgrade Bitbucket Server to Bitbucket Data Center on Centos8/RHEL8</a></p><p>I could not have understand the importance of source code management until working in a big company that tries to manage hundreds of projects with more than 80 actively coding software engineers. Everyone had an experience with Github and public repositories; but in a professional environment, you definitely need an SCM solution private to your company.</p><p>In this series of papers, we will be installing and configuring Bitbucket. As our company tries to achieve to work in a highly available setup, I will be sharing the steps to configure Bitbucket Data Center in a cluster.</p><h3>Install and Configure Bitbucket Data Center on Application Nodes</h3><h4>Prerequisites</h4><p>For a RHEL8 environment below requirements will be necessary and sufficient. Be sure to understand and complete this requirements before proceed.</p><p><strong>Hardware</strong></p><ul><li>This requirements need to be adjusted according to your company needs!</li></ul><p><strong>Java</strong></p><ul><li>You do not need to install and configure Java for Bitbucket. Because Bitbucket installer bundled with Java.</li></ul><p><strong>Database</strong></p><ul><li>In a company environment, this databases are managed by a separate team.</li></ul><p><strong>Git</strong></p><ul><li>Be sure you have installed git 2.39+.</li></ul><p><strong>Shared Search Server</strong></p><p>Search Servers give you to use search functionality in your application through a search bar. Please follow the instructions from the below page to <a href="https://medium.com/@ahmetkasim2/install-and-configure-opensearch-for-bitbucket-data-center-on-centos8-rhel8-8-834edb94274c">install and configure OpenSearch 1.3.13</a> on a remote server.</p><p>NOTE 1: ElasticSearch will not be available in a future version of Bitbucket.</p><p><strong>Shared File System</strong></p><p>This is an important part of the cluster structure because nodes will be doing I/O operations on this server. Please follow the instructions to <a href="https://medium.com/@ahmetkasim2/install-and-configure-nfs-for-bitbucket-data-center-on-centos-8-rhel-8-2892bb78d08c">install and configure NFSv3 for Bitbucket</a>.</p><p>NOTE 2: Please be sure about time sync of your nodes. If they are not synced, there will be serious logging errors on your application.</p><h4>Installation on Application Nodes</h4><p><strong>Install the Installer :)</strong></p><p>From now on, please be careful about the prompts. Because sometimes we change the server and some codes are server specific! For instance, [atlbender@cluster_node ~]# means you are running the code as root because of “#” sign and you need to run the command in the “cluster_node”</p><p>With the below command you can download the installer to your local machine,</p><pre>[atlbender@cluster_node ~]# wget https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-7.21.9-x64.bin</pre><p>After installing the installer, you send this to application nodes,</p><pre>[atlbender@cluster_node ~]# scp atlassian-bitbucket-7.21.9-x64.bin &lt;SERVER_USER&gt;@&lt;NODE_ADDRESS&gt;:/var/tmp</pre><p>Change the owner and mode of the installer,</p><pre>[atlbender@cluster_node ~]# chown -R root:root atlassian-bitbucket-7.21.9-x64.bin<br>[atlbender@cluster_node ~]# chmod u+x atlassian-bitbucket-7.21.9-x64.bin</pre><p><strong>IMPORTANT NOTE: </strong>Run the installer but <strong>do not start the service</strong> on the server or launch Bitbucket.</p><p><strong>Install Bitbucket</strong></p><pre>[atlbender@cluster_node tmp]# ./atlassian-bitbucket-7.21.9-x64.bin<br>Unpacking JRE …<br>Starting Installer …<br> <br>Bitbucket 7.21.9 installation wizard<br>Would you like to install or upgrade an instance?<br>Install a new instance [1, Enter], Upgrade an existing instance [2]<br><br> <br>Install Bitbucket 7.21.9<br>What type of instance are you looking to install?<br>Install a Server instance [1, Enter], Install a Data Center instance [2], Install a Smart Mirroring instance [3]<br>2<br>Where should Bitbucket be installed?<br> <br>Select the folder where you would like Bitbucket 7.21.9 to be installed,<br>then click Next.<br>[/opt/atlassian/bitbucket/7.21.9]<br> <br>Default location for Bitbucket home directory<br> <br>The location for Bitbucket data.<br>This will be the default location for repositories, plugins, and other data.<br> <br>Ensure that this location is not used by another Bitbucket installation.<br>[/var/atlassian/application-data/bitbucket]<br> <br>Configure which ports Bitbucket will use.<br> <br> <br>Configure TCP Ports<br>Bitbucket requires a TCP port that isn&#39;t being used by other applications.<br> <br>The HTTP port is where users access Bitbucket through their browsers.<br> <br>Bitbucket also requires ports 7992 and 7993 are available to run the bundled<br>search server that provides search functionality to Bitbucket.<br>HTTP Port Number<br>[7990]<br> <br> <br> <br>Run as a service<br>For a production server we recommend that you run Bitbucket as a<br>Windows/Linux service because Bitbucket will restart automatically when the<br>computer restarts.<br>Install Bitbucket as a service?<br>Yes [y, Enter], No [n]<br> <br>Please review your Bitbucket installation settings<br> <br> <br>Installation Summary<br>Installation Directory: /opt/atlassian/bitbucket/7.21.9<br>Home Directory: /var/atlassian/application-data/bitbucket<br>HTTP Port: 7990<br>Install as a service: Yes<br> <br>Install [i, Enter], Exit [e]<br> <br> <br>Extracting files …<br> <br> <br>Installation of Bitbucket is complete<br>Would you like to launch Bitbucket?<br>Yes [y, Enter], No [n]<br>n<br><br>An important note about changes to starting Bitbucket Server<br>Bitbucket Server standard startup commands have changed to automatically<br>start a new service that enabled code search.When starting Bitbucket Server<br>manually, ensure you start all required services using both of the following<br>command:service atlbitbucket start<br> <br>This machine now has Bitbucket 7.21.9 Data Center installed<br>Your installation of Bitbucket 7.21.9 Data Center on this node is ready and<br>can be accessed from your browser.<br> <br>For a complete Bitbucket 7.21.9 Data Center installation, you will need to<br>also install and connect to:<br> <br>* Shared database system<br>* Shared file system<br>* Shared search server<br> <br>Read more about installing Bitbucket Data Center.<br>Bitbucket 7.21.9 can be accessed at http://localhost:7990<br>Finishing installation …</pre><p>Finally, we have completed the installation of Bitbucket to a node successfully. :)</p><p>Repeat the same actions on the other nodes.</p><p>In the above steps, we had 2 important directories created,</p><ul><li>/opt/atlassian/bitbucket/7.21.9 — Installation Directory; included Java for the application under ./jre</li><li>/var/atlassian/application-data/bitbucket/ — Home Directory; inclueded “Shared Home Directory” under ./shared This where we have mounted our shared file system on NFS Server.</li></ul><p>NOTE 3: You can move forward on NFSv3 client side configurations from where you left off.</p><p><strong>OpenSearch SSL Configuration for Nodes</strong></p><p>Make sure you have completed “<strong>Configure TLS on Client Side</strong>” section on “<a href="https://medium.com/@ahmetkasim2/install-and-configure-opensearch-for-bitbucket-data-center-on-centos8-rhel8-8-834edb94274c">Install and Configure OpenSearch for Bitbucket Data Center</a>” paper.</p><p><strong>Shared File System Configurations for Nodes</strong></p><p>Also make sure you have completed “<strong>Client Side Configurations</strong>” section on “<strong>Install and Configure NFSv3 for Bitbucket Data Center</strong>” paper.</p><p><strong>Shared Home Restoration</strong></p><p>Since you have already up and running Bitbucket Server instance, the data we want to transfer is living there. To transfer data to new place, create tarball for /var/atlassian/application-data/bitbucket/shareddirectory on legacy Bitbucket</p><pre>[atlbender@cluster_node ~]# tar -cvzf /var/tmp/shared.tar.gz /var/atlassian/application-data/bitbucket/shared</pre><p>Extract it to /var/atlassian/application-data/bitbucket/sharedfolder on one of the nodes’ shared folder.</p><p>NOTE: Understand that completion of this section depends on the preceding section above.</p><p><strong>Add to Trusted Certificate Path</strong></p><p>This section depends on your local company TLS policies. Put your certificates to Bitbucket’s java keystore and RHEL to trust local communications.</p><pre>[atlbender@cluster_node ~]# ./keytool -import -alias &lt;ALIAS&gt; -file /var/tmp/server_certs/&lt;cert_name&gt;.crt -keystore /opt/atlassian/bitbucket/7.21.9/jre/lib/security/cacerts</pre><pre>[atlbender@cluster_node ~]# cp /var/tmp/server_certs/* /etc/pki/ca-trust/source/anchors/<br>[atlbender@cluster_node ~]# update-ca-trust</pre><h4>Start Bitbucket Data Center on First Node</h4><pre>[atlbender@cluster_node ~]# systemctl daemon-reload<br>[atlbender@cluster_node ~]# systemctl start atlbitbucket</pre><p>Move on to your browser and follow the setup wizard.</p><p>Conguratilations! You have Bitbucket Data Center up and running. You can configure and manage your repositories from here.</p><p>Next thing is to create disaster recovery instance and configure mirroring options.</p><p>Thanks for reading. Please feel free to be in contact. Any comment is appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efd2fc17ff9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confluence 7.15.2 MySQL 5.7 to MySQL 8 Migration]]></title>
            <link>https://medium.com/@ahmetkasim2/confluence-7-15-2-mysql-5-7-to-mysql-8-migration-6390b02db9c4?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6390b02db9c4</guid>
            <category><![CDATA[atlassian]]></category>
            <category><![CDATA[confluence]]></category>
            <category><![CDATA[confluence-db-migration]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Wed, 17 Jan 2024 14:20:40 GMT</pubDate>
            <atom:updated>2026-05-20T07:49:41.234Z</atom:updated>
            <content:encoded><![CDATA[<p>You can find the latest version of this paper on my personal blog.</p><p><a href="https://devops-enginar.gitlab.io/site/posts/confluence-7-15-2-mysql-5-7-to-mysql-8-migration/">Confluence 7.15.2 MySQL 5.7 to MySQL 8 Migration</a></p><p>In an enterprise level, managing upgrades, database migrations and configuration of application certificates could be overwhelming. Having migrated the DB, I decided to write the steps here would help you, either. This paper will cover steps to migrate Confluence database MySQL 5.7 to MySQL 8 gracefully.</p><h3>Before Migration</h3><p>There are few things you <strong>must</strong> do before the migration;</p><h4>MySQL Server Configurations</h4><ul><li>Configure /etc/my.cnf file so that it has the following configurations,</li></ul><pre>[mysqld]<br>.<br>.<br>character-set-server=utf8mb4<br>collation-server=utf8mb_bin<br>default-storage-engine=INNODB<br>max_allowed_packet=256M<br>innodb_log_file_size=2GB<br>transaction-isolation=READ-COMMITTED<br>.<br>.</pre><ul><li>Remove the following configuration if exists,</li></ul><pre>sql_mode=NO_AUTO_VALUE_ON_ZERO</pre><p>Restart the mysql.service for changes to take effect.</p><ul><li>Create DB and user with the following commands,</li></ul><pre>CREATE DATABASE &lt;database-name&gt; CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;<br>GRANT ALL PRIVILEGES ON &lt;database-name&gt;.* TO &#39;&lt;confluenceuser&gt;&#39;@&#39;&lt;confluence_server_ip&gt;&#39;</pre><ul><li>Confirm that your &lt;confluenceuser&gt; has DROP privileges especially,</li><li>Be sure you can establish a connection to your MySQL Server 8 using telnet from the Confluence server,</li></ul><pre>curl -v telnet://&lt;mysql_server_ip&gt;:3306<br># telnet &lt;mysql_server_ip&gt; 3306 # for Windows powershell</pre><h4>Server Side Configurations</h4><p>Before moving on to the migration step let’s backup some important data about the existing application. We will be using those files later,</p><ul><li>Copy your &lt;installation-dir&gt;/conf/server.xml . This file contains information about the keystore and the password for TLS configurations. Please take look at the paper written about the <a href="https://medium.com/@ahmetkasim2/create-and-manage-keystore-for-confluence-on-windows-cb88b2e01111">TLS Configurations for Confluence on Windows</a>.</li><li>Take look at the &lt;home-dir&gt;/confluence.cfg.xml for any changes about your directory.</li><li>Take a note of your service that is running for Confluence instance. This is a precautionary step for not to tackle with old Confluence instance.</li><li>Transfer your MySQL Connector to the server. MySQL Connector should look like mysql-connector-x.x.x.jar . This provides connection with your remote MySQL Server.</li><li>List of active <strong>user installed apps. </strong>You must install the same versions of each app as before the migration.</li></ul><h4>Migration Steps</h4><ol><li>Take an XML backup from the UI. Uncheck “Save Attachments” and “Save also backups folder” options,</li><li>Stop the Confluence,</li><li>Copy &lt;home-directory&gt;/attachments ,</li><li>Follow the Setup Your MySQL Server Configurations steps above,</li><li>Setup New DB and take note of the following credentials,<br><strong>-</strong> <strong>Hostname: </strong><strong>&lt;mysql_server_address&gt;`</strong>,<strong><br>- Port: </strong><strong>3306 (default)</strong>,<br>- <strong>DB Name: </strong><strong>&lt;database-name&gt; </strong>you provided above,<br>- <strong>DB Password: </strong><strong>&lt;password&gt; </strong>you created on the DB creation step above,</li><li>Install Confluence in a new location with run the installer as Administrator,<br>- Choose <strong>Custom Install</strong>,<br>- new <strong>Destination Directory — Installation Directory -</strong>,<br>- new <strong>Home Directory</strong><br>The last two <strong>must not</strong> be the same as the old directories</li><li>Add the MySQL connector you transfered to the server under &lt;installation-directory&gt;/confluence/WEB-INF/lib ,</li><li>Installer will start the Confluence and run the Setup Wizard from UI on localhost:8090. When running the setup wizard,<br>- Enter your licence — if necessary -<br>- Choose <strong>Production Installation</strong>,<br>- Choose <strong>My Own Database</strong> and enter the values you noted in the step 6,</li><li>On the<strong> Load Content</strong> step, choose <strong>Restore From Backup,<br>- </strong>After clicking the button, put your XML backup from the first step under &lt;home-directory&gt;/restore ,<br>- Uncheck the <strong>Build Index</strong> box and click the import button. You will now see the XML file on the screen. Click the file and uncheck again the <strong>Build Index</strong> box, just load the old content. You can reindex from the UI if necessary after installation is complete.</li><li>Copy the content of the attachments under &lt;home-directory&gt;/attachments ,</li><li>Configure the user added applications from the UI.</li><li>Configure the TLS via &lt;installation-dir&gt;/conf/server.xmlfile on the new installed directory.</li></ol><p>We are done !</p><p>Thanks for your time,<br>Kasım</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6390b02db9c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diving into Disk Management for Bitbucket Data Center on CentOS8/RHEL8]]></title>
            <link>https://medium.com/@ahmetkasim2/install-and-configure-nfs-for-bitbucket-data-center-on-centos-8-rhel-8-2892bb78d08c?source=rss-bc477c9cbc3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2892bb78d08c</guid>
            <category><![CDATA[nfs-server]]></category>
            <category><![CDATA[bitbucket]]></category>
            <category><![CDATA[shared-file-system]]></category>
            <category><![CDATA[bitbucket-data-center]]></category>
            <dc:creator><![CDATA[Ahmet Kasım Erbay]]></dc:creator>
            <pubDate>Mon, 15 Jan 2024 12:34:42 GMT</pubDate>
            <atom:updated>2026-05-20T07:52:24.994Z</atom:updated>
            <content:encoded><![CDATA[<p>You can find the latest version of this post on my personal blog page.</p><p><a href="https://devops-enginar.gitlab.io/site/posts/diving-into-disk-management-for-bitbucket-data-center-on-centos8-rhel8/">Diving into Disk Management for Bitbucket Data Center on Centos8/RHEL8</a></p><p>As I delve deeper into my role, navigating the intricate world of CentOS/RHEL, I’ve realized the significance of effective disk management and mounting options — especially for Bitbucket Data Center in a cluster environment. One of the key elements in this process is the Network File System (NFS), which enables file sharing across networks in a client-server model. NFS offers the flexibility to instantly share files among systems, a critical feature for our setup. For more on NFS, you can refer to <a href="https://www.ibm.com/docs/en/aix/7.1?topic=management-network-file-system">this</a>.</p><h3>Setting Up NFS for Bitbucket Data Center</h3><p>Following the installation of OpenSearch for Bitbucket Data Center, the next essential step is configuring the Shared File System using NFSv3. Below are the detailed steps to set up NFS on both server and client sides. Note that some configurations might need to be adjusted according to your specific system requirements.</p><h4>Server-Side Configurations</h4><p>Start by creating a customized disk setup. Custom configurations often provide better manageability and a broader understanding of application systems. Here’s my current mount setup:</p><pre>[atlbender@shared_file_server ~]# lsblk<br>NAME                  MAJ:MIN  RM    SIZE    RO    TYPE    MOUNTPOINT<br>sda                      8:0    0    80GB     0    disk<br>|-sda1                   8:1    0    20GB     0    disk    /boot/efi<br>|-sda2                   8:2    0    20GB     0    disk    /boot<br>|-sda3                   8:3    0    40GB     0    disk<br>  |-vgroot-root        253:0    0     8GB     0    lvm     /<br>  |-vgroot-swap        253:1    0     8GB     0    lvm     [SWAP]<br>  |-vgroot-home        253:2    0     8GB     0    lvm     /home<br>  |-vgroot-var         253:3    0     8GB     0    lvm     /var<br>  |-vgroot-tmp         253:4    0     8GB     0    lvm     /tmp<br>sdb                      8:16   0   100GB     0    disk<br>|-vgappdata-lvappdata  253:2    0   100GB     0    lvm     /appdata<br>sr0                     11:0    1  1024MB     0    rom</pre><p>Next, unmount and remove the old mount space to create a new directory for Bitbucket operations:</p><pre>[atlbender@shared_file_server ~]# umount /appdata<br>[atlbender@shared_file_server ~]# lvremove lvappdata<br>[atlbender@shared_file_server ~]# vgremove vgappdata</pre><p>Create Bitbucket shared home directory:</p><pre>[atlbender@shared_file_server ~]# mkdir -p /shareddata</pre><p>Create a logical volume and volume group for mounting:</p><pre>[atlbender@shared_file_server ~]# vgcreate vg_shareddata /dev/sdb<br>[atlbender@shared_file_server ~]# lvcreate -n lv_shareddata -l 100%FREE vg_shareddata</pre><p>Format the new volume with the XFS file system:</p><pre>[atlbender@shared_file_server ~]# mkfs.xfs /dev/mapper/vg_shareddata-lv_shareddata</pre><p>Verify the changes:</p><pre>[atlbender@shared_file_server ~]# lsblk<br>NAME                           MAJ:MIN  RM   SIZE    RO    TYPE    MOUNTPOINT<br>sda                              8:0    0    80GB     0    disk<br>|-sda1                           8:1    0    20GB     0    disk    /boot/efi<br>|-sda2                           8:2    0    20GB     0    disk    /boot<br>|-sda3                           8:3    0    40GB     0    disk<br>  |-vgroot-root                253:0    0     8GB     0    lvm     /<br>  |-vgroot-swap                253:1    0     8GB     0    lvm     [SWAP]<br>  |-vgroot-home                253:2    0     8GB     0    lvm     /home<br>  |-vgroot-var                 253:3    0     8GB     0    lvm     /var<br>  |-vgroot-tmp                 253:4    0     8GB     0    lvm     /tmp<br>sdb                              8:16   0   100GB     0    disk<br>|-vg_shareddata-lv_shareddata  253:2    0   100GB     0    lvm     /shareddata<br>sr0                             11:0    1  1024MB     0    rom</pre><p>Install and configure the NFS server:</p><pre>[atlbender@shared_file_server ~]# yum install nfs-utils -y<br>[atlbender@shared_file_server ~]# systemctl start nfs-server rpcbind<br>[atlbender@shared_file_server ~]# systemctl enable nfs-server rpcbind</pre><p>Update /etc/fstab for persistent mounts:</p><pre>[atlbender@shared_file_server ~]# echo &quot;/dev/mapper/vg_shareddata-lv_shareddata /shareddata xfs defaults 0 0&quot; | sudo tee -a /etc/fstab<br><br># Changes to /etc/fstabrequires daemon-reload<br>[atlbender@shared_file_server ~]# systemctl daemon-reload</pre><p>Configure NFS exports:</p><pre>[atlbender@shared_file_server ~]# echo &quot;/shareddata node_1(rw,sync)&quot; | sudo tee -a /etc/exports<br>[atlbender@shared_file_server ~]# echo &quot;/shareddata node_2(rw,sync)&quot; | sudo tee -a /etc/exports<br>[atlbender@shared_file_server ~]# exportfs -var</pre><p>Here are the explanations for options,</p><ul><li>-v: Be verbose</li><li>-a: Export or unexport all idrectories according to /etc/exports</li><li>-r: Reexport all directories, syncronize /var/lib/nfs/etab with /etc/exports . This option removes any entries from the kernel export tabel which are no longer available.</li></ul><p><strong>Mount on System Reboot</strong></p><p>The export table of the server is enriched by /etc/fstab . And mount -a command takes this file into account in boot process.</p><p>This is why we use the below command to make changes persistent,</p><pre>[atlbender@shared_file_server ~]# mount -a</pre><h4><strong>Check for Exports</strong></h4><p>Run the below command to see the exported clients,</p><pre>[atlbender@shared_file_server ~]# showmount -e localhost<br>Export list for localhost:<br>/shareddata &lt;comma_seperated_list_of_NODES&gt;</pre><p>Ensure the atlbitbucket user exists and has appropriate permissions:</p><pre>[atlbender@shared_file_server ~]# adduser -m atlbitbucket<br>[atlbender@shared_file_server ~]# chown -R atlbitbucket:atlbitbucket /shareddata<br>[atlbender@shared_file_server ~]# chmod 777 /shareddata/<br>[atlbender@shared_file_server ~]# su - atlbitbucket<br>[atlbender@shared_file_server ~]$ echo &quot;umask 0027&quot; &gt; ~/.bashrc</pre><h3>Client Side Configurations</h3><p>NOTE: You need to complete the “<strong>Install Bitbucket</strong>” section on <a href="https://medium.com/@ahmetkasim2/install-and-configure-bitbucket-data-center-on-centos8-rhel8-efd2fc17ff9c">Install and Bitbucket Data Center</a> paper. If not, do not move on to the next section!</p><p>Firstly, make sure that nfs-client.target service is up and enabled.</p><p>We need to create a mount point on the client side. After this configuration we expect to see the changes from one node on other nodes and NFS server.</p><pre>[atlbender@cluster_node ~]# mkdir -p /shareddata</pre><p>We will also adopt /etc/fstab on the nodes,</p><pre>[atlbender@cluster_node ~]#echo &quot;shared_file_server:/shareddata /var/atlassian/application-data/bitbucket/shared/ nfs rw,nfsvers=3,lookupcache=pos,noatime,intr,rsize=32768,wsize=32768,_netdev 0 0&quot; &gt;&gt; /etc/fstab</pre><pre>[atlbender@cluster_node ~]# systemctl daemon-reload<br>[atlbender@cluster_node ~]# mount -a</pre><p>You can test your configurations by manipulating the /shareddata folder on NFS server by seeing the same changes on nodes’ /var/atlassian/applicaiton-data/bitbucket/shared folder.</p><h3>Conclusion</h3><p>With these configurations, your Bitbucket Data Center should be well-equipped with NFS for optimal performance. Feel free to leave comments or reach out with any questions. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2892bb78d08c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>