Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
/ Torii Public archive

Torii ⛩️ is a simple, powerful and extensible open-source Internal Developer Portal

License

Notifications You must be signed in to change notification settings

Qovery/Torii

Repository files navigation

Torii ⛩️

Torii is a simple, powerful and extensible open-source Internal Developer Portal where developers can find all the tools and services they need to build, deploy, and manage their applications.

Torii focus on three principles:

  • Easily configurable: Platform Engineers can easily define a catalog of tools and services available to developers. They can also define a scorecard and a workflow for each tool and service.
  • Easily usable: Developers can easily find and use the tools and services they need to build, deploy, and manage their applications via a simple web interface.
  • Easily extensible: Platform Engineers can easily extend Torii by adding new tools and services to the catalog.

That's it!

⚠️ Torii is in active development and not ready for production yet. But contributions are appreciated.

Features

Feature Status
Self Service WIP
Catalog Services WIP
Auth Not implemented yet
Audit Not implemented yet

Getting Started

Prerequisites

  • MacOSX / Linux / Windows
  • Postgres

Installation

Today you can run Torii using Docker Compose. In the future, we will provide a Helm chart to deploy Torii on Kubernetes.

docker-compose up

If you want to run it locally you will need to start Postgres DB, the backend and the frontend separately.

# Start Postgres
docker-compose -f docker-compose-dev.yaml up
# Start the backend
cd backend
# you need to install Cargo (Rust) if you don't have it
cargo run -- --config examples/config.yaml

When starting the backend - you should see the following output:

████████╗ ██████╗ ██████╗ ██╗██╗
╚══██╔══╝██╔═══██╗██╔══██╗██║██║
   ██║   ██║   ██║██████╔╝██║██║
   ██║   ██║   ██║██╔══██╗██║██║
   ██║   ╚██████╔╝██║  ██║██║██║
   ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚═╝╚═╝

2024-04-14T17:38:07.667049Z  INFO backend: connecting to database...
2024-04-14T17:38:07.756951Z  INFO backend: database initialized and up to date
2024-04-14T17:38:07.757015Z  INFO backend: -> self-service section 'empty-section' loaded
2024-04-14T17:38:07.757021Z  INFO backend: -> self-service section 'default' loaded
2024-04-14T17:38:07.757026Z  INFO backend:      |-> action 'new-testing-environment' loaded
2024-04-14T17:38:07.757033Z  INFO backend:      |-> action 'stop-testing-environment' loaded
2024-04-14T17:38:07.758885Z  INFO backend: Server listening on 0.0.0.0:9999
# Start the frontend
cd frontend
npm install
npm run dev

You can now access:

  • the frontend at http://localhost:3000
  • the backend at http://localhost:9999

Configuration

Simple Configuration

Torii is configured with a YAML file that contains the self-service sections. A self-service section is a group of actions that developers can use to interact with tools and services.

Here is an example of a simple configuration that will create a self-service section with a single action to create a new testing environment:

self_service:
  sections:
    - slug: default
      name: Default
      description: Default section
      actions:
        - slug: new-testing-environment
          name: New Testing Environment
          description: spin up a temporary testing environment
          icon: target
          fields:
            - slug: name
              title: Name
              description: provide a name for your environment
              placeholder: testing-123
              type: text
              default: testing-123
              required: true
            - slug: description
              title: Description
              description: provide a description for your environment - what's good for?
              type: textarea
            - slug: ttl
              title: TTL
              description: Time to live for your environment (in hours)
              placeholder: 24
              type: number
              required: true
            - slug: seed
              title: Seed
              description: Do you want to seed your environment with some data?
              type: boolean
              default: true
          post_validate:
            - command:
                - python
                - my-scripts/environment_management.py
                - create
                - --name
                - {{name}} # this is a variable that will be replaced by the value of the field 'name'
          delayed_command:
            - command:
                - python
                - my-scripts/environment_management.py
                - delete
                - --name
                - {{name}}
              delay:
                hours: {{ttl}} # this is a variable that will be replaced by the value of the field 'ttl'

In this example, we define a self-service section with a single action called new-testing-environment. This action has four fields:

  • name: a text field that is required
  • description: a textarea field
  • ttl: a number field that is required
  • seed: a boolean field with a default value of true

When the developer fills the form and submits it, Torii will run the post_validate script. If the script exits with a non-zero exit code, the action will fail. If the script exits with a zero exit code, Torii will run the delayed_command script after the specified delay.

Design

Please refer to the DESIGN.md file for more information.

Contributing

Torii is still in early development. If you want to contribute, please open an issue or a pull request. We will improve the contribution guidelines as soon as possible.

Motivation

Today you have the choice between three options to build your Internal Developer Portal:

  1. Use Backstage from Spotify. It's a great solution, but it's hard to extend and customize. You need to be a TypeScript/React expert to extend it.
  2. Use a proprietary SaaS solution like Port, Cortex, OpsLevel, etc. It's a great solution, but it's expensive and you don't have control over the codebase.
  3. Build your own solution from scratch. It's a great solution, but it's hard to maintain and scale. You need to be a full-stack developer to build it.

Torii is a simple, powerful, and extensible open-source Internal Developer Portal that aims to be the best of all worlds. It's easy to extend and customize, it's free, and you have control over the codebase.


Curious to understand in more detail the motivation behind Torii? Read these articles:

Curious to understand Torii is built? Read these articles:

FAQ

What's the difference between Torii and Qovery?

The Qovery and Torii projects are two different projects with different goals:

  • Qovery is an Internal Developer Platform focusing on the Software Development Lifecycle (build, deploy, run).
  • Torii is an Internal Developer Portal focusing on unifying the experience of all engineering tools.

Here is a features table to help you understand the difference:

Feature Qovery (Internal Developer Platform) Torii (Internal Developer Portal)
Build
Deploy
Run
Ephemeral Environment
Self-Service
Catalogs Service
Scorecard Service
Workflow Service Partial with the concept of Pipeline

Why Torii?

Torii is a Japanese gate most commonly found at the entrance of or within a Shinto shrine, where it symbolically marks the transition from the mundane to the sacred.