-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
105 lines (94 loc) · 4.17 KB
/
snapcraft.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: juju
version: 2.9.8
summary: Juju - a model-driven operator lifecycle manager for K8s and machines
description: |
A model-driven **universal operator lifecycle manager** for multi cloud and hybrid cloud application management on K8s and machines.
**What is an operator lifecycle manager?**
Kubernetes operators are containers with operations code, that drive your applications on K8s. Juju is an operator lifecycle manager that manages the installation, integration and configuration of operators on the cluster. Juju also extends the idea of operators to traditional application management on Linux and Windows servers, or cloud instances.
**Model-driven operations and integration**
Organise your operators into models, which group together applications that can be tightly integrated on the same substrate and operated by the same team. Capture resource allocation, storage, networking and integration information in the model to simplify ongoing operations.
**Better day-2 operations**
Each operator code package, called a charm, declares methods for actions like back, restore, or security audit. Calling these methods provides remote administration of the application with no low-level access required.
**Learn more**
- https://juju.is/
- https://discourse.charmhub.io/
- https://github.com/juju/juju
confinement: classic
grade: devel
base: core18
apps:
juju:
environment:
# Make sure we access snap binaries first (i.e. juju-metadata lp:1759013)
PATH: "$SNAP/bin:$SNAP/usr/bin:/snap/bin:$PATH"
command: bin/juju
fetch-oci:
daemon: oneshot
command: wrappers/fetch-oci
start-timeout: 3m
stop-timeout: 35s
parts:
wrappers:
plugin: dump
source: snap/local
juju:
# TODO(hpidcock): move to upstream go plugin when it has the features we need.
plugin: juju-go
go-channel: 1.14/stable
# The source can be your local tree or github
# source: https://github.com/juju/juju.git
# If you pull a remote, set source-depth to 1 to make the fetch shorter
# source-depth: 1
# source: file:///full/file/path
# By default, reuse existing tree
source: .
# TODO(wallyworld) - uncomment source-type once LP:1860526 is fixed.
#source-type: git
# You can grab a specific tag, commit, or branch
# source-tag: juju-2.0.2
# source-commit: a83896d913d7e43c960e441c1e41612116d92d46
# source-branch: develop
# apply patches before building
go-packages:
- github.com/juju/juju/cmd/juju
# If you are releasing a build with public streams, you don't need to build the agent
# Instead, you should use the released agent
- github.com/juju/juju/cmd/jujuc
- github.com/juju/juju/cmd/jujud
- github.com/juju/juju/cmd/plugins/juju-metadata
- github.com/juju/juju/cmd/plugins/juju-wait-for
# go-external-strings is not supported by the standard go plugin.
# these strings are filled in by CI.
go-external-strings:
github.com/juju/juju/version.GitCommit: ""
github.com/juju/juju/version.GitTreeState: ""
github.com/juju/juju/version.build: ""
# go-static is not supported by the standard go plugin.
go-static: true
# go-strip is not supported by the standard go plugin.
go-strip: true
override-build: |
snapcraftctl build
mkdir -p $SNAPCRAFT_PART_INSTALL/bash_completions
cp -a etc/bash_completion.d/juju* $SNAPCRAFT_PART_INSTALL/bash_completions/.
# If you are releasing a build with public streams, copy in the agent directly
# If needed, grab the agent from streams
# curl http://streams.canonical.com/juju/tools/agent/$SNAPCRAFT_PROJECT_VERSION/juju-$SNAPCRAFT_PROJECT_VERSION-ubuntu-amd64.tgz | tar xz -C $SNAPCRAFT_PART_INSTALL/bin/
jujud=$SNAPCRAFT_PART_INSTALL/bin/jujud
version=$(jujud version)
hash=$(sha256sum $jujud | cut -d " " -f 1)
cat > jujud-versions.yaml <<EOF
versions:
- version: $version
sha256: $hash
EOF
cp -a jujud-versions.yaml $SNAPCRAFT_PART_INSTALL/bin
hooks:
connect-plug-peers: {}
disconnect-plug-peers: {}
post-refresh: {}
plugs:
peers:
interface: content
content: microk8s
target: $SNAP_COMMON/.peers