πŸ”§ DevOps

Platform Engineering

The field of building internal platforms for developer productivity

Detailed Explanation

Platform Engineering is the field of building and operating an Internal Developer Platform (IDP) that enables development teams to provision infrastructure and deploy applications on a self-service basis. Gartner predicts that by 2026, 80% of large enterprises will operate platform teams.

The core goal is "improving Developer Experience (DX)." Instead of dealing directly with the complex configuration of Kubernetes, Terraform, and CI/CD tools, developers can perform tasks such as "creating a new service," "provisioning a database," and "cloning an environment" in a few clicks through an abstracted interface.

Representative tools include Backstage (Spotify open source), Port, Humanitec, and Kratix. They provide a service catalog, a self-service portal, integrated developer documentation, and Golden Path templates.

In practice, a ratio of "1 platform engineer per 10 developers" is recommended, and the platform team treats development teams like customers and continuously improves the platform based on their feedback. A well-built platform reduces new developer onboarding time from 2 weeks to 2 days.

Code Example

# Backstage μ†Œν”„νŠΈμ›¨μ–΄ ν…œν”Œλ¦Ώ (catalog-info.yaml)
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: create-node-service
  title: Node.js λ§ˆμ΄ν¬λ‘œμ„œλΉ„μŠ€ 생성
  description: ν‘œμ€€ν™”λœ Node.js μ„œλΉ„μŠ€λ₯Ό μžλ™μœΌλ‘œ μƒμ„±ν•©λ‹ˆλ‹€
  tags:
    - nodejs
    - microservice
    - recommended
spec:
  owner: platform-team
  type: service

  parameters:
    - title: μ„œλΉ„μŠ€ 정보
      required:
        - serviceName
        - team
      properties:
        serviceName:
          title: μ„œλΉ„μŠ€ 이름
          type: string
          description: μ†Œλ¬Έμž, ν•˜μ΄ν”ˆλ§Œ ν—ˆμš© (예: user-api)
          pattern: '^[a-z][a-z0-9-]*$'
        team:
          title: λ‹΄λ‹Ή νŒ€
          type: string
          enum: ['backend', 'frontend', 'data', 'platform']
        description:
          title: μ„œλΉ„μŠ€ μ„€λͺ…
          type: string

    - title: 인프라 μ„€μ •
      properties:
        database:
          title: λ°μ΄ν„°λ² μ΄μŠ€
          type: string
          enum: ['none', 'postgresql', 'mongodb', 'redis']
          default: 'none'
        cpu:
          title: CPU μš”μ²­λŸ‰
          type: string
          enum: ['100m', '250m', '500m', '1000m']
          default: '250m'
        memory:
          title: λ©”λͺ¨λ¦¬ μš”μ²­λŸ‰
          type: string
          enum: ['128Mi', '256Mi', '512Mi', '1Gi']
          default: '256Mi'

  steps:
    # 1. GitHub μ €μž₯μ†Œ 생성
    - id: fetch-template
      name: ν…œν”Œλ¦Ώ κ°€μ Έμ˜€κΈ°
      action: fetch:template
      input:
        url: ./skeleton
        values:
          serviceName: ${{ parameters.serviceName }}
          team: ${{ parameters.team }}
          database: ${{ parameters.database }}

    - id: publish-github
      name: GitHub μ €μž₯μ†Œ 생성
      action: publish:github
      input:
        repoUrl: github.com?owner=my-org&repo=${{ parameters.serviceName }}
        defaultBranch: main
        protectDefaultBranch: true

    # 2. Kubernetes λ¦¬μ†ŒμŠ€ 생성
    - id: create-kubernetes
      name: Kubernetes λ„€μž„μŠ€νŽ˜μ΄μŠ€ 및 λ¦¬μ†ŒμŠ€ 생성
      action: kubernetes:apply
      input:
        manifest: |
          apiVersion: v1
          kind: Namespace
          metadata:
            name: ${{ parameters.serviceName }}
            labels:
              team: ${{ parameters.team }}
          ---
          apiVersion: apps/v1
          kind: Deployment
          metadata:
            name: ${{ parameters.serviceName }}
            namespace: ${{ parameters.serviceName }}
          spec:
            replicas: 2
            selector:
              matchLabels:
                app: ${{ parameters.serviceName }}
            template:
              spec:
                containers:
                  - name: app
                    resources:
                      requests:
                        cpu: ${{ parameters.cpu }}
                        memory: ${{ parameters.memory }}

    # 3. λ°μ΄ν„°λ² μ΄μŠ€ ν”„λ‘œλΉ„μ €λ‹ (μ„ νƒμ‹œ)
    - id: provision-database
      name: λ°μ΄ν„°λ² μ΄μŠ€ ν”„λ‘œλΉ„μ €λ‹
      if: ${{ parameters.database != 'none' }}
      action: crossplane:create
      input:
        apiVersion: database.example.com/v1
        kind: ${{ parameters.database | capitalize }}Instance
        metadata:
          name: ${{ parameters.serviceName }}-db

    # 4. Backstage μΉ΄νƒˆλ‘œκ·Έ 등둝
    - id: register-catalog
      name: μ„œλΉ„μŠ€ μΉ΄νƒˆλ‘œκ·Έ 등둝
      action: catalog:register
      input:
        repoContentsUrl: ${{ steps['publish-github'].output.repoContentsUrl }}
        catalogInfoPath: /catalog-info.yaml

  output:
    links:
      - title: μ €μž₯μ†Œ
        url: ${{ steps['publish-github'].output.remoteUrl }}
      - title: μ„œλΉ„μŠ€ μΉ΄νƒˆλ‘œκ·Έ
        icon: catalog
        entityRef: ${{ steps['register-catalog'].output.entityRef }}

How It's Said in Practice

Senior: "Every time we create a new service, we have to open a ticket with the DevOps team and wait 3 days, and that's a bottleneck. Shall we form a platform team and build a self-service portal?"

Junior: "Sounds good. If we build templates with Backstage, developers can create services themselves and even provision DBs. I estimate about 2 months for the initial build."

Interviewer: "What do you think is the difference between Platform Engineering and DevOps?"

Candidate: "DevOps is a culture of collaboration between development and operations, and Platform Engineering is the role of building the tools and platforms that put that culture into practice. It views developers as customers and puts DX first."

Take a mock interview on this topic β†’ WIA SOOM AI Interview Β· Start for free

Reviewer: "This template has too many options that deviate from the Golden Path. I think it would be better to reduce the choices and provide sensible defaults."

Developer: "Right. I'll remove the CPU/memory options and abstract them into service sizes (small/medium/large)."

Cautions

Learn More