Streamlining DevOps with workflows in an internal developer portal
August 14, 2024
Ready to start?
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:
- 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. - 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. - 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:
- 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. - 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. - 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. - 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. - 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.
Check out Port's pre-populated demo and see what it's all about.
No email required
Contact sales for a technical product walkthrough
Open a free Port account. No credit card required
Watch Port live coding videos - setting up an internal developer portal & platform
Check out Port's pre-populated demo and see what it's all about.
(no email required)
Contact sales for a technical product walkthrough
Open a free Port account. No credit card required
Watch Port live coding videos - setting up an internal developer portal & platform
Book a demo right now to check out Port's developer portal yourself
Apply to join the Beta for Port's new Backstage plugin
It's a Trap - Jenkins as Self service UI
Further reading:
Example JSON block
Order Domain
Cart System
Products System
Cart Resource
Cart API
Core Kafka Library
Core Payment Library
Cart Service JSON
Products Service JSON
Component Blueprint
Resource Blueprint
API Blueprint
Domain Blueprint
System Blueprint
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
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