Skip to main content

Deploy Your First Service

Step-by-step guide to deploying your first service with Odin

This guide walks you through deploying your first service with Odin, from installation to verification.

Prerequisites

  • Odin CLI installed (Installation Guide)
  • Access to an Odin backend
  • Cloud provider account configured

Step 1: Configure Odin

First, configure Odin with your backend:

odin configure \
  --backend-address api.odin.example.com:443 \
  --org-id 12345

This will:

  1. Prompt for authentication
  2. Store credentials in ~/.odin/config
  3. Set up the default profile

Step 2: Create an Environment

Create a development environment:

odin create env dev --accounts aws/dev-account

Verify the environment was created:

odin list env

Step 3: Create Service Definition

Create a file named service.json:

{
  "name": "hello-world",
  "version": "1.0.0-SNAPSHOT",
  "team": "platform",
  "components": [
    {
      "name": "web",
      "type": "webservice",
      "version": "1.0.0",
      "config": {
        "port": 8080,
        "replicas": 2
      }
    }
  ]
}

This defines a simple web service with 2 replicas.

Step 4: Create Provisioning Config

Create a file named provisioning.json:

[
  {
    "component_name": "web",
    "deployment_type": "kubernetes-deployment",
    "params": {
      "namespace": "dev",
      "cpu": "100m",
      "memory": "256Mi",
      "image": "nginx:latest"
    }
  }
]

Step 5: Deploy the Service

Deploy the service:

odin deploy service --env dev \
  --file service.json \
  --provisioning provisioning.json

Odin will:

  1. Validate both files
  2. Create deployment tasks
  3. Deploy components
  4. Monitor and report status

Step 6: Verify Deployment

Check the deployment status:

odin status env dev --service hello-world

Get detailed information:

odin describe env dev --service hello-world

Next Steps