Dagger
Search

dagrr

Manages Dagger Engines on a bunch of platforms

Installation

dagger install github.com/gerhard/daggerverse/dagrr@v0.2.0

Entrypoint

Return Type
Dagrr !
Arguments
NameTypeDefault ValueDescription
versionString -Dagger version to use (omit for latest): `--version=0.14.0`
appString -App name, defaults to version & unique name & date: `--app=dagger-v0-14-0-<GENERATED_NAME>-2024-11-19`
Example
dagger -m github.com/gerhard/daggerverse/dagrr@01a08d30976a55d5f9eb458f41c5123034f06a2b call \
func (m *myModule) example() *Dagrr  {
	return dag.
			Dagrr()
}
@function
def example() -> dag.Dagrr:
	return (
		dag.dagrr()
	)
@func()
example(): Dagrr {
	return dag
		.dagrr()
}

Types

Dagrr 🔗

onFlyio() 🔗

Manages Dagger on Fly.io: dager call on-flyio --token=env:FLY_API_TOKEN deploy

Return Type
Fly !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-`flyctl tokens create deploy` then `--token=env:FLY_API_TOKEN`
orgString "personal"Fly.io org name
Example
dagger -m github.com/gerhard/daggerverse/dagrr@01a08d30976a55d5f9eb458f41c5123034f06a2b call \
 on-flyio --token env:MYSECRET
func (m *myModule) example(token *Secret) *DagrrFly  {
	return dag.
			Dagrr().
			OnFlyio(token)
}
@function
def example(token: dagger.Secret) -> dag.DagrrFly:
	return (
		dag.dagrr()
		.on_flyio(token)
	)
@func()
example(token: Secret): DagrrFly {
	return dag
		.dagrr()
		.onFlyio(token)
}

getApp() 🔗

Returns the app name: dagger call get-app

Return Type
String !
Example
dagger -m github.com/gerhard/daggerverse/dagrr@01a08d30976a55d5f9eb458f41c5123034f06a2b call \
 get-app
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Dagrr().
			GetApp(ctx)
}
@function
async def example() -> str:
	return await (
		dag.dagrr()
		.get_app()
	)
@func()
async example(): Promise<string> {
	return dag
		.dagrr()
		.getApp()
}

Fly 🔗

manifest() 🔗

App manifest: dagger call on-flyio --token=env:FLY_API_TOKEN manifest file --path=fly.toml export --path=fly.toml

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
primaryRegionString -Primary region to use for deploying new machines, see https://fly.io/docs/reference/configuration/#primary-region
sizeString "performance-2x"VM size, see https://fly.io/docs/about/pricing/#compute
memoryString -Memory to request, see https://fly.io/docs/reference/configuration/#memory
gpuKindString -GPU kind to use, see https://fly.io/docs/reference/configuration/#gpu_kind
diskString "100GB"Disk size in GB
environment[String ! ] -Environment variables to export on the machine, see https://fly.io/docs/reference/configuration/#the-env-variables-section Each env var needs to follow the TOML format (eg. MY_KEY = "value") FIXME(samalba): turn this into a map[string]string once supported by the Dagger Go SDK
Example
dagger -m github.com/gerhard/daggerverse/dagrr@01a08d30976a55d5f9eb458f41c5123034f06a2b call \
 on-flyio --token env:MYSECRET \
 manifest
func (m *myModule) example(token *Secret) *Directory  {
	return dag.
			Dagrr().
			OnFlyio(token).
			Manifest()
}
@function
def example(token: dagger.Secret) -> dagger.Directory:
	return (
		dag.dagrr()
		.on_flyio(token)
		.manifest()
	)
@func()
example(token: Secret): Directory {
	return dag
		.dagrr()
		.onFlyio(token)
		.manifest()
}

deploy() 🔗

Deploy with default manifest: dagger call on-flyio --token=env:FLY_API_TOKEN deploy Then: export _EXPERIMENTAL_DAGGER_RUNNER_HOST=tcp://<APP_NAME>.internal:2345 Assumes https://fly.io/docs/networking/private-networking (clashes with Tailscale MagicDNS)

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirDirectory -No description provided
regions[String ! ] -No description provided
Example
dagger -m github.com/gerhard/daggerverse/dagrr@01a08d30976a55d5f9eb458f41c5123034f06a2b call \
 on-flyio --token env:MYSECRET \
 deploy
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Dagrr().
			OnFlyio(token).
			Deploy(ctx)
}
@function
async def example(token: dagger.Secret) -> str:
	return await (
		dag.dagrr()
		.on_flyio(token)
		.deploy()
	)
@func()
async example(token: Secret): Promise<string> {
	return dag
		.dagrr()
		.onFlyio(token)
		.deploy()
}

destroy() 🔗

Destroy the application: dagger call on-flyio --token=env:FLY_API_TOKEN destroy

Return Type
Void !
Example
dagger -m github.com/gerhard/daggerverse/dagrr@01a08d30976a55d5f9eb458f41c5123034f06a2b call \
 on-flyio --token env:MYSECRET \
 destroy
func (m *myModule) example(ctx context.Context, token *Secret)   {
	return dag.
			Dagrr().
			OnFlyio(token).
			Destroy(ctx)
}
@function
async def example(token: dagger.Secret) -> None:
	return await (
		dag.dagrr()
		.on_flyio(token)
		.destroy()
	)
@func()
async example(token: Secret): Promise<void> {
	return dag
		.dagrr()
		.onFlyio(token)
		.destroy()
}