Skip to content

Instantly share code, notes, and snippets.

View anna-geller's full-sized avatar
🎯
Focusing

Anna Geller anna-geller

🎯
Focusing
View GitHub Profile
@anna-geller
anna-geller / terraform_ci_cd.tf
Created June 12, 2023 15:57
Deploy all flows that exist in the flows directory
terraform {
required_providers {
kestra = {
source = "kestra-io/kestra"
version = "~> 0.7.0"
}
}
}
provider "kestra" {
@anna-geller
anna-geller / test.yml
Created June 12, 2023 14:44
For Vicki
id: test
namespace: dev
tasks:
- id: deploy
type: io.kestra.core.tasks.flows.Worker
tasks:
- id: cloneRepository
type: io.kestra.plugin.git.Clone
url: https://github.com/veekaybee/viberary
branch: main
id: ci-cd
namespace: prod
variables:
host: "https://demo.kestra.io/" # self-hosted server: "http://your_host_name:8080/"
auth: "serviceAccountUser:password"
tasks:
- id: deploy
type: io.kestra.core.tasks.flows.Worker
tasks:
id: salesReport
namespace: dev
tasks:
- id: downloadCsv
type: io.kestra.plugin.fs.http.Download
uri: https://gist.githubusercontent.com/anna-geller/15f19626d975877b40c3653b6745dcd6/raw/849e8f69a251ece8bfb32dbd6097e69af6fa7f7f/orders.csv
- id: analyzeSales
type: io.kestra.plugin.jdbc.duckdb.Query
inputFiles:
@anna-geller
anna-geller / orders.csv
Created May 30, 2023 13:33
Example data for a demo
order_id customer_name customer_email product_id price quantity total
1 Kelly Olsen [email protected] 20 166.89 1 166.89
2 Miguel Moore [email protected] 14 171.63 8 1373.04
3 Jessica White [email protected] 12 50.62 10 506.2
4 Judith Wilcox [email protected] 17 109.68 9 987.12
5 Andrew Welch [email protected] 20 21.83 3 65.49
6 Michele Callahan [email protected] 1 83.39 6 500.34
7 Lawrence Morris [email protected] 16 156.62 9 1409.58
8 Kathleen Moran [email protected] 15 20.51 10 205.1
9 Crystal Vang [email protected] 10 117.14 10 1171.4
id: gitPython
namespace: prod
tasks:
- id: GitHub
type: io.kestra.core.tasks.flows.Worker
tasks:
- id: cloneRepository
type: io.kestra.plugin.git.Clone
description: password is only required for private repositories
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
kestra = {
source = "kestra-io/kestra" # namespace of Kestra provider
version = "~> 0.7.0" # don't worry about 0.7.0 being displayed here - the provider works across the latest version as well
import openai
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
openai.api_key = os.getenv("OPENAI_API_KEY")
OPENAI_API_KEY=sk-xxx
id: gitPythonPublicRepository
namespace: prod
tasks:
- id: py
type: io.kestra.core.tasks.flows.Worker
tasks:
- id: clone-repository
type: io.kestra.plugin.git.Clone
url: https://github.com/anna-geller/kestra-flows