This is my first time asking here.
Can anyone help me how to enable the Redis API in ScyllaDB?
I can't find anything about enabling the Redis API.
Also where/how should I set the redis_port is it in the scylla.yaml?
Thank you in advance :)
Add
redis_port: 6379
somewhere in scylla.yaml
more here
http://scylla.docs.scylladb.com/master/design-notes/protocols.html#redis-client-protocol
The config option code:
https://github.com/scylladb/scylla/blob/master/db/config.cc#L789
Adding info on how to use Redis API with Scylla Docker:
run Scylla Docker with mapped Redis port
docker run -p 6379:6379 --name some-scylla -d scylladb/scylla --smp 1 --memory 750M --overprovisioned 1
update the scylla.yaml
docker exec -it some-scylla bash
vi /etc/scylla/scylla.yaml (add redis_port: 6379)
supervisorctl restart scylla
from the host server you can now use
redis-cli
127.0.0.1:6379> ping
PONG
Related
I have installed redis in a server
I wish to monitor redis via Prometheus and Grafana
Installed redis_exporter in the redis installed server using docker
$ docker pull oliver006/redis_exporter
$ docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter
Checked the redis_exporter running status in the server.
Added the redis installed and redis exporter installed IP in prometheus.yml file in Grafana Server
- job_name: 'redis_exporter'
target_groups:
- targets: ['IP:9121']
labels:
alias: redis
Restarted Prometheus in Grafana server
Checked the status in prometheus status page
It shows UP for the redis server IP:9121 mentioned in the prometheus.yml
In Grafana :
I have imported Prometheus Redis dashboard;(https://grafana.com/dashboards/763)
But data is not loading in the dashboard. Also the IP is not listed in the dashboard
Two things to check here:
Try this url and see if you're able to get the metrics.
curl -s "<redis_exporter>:9121/scrape?target=redis://<redis_instance>:6379"
Update the grafana dashboard variables from label_values(redis_up, addr) to label_values(redis_up, instance)
In case you set a password authentication for redis, need to supply a Redis password to redis-exporter
sudo docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter --redis.addr=redis://10.0.0.175:6379 --redis.password=redis_password_here
I've made an ACS instance.
az acs create --orchestrator-type=kubernetes \
--resource-group $group \
--name $k8s_name \
--dns-prefix $kubernetes_server \
--generate-ssh-keys
az acs kubernetes get-credentials --resource-group $group --name $k8s_name
And run helm init it has provisioned tiller pod fine. I then ran helm install stable/redis and got a redis deployment up and running (seemingly).
I can kube exec -it into the redis pod, and can see it's binding on 0.0.0.0 and can log in with redis-cli -h localhost and redis-cli -h <pod_ip>, but not redis-cli -h <service_ip> (from kubectl get svc.)
If I run up another pod (which is how I ran into this issue) I can ping redis.default and it shows the DNS resolving to the correct service IP but gives no response. When I telnet <service_ip> 6379 or redis-cli -h <service_ip> it hangs indefinitely.
I'm at a bit of a loss as to how to debug further. I can't ssh into the node to see what docker is doing.
Also, I'd initially tried this with a standard Alphine-Redis image, so the helm was a fallback. I tried it yesterday and the helm one worked, but the manual one didn't. Today doing it (on a newly built ACS cluster) it's not working at all on either.
I'm going to spin up the cluster again to see if its a stable reproduce, but I'm pretty confident something fishy is going on.
PS - I have a VNet with overlapping subnet 10.0.0.0/16 in a different region, when I go into the address range I do get a warning there that there is a clash, could that affect it?
<EDIT>
Some new insight... It's something to do with alpine based images (which we've been aiming to use)...
So kube run a --image=nginx (which is ubuntu based) and I can shell in, install telnet and connect to the redis service.
But, e.g. kubectl run c --image=rlesouef/alpine-redis then shell in, and telnet doesn't work to the same redis service.
</EDIT>
There was a similar issue https://github.com/Azure/acs-engine/issues/539 that has been fixed recently. One thing to verify is to check if nslookup works in the container.
I am new to YCSB and i want to benchmark Redis using more than one cluster. I have tried with only one Redis on my localhost with the following command.
./bin/ycsb load redis -p redis.host=localhost -p redis.port=6379 -P workloads/workloada -p recordcount=200000 -s > d.dat
I am getting the currect ops/sec and other data.
Now i need to know how can run YCSB for more than one cluster.
Can anybody give an answer (steps to run this).
And it would be helpful if anyone can help to run Couchbase YCSB too.
Thanx..!!
The following steps need to be done to perform YCSB bench marking with redis cluster
1) configure redis cluster with different nodes by referring to the document
http://redis.io/topics/cluster-tutorial
2) open the ycsb terminal,set up redis host ip address, port and specify the required parameters needed
./bin/ycsb load redis -p redis.host="ip address" -p redis.port="port" -P workloads/workloada -p recordcount=200000 -s > d.dat
I have a Redis Service running inside a docker container but when connecting to it the cursor is not returned.
When using redis-cli the terminal just hangs with issuing commands, I hope someone can point out where I'm going wrong.
Instead of seeing regular redis-cli output like:
% redis-cli
redis 127.0.0.1:6379> set docker awesome
OK
redis 127.0.0.1:6379> get docker
"awesome"
redis 127.0.0.1:6379>
This is what I am seeing:
% redis-cli -p 49156
redis 127.0.0.1:49156> set docker awesome
There's no "OK" and the terminal just hangs until I Ctrl-C it.
I'm following the docker.io instructions from http://docs.docker.io/en/latest/examples/running_redis_service/
Here's my Dockerfile:
FROM ubuntu:12.10
RUN apt-get update
RUN apt-get -y install redis-server
EXPOSE 6379
ENTRYPOINT ["/usr/bin/redis-server"]
I build the image with:
sudo docker build -t rudijs/redis .
I run an instance of the image with:
sudo docker run -d -p 6379 -name redis rudijs/redis
% sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3888fa49b605 rudijs/redis:latest /usr/bin/redis-serve 5 seconds ago Up 4 seconds 0.0.0.0:49156->6379/tcp redis
The exposed container redis port is at:
% sudo docker port redis 6379
0.0.0.0:49156
% redis-cli -p 49156
redis 127.0.0.1:49156> set docker awesome
I've tried tinkering with different port bindings from the container to the host but the result is always the same - cli hang.
Issuing command like "help" seem to work fine
% redis-cli -p 49156
redis 127.0.0.1:49156> help
redis-cli 2.2.12
Type: "help #<group>" to get a list of commands in <group>
"help <command>" for help on <command>
"help <tab>" to get a list of possible help topics
"quit" to exit
redis 127.0.0.1:49156>
If I just let it sit I get a timeout:
% redis-cli -p 49156
redis 127.0.0.1:49156> set docker awesome
Error: Connection reset by peer
(248.52s)
redis 127.0.0.1:49156>
Any advice or tips with this problem much appreciated.
Thanks!
The fix for this was Firehol (iptables) rules were needed:
interface docker0 interface1 src "172.17.0.0/16" dst 172.17.42.1
server all accept
client all accept
I want to run rabbitmq-server in one docker container and connect to it from another container using celery (http://celeryproject.org/)
I have rabbitmq running using the below command...
sudo docker run -d -p :5672 markellul/rabbitmq /usr/sbin/rabbitmq-server
and running the celery via
sudo docker run -i -t markellul/celery /bin/bash
When I am trying to do the very basic tutorial to validate the connection on http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html
I am getting a connection refused error:
consumer: Cannot connect to amqp://guest#127.0.0.1:5672//: [Errno 111]
Connection refused.
When I install rabbitmq on the same container as celery it works fine.
What do I need to do to have container interacting with each other?
[edit 2016]
Direct links are deprecated now. The new way to do link containers is docker network connect. It works quite similar to virtual networks and has a wider feature set than the old way of linking.
First you create your named containers:
docker run --name rabbitmq -d -p :5672 markellul/rabbitmq /usr/sbin/rabbitmq-server
docker run --name celery -it markellul/celery /bin/bash
Then you create a network (last parameter is your network name):
docker network create -d bridge --subnet 172.25.0.0/16 mynetwork
Connect the containers to your newly created network:
docker network connect mynetwork rabbitmq
docker network connect mynetwork celery
Now, both containers are in the same network and can communicate with each other.
A very detailed user guide can be found at Work with networks: Connect containers.
[old answer]
There is a new feature in Docker 0.6.5 called linking, which is meant to help the communication between docker containers.
First, create your rabbitmq container as usual. Note that i also used the new "name" feature which makes life a litte bit easier:
docker run --name rabbitmq -d -p :5672 markellul/rabbitmq /usr/sbin/rabbitmq-server
You can use the link parameter to map a container (we use the name here, the id would be ok too):
docker run --link rabbitmq:amq -i -t markellul/celery /bin/bash
Now you have access to the IP and Port of the rabbitmq container because docker automatically added some environmental variables:
$AMQ_PORT_5672_TCP_ADDR
$AMQ_PORT_5672_TCP_PORT
In addition Docker adds a host entry for the source container to the /etc/hosts file. In this example amq will be a defined host in the container.
From Docker documentation:
Unlike host entries in the /etc/hosts file, IP addresses stored in the environment variables are not automatically updated if the source container is restarted. We recommend using the host entries in /etc/hosts to resolve the IP address of linked containers.
Just get your container ip, and connect to it from another container:
CONTAINER_IP=$(sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID)
echo $CONTAINER_IP
When you specify -p 5672, What docker does is open up a new port, such as 49xxx on the host and forwards it to port 5672 of the container.
you should be able to see which port is forwarding to the container by running:
sudo docker ps -a
From there, you can connect directly to the host IP address like so:
amqp://guest#HOST_IP:49xxx
You can't use localhost, because each container is basically its own localhost.
Create Image:
docker build -t "imagename1" .
docker build -t "imagename2" .
Run Docker image:
docker run -it -p 8000:8000 --name=imagename1 imagename1
docker run -it -p 8080:8080 --name=imagename2 imagename2
Create Network:
docker network create -d bridge "networkname"
Connect the network with container(imagename) created after running the image:
docker network connect "networkname" "imagename1"
docker network connect "networkname" "imagename2"
We can add any number of containers to the network.
docker network inspect ''networkname"
I think you can't connect to another container directly by design - that would be the responsibility of the host. An example of sharing data between containers using Volumes is given here http://docs.docker.io/en/latest/examples/couchdb_data_volumes/, but I don't think that that is what you're looking for.
I recently found out about https://github.com/toscanini/maestro - that might suit your needs. Let us know if it does :), I haven't tried it myself yet.
Edit. Note that you can read here that native "Container wiring and service discovery" is on the roadmap. I guess 7.0 or 8.0 at the latest.
You can get the docker instance IP with...
CID=$(sudo docker run -d -p :5672 markellul/rabbitmq /usr/sbin/rabbitmq-server); sudo docker inspect $CID | grep IPAddress
But that's not very useful.
You can use pipework to create a private network between docker containers.
This is currently on the 0.8 roadmap:
https://github.com/dotcloud/docker/issues/1143