forked from canonical/lxd-demo-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.snapcraft.yaml
86 lines (73 loc) · 1.81 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
name: lxd-demo-server
base: core18
version: git
grade: stable
summary: LXD demo server
description: |-
Let website visitors spawn test containers
This is the service behind https://linuxcontainers.org/lxd/try-it
It can be used to easily allow visitors on a website to spawn a
container, get a shell inside it and play around with some piece of
software for a limited amount of time.
Supported features:
- Get service status (available features, availability, addresses, ...)
- Read and validate terms of service
- Spawn a demo container
- Get info on running container
- Access container console
- Send feedback on demo experience
To install:
- sudo snap install lxd
- sudo lxd init
- sudo snap install lxd-demo-server
- sudo snap connect lxd-demo-server:lxd lxd:lxd
confinement: strict
apps:
daemon:
command: daemon.start
daemon: simple
plugs:
- lxd
- network
- network-bind
configure:
command: configure
database:
command: database
parts:
lxd-demo-server:
source: .
build-packages:
- gcc
- libsqlite3-dev
stage-packages:
- sqlite3
- uuid-runtime
- vim-tiny
plugin: go
go-packages:
- github.com/lxc/lxd-demo-server
go-importpath: github.com/lxc/lxd-demo-server
organize:
usr/bin/sqlite3: bin/sqlite3
usr/bin/uuidgen: bin/uuidgen
usr/bin/vim.tiny: bin/vim.tiny
prime:
- bin/sqlite3
- bin/uuidgen
- bin/vim.tiny
- bin/lxd-demo-server
override-build: |-
set -ex
sed -i "s/ osFchown(fd,uid,gid)/ 0/g" ../go/src/github.com/mattn/go-sqlite3/sqlite3-binding.c
set +ex
snapcraftctl build
set -ex
static:
plugin: dump
source: static
organize:
./*: static/
wrappers:
plugin: dump
source: .snapcraft/