Internal Developer Platform
IDP, Internal Developer Platform
An internal platform that lets developers set up environments, deploy, and monitor in a self-service way without infrastructure complexity, and a core deliverable of Platform Engineering.
IDP, Internal Developer Platform
An internal platform that lets developers set up environments, deploy, and monitor in a self-service way without infrastructure complexity, and a core deliverable of Platform Engineering.
An Internal Developer Platform (IDP) is an internal platform that provides self-service capabilities so that developers in an organization can build, deploy, and operate applications without infrastructure expertise. Gartner forecasts that 80% of software engineering organizations will have established platform teams by 2026, and the IDP is the core deliverable of this Platform Engineering.
The core value of an IDP is improving Developer Experience (DX). Developers do not need to understand infrastructure details such as Kubernetes, Terraform, and networking; through an abstracted interface they perform tasks like "create a Python service," "provision a database," and "deploy to the staging environment." This reduces cognitive load and lets developers focus on business logic.
The main components of an IDP include a service catalog (a list of all services, APIs, and infrastructure resources in the organization), a self-service portal (automated workflows for creating environments, deploying, rolling back, etc.), golden paths (proven tech stacks and templates), and observability integration (dashboards for logging, metrics, and tracing). Spotify's Backstage is a representative open-source IDP framework.
A common mistake when building an IDP is trying to create a perfect platform from the start. A successful IDP starts as an MVP and expands gradually based on developer feedback. Close collaboration between the platform team and development teams is also essential, and a Product Thinking approach that manages "the platform as a product" is important.
# Backstage Software Template - μ λ§μ΄ν¬λ‘μλΉμ€ μμ±
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: python-fastapi-service
title: Python FastAPI λ§μ΄ν¬λ‘μλΉμ€
description: FastAPI κΈ°λ° λ§μ΄ν¬λ‘μλΉμ€λ₯Ό μμ±νκ³ Kubernetesμ λ°°ν¬ν©λλ€
tags:
- python
- fastapi
- kubernetes
spec:
owner: platform-team
type: service
# κ°λ°μ μ
λ ₯ νλΌλ―Έν°
parameters:
- title: μλΉμ€ μ 보
required:
- serviceName
- team
properties:
serviceName:
title: μλΉμ€ μ΄λ¦
type: string
description: μλ¬Έ μλ¬Έμ, νμ΄νλ§ μ¬μ©
pattern: '^[a-z][a-z0-9-]*$'
team:
title: λ΄λΉ ν
type: string
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
description:
title: μλΉμ€ μ€λͺ
type: string
- title: μΈνλΌ μ΅μ
properties:
database:
title: λ°μ΄ν°λ² μ΄μ€
type: string
enum:
- none
- postgresql
- mongodb
default: none
cache:
title: μΊμ
type: string
enum:
- none
- redis
default: none
environment:
title: μ΄κΈ° νκ²½
type: array
items:
type: string
enum:
- development
- staging
- production
default:
- development
# μλν λ¨κ³
steps:
# 1. ν
νλ¦Ώμμ μ½λ μμ±
- id: fetch-template
name: νλ‘μ νΈ ν
νλ¦Ώ κ°μ Έμ€κΈ°
action: fetch:template
input:
url: ./skeleton
values:
serviceName: ${{ parameters.serviceName }}
team: ${{ parameters.team }}
description: ${{ parameters.description }}
database: ${{ parameters.database }}
# 2. GitHub μ μ₯μ μμ±
- id: create-repo
name: GitHub μ μ₯μ μμ±
action: publish:github
input:
repoUrl: github.com?owner=my-org&repo=${{ parameters.serviceName }}
description: ${{ parameters.description }}
defaultBranch: main
protectDefaultBranch: true
# 3. Kubernetes 리μμ€ μμ±
- id: create-k8s-resources
name: Kubernetes λ€μμ€νμ΄μ€ λ° λ¦¬μμ€ μμ±
action: kubernetes:apply
input:
manifest:
apiVersion: v1
kind: Namespace
metadata:
name: ${{ parameters.serviceName }}
labels:
team: ${{ parameters.team }}
# 4. ArgoCD μ ν리μΌμ΄μ
λ±λ‘
- id: register-argocd
name: ArgoCD μ± λ±λ‘
action: argocd:create-app
input:
appName: ${{ parameters.serviceName }}
repoUrl: ${{ steps['create-repo'].output.remoteUrl }}
path: k8s/
targetNamespace: ${{ parameters.serviceName }}
# 5. λ°μ΄ν°λ² μ΄μ€ νλ‘λΉμ λ (μ νν κ²½μ°)
- id: provision-database
name: λ°μ΄ν°λ² μ΄μ€ νλ‘λΉμ λ
if: ${{ parameters.database != 'none' }}
action: crossplane:create
input:
apiVersion: database.example.com/v1alpha1
kind: ${{ parameters.database == 'postgresql' && 'PostgreSQLInstance' || 'MongoDBInstance' }}
metadata:
name: ${{ parameters.serviceName }}-db
spec:
size: small
version: latest
# 6. Backstage μΉ΄νλ‘κ·Έμ λ±λ‘
- id: register-catalog
name: μλΉμ€ μΉ΄νλ‘κ·Έ λ±λ‘
action: catalog:register
input:
repoContentsUrl: ${{ steps['create-repo'].output.repoContentsUrl }}
catalogInfoPath: /catalog-info.yaml
# μλ£ ν μΆλ ₯
output:
links:
- title: GitHub μ μ₯μ
url: ${{ steps['create-repo'].output.remoteUrl }}
- title: ArgoCD λμ보λ
url: https://argocd.example.com/applications/${{ parameters.serviceName }}
- title: μλΉμ€ μΉ΄νλ‘κ·Έ
url: ${{ steps['register-catalog'].output.entityRef }}
"""
IDP(Internal Developer Platform) μ
νμλΉμ€ API ν΄λΌμ΄μΈνΈ
κ°λ°μκ° νλ‘κ·Έλλ§€ν±νκ² λ¦¬μμ€λ₯Ό μμ±/κ΄λ¦¬ν μ μλ μΈν°νμ΄μ€
"""
import httpx
from dataclasses import dataclass
from typing import Optional, List
from enum import Enum
class DatabaseType(Enum):
POSTGRESQL = "postgresql"
MONGODB = "mongodb"
REDIS = "redis"
class EnvironmentType(Enum):
DEVELOPMENT = "development"
STAGING = "staging"
PRODUCTION = "production"
@dataclass
class ServiceConfig:
name: str
team: str
description: str
language: str = "python"
database: Optional[DatabaseType] = None
cache: bool = False
environments: List[EnvironmentType] = None
def __post_init__(self):
if self.environments is None:
self.environments = [EnvironmentType.DEVELOPMENT]
class IDPClient:
"""IDP μ
νμλΉμ€ API ν΄λΌμ΄μΈνΈ"""
def __init__(self, base_url: str, api_token: str):
self.base_url = base_url
self.client = httpx.Client(
base_url=base_url,
headers={"Authorization": f"Bearer {api_token}"},
timeout=30.0
)
def create_service(self, config: ServiceConfig) -> dict:
"""μ λ§μ΄ν¬λ‘μλΉμ€ μμ± (μ μ₯μ, K8s 리μμ€, CI/CD ν¬ν¨)"""
payload = {
"templateName": f"{config.language}-service-template",
"parameters": {
"serviceName": config.name,
"team": config.team,
"description": config.description,
"database": config.database.value if config.database else "none",
"cache": "redis" if config.cache else "none",
"environments": [env.value for env in config.environments]
}
}
response = self.client.post("/api/scaffolder/v1/tasks", json=payload)
response.raise_for_status()
task = response.json()
print(f"μλΉμ€ μμ± μμ
μμ: {task['id']}")
return task
def get_task_status(self, task_id: str) -> dict:
"""μλΉμ€ μμ± μμ
μν μ‘°ν"""
response = self.client.get(f"/api/scaffolder/v1/tasks/{task_id}")
response.raise_for_status()
return response.json()
def list_services(self, team: Optional[str] = None) -> List[dict]:
"""μλΉμ€ μΉ΄νλ‘κ·Έ μ‘°ν"""
params = {"filter": "kind=Component"}
if team:
params["filter"] += f",metadata.annotations.team={team}"
response = self.client.get("/api/catalog/entities", params=params)
response.raise_for_status()
return response.json()
def deploy_service(
self,
service_name: str,
environment: EnvironmentType,
version: str
) -> dict:
"""μλΉμ€λ₯Ό νΉμ νκ²½μ λ°°ν¬"""
payload = {
"serviceName": service_name,
"environment": environment.value,
"version": version,
"strategy": "rolling" # or "blue-green", "canary"
}
response = self.client.post("/api/deployments", json=payload)
response.raise_for_status()
return response.json()
def get_service_metrics(self, service_name: str) -> dict:
"""μλΉμ€ λ©νΈλ¦ μ‘°ν (κ΄μ°°μ± ν΅ν©)"""
response = self.client.get(
f"/api/observability/services/{service_name}/metrics"
)
response.raise_for_status()
return response.json()
def provision_database(
self,
service_name: str,
db_type: DatabaseType,
size: str = "small"
) -> dict:
"""λ°μ΄ν°λ² μ΄μ€ μ
νμλΉμ€ νλ‘λΉμ λ"""
payload = {
"serviceName": service_name,
"databaseType": db_type.value,
"size": size, # small, medium, large
"backup": True,
"encryption": True
}
response = self.client.post("/api/databases", json=payload)
response.raise_for_status()
return response.json()
# μ¬μ© μμ
if __name__ == "__main__":
# IDP ν΄λΌμ΄μΈνΈ μ΄κΈ°ν
idp = IDPClient(
base_url="https://developer-portal.example.com",
api_token="your-api-token"
)
# μ μλΉμ€ μμ±
config = ServiceConfig(
name="order-service",
team="commerce-team",
description="μ£Όλ¬Έ μ²λ¦¬ λ§μ΄ν¬λ‘μλΉμ€",
language="python",
database=DatabaseType.POSTGRESQL,
cache=True,
environments=[
EnvironmentType.DEVELOPMENT,
EnvironmentType.STAGING
]
)
task = idp.create_service(config)
print(f"μλΉμ€ μμ± μ€... Task ID: {task['id']}")
# μμ
μν νμΈ
status = idp.get_task_status(task["id"])
print(f"μν: {status['status']}")
# νμ λͺ¨λ μλΉμ€ μ‘°ν
services = idp.list_services(team="commerce-team")
for svc in services:
print(f"- {svc['metadata']['name']}: {svc['spec']['lifecycle']}")
Take a mock interview on this topic β WIA SOOM AI Interview Β· Start for free