Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cockroachdb/cockroach #14733

Merged
merged 3 commits into from Aug 22, 2023

Conversation

takumin
Copy link
Contributor

@takumin takumin commented Aug 19, 2023

cockroachdb/cockroach: A distributed SQL database designed for speed, scale, and survival

$ aqua g -i cockroachdb/cockroach

How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Command and output

$ cockroach --help
CockroachDB command-line interface and server.

Usage:
  cockroach [command]

Available Commands:
  start             start a node in a multi-node cluster
  start-single-node start a single-node cluster
  connect           Create certificates for securely connecting with clusters

  init              initialize a cluster
  cert              create ca, node, and client certs
  sql               open a sql shell
  statement-diag    commands for managing statement diagnostics bundles
  auth-session      log in and out of HTTP sessions
  node              list, inspect, drain or remove nodes

  nodelocal         upload and delete nodelocal files
  userfile          upload, list and delete user scoped files
  import            import a db or table from a local PGDUMP or MYSQLDUMP file
  demo              open a demo sql shell
  convert-url       convert a SQL connection string for use with various client drivers
  gen               generate auxiliary files
  version           output version information
  debug             debugging commands
  sqlfmt            format SQL statements
  workload          generators for data and query loads
  help              Help about any command

Flags:
  -h, --help                               help for cockroach
      --log <string>
                                            Logging configuration, expressed using YAML syntax. For example, you can
                                            change the default logging directory with: --log='file-defaults: {dir: ...}'.
                                            See the documentation for more options and details.  To preview how the log
                                            configuration is applied, or preview the default configuration, you can use
                                            the 'cockroach debug check-log-config' sub-command.

      --log-config-file <file>
                                            File name to read the logging configuration from. This has the same effect as
                                            passing the content of the file via the --log flag.
                                            (default <unset>)
      --log-config-vars strings
                                            Environment variables that will be expanded if present in the body of the
                                            logging configuration.

      --log-dir <string>
                                            --log-dir=XXX is an alias for --log='file-defaults: {dir: XXX}'.

      --logtostderr <severity>[=DEFAULT]
                                            --logtostderr=XXX is an alias for --log='sinks: {stderr: {filter: XXX}}'. If
                                            no value is specified, the default value for the command is inferred: INFO for
                                            server commands, WARNING for client commands.
                                            (default UNKNOWN)
      --redactable-logs
                                            --redactable-logs=XXX is an alias for --log='file-defaults: {redactable:
                                            XXX}}'.

      --version                            version for cockroach
      --vmodule moduleSpec                 comma-separated list of pattern=N settings for file-filtered logging (significantly hurts performance)

Use "cockroach [command] --help" for more information about a command.

starts a temporary, in-memory CockroachDB cluster of one or more nodes, with or without a preloaded dataset, and opens an interactive SQL shell to the cluster.

$ cockroach demo
#
# Welcome to the CockroachDB demo database!
#
# You are connected to a temporary, in-memory CockroachDB cluster of 1 node.
#
# This demo session will send telemetry to Cockroach Labs in the background.
# To disable this behavior, set the environment variable
# COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING=true.
#
# Beginning initialization of the movr dataset, please wait...
#
# The cluster has been preloaded with the "movr" dataset
# (MovR is a fictional vehicle sharing company).
#
# Reminder: your changes to data stored in the demo session will not be saved!
#
# If you wish to access this demo cluster using another tool, you will need
# the following details:
#
#   - Connection parameters:
#      (webui)    http://127.0.0.1:8080/demologin?password=demo61837&username=demo
#      (cli)      cockroach sql --certs-dir=/home/takumi/.cockroach-demo -u demo -d movr
#      (sql)      postgresql://demo:demo61837@127.0.0.1:26257/movr?sslmode=require&sslrootcert=%2Fhome%2Ftakumi%2F.cockroach-demo%2Fca.crt
#
#   - Username: "demo", password: "demo61837"
#   - Directory with certificate files (for certain SQL drivers/tools): /home/takumi/.cockroach-demo
#
# You can enter \info to print these details again.
#
# Server version: CockroachDB CCL v23.1.8 (x86_64-pc-linux-gnu, built 2023/08/04 18:11:44, go1.19.10) (same version as client)
# Cluster ID: 475707a9-147e-4f9e-b9b9-417cf254f6f6
# Organization: Cockroach Demo
#
# Enter \? for a brief introduction.
#
demo@127.0.0.1:26257/movr> quit

Reference

@suzuki-shunsuke
Copy link
Member

Thank you!

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Aug 22, 2023
@suzuki-shunsuke suzuki-shunsuke added this to the v4.41.0 milestone Aug 22, 2023
@suzuki-shunsuke
Copy link
Member

📝

I'm not familiar with CockroachDB at all.

https://www.cockroachlabs.com/docs/stable/install-cockroachdb-mac#install-binary

The archive contains the cockroach binary and the supporting libraries that are used to provide spatial features.

Extract the archive and optionally copy the cockroach binary into your PATH so you can execute cockroach commands from any shell.

Copy these libraries to one of the locations where CockroachDB expects to find them. By default, CockroachDB looks for external libraries in /usr/local/lib/cockroach or a lib subdirectory of the CockroachDB binary's current directory. If you place these libraries in another location, you must pass the location in the --spatial-libs flag to cockroach start.

aqua doesn't support coping libraries into the location such as /usr/local/lib/cockroach.

But I found cockroach looks for spatial libs from A lib subdirectory of the CockroachDB binary's current directory by default.

https://www.cockroachlabs.com/docs/v23.1/cockroach-start#flags-spatial-libs

Defaults:

  • /usr/local/lib/cockroach
  • A lib subdirectory of the CockroachDB binary's current directory.

So there is no problem.

@suzuki-shunsuke suzuki-shunsuke merged commit d76831c into aquaproj:main Aug 22, 2023
16 checks passed
@suzuki-shunsuke
Copy link
Member

v4.41.0 is out 🎉
https://github.com/aquaproj/aqua-registry/releases/tag/v4.41.0

@takumin takumin deleted the feat/cockroachdb/cockroach branch August 22, 2023 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants