Blog
/
/
Streamlining DevOps with workflows in an internal developer portal
Internal developer portal

Streamlining DevOps with workflows in an internal developer portal

Download PDF
Aug 14, 2024
Internal developer portal

In the world of DevOps, efficiency and automation are key. As developers and IT professionals, we constantly seek ways to streamline processes, reduce manual intervention, and ensure that our systems run smoothly with minimal downtime. 

In many cases, you want to be able to chain actions - where one action will only be triggered once its preceding action is completed. In most cases, this will also involve manual approvals as part of the workflow.

In this blog post, I’ll walk you through a real-world use case of how to build and use workflows in Port. I’ll also share additional use cases that demonstrate the versatility of using workflows in Port.

The scenario: managing Kubernetes (K8S) namespaces

Imagine you're a developer working on a project that involves multiple Kubernetes namespaces. As part of your routine tasks, you may need to delete a namespace that’s no longer required. But as simple as this sounds, there are several critical steps to ensure that this action doesn’t disrupt your environment or cause unintended consequences.

Here’s how using workflows in Port automates this process:

  1. Validation check
    The first step in our workflow is to verify whether the namespace can be safely deleted. This will be automatically triggered when our workflow process starts. This check is crucial, as it ensures that no critical resources or dependencies are tied to the namespace, preventing accidental disruptions.
  2. Notification to the DevOps team
    Once the system confirms that the namespace is safe for deletion, it triggers a notification to the DevOps team. This step ensures that the right people are informed and can review the request before any action is taken. Communication and approval are vital in any DevOps process, and Port’s Workflows make this seamless.
  3. Approval & execution
    Upon receiving approval from the DevOps team, the workflow moves to the final stage: triggering a pipeline that executes the deletion of the namespace. This stage is fully automated, ensuring that the task is completed swiftly and accurately, without requiring further manual intervention.

A portal view of workflow entities in different stages with different statuses 

How it works: the power of using blueprints

To implement this automated process, we’ll create a workflow blueprint (blueprints exist in the portal’s builder section and are used to define its data model). In this use case, the Workflow blueprint includes a status property that updates at each stage of the process. As the status changes, the workflow advances, potentially creating new entities, updating items in the catalog, or triggering additional automation tasks.

This blueprint-driven approach allows for a high degree of customization, enabling you to tailor the workflow to suit your specific needs and use cases. Whether you’re managing K8S namespaces, handling CI/CD pipelines, or automating routine maintenance tasks, workflows can help you achieve your goals with minimal effort.

Here are the blueprints:

Additional workflow use cases 

While the K8S namespace deletion example is a powerful demonstration of using workflows in Port, the possibilities don’t stop there. Here are a few more use cases where workflows can be used: 

  1. Onboarding new developers
    When a new developer joins your team, there’s a lot to set up—provisioning accounts, setting up permissions, and granting access to various tools and environments. You can use workflows to automate this entire process, ensuring that each step is completed in sequence, from creating user accounts in your identity management system to provisioning cloud resources, all while notifying relevant team members and managers along the way.
  2. Incident response automation
    When an incident occurs, time is of the essence. You can define workflows to automate your incident response process, from detecting an issue and notifying the on-call team to triggering specific remediation actions. For example, if a monitoring system detects a spike in CPU usage, a workflow could automatically notify the DevOps team, scale up resources, and open a ticket in your incident management system, ensuring a swift and coordinated response.
  3. Automated security audits
    Regular security audits are essential for maintaining compliance and safeguarding your infrastructure. Using workflows, you can automate the process of running security checks, compiling reports, and notifying the security team of any issues that need attention. For instance, a workflow could periodically scan your cloud infrastructure for misconfigurations, generate a report, and trigger a follow-up action to address any vulnerabilities found.
  4. Continuous Integration/Continuous Deployment (CI/CD) pipeline orchestration
    Use workflows to streamline your CI/CD pipelines by orchestrating the entire process from code commit to production deployment. You can set up workflows to trigger automated tests, initiate security scans, deploy to staging environments, and finally push to production, all with built-in approval gates and notifications to keep your team informed.
  5. Managing Infrastructure as Code (IaC)
    Managing your infrastructure as code is crucial for consistency and scalability. Using workflows you can automate the deployment and management of your IaC templates. For example, when a new version of an IaC template is committed to the repository, a workflow can automatically apply the changes, validate the infrastructure, and roll back if any issues are detected, ensuring that your infrastructure remains stable and consistent.

The benefits: automating multi step processes

These examples highlight the versatility of being able to build workflows in Port and the benefits are many: 

  • Reduce manual errors: Automated checks and approvals ensure that nothing falls through the cracks, minimizing the risk of human error.
  • Save time: Automation speeds up routine tasks, allowing your team to focus on more strategic initiatives.
  • Improve collaboration: Notifications and approvals ensure that everyone is on the same page, fostering better communication and teamwork.
  • Increase efficiency: streamline your operations, making them more efficient and scalable.

Conclusion: unlocking the full potential of automation

As we’ve seen, workflows in an internal developer portal offer a powerful solution for automating complex processes in your DevOps and IT environments. Whether you’re managing Kubernetes namespaces, orchestrating multi-stage pipelines, onboarding new developers, or handling any other critical task, workflows can help you achieve a seamless, efficient, and error-free operation.

If you’re ready to unlock the full potential of automation in your organization, I encourage you to explore Port and see how it can transform your practices. And if you have any questions or would like a personalized demo, don’t hesitate to reach out—I’m here to help!

You can watch the full demo here.

{{cta}}

Book a demo right now to check out Port's developer portal yourself

Book a demo
{{jenkins}}

It's a Trap - Jenkins as Self service UI

Read more
{{gitops}}

How do GitOps affect developer experience?

Read more
{{ebook}}

It's a Trap - Jenkins as Self service UI. Click her to download the eBook

Download eBook
{{cyberark}}

Learning from CyberArk - building an internal developer platform in-house

Read more
{{dropdown}}

Example JSON block

{
  "foo": "bar"
}

Order Domain

{
  "properties": {},
  "relations": {},
  "title": "Orders",
  "identifier": "Orders"
}

Cart System

{
  "properties": {},
  "relations": {
    "domain": "Orders"
  },
  "identifier": "Cart",
  "title": "Cart"
}

Products System

{
  "properties": {},
  "relations": {
    "domain": "Orders"
  },
  "identifier": "Products",
  "title": "Products"
}

Cart Resource

{
  "properties": {
    "type": "postgress"
  },
  "relations": {},
  "icon": "GPU",
  "title": "Cart SQL database",
  "identifier": "cart-sql-sb"
}

Cart API

{
 "identifier": "CartAPI",
 "title": "Cart API",
 "blueprint": "API",
 "properties": {
   "type": "Open API"
 },
 "relations": {
   "provider": "CartService"
 },
 "icon": "Link"
}

Core Kafka Library

{
  "properties": {
    "type": "library"
  },
  "relations": {
    "system": "Cart"
  },
  "title": "Core Kafka Library",
  "identifier": "CoreKafkaLibrary"
}

Core Payment Library

{
  "properties": {
    "type": "library"
  },
  "relations": {
    "system": "Cart"
  },
  "title": "Core Payment Library",
  "identifier": "CorePaymentLibrary"
}

Cart Service JSON

{
 "identifier": "CartService",
 "title": "Cart Service",
 "blueprint": "Component",
 "properties": {
   "type": "service"
 },
 "relations": {
   "system": "Cart",
   "resources": [
     "cart-sql-sb"
   ],
   "consumesApi": [],
   "components": [
     "CorePaymentLibrary",
     "CoreKafkaLibrary"
   ]
 },
 "icon": "Cloud"
}

Products Service JSON

{
  "identifier": "ProductsService",
  "title": "Products Service",
  "blueprint": "Component",
  "properties": {
    "type": "service"
  },
  "relations": {
    "system": "Products",
    "consumesApi": [
      "CartAPI"
    ],
    "components": []
  }
}

Component Blueprint

{
 "identifier": "Component",
 "title": "Component",
 "icon": "Cloud",
 "schema": {
   "properties": {
     "type": {
       "enum": [
         "service",
         "library"
       ],
       "icon": "Docs",
       "type": "string",
       "enumColors": {
         "service": "blue",
         "library": "green"
       }
     }
   },
   "required": []
 },
 "mirrorProperties": {},
 "formulaProperties": {},
 "calculationProperties": {},
 "relations": {
   "system": {
     "target": "System",
     "required": false,
     "many": false
   },
   "resources": {
     "target": "Resource",
     "required": false,
     "many": true
   },
   "consumesApi": {
     "target": "API",
     "required": false,
     "many": true
   },
   "components": {
     "target": "Component",
     "required": false,
     "many": true
   },
   "providesApi": {
     "target": "API",
     "required": false,
     "many": false
   }
 }
}

Resource Blueprint

{
 “identifier”: “Resource”,
 “title”: “Resource”,
 “icon”: “DevopsTool”,
 “schema”: {
   “properties”: {
     “type”: {
       “enum”: [
         “postgress”,
         “kafka-topic”,
         “rabbit-queue”,
         “s3-bucket”
       ],
       “icon”: “Docs”,
       “type”: “string”
     }
   },
   “required”: []
 },
 “mirrorProperties”: {},
 “formulaProperties”: {},
 “calculationProperties”: {},
 “relations”: {}
}

API Blueprint

{
 "identifier": "API",
 "title": "API",
 "icon": "Link",
 "schema": {
   "properties": {
     "type": {
       "type": "string",
       "enum": [
         "Open API",
         "grpc"
       ]
     }
   },
   "required": []
 },
 "mirrorProperties": {},
 "formulaProperties": {},
 "calculationProperties": {},
 "relations": {
   "provider": {
     "target": "Component",
     "required": true,
     "many": false
   }
 }
}

Domain Blueprint

{
 "identifier": "Domain",
 "title": "Domain",
 "icon": "Server",
 "schema": {
   "properties": {},
   "required": []
 },
 "mirrorProperties": {},
 "formulaProperties": {},
 "calculationProperties": {},
 "relations": {}
}

System Blueprint

{
 "identifier": "System",
 "title": "System",
 "icon": "DevopsTool",
 "schema": {
   "properties": {},
   "required": []
 },
 "mirrorProperties": {},
 "formulaProperties": {},
 "calculationProperties": {},
 "relations": {
   "domain": {
     "target": "Domain",
     "required": true,
     "many": false
   }
 }
}
{{tabel-1}}

Microservices SDLC

  • Scaffold a new microservice

  • Deploy (canary or blue-green)

  • Feature flagging

  • Revert

  • Lock deployments

  • Add Secret

  • Force merge pull request (skip tests on crises)

  • Add environment variable to service

  • Add IaC to the service

  • Upgrade package version

Development environments

  • Spin up a developer environment for 5 days

  • ETL mock data to environment

  • Invite developer to the environment

  • Extend TTL by 3 days

Cloud resources

  • Provision a cloud resource

  • Modify a cloud resource

  • Get permissions to access cloud resource

SRE actions

  • Update pod count

  • Update auto-scaling group

  • Execute incident response runbook automation

Data Engineering

  • Add / Remove / Update Column to table

  • Run Airflow DAG

  • Duplicate table

Backoffice

  • Change customer configuration

  • Update customer software version

  • Upgrade - Downgrade plan tier

  • Create - Delete customer

Machine learning actions

  • Train model

  • Pre-process dataset

  • Deploy

  • A/B testing traffic route

  • Revert

  • Spin up remote Jupyter notebook

{{tabel-2}}

Engineering tools

  • Observability

  • Tasks management

  • CI/CD

  • On-Call management

  • Troubleshooting tools

  • DevSecOps

  • Runbooks

Infrastructure

  • Cloud Resources

  • K8S

  • Containers & Serverless

  • IaC

  • Databases

  • Environments

  • Regions

Software and more

  • Microservices

  • Docker Images

  • Docs

  • APIs

  • 3rd parties

  • Runbooks

  • Cron jobs

Check out Port's pre-populated demo and see what it's all about.

Check live demo

No email required

Contact sales for a technical product walkthrough

Let’s start

Open a free Port account. No credit card required

Let’s start

Watch Port live coding videos - setting up an internal developer portal & platform

Let’s start

Check out Port's pre-populated demo and see what it's all about.

(no email required)

Let’s start

Contact sales for a technical product walkthrough

Let’s start

Open a free Port account. No credit card required

Let’s start

Watch Port live coding videos - setting up an internal developer portal & platform

Let’s start

Let us walk you through the platform and catalog the assets of your choice.

I’m ready, let’s start