Merge ~valentinviennot/ubuntu-docker-images:update-redis-readme into ~ubuntu-docker-images/ubuntu-docker-images/+git/redis:edge

Proposed by Valentin Viennot
Status: Merged
Merged at revision: 0d96fbbe85630b6664c4bc42609ce08d876fc459
Proposed branch: ~valentinviennot/ubuntu-docker-images:update-redis-readme
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/redis:edge
Diff against target: 196 lines (+40/-98)
1 file modified
README.md (+40/-98)
Reviewer Review Type Date Requested Status
Richard Harding (community) Approve
Review via email: mp+394244@code.launchpad.net

Description of the change

Final review from latest meetings. This content has been generated by the templating tool proposal, with latest data and template.

https://bugs.launchpad.net/ubuntu-docker-images/+bug/1904931

Please check if everything seems fine and if I can go ahead in this direction.

To post a comment you must log in.
Revision history for this message
Richard Harding (rharding) wrote :

+1 looks like a nice set of changes thanks for the additional polish on these.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index 8acb9a8..404e629 100644
3--- a/README.md
4+++ b/README.md
5@@ -1,28 +1,29 @@
6 # Redis | Ubuntu
7
8-## About Redis
9-
10-"Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. [Learn more](https://redis.io/topics/introduction)." (from [redis.io](redis.io))
11
12-## Tags
13+## About Redis
14
15-- `5.0.7-focal`, `5.0.7`, `5.0-focal`, `5.0`, `5-focal`, `5`, `focal`, `beta` - **/!\ this is a beta release**
16+Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. Read more on the [Redis website](https://redis.io/topics/introduction).
17
18-## Architectures supported
19
20-* `amd64`, `arm64`, `ppc64el`, `s390x`
21+## Tags and Architectures
22
23+| Tag | Currently | Architectures |
24+|---|---|---|
25+| `5.x`    ![BETA](https://assets.ubuntu.com/v1/e8ac33d1-header-beta-flag.svg) | Redis 5.0.7 on Ubuntu 20.04 LTS | `amd64`, `arm64`, `ppc64el`, `s390x` |
26
27 ## Usage
28-### Docker CLI
29+
30+Launch this image locally:
31
32 ```sh
33-$ docker run -d --name redis-container -p 30073:6379 -e TZ=UTC -e REDIS_PASSWORD=mypassword squeakywheel/redis:edge
34+docker run -d --name redis-container -e TZ=UTC -p 30073:6379 -e REDIS_PASSWORD=mypassword ubuntu/redis:5.x
35 ```
36
37-Access your Redis server at `localhost:30073`.
38+Access your MySQL server at `localhost:30073`.
39
40 #### Parameters
41+
42 | Parameter | Description |
43 |---|---|
44 | `-e TZ=UTC` | Timezone. |
45@@ -32,122 +33,63 @@ Access your Redis server at `localhost:30073`.
46 | `-e REDIS_ALLOW_REMOTE_CONNECTIONS=yes` | Set to `no` to disallow remote connections to `redis-server` (i.e., make `redis-server` listen to `127.0.0.1` only). |
47 | `-e REDIS_EXTRA_FLAGS` | Specify extra flags to be passed to `redis-server` when initializing it. |
48 | `-p 30073:6379` | Expose redis on `localhost:30073`. |
49-| `-v /path/to/redis.conf:/etc/redis/redis.conf` | Mount local [configuration file](https://redis.io/topics/config) `redis.conf` (download this [example file](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf)). |
50-
51+| `-v /path/to/redis.conf:/etc/redis/redis.conf` | Local [configuration file](https://redis.io/topics/config) `redis.conf` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf)). |
52
53 #### Testing/Debugging
54
55-In case you need to debug what it is happening with the container you can run `docker logs <name_of_the_container>`. But if you want to get access to an interactive shell run:
56+To debug the container:
57
58 ```sh
59-$ docker exec -it <name_of_the_container> /bin/bash
60+$ docker logs -f redis-container
61 ```
62
63-With this same image, you can launch an interactive container with the `redis-cli` program,
64-and connect to the `redis-server` that is running in the first container.
65+To get an interactive shell:
66
67 ```sh
68-$ docker network create redis-network
69-$ docker network connect redis-network redis-container
70-$ docker run -it --network redis-network --rm squeakywheel/redis:edge redis-cli -h redis-container
71+$ docker exec -it redis-container /bin/bash
72+```
73+
74+This image also includes the redis-cli client for interactive container use:
75+
76+```sh
77+$ docker network create redis-net
78+$ docker network connect redis-net redis-container
79+$ docker run -it --rm --network redis-net ubuntu/redis:5.x redis-cli -h redis-container
80+```
81+```
82 redis:6379> AUTH mypassword
83 OK
84 redis:6379> PING
85 PONG
86 redis:6379>
87+
88 ```
89
90-### Deploy with Kubernetes
91
92-You can use your favorite Kubernetes distribution; if you don't have one, consider [installing MicroK8s](https://microk8s.io/).
93+## Deploy with Kubernetes
94
95-With microk8s running, enable the `dns` and `storage` add-ons:
96+Works with any Kubernetes; if you don't have one, we recommend you [install MicroK8s](https://microk8s.io/) and `microk8s enable dns storage` then alias `kubectl` to `microk8s.kubectl`.
97
98-```sh
99-$ microk8s enable dns storage
100-```
101+Download
102+[redis.conf](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf) and
103+[redis-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/redis-deployment.yml). Then:
104
105 ```sh
106-$ microk8s kubectl create configmap redis-config --from-file=redis=config/redis.conf
107-```
108-
109-Use the sample deployment yaml provided [here](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/redis-deployment.yml).
110-
111-<details>
112- <summary>Apply the `redis-deployment.yml` (click to expand)</summary>
113-
114-```yaml
115-# redis-deployment.yml
116----
117-apiVersion: apps/v1
118-kind: Deployment
119-metadata:
120- name: redis-deployment
121-spec:
122- replicas: 1
123- selector:
124- matchLabels:
125- app: redis
126- template:
127- metadata:
128- labels:
129- app: redis
130- spec:
131- containers:
132- - name: redis
133- image: squeakywheel/redis:edge
134- volumeMounts:
135- - name: redis-config-volume
136- mountPath: /etc/redis/redis.conf
137- subPath: redis.conf
138- ports:
139- - containerPort: 6379
140- name: redis
141- protocol: TCP
142- volumes:
143- - name: redis-config-volume
144- configMap:
145- name: redis-config
146- items:
147- - key: redis
148- path: redis.conf
149----
150-apiVersion: v1
151-kind: Service
152-metadata:
153- name: redis-service
154-spec:
155- type: NodePort
156- selector:
157- app: redis
158- ports:
159- - protocol: TCP
160- port: 6379
161- targetPort: 6379
162- nodePort: 30073
163- name: redis
164-```
165-</details>
166-
167-```
168-$ microk8s kubectl apply -f redis-deployment.yml
169+$ kubectl create configmap redis-config --from-file=redis.conf
170+$ kubectl apply -f redis-deployment.yml
171 ```
172
173 You will now be able to connect to the redis server on `localhost:30073`.
174
175-## Bugs and Features request
176-
177-If you find a bug in our image or want to request a specific feature file a bug here:
178+## Bugs and feature requests
179
180-https://bugs.launchpad.net/ubuntu-docker-images/+filebug
181+If you find a bug in our image or want to request a specific feature, please file a bug here:
182
183-In the title of the bug add `redis: <reason>`.
184+[https://bugs.launchpad.net/ubuntu-docker-images/+filebug](https://bugs.launchpad.net/ubuntu-docker-images/+filebug)
185
186-Make sure to include:
187+Please title the bug "`redis: <reason>`".
188
189-* The digest of the image you are using, you can find it using this command replacing `<tag>` with the one you used to run the image:
190+Make sure to include the digest of the image you are using, from:
191 ```sh
192-$ docker images --no-trunc --quiet squeakywheel/redis:<tag>
193+$ docker images --no-trunc --quiet ubuntu/redis:<tag>
194 ```
195-* Reproduction steps for the deployment
196-* If it is a feature request, please provide as much detail as possible

Subscribers

People subscribed via source and target branches