Latest Posts (9 found)
Humble Thoughts 1 years ago

Heroku Env Lookup

If you happen to work with mid-sized organizations in Heroku, containing tens of apps, though not mature enough for the Enterprise plan or missing the IaaC setup, you know how tedious it might get to juggle all the configuration variables. It might get even more overwhelming when you need to grep apps by env variable, finding the right app configured with a specific value. When I reencountered this issue, I decided to solve it once and for a while, so here's the plugin helping to look up a variable matching the search value in its name or value. Here's how it works. Installation is simple: After installation, you will be able to lookup for an environment variable by a substring or a full string like this: Hope you'll find this helpful! Support the initiative or buy a commercial license if you will use it for managing apps for commercial purposes.

0 views
Humble Thoughts 1 years ago

Select and Copy to Markdown link

I created a simple Chrome extension for copying a link with selected text as a Markdown link. The workflow is smooth and straightforward: being on a tab, select text, press on Mac or on Windows, and paste it to the Obsidian-like tool. Check it out on the Chrome Web Store: It's also open-source, so feel free to contribute or report an issue on Github: https://github.com/lancedikson/selection-to-md-link

0 views
Humble Thoughts 1 years ago

AWS EFS Configuration failure

I wanted to share a quick story about setting up an AWS EFS instance. If you're reading this, I assume you're either in the process of configuring one or have encountered a similar issue. Here's what happened: You successfully set up an EFS, configured access points for it, and mounted it to an EC2 instance or ECS service cluster. You thought everything was going smoothly because you successfully set up NAT networking. However, when you tried to write data to the filesystem, it kept failing with a exception. This happens due to misconfiguration of the access point permissions: the directory created in the EFS doesn't imply permissions for the user trying to reach the data on disk. For example, imagine an access point that was made with the configuration to be owned by the uid and gid with the permissions set to : Initial Access point configuration In this case, trying to reach the data under a non-root user with a different uid and gid from the mentioned will fail. So, first things first, you should ensure the permissions of the AP are set to allow the user to work with the data. Though, here's the catch. Imagine you've tried the configuration above and understood it doesn't work. After that, you dive into the container image code or the application configuration and learn the user working with the drive is . You recreate the AP as there's no way to reconfigure those settings, but it still doesn't work... This is where it's important to remember that even if you reconfigured the AP settings, they still won't recreate the FS directory nor reconfigure its permissions for you. Reconfigured AP You end up trying to write to the directory owned by the user under the user, so it fails. Even if you set permissions to and recreate an AP with it, it won't change anything. So, you have two options now: either manually adjust the attributes of the directory on FS to fit your new configuration ( , ) or create a new directory with the correct settings.

0 views
Humble Thoughts 1 years ago

Tech Lead Insights: Episode 1 — Pilot

Hi, tech gurus! In the pilot episode of the Tech Lead Insights podcast , we will dive into the realms of tech leadership with three compelling articles: These articles, handpicked for their strategic insights, promise to illuminate the path to effective leadership. Join us in unpacking the wisdom they hold for your professional journey. Ready to explore? Check out the articles here: Don't miss the next episode – follow us on your favorite streaming platforms:

0 views
Humble Thoughts 2 years ago

Self-hosted Blog Guide for Engineers: (the Sweet) Part III — Further maintenance

This article is part of a guide for engineers on setting up a self-hosted blog (or any other service) on Ghost using Terraform, Ansible, and Kubernetes ( part I , part II ). Congratulations on successfully setting up your Kubernetes cluster with a Ghost blog! As you embark on this new journey of managing and maintaining your dynamic platform, it is essential to stay proactive in ensuring the smooth operation and optimal performance of your environment. This article will explore three crucial aspects of maintaining your newly created Kubernetes cluster with Ghost blog: updating the Ghost configuration file, upgrading Ghost and MySQL versions, and expanding storage volume. The Ghost configuration file serves as the backbone of your blog's settings, defining everything from database connectivity to theme customization. Regularly updating this file ensures that your Ghost installation remains up-to-date with any changes or improvements introduced by the Ghost team. Considering you've followed the instructions from Part II of this manual, you should now have the configuration file set up with Kubernetes secret. In that case, all you'd need to do to upgrade the configuration is: Ghost, being an open-source platform, constantly receives updates and new features that improve its security, performance, and overall user experience. Similarly, MySQL, the database management system that powers your Ghost blog, often releases new versions with bug fixes and optimizations. Fortunately for us, the setup we've configured allows us to update both technologies with little effort. All you need to do is simply update the image directive version ( ) in the and apply the change to the Kubernetes cluster in the namespace. Similarly, it's done for MySQL by updating the image version directive for MySQL deployment in the file and applying the change. As your Ghost blog grows in content and attracts more visitors, you may find that the initial storage volume allocated to your Kubernetes cluster becomes insufficient. In this section, we will look into expanding your storage volume to accommodate the increasing demands of your blog. One of the critical aspects of our setup was CSI Driver installation for Hetzner which would help us to modify a separate volume via Kubernetes cluster configuration changes. To expand the volume, change the param to a new value in the config and apply it running the command. This will result in smooth Hetzner Volume resizing without re-creation of it. Note that this value can only be increased and can't be shrunk back — don't go too far, as it will affect the cost. As you can see, maintaining such a blog is simple and hassle-free. In future articles, I'll aim to cover details on further expansion — moving from a single-node configuration to an indeed clustered, highly-available solution. Subscribe to not miss out on the updates!

0 views
Humble Thoughts 2 years ago

My two cents on Investing for Finnish residents

Last week I saw a question on Twitter about investing for Finnish residents and a request for advice. While answering, I decided to put my experience together in a single post to share with the recently relocated immigrants and expats interested in the subject. In this post, I’ll try to highlight only tools for investments (not trading) and what you should pay attention to based on my experience, and what I found helpful to learn. I won’t cover topics on why one should or should not invest or what asset classes there are and which one is for you— you can find plenty of answers to that online. Note: this post is neither financial nor taxation advice; it’s simply a set of tools and principles I’ve found helpful and working for me. Make sure to re-check the updated terms of service for brokerage and up-to-date taxation regulations before making your own decisions! Initially, I thought of gathering details about all the available brokers in Finland into a comprehensive guide, but in the process decided to change the perspective a bit, as it would require too much effort, but in the end, result in little value with yet another comparison table similar to the many existing out there. Instead, I decided to cover the brokers I know well and use on a daily/weekly basis, rationalizing them with the principles I followed when choosing. And, of course, I will list the outsiders for you to explore their features on your own. Let’s start with the principles defining how I’ve chosen brokers. I try to diversify not only assets and their classes but brokers and banks as well, as brokers are financial institutions that can potentially go bankrupt; or make specific changes in terms of service that won't allow people of particular origin to continue being their clients; or they can go offline when you need them — we all are used to 24/7 working services, but, it's been just a few years since the Finnish branch of Nordea bank was shut down for a few days. I couldn't even use their card to buy food. Anyway, the more diversified my portfolio is, the better I sleep. This is pretty straightforward: no one likes to lose their assets. So don't I. The deposits and brokers I use should provide guarantees of assets protection insurance in case of becoming insolvent. I recommend always checking brokers' insurance in advance. So, for example, Trading212 covers up to €20,000 via Investors Compensation Fund and up to €1M with private insurance from Lloyd's of London . Degiro protects up to €100,000 . Interactive Brokers covers up to €20,000 with certain conditions . It is also pretty simple — I seek the best value for money; that's why I typically don't use local banks for investing, as their fees are way bigger than investments-oriented brokers. I invest regularly and keep diversifying my assets, making several transactions at a time and in small amounts. In this case, paying 5 euro or even more for a transaction doesn't feel reasonable to me as the commission would diminish the profits tangibly. Nowadays, Finnish fintech is already at a decent level; however, you can still meet hard-to-use services, bad UX, non-English apps, and other exceptions. On the other hand, local services often provide implicit tax reporting included in the service. In contrast, regional (US/EU-wide) services like Degiro , Trading212 , Interactive Brokers , and Revolut offer good-to-perfect usability and design but can't provide automatic tax reporting. That is a trade-off everyone has to deal with in Finland. I value day-to-day experience and know how to report taxes, so the choice is obvious. You may think differently until you know better how to report taxes (spoiler: it's just four numbers to fill in your tax card). Before comparing the brokers, it's crucial to mention common business models that brokers utilize to gain profits. It's common for brokers to earn money by these methods: The price spread is the least measurable for the end user because it is implicit, so assessing can be challenging. However, when I checked last time, all the brokers I used had similar or very close prices for my control tickers, and the deviation was relatively small to include in the calculations. But, shares lending is a vital aspect to consider when you choose your broker. Essentially it's often explained as "the shares you've bought and own can be lent out to others (for example, for short-selling) to compensate for the low or zero fees." The concept implies that the broker will resolve the situation smoothly in case of a sale, buying out the shares from you. However, it's worth checking the terms to ensure you know all the legal aspects and possible scenarios. For example, Degiro and Trading212 utilize the share lending concept a lot. Degiro has it as a basis for a separate account type (Regular), keeping the Custody-type account clean of securities lending. The fees on the Regular account are much lower though they have a right to lend out your shares. Trading212 has no option to opt-out at the moment, but significant changes are coming up to the platform on 5.7.2023 for UK and later this year for the EU entity, that will bring an opportunity to opt-out or opt-in for getting securities lending interest. Personally, I'm excited about these features and appreciate the company's transparency and fair approach. The fees are easily comparable on the one hand. Conversely, they vary greatly depending on your trades' frequency, amounts, and composition. Again, I decided not to collect all the numbers here but more subjectively evaluate the fees based on my perception and manner of investing. I'm building a diversified broad-market portfolio, primarily investing in ETFs once in 1-2 months. So, I make 10-20 regular transactions once in 1-2 months. Here's how I see the fees and other features of the brokers that I use: As you can see, I can't tell you much about Nordnet as I still need an account there. Although I've signed up for it, the estimated wait time is 1-2 weeks now, which is a metric we can compare to the other listed brokers — it's closer to bigger banks like Nordea or OP and doesn't even stand close to 1-2 days of account opening in T212, Degiro or Revolut. One of the main questions is how to report taxes on capital gains. In Finland, as in many countries, there are two ways for tax reporting: the broker can do it automatically for you, or you have to do it manually via vero.fi. It's possible to report taxes during the fiscal year while the tax card is active, or after the year has ended, you can request a correction for the last year until May next year. It's pretty easy to report profits and losses. At the same time, the tax card is open and active — you have to report four numbers: acquisition expenses (fees), selling prices, total gains, and total losses. You'd need to request a report from each broker for the whole year and sum up numbers to get these numbers. And the dividends, of course, in a separate section. However, even if the fiscal year is ended and you still need to report something, you can still report the gains and losses via vero.fi account through making a correction to the pre-filled tax return. You'd need to collect all the reports for the taxable year together, sum up the numbers and attach the reports to the correction request. Usually takes up to 30 min for me to complete this procedure once a year, which is not a big deal. There's a list of possible deductions from capital income — I won't repeat vero; you better check it on your own from their pages . Some optimizations can be done if you've seen losses. As capital losses can't be deducted from other income types (such as earned income), there seems to be a possibility for a carryover to be deducted later from capital income. More information is available on vero.fi . There's a concept of equity saving accounts, which allows you to forget about taxes on individual sales or dividends in the meantime. The profit from an equity savings account is only taxed when you withdraw money. Check out vero.fi for more details. I've yet to try this concept, but it seems to be available with local brokers only. There's one more interesting concept in taxation called Deemed acquisition cost, which, in some instances, by pumping the acquisition cost up, can lower the taxable profits and lead to lower tax payments. Again, you can find more information on vero.if . I don't know how this can be used in the case of regular investments to a few broad-market funds as it's pretty hard to track down the duration of ownership, but it can be helpful in the case of rare transactions such as private companies' equity. As to the benefits, there's a local program by Suomen Osakesäästäjät that a few local brokers support. Membership costs 15-38 euro annually, giving you access to investment-related magazines and special service prices. For example, you automatically get a level 3 account upgrade on Nordnet if you're a community member. That's all I've found helpful for investing as a Finnish resident. If you have any questions or suggestions for edits, please, feel free to reach out via contacts on the About page .

0 views
Humble Thoughts 2 years ago

Self-hosted Blog Guide for Engineers: Part II - Setting up Kubernetes

In the previous step , we set up k3s on our remote server using Ansible. We should use the kube config file to control the remote Kubernetes (single-node) cluster. For this, try running the following command from the root directory of the repository: Sourcing the file is required to reload the variable to ensure the new file is found and loaded to kubectl. If the result is successful and the context is switched, you should be able to check up on our K3s cluster on the server. Try running : Great! Now the server is ready to create the application and supporting services.

0 views
Humble Thoughts 2 years ago

Self-hosted Blog Guide for Engineers

I'd been searching for a comprehensive guide on setting up a cheap and easily maintainable personal site or blog lately and couldn't find a good enough one. I've decided to do it myself and create a step-by-step guide for others to reuse. Welcome to a self-hosted blog development tutorial utilizing a heck of a technology stack: Terraform, Ansible, and Kubernetes! As the first tutorial on Humble Thoughts, it's available to all-tier members but serves as an example of exclusive content available in the future only to the Exclusive subscription members. You can sign-up for a trial period and decide later if you want to continue supporting me. Yeah, you've got this right; we will be using a stack that might look like a bit of over-engineering for this type of solution, but for a good reason — it's always great to learn and practice something new. Still, I was impressed by how easily one can maintain the result solution. And even though the stack may seem like an over-kill for the problem, I keep it as simple as possible, though easy to maintain and scale further, and relatively cheap as well ( only around 5€/month according to the Hetzner Cloud prices in Jun 2023 ). I'll guide you through the process of setting up servers (single-node or even a cluster) on the cheapest cloud platform provider ( Hetzner ) I know, with the use of Terraform, Ansible, and k3s (the Lightweight Kubernetes). The project we will be deploying is a Ghost blog, similar to the one you're reading this tutorial on. My goal in this tutorial is to guide you through the process of setting up a web service using the mentioned tech stack. I will only dive into some of the details, but in general will cover only necessary things to keep the tutorial short and focused on practicalities. You won't see many theory on how Kubernetes or Ansible work. Having a little experience with such tools and services as CLI terminal, SSH keys, Git, Docker, Python dependencies manager (pip), AWS, and GitLab would improve your chances of faster results, but I will leave notes for you to be able to do your own research on your way to the final setup. Besides, I prepared a Git repository with all the necessary code snippets you will need for the tutorial. Here's the plan for this tutorial: Let's jump in and get our hands on the tech without further ado! The tutorial is created on MacOS; thus, it will be possible to repeat all the steps without a difference on Linux, but I wonder how easy it will be to complete on Windows. All the tools are available on Windows, but the way to set them up might differ, so keep that in mind. I will use several tools and services during the tutorial, so it's better to start preparing them in advance just not to block further steps. We will use the following services, so make sure you have accounts on all of these: Got them? Well done! We're almost ready to start; let's set up the necessary tools on your machine. That's it! Now we're ready to move forward and experiment with the cloud! Let's start from the point where every software project should begin — solution architecture. Every solution architecture starts from requirements. Let's keep our requirements simple for a smooth start. So, our requirements, for now, are a single-node server on Hetzner Cloud, running a k3s server and services, such as Ghost blog, a MySQL database for the blog, and a persistent volume from Hetzner to make sure our data is stored consistently and won't be gone if a Ghost pod or MySQL pod is replaced. We also want to allow only specific ports: 80/443 for HTTP(S), 6443 for K8s Server API, and 22 for SSH. Here is a diagram of what such solution could look like: Let's briefly go through the main component of the solution. The big red box represents Hetzner Cloud, and the orange blocks represent particular Hetzner Services (Firewall, Server, Volume). The Server is the most exciting part for us because it contains the main high-level logical aspects of the system — a webserver (nginx), Ghost blog, and the database for it. We will primarily focus on the green components in our configuration but also touch the K8s API server just a little bit. We will set up an automated Let's Encrypt certificate issuer to provide an SSL certificate for our service. We will also need a K8s Ingress Service to route all the incoming requests and make sure the HTTP(S) requests are proxied correctly to the right services — Certificate Issuer and the Ghost App. You can think about Ingress as a routing service with a compelling set of configuration tools, some of which we will save for the future. It will only help us expose the mentioned services and apps for now. We will start with setting up the project locally and setting up all the necessary connections to the services I listed above. To simplify the process, I've prepared a template repository on Github and Gitlab , containing all the required files we will work with during this tutorial. Fork it to a private repository and continue with your copy to keep all the changes you make versioned. Check out the repository locally and open it in your favorite code editor. Note that the repository files contain places marked with comments that you have to change to your own settings otherwise it won't work at all.

0 views
Humble Thoughts 2 years ago

Hello World

Hello, stranger! My name is Denis Demchenko. I'm a software engineer with profound experience in product development, currently working as the Chief Technology Officer at Videoly . I'd been planning to create a blog for sharing my humble thoughts and knowledge with the community for sometime now, but never found enough time or inspiration to start writing. Now I decided to give it a shot, and try to take up writing. I'm going to focus mainly on technical topics about software development, management in IT, probably some financial topics, and a maybe something else I would find possibly useful for others. If you are interested in certain questions that I might have knowledge in and haven't yet covered it in the blog, please, reach out — I appreciate any feedback! I also plan to work on well-crafted tutorials on web development topics. Consider subscribing if you are interested in learning, and don't hesitate to reach out on Twitter in case you have any questions. Things will be up and running here shortly!

0 views