-
Notifications
You must be signed in to change notification settings - Fork 2
/
rockcraft.yaml
66 lines (61 loc) · 1.93 KB
/
rockcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
---
name: charmed-redis # the name of your ROCK
base: [email protected] # the base environment for this ROCK
version: '7.2.5' # just for humans. Semantic versioning is recommended
summary: Charmed Redis ROCK OCI # 79 char long summary
description: |
This is an OCI image that bundles Redis together with the metrics exporter
in order to be used in Charmed Operators, providing automated operations
management from day 0 to day 2 on Redis, on top of a Virtual Machine cluster
and K8s cluster. It is an open source, end-to-end, production ready data
platform on top of cloud native technologies.
license: Apache-2.0 # your application's SPDX license
platforms: # The platforms this ROCK should be built on and run on
amd64:
services:
redis:
override: replace
startup: disabled
summary: Start Redis
command: "redis-server"
redis_exporter:
override: replace
startup: disabled
summary: Start Redis Exporter
command: "/bin/redis_exporter"
package-repositories:
- type: apt
components: [main]
suites: [jammy]
key-id: 54318FA4052D1E61A6B6F7BB5F4349D6BF53AA0C
url: https://packages.redis.io/deb
priority: always
parts:
redis-user:
plugin: nil
overlay-script: |
groupadd -R $CRAFT_OVERLAY -g 584788 redis
useradd -R $CRAFT_OVERLAY -M -r -g redis -u 584788 redis
override-prime: |
craftctl default
# Give permission and create the required directories
mkdir -p $CRAFT_PRIME/var/lib/redis
chmod 0755 $CRAFT_PRIME/var/lib/redis
chown -R 584788:584788 $CRAFT_PRIME/var/lib/redis
redis:
plugin: nil
after:
- redis-user
stage-packages:
- redis
redis_exporter:
plugin: go
after:
- redis
source: https://github.com/canonical/redis_exporter.git
source-type: git
source-branch: "v1.60.0"
build-snaps:
- go/1.21/stable