Break redis into a function. Add reference to README for now
This commit is contained in:
parent
139e45333b
commit
5cad2fef43
@ -128,6 +128,13 @@ You can see worker pods spin up then complete by watching the status of all pods
|
|||||||
watch kubectl get pods
|
watch kubectl get pods
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To see progress and failed batches, connect to Redis with
|
||||||
|
```
|
||||||
|
./mev redis
|
||||||
|
```
|
||||||
|
|
||||||
|
then query keys keys and values using the [spec shared by dramatiq](https://github.com/Bogdanp/dramatiq/blob/24cbc0dc551797783f41b08ea461e1b5d23a4058/dramatiq/brokers/redis/dispatch.lua#L24-L43)
|
||||||
|
|
||||||
To watch the logs for a given pod, take its pod name using the above, then run:
|
To watch the logs for a given pod, take its pod name using the above, then run:
|
||||||
```
|
```
|
||||||
kubectl logs -f pod/mev-inspect-backfill-abcdefg
|
kubectl logs -f pod/mev-inspect-backfill-abcdefg
|
||||||
|
18
mev
18
mev
@ -23,6 +23,16 @@ function db(){
|
|||||||
-- $DB_NAME --host=$host --user=$username
|
-- $DB_NAME --host=$host --user=$username
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function redis(){
|
||||||
|
echo "To continue, enter 'shift + r'"
|
||||||
|
redis_password=$(get_kube_secret "redis" "redis-password")
|
||||||
|
kubectl run -i --rm --tty \
|
||||||
|
--namespace default redis-client-$RANDOM \
|
||||||
|
--env REDIS_PASSWORD=$redis_password \
|
||||||
|
--image docker.io/bitnami/redis:6.2.6-debian-10-r0 \
|
||||||
|
--command -- redis-cli -h redis-master -a $redis_password
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
db)
|
db)
|
||||||
echo "Connecting to $DB_NAME"
|
echo "Connecting to $DB_NAME"
|
||||||
@ -30,13 +40,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
redis)
|
redis)
|
||||||
echo "Connecting to redis"
|
echo "Connecting to redis"
|
||||||
echo "To continue enter 'shift + r'"
|
redis
|
||||||
redis_password=$(get_kube_secret "redis" "redis-password")
|
|
||||||
kubectl run -i --rm --tty \
|
|
||||||
--namespace default redis-client-$RANDOM \
|
|
||||||
--env REDIS_PASSWORD=$redis_password \
|
|
||||||
--image docker.io/bitnami/redis:6.2.6-debian-10-r0 \
|
|
||||||
--command -- redis-cli -h redis-master -a $redis_password
|
|
||||||
;;
|
;;
|
||||||
listener)
|
listener)
|
||||||
kubectl exec -ti deploy/mev-inspect -- ./listener $2
|
kubectl exec -ti deploy/mev-inspect -- ./listener $2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user