-
Notifications
You must be signed in to change notification settings - Fork 0
/
rockcraft.yaml
57 lines (54 loc) · 1.75 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
# Copyright 2024 Canonical Ltd.
# See LICENSE-rock file for licensing details.
---
name: charmed-valkey # 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 Valkey ROCK OCI # 79 char long summary
description: |
This is an OCI image that bundles Valkey together with the metrics exporter
in order to be used in Charmed Operators, providing automated operations
management from day 0 to day 2 on Valkey, 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:
valkey:
override: replace
startup: enabled
summary: Start Valkey
command: "valkey-server --dir /var/lib/valkey"
user: valkey
redis_exporter:
override: replace
startup: enabled
summary: Start Metrics Exporter
command: "/bin/redis_exporter"
user: valkey
parts:
valkey:
plugin: nil
stage-snaps:
- charmed-valkey/latest/edge
valkey-user:
plugin: nil
after:
- valkey
overlay-script: |
# Create a user in the $CRAFT_OVERLAY chroot
groupadd -R $CRAFT_OVERLAY -g 584788 valkey
useradd -R $CRAFT_OVERLAY -M -r -g valkey -u 584788 valkey
override-prime: |
mkdir -p $CRAFT_PRIME/var/lib/valkey
chown -R 584788:584788 $CRAFT_PRIME/var/lib/valkey
redis_exporter:
plugin: go
after:
- valkey-user
source: https://github.com/canonical/redis_exporter.git
source-type: git
source-branch: "v1.60.0"
build-snaps:
- go/1.21/stable