Self-Serve Everything.

Is the new “Automate everything”.

Shaked Braimok Yosef
3 min readMar 17, 2024

By reading this article, you’ll learn how easy it is to implement a Self-Service action. All you need to do is understand the flow and execute ‘terraform apply’.

Introduction

In the era of Platform Engineering, where the goal is to provide autonomy to developers and remove bottlenecks from service teams, there is a significant need for day-to-day self-service actions. These actions often require on-call availability in service teams (for example: DevOps & SRE), who face a large queue of tickets from disappointed developers eagerly awaiting assistance to progress with their tasks.

There are two main methods I employ to provide self-service: the first is through SCM (integrations with development tools using the GitOps method), enabling developers to execute operations based on their actions in GitHub. The second method is through the developer portal, which includes the Service Scaffolder as well as customized actions that anyone in the organization can create to optimize the work of R&D engineers.

This is why I created these efficient modules in Terraform. By utilizing modules, you can establish a comprehensive infrastructure capable of receiving events from the portal and executing any desired operation, whether within your VPC, databases, or elsewhere.

The flow

The flow is very basic: the developer wants to perform an operation without waiting for a DevOps engineer → She opens the Self-Service page in the Developer Portal → chooses the relevant operation → and that’s it — the operation is running.

Behind the scenes

  1. The execution event (triggered by the developer’s form submission) is sent to Port Kafka topics.
  2. Our Lambda Agent is triggered by the Kafka topic, retrieves the event, and executes the relevant CodeBuild project.
  3. The Runner (a CodeBuild project run as a “backend” for a specific form in the Self-Service Hub) is initiated. Upon completion, it updates the run status in the Portal.

Getting Started 🚀

  1. Clone the demo project: https://github.com/Senora-dev/port-self-service-backend
  2. Set up your correct details and credentials as provided by Port:

In the Runner module, set the details of the Action you created in Port UI.

3. Run ‘terraform init’ and ‘terraform apply’.

That’s all! Now you can add Runners as needed to enrich your Self-Service culture. Enjoy! 🥳

--

--

Shaked Braimok Yosef

Developer Platforms Builder · DevOps Consultant · Tech Content Creator