<?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 Markus Fasselt on Medium]]></title>
        <description><![CDATA[Stories by Markus Fasselt on Medium]]></description>
        <link>https://medium.com/@digilist?source=rss-c8430e477eaf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TKP20XSusIA7scxa.</url>
            <title>Stories by Markus Fasselt on Medium</title>
            <link>https://medium.com/@digilist?source=rss-c8430e477eaf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 19:23:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@digilist/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[Automatic dependency updates]]></title>
            <link>https://medium.com/@digilist/automatic-dependency-updates-891589688adc?source=rss-c8430e477eaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/891589688adc</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[dependency-management]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Markus Fasselt]]></dc:creator>
            <pubDate>Sat, 14 Nov 2020 18:17:41 GMT</pubDate>
            <atom:updated>2020-11-14T18:17:41.573Z</atom:updated>
            <content:encoded><![CDATA[<h4>By using Dependabot and GitHub Actions</h4><p>If you have built some software that is using external dependencies, it is important to update those dependencies from time to time for bug fixes, improved security or new features.</p><p>Depending on the number of dependencies and the time since the last update this can become a time consuming and complex task; especially when there are backward incompatible changes or multi-major-version updates. The necessary work to update a project increases with every new dependency and version update (or the longer you wait with updating dependencies).</p><p>It is better to update dependencies shortly after a new version was released. But doing this manually is time consuming and annoying. Who wants to run composer update, npm update etc. every day? And it’s not just running the update command. You need to test the software and ensure everything is still working.</p><p>Gladly, it is not necessary anymore to do all of this manually.</p><h3>Dependabot</h3><p><a href="https://dependabot.com/">Dependabot</a> is a tool that keeps track of all dependencies and submits a Pull Request once there is new version for any dependency. It supports various languages and is setup in minutes. Dependabot got acquired by GitHub in 2019 is currently being integrated more deeply into the GitHub ecosystem.</p><p>Right now (November 2020) there are two versions, the old one running on Dependabot.com and a new one that is directly embedded in GitHub. So right now there are two ways to get started:</p><ul><li>Sign up on dependabot.com with your GitHub Account (dependabot-preview)</li><li>Enable Dependabot directly on GitHub for your repository (dependabot)</li></ul><p>Dependabot is currently being integrated into GitHub and I guess that dependabot.com will be shut down at some point. Therefore I will only write about how to enable it on GitHub.</p><p>Dependabot can be enabled for your repository under Insights &gt; Dependency graph &gt; Dependabot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Edb0vEnVWMnM6dQscGABMw.png" /></figure><p>After enabling it, GitHub asks you to configure Dependabot with the .github/dependabot.yaml file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*d94SefAQRpRvjz4fRu_QDQ.png" /></figure><p>By clicking the “Create config file” button GitHub opens an editor with a default YAML config.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jdgog7pLGnrVGudC9zRDcg.png" /></figure><p>To configure Dependabot for PHP you need to set package-ecosystem to composer or to npm for JavaScript.</p><p>And that’s it, now Dependabot will check every day for new updates and opens a PR for every new dependency version.</p><p>Of course, it is possible to update the packages for multiple languages / package ecosystems, at different intervals or only patch versions. There are lots of configuration options available and you can find some documentation here: <a href="https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates">https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates</a></p><h3>Merging dependency updates automatically</h3><p>Getting Pull Requests for every new version update is great, but you still need to check and merge all those updates. Gladly there is a solution for this as well using GitHub Actions and the <a href="https://github.com/marketplace/actions/dependabot-auto-merge">Dependabot Auto Merge</a> Action.</p><p>To get started with this action you simply need to create a YAML configuration file in .github/workflows (e.g. .github/workflows/automerge.yaml) and configure the action, similar to the following:</p><pre><strong>name</strong>: Dependabot auto-merge<br><strong>on</strong>: pull_request<br><br><strong>jobs</strong>:<br>    <strong>auto-merge</strong>:<br>        <strong>runs-on</strong>: ubuntu-latest<br>        <strong>steps</strong>:<br>            - <strong>uses</strong>: ahmadnassri/action-dependabot-auto-merge@v1<br>              <strong>with</strong>:<br>                  <strong>target</strong>: patch<br>                  <strong>github-token</strong>: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}</pre><p>In addition, you need to define the DEPENDABOT_AUTOMERGE_TOKEN secret for your repository (Settings &gt; Secrets) which is a personal access token for your account with the repo access right. You can create it here: <a href="https://github.com/settings/tokens">https://github.com/settings/tokens</a></p><p>When there is a new PR now, the action will add a comment with the text “@dependabot merge” which instructs Dependabot to merge the PR once all status checks pass (and only if there is no failure).</p><p>And that’s it, now you have fully automatic dependency updates.</p><p>Of course, having a fully automated dependency update does not help you if it breaks your code. Therefore, I recommend to have a CI pipeline that builds your code and runs automated tests to ensure everything is still working after the dependency update (e.g. by using GitHub actions as well).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=891589688adc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Global Symfony form label modification]]></title>
            <link>https://medium.com/@digilist/global-symfony-form-label-modification-3b157bf8d6fd?source=rss-c8430e477eaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b157bf8d6fd</guid>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[symfony]]></category>
            <category><![CDATA[symfony-framework]]></category>
            <dc:creator><![CDATA[Markus Fasselt]]></dc:creator>
            <pubDate>Tue, 15 May 2018 07:42:41 GMT</pubDate>
            <atom:updated>2018-05-15T07:42:41.825Z</atom:updated>
            <content:encoded><![CDATA[<p>In Symfony forms there are multiple ways to add a suffix to your form labels to indicate whether these are required (or optional).</p><p>When you do a little research, you’ll probably find these two solutions:</p><ol><li><a href="https://stackoverflow.com/a/45763767/1044527">Add an asterisk to required fields with CSS</a></li><li><a href="https://stackoverflow.com/a/45761589/1044527">Override the twig template</a></li></ol><p>However, if you want to use <a href="https://github.com/tonystar/float-label-css">floating labels</a> these solutions do not work, because you need to print the label twice. (I know in the gif there are different texts for the placeholder and the label, but in my case I wanted to have the same text.) So this post will give you a quick tutorial on how you can solve this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*KYnCgr6wkaro0753ND3gdw.gif" /><figcaption>Preview of floating labels</figcaption></figure><p>This problem can be solved by creating a <a href="https://symfony.com/doc/current/form/create_form_type_extension.html">form type extension</a> that allows you to modify any form field in your application.</p><p>The following code adds an <em>optional</em> hint to the label of any form label of a field that is not required:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aa110dc332dba0a1ea183856aa2d0a3c/href">https://medium.com/media/aa110dc332dba0a1ea183856aa2d0a3c/href</a></iframe><p>The given code runs only if the field has an explicit label. With twig, there is a default label generated based on the field name, but I do not like that behavior and therefore do not support it. But feel free to adopt it to your needs :)</p><p>If you find some cases that do not work (like with expanded choice types), please let me know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b157bf8d6fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running a P2P-VPN with tinc]]></title>
            <link>https://medium.com/@digilist/running-a-p2p-vpn-with-tinc-4c877913fcc8?source=rss-c8430e477eaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c877913fcc8</guid>
            <category><![CDATA[cluster]]></category>
            <category><![CDATA[openvpn]]></category>
            <category><![CDATA[tinc]]></category>
            <category><![CDATA[vpn]]></category>
            <dc:creator><![CDATA[Markus Fasselt]]></dc:creator>
            <pubDate>Sat, 20 Aug 2016 09:55:44 GMT</pubDate>
            <atom:updated>2018-01-03T09:23:44.037Z</atom:updated>
            <content:encoded><![CDATA[<p><em>It is a common task today to build a server cluster across multiple data centers. To do so, there are several aspects that need to be considered to build a reliable cluster across a wide area network (WAN). One aspect, which will be explored in the following, is how to enable private communication between the cluster’s nodes (or the applications that run on the cluster).</em></p><p>It is really important to keep the communication between the nodes private. Otherwise, the cluster would be vulnerable for man-in-the-middle attacks. An attacker could read all data or even manipulate it. And that probably without even noticing it.</p><p>There are several ways to ensure secure communication across a public network. To choose the right solution, there are several aspects that need to be considered:</p><ul><li>Does the application support encryption?</li><li>Is there only one application speaking with other nodes or are there multiple?</li><li>How many nodes need to be connected?</li></ul><p>Depending on the requirements, it might be the easiest to use the embedded encryption feature in the server application if available (e.g. by using HTTPS for web server communication or by using encrypted replication in MySQL). Alternatively, a virtual private network (VPN) between all nodes can be built.</p><p>One VPN software I found very easy to deploy is <a href="https://www.tinc-vpn.org/">tinc</a>. I am currently running a small cluster of seven nodes across three data centers. The cluster is up for three weeks and runs (until now) pretty stable. Anyway, there are still some downsides I will come to later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*0C996KwS4C-TM5OWpcvYkQ.png" /><figcaption>(Image by <a href="https://www.digitalocean.com/community/tutorials/how-to-install-tinc-and-set-up-a-basic-vpn-on-ubuntu-14-04">DigitalOcean</a>)</figcaption></figure><p>Tinc comes with all the features one would expect from a secure VPN:</p><ul><li>Automatic encryption</li><li>Optional compression<br>It is possible to compress the traffic with zlib or lzo.</li><li>Easily expandable <br>Just configure a new node and get started. After registering it with one first node it is able to communicate with the whole cluster. To allow a P2P connection with all nodes, just copy the configuration to all nodes.</li><li><a href="https://en.wikipedia.org/wiki/Mesh_networking">Automatic mesh routing</a><br>Tinc always tries to sent traffic directly to the destination node. If this is not possible, tinc will forward the traffic through other nodes.</li><li>Run multiple VPNs across different clusters at the same time</li><li>Easy to deploy</li></ul><h4>Setting up Tinc</h4><p>As there are already some great resources on the internet on how to install and configure tinc, I won’t repeat it here. I suggest the guides by <a href="https://www.digitalocean.com/community/tutorials/how-to-install-tinc-and-set-up-a-basic-vpn-on-ubuntu-14-04">DigitalOcean</a> and <a href="http://stacksetup.com/VPN/UsingTinc">Stack Setup</a>. Furthermore, the <a href="https://www.tinc-vpn.org/documentation/tinc.pdf">documentation</a> might be worth a look.</p><h4>Experiences running a tinc VPN</h4><p>As I said above, I am currently running a cluster of seven nodes across three data centers with tinc. In my network I am running <a href="https://www.percona.com/software/mysql-database/percona-xtradb-cluster">Percona Cluster</a> (MySQL master-master replication) and a Redis master-slave setup.</p><p>I constructed the cluster over a period of one week. At first, there was just one node and I added one node a day to observe the effects after adding a new node.</p><p>After that week, I was quite astonished how easy and flawless the setup was. There was not a single unexpected problem during the setup and until now. The cluster is working like a charm.</p><p>However, I’d have to admit that the VPN performance is not that great yet. Transferring a 1 GB file with scp between two nodes (same data center) takes 13s through the public network and 47.9s trough the tinc VPN (thats 3.7x that much).</p><p>I am not sure whether I can optimize that. At the moment I am not using any compression, but I noticed a further performance drop after enabling the compression. This has probably something to do with the single-threaded nature of tinc. It might also be a general VPN thing; I didn’t compare it with OpenVPN or other VPN solutions. If something faster is needed, there are most probably better solutions.</p><p>The performance is still acceptable for me, as I only have a read intensive workload and in general not that much communication between the nodes. Only the initial synchronization takes some time.</p><p>All in all, I can recommend tinc to build a private network quick and easy. If the performance matters, there might be better solutions. Unfortunately, I cannot say whether it is suitable for bigger setups with higher loads yet.</p><p><strong>Update:</strong> Since writing this article one and half years ago the cluster is still running like a charm. There were only some minor incidents and failures which I can reason with invalid configuration updates that had nothing to do with tinc by itself. Furthermore, adding and removing nodes or some temporary node failures did not affect the reliability of tinc. It just works!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c877913fcc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>