<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Krzysztof Lach</title>
    <description>The latest articles on DEV Community by Krzysztof Lach (@ziqq).</description>
    <link>https://dev.to/ziqq</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F893729%2F4198a0f5-d9d9-432d-bc41-a5367a709f1d.jpg</url>
      <title>DEV Community: Krzysztof Lach</title>
      <link>https://dev.to/ziqq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ziqq"/>
    <language>en</language>
    <item>
      <title>What is platform engineering and why it matters?</title>
      <dc:creator>Krzysztof Lach</dc:creator>
      <pubDate>Fri, 01 Sep 2023 11:13:23 +0000</pubDate>
      <link>https://dev.to/ziqq/what-is-platform-engineering-and-why-it-matters-54lh</link>
      <guid>https://dev.to/ziqq/what-is-platform-engineering-and-why-it-matters-54lh</guid>
      <description>&lt;p&gt;Introducing cloud computing and a wide range of different services (PaaS, SaaS, IaaS) to the public was a significant technological advancement that enabled many small and large companies to evolve their application portfolios. Simultaneously, system and infrastructure complexity began to grow significantly, causing engineers who transitioned from the old-school development process to cloud-native applications to grapple with the overwhelming array of tools needed to deliver applications across various environments, especially in production.&lt;/p&gt;

&lt;p&gt;The establishment of the concept of cloud computing marked the end of the "golden" era of single-script or MSI installations and, as a natural evolutionary step, introduced the new DevOps concept. DevOps quickly gained traction and established a new engineering standard among engineering teams.&lt;/p&gt;

&lt;p&gt;The practice of shifting responsibility between Ops and Dev teams came to an end. People started working together to conceive, build, and deliver secure software at a rapid pace. DevOps practices enabled software development and operations teams to accelerate delivery through automation, collaboration, a fast iterative improvement and feedback loop.&lt;/p&gt;

&lt;p&gt;The "You build it, you run it" approach posed a significant challenge for many engineering teams. While the DevOps culture worked well for highly organized and well-structured companies like Google or Amazon, it didn't for most other teams and organizations. The main reason was that most companies couldn't invest the same level of resources in optimizing workflows or hiring talented experts.&lt;/p&gt;

&lt;p&gt;Instead, what happened was that many organizations introduced numerous anti-patterns that escalated rapidly. Senior engineers became responsible for managing infrastructure, environments, and deployment pipelines. This led to a phenomenon known as "shadow operating" among engineers, slowing down the implementation of new features or updates to existing ones, with more complex work being shifted to junior colleagues. This anti-pattern was widely introduced by inexperienced managers who couldn't fully grasp the DevOps concept. &lt;/p&gt;

&lt;p&gt;To further shorten time-to-market and improve performance, more mature companies along DevOps began to introduce the concept of Internal Development Platforms (IDPs) as the next complementary evolution step for DevOps. Teams consisting of Ops and Dev engineers started building an overlapping skillsets that could deliver the necessary tools and provide a friendly abstraction layer for running applications purely by development teams. Using IDPs and setting up teams to build IDPs significantly shortens the time to market and enables the true "You build it, you run it" concept. Thanks to IDPs, developers can take care of their app from end to end by quickly and efficiently provisioning infrastructure and implementing CI/CD pipelines without headaches.&lt;/p&gt;

&lt;p&gt;The IDP provides the right level of abstractions for building and deploying applications, sparing developers the need to worry about deploying different cloud services and performing complex configurations, as everything works for them "out of the box." Even less experienced junior engineers can provision fully configured and security-compliant Kubernetes clusters in a matter of minutes. This is just one of many examples of how IDP empowers development teams throughout the organization. As you can see, platform engineering is about building and integrating everything into a well-structured delivery process rather than letting everybody handle everything and forcing people to understand the entire complex toolchain. As Evan Bottcher (Thoughtworks) nicely put it, platforms are "a foundation of self-service APIs, tools, services, knowledge, and support, which are organized as a compelling internal product. Autonomous delivery teams can make use of the platform to deliver product features at a higher pace, with reduced coordination."&lt;/p&gt;

&lt;p&gt;Start building your DevOps culture and IDP as soon as possible, regardless of the size of your company! You will thank me later when the only person who knows how to "DevOps" leaves, and you won't be able to deploy your app for days or weeks.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>cloudnative</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Devops is not a job title! Devops is a mindset!</title>
      <dc:creator>Krzysztof Lach</dc:creator>
      <pubDate>Wed, 26 Jul 2023 11:24:13 +0000</pubDate>
      <link>https://dev.to/ziqq/devops-is-not-a-job-title-devops-is-a-mindset-51an</link>
      <guid>https://dev.to/ziqq/devops-is-not-a-job-title-devops-is-a-mindset-51an</guid>
      <description>&lt;p&gt;DevOps is not a job title, and here's why:&lt;/p&gt;

&lt;p&gt;First of all, to understand what DevOps is and what it's not, we have to take a step back and remind ourselves how the SDLC (Software Development Life Cycle) worked in the past.&lt;/p&gt;

&lt;p&gt;In short, there was a Development team that, after successfully implementing and running a project in local development environments, would "throw the code over the wall" to the operations team, consisting of IT admins and network engineers, responsible for delivering the product to the market with the help of other departments.&lt;/p&gt;

&lt;p&gt;The real challenge was that the developers weren't held accountable for what they delivered and the reliability and scalability of the solution. This led to infinite tension between the development and operations teams, often resulting in shipping delays and financial losses.&lt;/p&gt;

&lt;p&gt;Around 2009, this problem, along with the complexity of applications and infrastructure, was addressed with the creation of a DevOps culture. Developers were encouraged to closely cooperate with the operations team and take full responsibility for the delivered solution/software. This meant ensuring that the code was reliable, thoroughly tested, and that the solution was scalable. On the other hand, the operations team had to ensure a robust infrastructure and a smooth deployment/shipping process.&lt;/p&gt;

&lt;p&gt;As you can probably already tell, DevOps is not merely a job title or a specially created team. Thinking about DevOps as just a distinction between developers and some special DevOps role is detrimental, just as it was in the past.&lt;/p&gt;

&lt;p&gt;DevOps is a way of creating an organizational culture – a culture of cooperation and communication. It's about taking responsibility for what you build and cultivating the right mindset. Working together as one team towards a common goal will lead to great success.&lt;/p&gt;

&lt;p&gt;Moreover, DevOps influences the application lifecycle throughout its plan, develop, deliver, and operate phases. Each phase relies on the others, and the phases are not role-specific. In a true DevOps culture, each role is involved in each phase to some extent.&lt;/p&gt;

&lt;p&gt;*** Because of huge system complexity and wide range of tools needed to deliver software to the end users the separate DevOps and SRE roles started to be introduced alongisde DevOps concept and overall culture. &lt;/p&gt;

&lt;p&gt;*** I recommend the book "The Phoenix Project: A Novel about IT, DevOps, and Helping Your Business Win" by Gene Kim, Kevin Behr, and George Spafford. It provides great insights into how the DevOps culture and mindset work within an organization.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>azure</category>
      <category>aws</category>
    </item>
    <item>
      <title>Github Actions and Bicep is fantastic and here is why…</title>
      <dc:creator>Krzysztof Lach</dc:creator>
      <pubDate>Thu, 16 Mar 2023 12:55:22 +0000</pubDate>
      <link>https://dev.to/ziqq/github-actions-and-bicep-is-fantastic-and-here-is-why-780</link>
      <guid>https://dev.to/ziqq/github-actions-and-bicep-is-fantastic-and-here-is-why-780</guid>
      <description>&lt;p&gt;From last few years I was mainly working with Azure Pipelines and Ansible as infrastructure as code. From that time I was thinking that Azure Pipelines with Ansible is a very good duo. Especially that project that I worked on invested a tons of money and time to build a robust, innovative, easy to use automation tools. With few easy steps you could import predefined roles, define parameters and deploy Azure building blocks. All of that made me just fall in love with „the framework”. &lt;/p&gt;

&lt;p&gt;Whole automation that was build around it was amazing. Of course „the framework” has pros and cons but for me switching from CLI, ARM templates and json that many companies are still using was a game changer - even thought it took me a while to understand mechanisms hidden behind a nice developer friendly layer of abstraction. &lt;/p&gt;

&lt;p&gt;Few weeks ago I decided to use different tools that I can use when building infrastructure as code. I wanted to go outside my comfort zone and get better understanding what is going on with actual industry trends. After small reaserch I decided that I will go with Github Actions and Microsoft Bicep. &lt;/p&gt;

&lt;p&gt;I simply decided to use Github Actions because I’m keeping all my side projects on Github - probably like most of IT folks. I started going trough documentation and I was amazed how well it is structured and how easy I can find useful stuff. There is also a strong community behind Github Actions that is actively supporting idea behind moving Azure Pipelines to Github. There are many free tools for workflows and actions yaml syntax validation that are extremely useful.&lt;/p&gt;

&lt;p&gt;To make Github Actions complementary for Azure I used Bicep language. I liked the idea that Bicep is domain specific language for deploying Azure resources. To simply combine Actions with Bicep you need only one action role azure/arm-deploy. But why Bicep is so cool? Bicep files are often one third of the JSON ARM template, that most of the time is unreadable for humans. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ulyiov7w6b9yr2bx7er.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ulyiov7w6b9yr2bx7er.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would say that Bicep templates syntax is very similar to common programming languages like C# or TypeScript - so for me prototyping deployments was very easy to jump in.&lt;/p&gt;

&lt;p&gt;Ok but enough of cheap talking… so without further it ado let’s jump straight to the code. &lt;/p&gt;

&lt;p&gt;For sake of simplicity we will use &lt;a href="https://github.com/krzysztofla/Example.Python.Api.git" rel="noopener noreferrer"&gt;Python + FastAPI&lt;/a&gt; (To be honest because I'm learning Python lately ^^). Here is my project structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgeaiafrbjm27h6qlx5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgeaiafrbjm27h6qlx5f.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
The source of our pipeline is in main.yml file where pipeline has it's starting point. We sliced our workflow in three stages [build, deploy infrastructure, deploy]. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure step simply is deploying App Service infrastructure to our Azure Subscription.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;infrastructure_deploy:
    if: github.event.inputs.deploy_infrastructure == 'true' 
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: Example.Python.Api

    steps:
      - uses: actions/checkout@v3

      - name: Az Login
        uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      - name: Bicep deploy infrastructure
        id: infrastructure-deployment
        uses: azure/arm-deploy@v1
        with:
          scope: subscription
          subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
          region: westeurope
          template: ./.github/workflows/infrastructure/main.bicep
          parameters: project=python-example-api-aps location=westeurope appName=${{github.event.inputs.appName}}
          deploymentName: aps-python-bicep-demo

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Build step build and save our build output as artefact that in the final deployment step we will use to publish our app to cloud.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Az Login
        uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      - name: Set up Python 3.11
        uses: actions/setup-python@v3
        with:
          python-version: "3.11"

      - name: Create and start virtual environment
        run: |
          python -m venv venv
          source venv/bin/activate

      - name: Set up dependency caching for faster installs
        uses: actions/cache@v3
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install dependencies
        run: pip install -r requirements.txt

      - name: Upload artifact for deployment jobs
        uses: actions/upload-artifact@v3
        with:
          name: python-app
          path: |
            .
            !venv/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Azure deployment
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deploy:
    runs-on: ubuntu-latest
    needs: build

    environment:
      name: 'production'

    steps:
      - name: Az Login
        uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      - name: Download artifact from build job
        uses: actions/download-artifact@v3
        with:
          name: python-app
          path: .

      - name: Retrieve publish profile for deployment
        id: publishProfileRetrieval
        run: |
          publishProfiles=$(az webapp deployment list-publishing-profiles \
            --name app-api-${{github.event.inputs.appName}} \
            --resource-group "ziqq-test-rg2" \
            --subscription "${{ secrets.AZURE_SUBSCRIPTION }}" --xml)
          echo "::add-mask::$publishProfiles"
          echo "::set-output name=publishProfiles::$publishProfiles"

      - name: Print pwd
        run: pwd

      - name: 'Deploy to Azure Web App'
        id: deploy-to-webapp
        uses: azure/webapps-deploy@v2
        with:
          images: ''
          app-name: app-api-${{github.event.inputs.appName}}
          publish-profile: ${{ steps.publishProfileRetrieval.outputs.publishProfiles }}

      - name: logout
        run: |
          az logout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now lets take a look at the fantastic Bicep files structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjubwiy3qbzxji84nkxr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjubwiy3qbzxji84nkxr7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As entry point we have main.bicep file where like before all our infrastructure deployments steps are described.&lt;/li&gt;
&lt;li&gt;params.bicep file describes what type of parameters our pipeline can take and where to pass them.&lt;/li&gt;
&lt;li&gt;Folder modules contains all templates needed to run App Service infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;main.bicep&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;targetScope = 'subscription'

param location string
param project string
param appName string

resource rg 'Microsoft.Resources/resourceGroups@2022-09-01' = {
  name: 'ziqq-test-rg2'
  location: location
}

module resources 'params.bicep' = {
  name: 'deploy-${project}-resources'
  scope: rg

  params: {
    location: location
    project: project
    appName: appName
  }
}

output rgName string = rg.name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;params.bicep&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;param location string
param project string
param appName string

module appServicePlan 'modules/app-service-plan.bicep' = {
  name: 'deploy-plan'

  params: {
    location: location
    project: project
  }
}

module appService 'modules/app-service.bicep' = {
  name: 'deploy-app-service'

  params: {
    appName: appName
    location: location
    planId: appServicePlan.outputs.planId
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;app-service-plan.bicep&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;param location string
param project string

resource plan 'Microsoft.Web/serverfarms@2022-03-01' = {
  name: 'asp-${project}'
  location: location

  kind: 'app,linux'

  properties: {
    reserved: true
  }

  sku: {
    name: 'S1' 
  }
}

output planId string = plan.id 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;app-service.bicep&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;param location string

param appName string
param planId string

resource app 'Microsoft.Web/sites@2022-03-01' = {
  name: 'app-api-${appName}'
  location: location

  properties: {
    serverFarmId: planId
    reserved: true

    siteConfig: {
      linuxFxVersion: 'PYTHON|3.11'
    }
  }
}

output publishProfile string = ''

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Azure Bicep team did a great job developing modern and developer friendly way to deploy infrastructure to Azure. I found using Bicep and Github Actions very easy and satisfying. Debugging and maintaining JSON ARM Templates in early stages of infrastructure as code way of dealing with cloud was a nightmare for me so I appreciate even more frameworks/languages like this. I will definitely continue to work with both technologies in my personal projects.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
