OpsCanvas
  • Welcome to OpsCanvas Knowledge Portal
  • Designer
    • Introduction
    • Quickstart
      • Create an App Diagram
        • Tutorial
      • Deploy Application
        • Tutorial
      • Create Deploy Target
    • How To
      • Find environment info
      • Access your infrastructure
      • Helpful kubectl commands
      • Update a service
      • CloudWatch Logs
    • Application Glossary
  • Frequently Asked Questions
  • Open Source Software
Powered by GitBook
On this page
  • New diagram
  • Add private service
  • Draw connection
  • Configure private service
  • Add environment variables

Was this helpful?

  1. Designer
  2. Quickstart
  3. Create an App Diagram

Tutorial

This tutorial provides you with a hands-on example on how to draw and configure a simple "To-Do" application.

PreviousCreate an App DiagramNextDeploy Application

Last updated 11 months ago

Was this helpful?

App source code here: .

New diagram

  • Name: todo-app

  • Cloud: AWS

  • Managed services: 1x RDS Postgres

Add private service

Draw connection

Draw a line connecting the Todo-API to the Postgres database.

Configure private service

You can use the todo API available in our public ECR registry. To do so, fill out the service configuration form with the following variables:

  • Listen port: 8000

  • Is private: false (un-ticked)

  • Image reference: registry.dev.opscanvas.io/test/todo-api:1.0.0

  • Username: test

  • Password: TestOpsCanvas1

It will take a few seconds for the image to be copied over.

Add environment variables

  • DB_HOST (Text) -> rds_postgres:db_host (select from dropdown)

  • DB_NAME (Text) -> rds_postgres:db_name(select from dropdown)

  • DB_PORT(Number) -> rds_postgres:port(select from dropdown)

  • DB_USER (Text) -> rds_postgres:db_username(select from dropdown)

  • ROOT_PATH (Text) -> /todo-api

  • DB_PASSWORD (Secret) -> rds_postgres:db_password(select from dropdown)

When OpsCanvas launches your application it creates a Kubernetes cluster and installs your private services into that. It configures load balancers to route traffic to services based on their name.

The ROOT_PATH variable is used by FastAPI to route requests to the OpenAPI documentation for the service.

onto the canvas. Name it Todo-API.

The Todo API is a built with and , it is configured with 6 environment variables:

python app
FastAPI
asyncpg
https://gitlab.com/opscanvas-public/todo
Drag service
service added and renamed
drawing a connection between services
private service configuration