Dagger
Search

replicated

Run commands using the replicated CLI

Installation

dagger install github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8

Entrypoint

Return Type
Replicated !
Arguments
NameTypeDescription
tokenSecret !No description provided
apiOriginString No description provided
idOriginString No description provided
registryOriginString No description provided
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET
func (m *myModule) example(token *Secret) *Replicated  {
	return dag.
			Replicated(token)
}
@function
def example(token: dagger.Secret, ) -> dag.Replicated:
	return (
		dag.replicated(token)
	)
@func()
example(token: Secret, ): Replicated {
	return dag
		.replicated(token)
}

Types

Replicated 🔗

Replicated is a Dagger module that provides access to the replicated CLI

token() 🔗

Return Type
Secret !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET token
func (m *myModule) example(token *Secret) *Secret  {
	return dag.
			Replicated(token).
			Token()
}
@function
def example(token: dagger.Secret, ) -> dagger.Secret:
	return (
		dag.replicated(token)
		.token()
	)
@func()
example(token: Secret, ): Secret {
	return dag
		.replicated(token)
		.token()
}

apiorigin() 🔗

Return Type
String !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET apiorigin
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Replicated(token).
			Apiorigin(ctx)
}
@function
async def example(token: dagger.Secret, ) -> str:
	return await (
		dag.replicated(token)
		.apiorigin()
	)
@func()
async example(token: Secret, ): Promise<string> {
	return dag
		.replicated(token)
		.apiorigin()
}

idorigin() 🔗

Return Type
String !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET idorigin
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Replicated(token).
			Idorigin(ctx)
}
@function
async def example(token: dagger.Secret, ) -> str:
	return await (
		dag.replicated(token)
		.idorigin()
	)
@func()
async example(token: Secret, ): Promise<string> {
	return dag
		.replicated(token)
		.idorigin()
}

registryOrigin() 🔗

Return Type
String !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET registry-origin
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Replicated(token).
			RegistryOrigin(ctx)
}
@function
async def example(token: dagger.Secret, ) -> str:
	return await (
		dag.replicated(token)
		.registry_origin()
	)
@func()
async example(token: Secret, ): Promise<string> {
	return dag
		.replicated(token)
		.registryOrigin()
}

container() 🔗

Obtain the base container with the replicated CLI installed at /replicated

Return Type
Container !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET container
func (m *myModule) example(token *Secret) *Container  {
	return dag.
			Replicated(token).
			Container()
}
@function
def example(token: dagger.Secret, ) -> dagger.Container:
	return (
		dag.replicated(token)
		.container()
	)
@func()
example(token: Secret, ): Container {
	return dag
		.replicated(token)
		.container()
}

clusterCreate() 🔗

Create a new CMX cluster

Example:

dagger call -m github.com/replicatedhq/daggerverse/replicated –token=env:REPLICATED_API_TOKEN cluster-create –name=my-cluster –wait=10m –ttl=20m –distribution=k3s –version=1.31.0

Return Type
Cluster !
Arguments
NameTypeDefault ValueDescription
nameString -Name of the cluster
waitString !"15m"How long to wait for the cluster to be ready
ttlString !"20m"TTL of the cluster
distributionString !"k3s"Distribution to use
versionString -Version of the distribution to use
nodesInteger !"1"Number of nodes to create
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET cluster-create --wait string --ttl string --distribution string --nodes integer
func (m *myModule) example(token *Secret, wait string, ttl string, distribution string, nodes int) *ReplicatedCluster  {
	return dag.
			Replicated(token).
			ClusterCreate(wait, ttl, distribution, nodes)
}
@function
def example(token: dagger.Secret, wait: str, ttl: str, distribution: str, nodes: int) -> dag.ReplicatedCluster:
	return (
		dag.replicated(token)
		.cluster_create(wait, ttl, distribution, nodes)
	)
@func()
example(token: Secret, wait: string, ttl: string, distribution: string, nodes: number): ReplicatedCluster {
	return dag
		.replicated(token)
		.clusterCreate(wait, ttl, distribution, nodes)
}

clusterRemove() 🔗

Remove a CMX cluster

Example:

dagger call –token=env:REPLICATED_API_TOKEN cluster-remove –cluster-id=my-cluster

Return Type
String !
Arguments
NameTypeDefault ValueDescription
clusterIdString !-Cluster ID of the cluster to remove
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET cluster-remove --cluster-id string
func (m *myModule) example(ctx context.Context, token *Secret, clusterId string) string  {
	return dag.
			Replicated(token).
			ClusterRemove(ctx, clusterId)
}
@function
async def example(token: dagger.Secret, cluster_id: str) -> str:
	return await (
		dag.replicated(token)
		.cluster_remove(cluster_id)
	)
@func()
async example(token: Secret, clusterId: string): Promise<string> {
	return dag
		.replicated(token)
		.clusterRemove(clusterId)
}

clusterExposePort() 🔗

Expose a port on a CMX cluster, returning the hostname of the exposed port

Example:

dagger call –token=env:REPLICATED_API_TOKEN cluster-expose-port –cluster-id=my-cluster –node-port=80

Return Type
String !
Arguments
NameTypeDefault ValueDescription
clusterIdString !-Cluster ID of the cluster to remove
nodePortInteger !-Port to expose
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 --token env:MYSECRET cluster-expose-port --cluster-id string --node-port integer
func (m *myModule) example(ctx context.Context, token *Secret, clusterId string, nodePort int) string  {
	return dag.
			Replicated(token).
			ClusterExposePort(ctx, clusterId, nodePort)
}
@function
async def example(token: dagger.Secret, cluster_id: str, node_port: int) -> str:
	return await (
		dag.replicated(token)
		.cluster_expose_port(cluster_id, node_port)
	)
@func()
async example(token: Secret, clusterId: string, nodePort: number): Promise<string> {
	return dag
		.replicated(token)
		.clusterExposePort(clusterId, nodePort)
}

Cluster 🔗

Cluster is a struct representing a CMX cluster

clusterId() 🔗

Return Type
String !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 cluster-create --wait string --ttl string --distribution string --nodes integer \
 cluster-id
func (m *myModule) example(ctx context.Context, wait string, ttl string, distribution string, nodes int) string  {
	return dag.
			Replicated().
			ClusterCreate(wait, ttl, distribution, nodes).
			ClusterId(ctx)
}
@function
async def example(wait: str, ttl: str, distribution: str, nodes: int) -> str:
	return await (
		dag.replicated()
		.cluster_create(wait, ttl, distribution, nodes)
		.cluster_id()
	)
@func()
async example(wait: string, ttl: string, distribution: string, nodes: number): Promise<string> {
	return dag
		.replicated()
		.clusterCreate(wait, ttl, distribution, nodes)
		.clusterId()
}

status() 🔗

Return Type
String !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 cluster-create --wait string --ttl string --distribution string --nodes integer \
 status
func (m *myModule) example(ctx context.Context, wait string, ttl string, distribution string, nodes int) string  {
	return dag.
			Replicated().
			ClusterCreate(wait, ttl, distribution, nodes).
			Status(ctx)
}
@function
async def example(wait: str, ttl: str, distribution: str, nodes: int) -> str:
	return await (
		dag.replicated()
		.cluster_create(wait, ttl, distribution, nodes)
		.status()
	)
@func()
async example(wait: string, ttl: string, distribution: string, nodes: number): Promise<string> {
	return dag
		.replicated()
		.clusterCreate(wait, ttl, distribution, nodes)
		.status()
}

kubeconfig() 🔗

Return Type
String !
Example
dagger -m github.com/replicatedhq/daggerverse/replicated@1b8faf528b3c00b6b400bc7555ea4b5de5224ef8 call \
 cluster-create --wait string --ttl string --distribution string --nodes integer \
 kubeconfig
func (m *myModule) example(ctx context.Context, wait string, ttl string, distribution string, nodes int) string  {
	return dag.
			Replicated().
			ClusterCreate(wait, ttl, distribution, nodes).
			Kubeconfig(ctx)
}
@function
async def example(wait: str, ttl: str, distribution: str, nodes: int) -> str:
	return await (
		dag.replicated()
		.cluster_create(wait, ttl, distribution, nodes)
		.kubeconfig()
	)
@func()
async example(wait: string, ttl: string, distribution: string, nodes: number): Promise<string> {
	return dag
		.replicated()
		.clusterCreate(wait, ttl, distribution, nodes)
		.kubeconfig()
}