singlestore-labs / singlestoredb-dev-image Goto Github PK
View Code? Open in Web Editor NEWThe SingleStoreDB Dev Container is the fastest way to develop with SingleStore on your laptop or in a CI/CD environment.
License: Apache License 2.0
The SingleStoreDB Dev Container is the fastest way to develop with SingleStore on your laptop or in a CI/CD environment.
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
This is a feature request for improving performance of Singlestore dev docker image on M1/M2 apple machines.
In the github page it is described:
"In order to support running SingleStoreDB on Apple Silicon many of our performance optimizations are disabled. This can result in unexpectedly bad performance...
To tune this performance impact (either faster or slower) you can change the number of cores and amount of RAM..."
Unfortunately the above suggestion seems to be not enough, giving more CPU and RAM to the docker desktop does not help enough and some operations in Singlestore running on M1/M2 machines inside docker desktop still take minutes instead of seconds.
When this docker image is run on Apple M1/M2 machines in a docker desktop, the qemu emulation is used:
It seems the emulation automatically chooses a very basic cpu which is missing many of the instructions sets for Singlestore to use:
When running sdb-report collect-and-check command inside the docker image shell, you will receive the following notification about missing features of the CPU:
FAIL SSE4.2 CPU extensions unavailable on 127.0.0.1
WARN AVX2 CPU extensions unavailable on 127.0.0.1
Describe the solution you'd like
As a improvement feature I would like to have the ability to have the docker image with feature instructions Singlestore optimized for.
In recent years many developers use Apple M1/M2 machines to work on Singlestore projects and having an optimized environment is very important.
This can be via better emulation or via compiling the Singlestore to run natively on such CPU's.
I think the above change can improve the performance of the Singlestore docker image.
Describe alternatives you've considered
It is possible to control the above manually using for example colima instead of docker desktop (https://github.com/abiosoft/colima) ,which allows to specify parameters for qemu, without modifying the image.
Then it is possible to specify which cpu type you would like to simulate for the qemu to use.
But, this workaround requires manual and complex steps to make it work.
Additional context
Version information:
Singlestore 8.1.15 (docker pull ghcr.io/singlestore-labs/singlestoredb-dev:0.2.8)
Docker Desktop 4.22
Macbook M1 Pro (Ventura 13.4.1) with 16gb ram
8cores and 10gb allocated for the docker desktop
8.1.15-4660571fdf
Describe the bug
SingleStore docker container does not start successfully on a laptop/computer that has more than 4 cores.
To Reproduce
Steps to reproduce the behavior:
docker compose up
$ docker compose up
[+] Running 3/3
⠿ Network traffic-copter_default Created 0.1s
⠿ Volume "traffic-copter_data" Created 0.0s
⠿ Container traffic-copter-singlestore-1 Created 2.8s
Attaching to traffic-copter-singlestore-1
traffic-copter-singlestore-1 | Starting SingleStore nodes...
traffic-copter-singlestore-1 | {}
traffic-copter-singlestore-1 |
traffic-copter-singlestore-1 | real 0m7.204s
traffic-copter-singlestore-1 | user 0m0.580s
traffic-copter-singlestore-1 | sys 0m0.317s
traffic-copter-singlestore-1 | Configuring SingleStore nodes...
traffic-copter-singlestore-1 | Error 2373: Code generation for new statements is disabled because the total number of license units of capacity used on all leaf nodes is 4, which is above the limit of 2 for the SingleStore free license. To purchase more capacity, contact [email protected]. Or, adjust the size or number of leaf nodes to bring the number of license units used to 2 or less. See https://docs.memsql.com/redir/capacity-limit-error for more information.
traffic-copter-singlestore-1 exited with code 1
See below the docker-compose.yaml
file I am using to test this new image:
version: '3.8'
services:
singlestore:
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
ports:
- 3306:3306
- 8080:8080
volumes:
# persist data between runs:
- data:/data
- ./init.sql:/init.sql
environment:
# use the LICENSE_KEY environment variable set in the terminal:
- SINGLESTORE_LICENSE=${SINGLESTORE_LICENSE}
- ROOT_PASSWORD=root
volumes:
data:
Expected behavior
I expect the SingleStore
container to start successfully.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
ghcr.io/singlestore-labs/singlestoredb-dev:latest
which should be the same as ghcr.io/singlestore-labs/singlestoredb-dev:0.0.8
$ nproc
32
Additional context
Additionally, SingleStore GitHub Action has never worked correctly. The code for this article is here.
I had to use instead docker-compose on the GitHub action with the image singlestore/cluster-in-a-box:latest. The developer who wrote that GitHub action should have placed a sanity check for the MySQL connection.
See also SingleStore Error 2374
To finalize, the image singlestore/cluster-in-a-box:latest
works fine with docker compose. See the below docker compose configuration:
version: '3.8'
services:
singlestore:
image: singlestore/cluster-in-a-box:latest
ports:
- 3306:3306
- 8080:8080
volumes:
# persist data between runs:
- db-data:/var/lib/memsql
- ./init.sql:/init.sql
environment:
# use the LICENSE_KEY environment variable set in the terminal:
- LICENSE_KEY=${SINGLESTORE_LICENSE}
- START_AFTER_INIT=Y
- ROOT_PASSWORD=password_here
volumes:
db-data:
And docker compose CLI output showing that the container started successfully:
$ docker compose up
[+] Running 1/0
⠿ Container tc-singlestore-1 Recreated 0.1s
Attaching to tc-singlestore-1
tc-singlestore-1 | Starting Cluster
tc-singlestore-1 | {}
tc-singlestore-1 | ==> /var/lib/memsql/1b482754-cbe1-4336-bfaf-811ea6789926/tracelogs/memsql.log <==
tc-singlestore-1 | 03651764 2022-09-30 16:01:43.925 INFO: Completed recovery of system databases. Beginning recovery of user databases.
tc-singlestore-1 | 03656876 2022-09-30 16:01:43.930 INFO: Initializing cluster management.
tc-singlestore-1 | 03656926 2022-09-30 16:01:43.930 INFO: Consensus node started...
tc-singlestore-1 | 03657583 2022-09-30 16:01:43.931 INFO: Thread 115029: Fn: Initializing Replication Management Thread
tc-singlestore-1 | 03657734 2022-09-30 16:01:43.931 INFO: Starting the accept loop.
tc-singlestore-1 | 03670562 2022-09-30 16:01:43.944 INFO: Query information_schema.'SELECT @@memsql_id' submitted for asynchronous compilation
tc-singlestore-1 | 03746448 2022-09-30 16:01:44.019 INFO: Query information_schema.'SELECT node_id FROM INFORMATION_SCHEMA.lmv_nodes' submitted for asynchronous compilation
tc-singlestore-1 | 03771281 2022-09-30 16:01:44.044 INFO: Query information_schema.'SELECT @@memsql_version' submitted for asynchronous compilation
tc-singlestore-1 | 03876453 2022-09-30 16:01:44.149 INFO: Query information_schema.'SELECT @@memsql_id' submitted 215 milliseconds ago, queued for 12 milliseconds, compiled asynchronously in 203 milliseconds
tc-singlestore-1 | 03880903 2022-09-30 16:01:44.154 INFO: Query information_schema.'SELECT @@memsql_version' submitted 130 milliseconds ago, queued for 22 milliseconds, compiled asynchronously in 108 milliseconds
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/memsql/5b30dc09-100d-4ef3-9fc4-2b5c28919aa5/tracelogs/memsql.log <==
tc-singlestore-1 | 03650171 2022-09-30 16:01:43.926 INFO: Completed recovery of system databases. Beginning recovery of user databases.
tc-singlestore-1 | 03655365 2022-09-30 16:01:43.931 INFO: Initializing cluster management.
tc-singlestore-1 | 03655413 2022-09-30 16:01:43.931 INFO: Consensus node started...
tc-singlestore-1 | 03655974 2022-09-30 16:01:43.931 INFO: Thread 115029: Fn: Initializing Replication Management Thread
tc-singlestore-1 | 03656188 2022-09-30 16:01:43.932 INFO: Starting the accept loop.
tc-singlestore-1 | 03668121 2022-09-30 16:01:43.944 INFO: Query information_schema.'SELECT @@memsql_id' submitted for asynchronous compilation
tc-singlestore-1 | 03785955 2022-09-30 16:01:44.061 INFO: Query information_schema.'SELECT node_id FROM INFORMATION_SCHEMA.lmv_nodes' submitted for asynchronous compilation
tc-singlestore-1 | 03798763 2022-09-30 16:01:44.074 INFO: Query information_schema.'SELECT @@memsql_version' submitted for asynchronous compilation
tc-singlestore-1 | 03905646 2022-09-30 16:01:44.181 INFO: Query information_schema.'SELECT @@memsql_id' submitted 246 milliseconds ago, queued for 11 milliseconds, compiled asynchronously in 235 milliseconds
tc-singlestore-1 | 03909953 2022-09-30 16:01:44.185 INFO: Query information_schema.'SELECT @@memsql_version' submitted 120 milliseconds ago, queued for 11 milliseconds, compiled asynchronously in 109 milliseconds
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/singlestoredb-studio/studio.log <==
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/memsql/memsql_exporter.log <==
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/memsql/1b482754-cbe1-4336-bfaf-811ea6789926/tracelogs/memsql.log <==
tc-singlestore-1 | 03991436 2022-09-30 16:01:44.264 INFO: Query information_schema.'SELECT node_id FROM INFORMATION_SCHEMA.lmv_nodes' submitted 258 milliseconds ago, queued for 16 milliseconds, compiled asynchronously in 242 milliseconds
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/memsql/5b30dc09-100d-4ef3-9fc4-2b5c28919aa5/tracelogs/memsql.log <==
tc-singlestore-1 | 04018928 2022-09-30 16:01:44.294 INFO: Query information_schema.'SELECT node_id FROM INFORMATION_SCHEMA.lmv_nodes' submitted 243 milliseconds ago, queued for 13 milliseconds, compiled asynchronously in 230 milliseconds
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/singlestoredb-studio/studio.log <==
tc-singlestore-1 | 2022/09/30 16:01:44 env.go:90 Log Opened
tc-singlestore-1 | 2022/09/30 16:01:44 server.go:74 Listening on 0.0.0.0:8080
tc-singlestore-1 | 2022/09/30 16:01:44 server.go:93 HTTPS configuration was not detected, serving with HTTP
tc-singlestore-1 |
tc-singlestore-1 | ==> /var/lib/memsql/memsql_exporter.log <==
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Arguments: [@/opt/singlestoredb-server-7.8.13-f8fec5f0db/memsql_exporter/conf/memsql_exporter_ma.args]" source="memsql_exporter.go:621"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Starting memsql_exporter (version=7.8.13, branch=, revision=f8fec5f)" source="memsql_exporter.go:636"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Build context (go=devel +2a0dd053ec Fri Feb 5 19:53:15 2021 +0000, user=, date=)" source="memsql_exporter.go:637"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Read DSN from /etc/memsql/memsql_exporter.cnf" source="memsql_exporter.go:656"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Enabled scrapers:" source="memsql_exporter.go:671"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.show_status_extended" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.global_status_gauge_vars" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.show_variables" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.show_workload_management_status" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.distributed.partitions" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.events" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.mv_activities" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.tables" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.processlist" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.tablestats" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.memory.counters" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.mv_activities_extended_cumulative" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.system_info" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.pipeline_batches" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.info_schema.mv_nodes" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --collect.global_status_counting_vars" source="memsql_exporter.go:675"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Enabled cluster scrapers:" source="memsql_exporter.go:683"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_sysinfo_net" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_global_variables" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_workload_management_status" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_sysinfo_mem" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_sysinfo_disk" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_activities" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.tables" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_processlist" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.tablestats" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.events" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.distributed.partitions" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_global_status" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_sysinfo_cpu" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_activities_extended_cumulative" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.system_info" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.pipeline_batches" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --cluster-collect.info_schema.mv_nodes" source="memsql_exporter.go:687"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Enabled samplers:" source="memsql_exporter.go:694"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --sample.activity_extended" source="memsql_exporter.go:698"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --sample.pipeline_batches" source="memsql_exporter.go:698"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --sample.cluster_info" source="memsql_exporter.go:698"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --sample.events" source="memsql_exporter.go:698"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --sample.node" source="memsql_exporter.go:698"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg=" --sample.activity" source="memsql_exporter.go:698"
tc-singlestore-1 | time="2022-09-30T16:01:44Z" level=info msg="Listening on :9104" source="memsql_exporter.go:755"
Wasm will be (is!) available in the Self-Managed product. https://docs.singlestore.com/db/v8.0/en/reference/code-engine---powered-by-wasm.html?action=version-change
Is this something you would want to mention in the singlestoredb-dev-image docs, like the Data API?
With the name change, should the shell prompt now be singlestoredb?
singlestore>
singlestoredb>
As well as the command:
docker exec -it singlestoredb-dev singlestore -p"${DATABASE_PASSWORD}"
docker exec -it singlestoredb-dev singlestoredb -p"${DATABASE_PASSWORD}"
Hello SingleStore,
On a Centos7 the following command returns an error:
docker pull ghcr.io/singlestore-labs/singlestoredb-dev:0.2.11
Trying to pull repository ghcr.io/singlestore-labs/singlestoredb-dev ...
Pulling repository ghcr.io/singlestore-labs/singlestoredb-dev
Error: image singlestore-labs/singlestoredb-dev:0.2.11 not found
How to solve it please?
Thanks
Describe the bug
When trying to restore a full backup from an S3 storage to the dev-image, you get the following error:
"ERROR 2205 ER_SNAPSHOT_SUBPROCESS_EXITED_WITH_NONZERO_RESULT: Leaf Error (127.0.0.1:3307): Backup subprocess nonzero exit value. Failed to Download whole object".
Note.1: Tried with and without persistent storage.
Note.2: Tried in the same host & same backup using the default installation, and it worked as expected.
Note.3: I didn't try using another backup provider.
Steps to reproduce the behavior:
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
I need to run singlestoredb-dev-image in a Kubernetes Pod alongside other infrastructure (including MySQL) to run tests. I am attempting to upgrade from my customized CIAB image, in which I had overridden the startup script so that PORT
could be set in the environment. This would cause the master node to use the specified port, and the leaf node to use PORT + 1
.
I attempted a similar customization for the singlestoredb-dev-image. However, it appears that due to the execution of init.sh
within the original image, I am unable to simply modify the file within my image to alter the ports.
Here is the script I use to populate the port argument in sdb-admin create-node
and sdb-admin add-leaf
:
MASTER_PORT="${PORT:-3306}"
LEAF_PORT="$((MASTER_PORT + 1))"
Describe the solution you'd like
Add an environment variable to allow node port(s) to be customized and resolve port conflicts.
Describe alternatives you've considered
Writing my own Dockerfile, or figuring out an additional script to run to update the configurations or recreate the nodes (this is pretty unfavorable).
Hello SingleStore,
I'm trying to restore databases from GCS, the command works well in a cluster deployed on a VM, however the same command hangs in the Docker cluster.
SingleStore 8.1.25
Docker image: latest
Any idea how to solve it please?
Thanks
Describe the bug
I can't log into the cluster.
When I navigate to http://localhost:8080/connect/localhost and log in with root
as username and admin
as password I get a The credentials are incorrect. Please verify them and try again.
message.
To Reproduce
Steps to reproduce the behavior:
docker run \
-d --name singlestore \
-e SINGLESTORE_LICENSE="private of course" \
-e ROOT_PASSWORD=“admin” \
-p 3306:3306 -p 8080:8080 -p 9000:9000 \
-v singlestore_data:/data \
ghcr.io/singlestore-labs/singlestoredb-dev:latest
root
as username and admin
as passwordExpected behavior
The ability to log in.
Desktop (please complete the following information):
Additional context
I'm using OrbStack so I've got no Docker for Mac installed.
When I go into the container and do echo $ROOT_PASSWORD
I do get "admin" as response.
Describe the bug
dt-singlestore-1 | {}
dt-singlestore-1 |
dt-singlestore-1 | real 0m5.635s
dt-singlestore-1 | user 0m0.213s
dt-singlestore-1 | sys 0m0.084s
dt-singlestore-1 | Configuring SingleStore nodes...
dt-singlestore-1 | Error 1888: Unable to reload license file: The provided license is invalid
dt-singlestore-1 exited with code 1
singlestore:
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
volumes:
- 'sail-singlestore:/data'
restart: always
environment:
- SINGLESTORE_LICENSE="<removed>"
- ROOT_PASSWORD='password'
ports:
- '${FORWARD_SINGLESTORE_PORT:-3306}:3306'
- '${FORWARD_SINGLESTORE_UI_PORT:-8080}:8080'
- '${FORWARD_SINGLESTORE_API_PORT:-9000}:9000'
networks:
- sail
To Reproduce
Steps to reproduce the behavior:
load docker compose section and provide license
run sail up
Expected behavior
When using the docker command it doesn't throw an error with the same environment variables but when trying to use sail it fails.
Desktop (please complete the following information):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.