package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
AddLabels adds (or updates) the given labels to the VMs corresponding to the given cluster.
AdminPorts finds the AdminUI ports for a cluster.
AdminURL generates admin UI URLs for the nodes in a cluster.
CachedCluster returns the cached information about a given cluster.
CachedClusters iterates over all roachprod clusters from the local cache, in alphabetical order.
CaptureSideEyeSnapshot asks the Side-Eye service to take a snapshot of the cockroach processes of the specified cluster/environment.
Create TODO.
CreateLoadBalancer creates a load balancer for the SQL service on the given cluster.
CreateSnapshot snapshots all the persistent volumes attached to nodes in the named cluster.
DefaultStartOpts returns a StartOpts populated with default values.
DefaultStopOpts returns StopOpts populated with the default values used by Stop.
Deploy deploys a new version of cockroach to the given cluster.
Destroy TODO.
DestroyDNS destroys the DNS records for the given cluster.
DistributeCerts distributes certificates to the nodes in a cluster.
Download downloads 3rd party tools, using a GCS cache if possible.
DownloadLatestPProfFile downloads the latest pprof file before beforeTime across all cluster nodes if the beforeTime is not set, it defaults to the current time.
Extend extends the lifetime of the specified cluster to prevent it from being destroyed.
FetchLogs downloads the logs from the cluster using `roachprod get`.
GC garbage-collects expired clusters, unused SSH key pairs in AWS, and unused DNS records.
Get copies a remote file from the nodes in a cluster.
GetSideEyeTokenFromEnv returns the Side-Eye API token from either an environment variable or gcloud secrets.
GrafanaURL returns a url to the grafana dashboard.
Init initializes the cluster.
InitDirs initializes the directories for storing cluster metadata and debug logs.
InitProviders initializes providers and returns a map that indicates if a provider is active or inactive.
Install installs third party software.
IP gets the ip addresses of the nodes in a cluster.
JaegerURL returns a url to the jaeger UI, assuming it was installed on the lat node in the given cluster.
List returns a cloud.Cloud struct of all roachprod clusters matching clusterNamePattern.
LoadBalancerIP resolves the IP of a load balancer serving the given cluster.
LoadBalancerPgURL generates the postgres URL for a load balancer serving the given cluster.
LoadClusters reads the cached cluster metadata from config.ClustersDir and populates syncedClusters.
Logs TODO.
Monitor monitors the status of cockroach nodes in a cluster.
PgURL generates pgurls for the nodes in a cluster.
Pprof TODO.
PrometheusSnapshot takes a snapshot of prometheus and stores the snapshot and a script to spin up a docker instance for it to the given directory.
Put copies a local file to the nodes in a cluster.
Reformat reformats disks in a cluster to use the specified filesystem.
Reset resets all VMs in a cluster.
Run runs a command on the nodes in a cluster.
RunWithDetails runs a command on the nodes in a cluster.
SetupSSH sets up the keys and host keys for the vms in the cluster.
Signal sends a signal to nodes in the cluster.
SQL runs `cockroach sql` on a remote cluster.
SQLPorts finds the SQL ports for a cluster.
Stage stages release and edge binaries to the cluster.
StageURL TODO.
Start starts nodes on a cluster.
StartFluentBit installs, configures, and starts Fluent Bit on the cluster identified by clusterName.
StartGrafana spins up a prometheus and grafana instance on the last node provided and scrapes from all other nodes.
StartJaeger starts a jaeger instance on the last node in the given cluster and configures the cluster to use it.
StartOpenTelemetry installs, configures, and starts the OpenTelemetry Collector on the cluster identified by clusterName.
StartServiceForVirtualCluster starts SQL/HTTP instances for a virtual cluster.
StartSideEyeAgents starts the Side-Eye agent on all the nodes in the given cluster.
Status retrieves the status of nodes in a cluster.
Stop stops nodes on a cluster.
StopFluentBit stops Fluent Bit on the cluster identified by clusterName.
StopGrafana shuts down prometheus and grafana servers on the last node in the cluster, if they exist.
StopJaeger stops and removes the jaeger container.
Stop stops the OpenTelemetry Collector on the cluster identified by clusterName.
StopServiceForVirtualCluster stops SQL instance processes on the virtualCluster given.
StorageCollectionPerformAction either starts or stops workload collection on a target cluster.
Sync grabs an exclusive lock on the roachprod state and then proceeds to read the current state from the cloud and write it out to disk.
TruncateString truncates a string to maxLength and adds "..." to the end.
UpdateSideEyeEnvironmentName updates the environment name used by the Side-Eye agents running on the given cluster.
UpdateTargets updates prometheus target configurations for a cluster.
Version returns version/build information.
Wipe wipes the nodes in a cluster.
# Constants
Default scheduled backup runs a full backup every hour and an incremental every 15 minutes.
30 days.
# Variables
ClearClusterCache indicates if we should ever clear the local cluster cache of clusters.
# Structs
ClusterAlreadyExistsError is returned when the cluster name passed to Create is already used by another cluster.
LogsOpts TODO.
MalformedClusterNameError is returned when the cluster name passed to Create is invalid.
PprofOpts specifies the options needed by Pprof().
StopOpts is used to pass options to Stop.