首页 > 其他分享 >kestra 试用体验

kestra 试用体验

时间:2023-08-14 21:23:59浏览次数:40  
标签:inputs postgres kestra 试用 io 体验 type user

kestra 官方是提供了基于docker-compose 运行的模版,以下主要是体验下,实际上kestra 提供的一些能力还是很强大的
尤其是强大的插件开发能力

环境准备

  • docker-compose 文件
 
volumes:
  postgres-data:
    driver: local
  kestra-data:
    driver: local
 
services:
  postgres:
    image: postgres
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: kestra
      POSTGRES_USER: kestra
      POSTGRES_PASSWORD: k3str4
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
      interval: 30s
      timeout: 10s
      retries: 10
 
  kestra:
    image: kestra/kestra:latest-full
    pull_policy: always
    entrypoint: /bin/bash
    # Note that this is meant for development only. Refer to the documentation for production deployments of Kestra which runs without a root user.
    user: "root"
    command:
      - -c
      - /app/kestra server standalone --worker-thread=128
    volumes:
      - kestra-data:/app/storage
      - /var/run/docker.sock:/var/run/docker.sock
      - /tmp/kestra-wd:/tmp/kestra-wd
    environment:
      KESTRA_CONFIGURATION: |
        datasources:
          postgres:
            url: jdbc:postgresql://postgres:5432/kestra
            driverClassName: org.postgresql.Driver
            username: kestra
            password: k3str4
        kestra:
          server:
            basic-auth:
              enabled: false
              username: admin
              password: kestra
          repository:
            type: postgres
          storage:
            type: local
            local:
              base-path: "/app/storage"
          queue:
            type: postgres
          tasks:
            tmp-dir:
              path: /tmp/kestra-wd/tmp
          url: http://localhost:8080/
    ports:
      - "8080:8080"
      - "8081:8081"
    depends_on:
      postgres:
        condition: service_started

运行&使用

  • 启动
docker-compose up -d
  • 访问

模式登陆完成,开启任务官方也有一个引导可以帮助我们快速使用kestra(会自动创建相关的组建任务)
效果如下

 



示例task 定义,可以看到就是一个yaml 文件,包含了输入,任务,以及触发

 
# Flow declaration with a mandatory unique identifier, a namespace, and an optional description.
# Flow identifier are unique inside a namespace.
id: welcomeKestra
namespace: io.kestra.tour
description: Welcome to Kestra!
 
# Flow inputs: each input has a name, a type, and an optional default value.
inputs:
  # We define one input of name 'user' with a default value 'Data Engineer'
- name: user
  type: STRING
  defaults: Kestra user
 
# List of tasks that will be executed one after the other.
# Each task must have an identifier unique for the flow and a type.
# Depending on the type of the task, you may have to pass additional attributes.
tasks:
  # This is one of the simplest task: it echos a message in the log, like the 'echo' command.
  # The message is passed thanks to the 'format' attribute.
  # We use the variable from the 'inputs' : {{ and }} are separator of a Pebble expression in which we can access variables.
- id: hello
  type: io.kestra.core.tasks.log.Log
  message: Hey there, {{ inputs.user }}!
 
  # This task runs a bash command.
  # Here we just 'echo' a message, using again the input variable.
- id: goodbye
  type: io.kestra.core.tasks.scripts.Bash
  commands:
  - echo See you soon, {{ inputs.user }}!
 
 # To trigger the Flow we use the 'triggers' property.
triggers:
  # Here we use the 'schedule' trigger to run the flow every minute.
    - id: everyMinute
      type: io.kestra.core.models.triggers.types.Schedule
      cron: "*/1 * * * *"
      inputs:
        name: Kestra master user

执行信息

 

说明

kestra 是基于java 开发的,开发框架基于了micronaut,支持丰富的插件开发,同时官方已经提供了不少插件(开发的插件对于包含以来的需要打包为shadow fat jar),对于数据开发是一个不错的选择,当然kestra 是包含企业版的,社区版缺少ha 以及访问控制的能力

参考资料

https://github.com/kestra-io/kestra
https://kestra.io/docs/architecture
https://kestra.io/
https://kestra.io/enterprise

标签:inputs,postgres,kestra,试用,io,体验,type,user
From: https://www.cnblogs.com/rongfengliang/p/17629781.html

相关文章

  • 亚信科技AntDB &U8 cloud联合产品亮相U8 cloud信创云ERP新品体验会(西安站)
    8月2日,U8cloud信创云ERP新品体验会(西安站)顺利举办,亚信科技AntDB数据库生态负责人发表《u8c+AntDB·信创好搭档·企业好选择》精彩演讲,正式向陕西省行业客户推介AntDB&U8cloud联合产品,并带来极具诚意的0元购爆点活动。图1:AntDB数据库生态负责人发表精彩演讲 AntDB数据库背景及......
  • 01-测试用例的基本知识
    测试用例 (TestCase)是指对一项特定的软件产品进行测试任务的描述,体现测试方案、方法、技术和策略。为了某个目标而编制的一组数据测试输入,执行步骤以及预期结果的集合,以便测试某个程序路径或某个满足特定需求的功能。测试用例的内容用例编号:唯一的号码;用例名称:要统一命名;......
  • JDK 17 营销初体验 —— 亚毫秒停顿 ZGC 落地实践 | 京东云技术团队
    前言自2014年发布以来,JDK8一直都是相当热门的JDK版本。其原因就是对底层数据结构、JVM性能以及开发体验做了重大升级,得到了开发人员的认可。但距离JDK8发布已经过去了9年,那么这9年的时间,JDK做了哪些升级?是否有新的重大特性值得我们尝试?能否解决一些我们现在苦恼的......
  • JDK 17 营销初体验 —— 亚毫秒停顿 ZGC 落地实践
    前言自2014年发布以来,JDK8一直都是相当热门的JDK版本。其原因就是对底层数据结构、JVM性能以及开发体验做了重大升级,得到了开发人员的认可。但距离JDK8发布已经过去了9年,那么这9年的时间,JDK做了哪些升级?是否有新的重大特性值得我们尝试?能否解决一些我们现在苦恼......
  • ABAP 开发者上云的时候到了 - 现在大家可以免费使用 SAP 云平台 ABAP 环境的试用版了
    之前Jerry已经写了一系列SAPCloudPlatformABAP编程环境的文章,当时使用的环境,是SAP专门为SAP社区导师们创建的。当时也有朋友留言,询问大家何时才能使用到免费的SAP云平台ABAP编程环境。SAP社区上也有世界各地的开发者问这个问题,负责这个话题的同事们的答复大意是:我们一直在努......
  • kestra apache airflow 可选方案
    今天我有简单说明过一个mage-ai的airflow替换方案,kestra是另外一个可选方案kestra使用了yaml进行piepline的配置,当然我们也可以直接在ui中操作,kestra包含了自己的插件系统适合的业务场景数据调度分布式调度事件驱动workflow说明kestra也提供了可以在线体验的地址,......
  • 【我和openGauss的故事】体验openGauss 5.0极简版一主一备部署,延时回放和主备切换功能
    三人禾openGauss2023-07-2917:58发表于四川收录于合集#第六届openGauss技术文章征集初审合格文章62个概要openGauss的安装在官方文档的描述中,以企业生产环境为标准进行安装部署较为详细。但在个人基本的功能测试需求下,这样的安装操作显得有些复杂。极简版安装的使用主体主要针......
  • 【我和openGauss的故事】openGauss初体验
    T[openGauss](javascript:void(0);)2023-07-2917:58发表于四川收录于合集#第六届openGauss技术文章征集初审合格文章62个一:openGauss环境准备1.安装openGauss个人如果要使用openGauss数据库可以在本地进行安装,由于我们使用的大多是windows系统,而openGauss的安装只支持在Linux......
  • 记录--Loading 用户体验 - 加载时避免闪烁
    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助在切换详情页中有这么一个场景,点击上一条,会显示上一条的详情页,同理,点击下一条,会显示下一条的详情页。伪代码如下所示:我们定义了一个 switcher 模版,用户点击上一条、下一条时调用 goToPreOrNext 方法。该页面......
  • 写测试用例、重构函数、生成SQL查询……原来CodeGeeX还能做这些!
    CodeGeeX中的智能问答功能“AskCodeGeeX”可以帮助程序员解答开发过程中遇到的问题。但是“AskCodeGeeX”的能力不止于此,用它还能帮助程序员高效编写测试用例,添加代码调试信息,实现SQL语句等等。如果你还不知道如何实现,下面我们一起来看几个例子,看看程序员拥有一个超级编程助手,......