-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
176 lines (155 loc) · 5.65 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: juju
version: 2.9.27
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
**Note**
This snap needs to read any relevant locally stored cloud credentials in order to manage resources on your behalf in a specified cloud.
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
plugs:
- network
- network-bind
- ssh-public-keys
- lxd
# Needed so that juju can still use the real ~/.local/share/juju.
- dot-local-share-juju
# Needed to read lxd config.
- config-lxd
# Needed to read ~/.kube, ~/.novarc, ~/.aws etc.
- dot-aws
- dot-azure
- dot-google
- dot-kubernetes
- dot-maas
- dot-openstack
- dot-oracle
# Needed so that arbitrary cloud/credential yaml files can be read and backups written.
- home
# Needed to that SSO via the web browser can work.
- desktop
fetch-oci:
daemon: oneshot
command: wrappers/fetch-oci
start-timeout: 3m
stop-timeout: 35s
plugs:
- network
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.17/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
dot-local-share-juju:
interface: personal-files
write:
- $HOME/.local/share/juju
config-lxd:
interface: personal-files
read:
- $HOME/snap/lxd/common/config
dot-aws:
interface: personal-files
read:
- $HOME/.aws
dot-azure:
interface: personal-files
read:
- $HOME/.azure
dot-google:
interface: personal-files
read:
- $HOME/.config/gcloud
dot-kubernetes:
interface: personal-files
read:
- $HOME/.kube
dot-maas:
interface: personal-files
read:
- $HOME/.maasrc
dot-oracle:
interface: personal-files
read:
- $HOME/.oci
dot-openstack:
interface: personal-files
read:
- $HOME/.novarc