This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/examples
Andrea Luzzardi 324a1c2992 examples: kubernetes-aws: fix cuefmt
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-01 16:49:58 -07:00
..
aws-monitoring implemented http-monitoring example using AWS Cloudformation and AWS Cloudwatch Synthetics 2021-03-03 17:34:00 -08:00
dagger-dev Rename dagger.#Dir to dagger.#Artifact 2021-03-13 00:11:59 -08:00
kubernetes fix linting errors 2021-03-24 09:36:19 -07:00
kubernetes-aws examples: kubernetes-aws: fix cuefmt 2021-04-01 16:49:58 -07:00
react Improve react example 2021-04-01 14:46:39 -07:00
README.md Docs: update and polish "Kubernetes on AWS" example 2021-04-01 22:37:14 +00:00

Dagger Examples

All example commands should be executed in the examples/ directory in an up-to-date checkout of the dagger repository.

Deploy a simple React application

This example shows how to deploy an example React Application. Read the deployment plan

Audience: Javascript developers looking to deploy their application.

Components:

  1. Change the current directory to the example deployment plan
cd ./react
  1. Create a new deployment from the plan
dagger new
  1. Configure the deployment with your Netlify access token. You can create new tokens from the Netlify dashboard.
dagger input text www.account.token MY_TOKEN

NOTE: there is a dedicated command for encrypted secret inputs, but it is not yet implemented. Coming soon!

  1. Deploy!
dagger up

Provision a Kubernetes cluster on AWS

This example shows how to provision a new Kubernetes cluster on AWS, and configure your kubectl client to use it. Read the deployment plan

Audience: infrastructure teams looking to provisioning kubernetes clusters as part of automated CICD pipelines.

Components:

  1. Change the current directory to the example deployment plan
cd ./kubernetes-aws
  1. Create a new deployment from the plan
dagger new
  1. Configure the deployment with your AWS credentials
dagger input text awsConfig.accessKey MY_AWS_ACCESS_KEY
dagger input text awsConfig.secretKey MY_AWS_SECRET_KEY
  1. Deploy!
dagger up
  1. Export the generated kubectl config
dagger query kubeconfig.kubeconfig | jq . > kubeconfig

aws-monitoring: HTTP Monitoring on AWS

This example implements a full HTTP(s) Monitoring solution on AWS using Cloudformation and Cloudwatch Synthetics.

How to run:

dagger compute ./aws-monitoring \
    --input-string awsConfig.accessKey="MY_AWS_ACCESS_KEY" \
    --input-string awsConfig.secretKey="MY_AWS_SECRET_KEY" \

kubernetes: Deploy to an existing Kubernetes cluster

This example shows two different ways for deploying to an existing Kubernetes (EKS) cluster: a simple deployment spec (written in Cue), and a local helm chart.

How to run:

dagger compute ./kubernetes \
    --input-string awsConfig.accessKey="MY_AWS_ACCESS_KEY" \
    --input-string awsConfig.secretKey="MY_AWS_SECRET_KEY" \
    --input-dir helmChart.chart=./kubernetes/testdata/mychart