Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:redis into ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master

Proposed by Sergio Durigan Junior
Status: Merged
Merge reported by: Sergio Durigan Junior
Merged at revision: e08cfb221bc51d639faf22eb4f8d76d9fd259891
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:redis
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master
Diff against target: 179 lines (+167/-0)
2 files modified
data/redis.yaml (+67/-0)
out/redis.md (+100/-0)
Reviewer Review Type Date Requested Status
Valentin Viennot (community) Approve
Richard Harding Pending
Lucas Kanashiro Pending
Canonical Server Pending
Review via email: mp+394267@code.launchpad.net

Description of the change

Redis data (needed to generate the README file) and the corresponding redis.md (generated from the data).

To post a comment you must log in.
Revision history for this message
Valentin Viennot (valentinviennot) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/data/redis.yaml b/data/redis.yaml
2new file mode 100644
3index 0000000..c7440f0
4--- /dev/null
5+++ b/data/redis.yaml
6@@ -0,0 +1,67 @@
7+application: Redis
8+repo: redis
9+description: >
10+ Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.
11+ It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams.
12+ 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.
13+ Read more on the [Redis website](https://redis.io/topics/introduction).
14+version: 5.0.7
15+base: Ubuntu 20.04 LTS
16+architectures:
17+ - amd64
18+ - arm64
19+ - ppc64el
20+ - s390x
21+docker:
22+ parameters:
23+ - -p 30073:6379
24+ - -e REDIS_PASSWORD=mypassword
25+ access: Access your Redis server at `localhost:30073`.
26+parameters:
27+ - type: -e
28+ value: TZ=UTC
29+ description: Timezone.
30+ - type: -e
31+ value: ALLOW_EMPTY_PASSWORD
32+ description: Set to `yes` to allow connections to `redis-server` without a password. **This setting is not recommended in production environments**.
33+ - type: -e
34+ value: REDIS_PASSWORD
35+ description: Set the desired password to be used.
36+ - type: -e
37+ value: REDIS_RANDOM_PASSWORD
38+ description: Set this variable to `1` if you would like the entrypoint script to generate a random password for you. You will be able to see the generated password in the logs (`docker logs`).
39+ - type: -e
40+ value: REDIS_ALLOW_REMOTE_CONNECTIONS=yes
41+ description: Set to `no` to disallow remote connections to `redis-server` (i.e., make `redis-server` listen to `127.0.0.1` only).
42+ - type: -e
43+ value: REDIS_EXTRA_FLAGS
44+ description: Specify extra flags to be passed to `redis-server` when initializing it.
45+ - type: -p
46+ value: 30073:6379
47+ description: Expose redis on `localhost:30073`.
48+ - type: -v
49+ value: /path/to/redis.conf:/etc/redis/redis.conf
50+ description: 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)).
51+debug:
52+ network:
53+ client: redis-cli
54+ args: -h redis-container
55+ followup: |
56+ ```
57+ ```
58+ redis:6379> AUTH mypassword
59+ OK
60+ redis:6379> PING
61+ PONG
62+ redis:6379>
63+microk8s:
64+ configmap:
65+ name: redis-config
66+ files:
67+ - key: redis
68+ name: redis.conf
69+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf
70+ deploy:
71+ name: redis-deployment.yml
72+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/redis-deployment.yml
73+ access: You will now be able to connect to the Redis server on `localhost:30073`.
74diff --git a/out/redis.md b/out/redis.md
75new file mode 100644
76index 0000000..6e0f233
77--- /dev/null
78+++ b/out/redis.md
79@@ -0,0 +1,100 @@
80+# Redis | Ubuntu
81+
82+
83+## About Redis
84+
85+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).
86+
87+
88+## Tags and Architectures
89+
90+
91+| Tag | Currently | Architectures |
92+|---|---|---|
93+| `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` |
94+
95+## Usage
96+
97+Launch this image locally:
98+
99+```sh
100+docker run -d --name redis-container -e TZ=UTC -p 30073:6379 -e REDIS_PASSWORD=mypassword ubuntu/redis:5.x
101+```
102+
103+Access your Redis server at `localhost:30073`.
104+
105+#### Parameters
106+
107+| Parameter | Description |
108+|---|---|
109+| `-e TZ=UTC` | Timezone. |
110+| `-e ALLOW_EMPTY_PASSWORD` | Set to `yes` to allow connections to `redis-server` without a password. **This setting is not recommended in production environments**. |
111+| `-e REDIS_PASSWORD` | Set the desired password to be used. |
112+| `-e REDIS_RANDOM_PASSWORD` | Set this variable to `1` if you would like the entrypoint script to generate a random password for you. You will be able to see the generated password in the logs (`docker logs`). |
113+| `-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). |
114+| `-e REDIS_EXTRA_FLAGS` | Specify extra flags to be passed to `redis-server` when initializing it. |
115+| `-p 30073:6379` | Expose redis on `localhost:30073`. |
116+| `-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)). |
117+
118+
119+#### Testing/Debugging
120+
121+To debug the container:
122+
123+```sh
124+$ docker logs -f redis-container
125+```
126+
127+To get an interactive shell:
128+
129+```sh
130+$ docker exec -it redis-container /bin/bash
131+```
132+
133+This image also includes the `redis-cli` client for interactive container use:
134+
135+```sh
136+$ docker network create redis-network
137+$ docker network connect redis-network redis-container
138+$ docker run -it --rm --network redis-network ubuntu/redis:5.x redis-cli -h redis-container
139+```
140+```
141+redis:6379> AUTH mypassword
142+OK
143+redis:6379> PING
144+PONG
145+redis:6379>
146+
147+```
148+
149+
150+## Deploy with Kubernetes
151+
152+
153+
154+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`.
155+
156+Download
157+[redis.conf](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/config/redis.conf), and
158+[redis-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/redis/plain/examples/redis-deployment.yml). Then:
159+
160+```sh
161+$ kubectl create configmap redis-config --from-file=redis=redis.conf
162+$ kubectl apply -f redis-deployment.yml
163+```
164+
165+You will now be able to connect to the redis server on `localhost:30073`.
166+
167+## Bugs and feature requests
168+
169+If you find a bug in our image or want to request a specific feature, please file a bug here:
170+
171+[https://bugs.launchpad.net/ubuntu-docker-images/+filebug](https://bugs.launchpad.net/ubuntu-docker-images/+filebug)
172+
173+Please title the bug "`redis: <reason>`".
174+
175+Make sure to include the digest of the image you are using, from:
176+```sh
177+$ docker images --no-trunc --quiet ubuntu/redis:<tag>
178+```
179+

Subscribers

People subscribed via source and target branches

to all changes: