mirror of
https://github.com/snoyberg/keter.git
synced 2024-12-13 10:53:41 +03:00
Add simple keter bundle tests with wildcard assignments
This commit is contained in:
parent
7c5a8952f3
commit
f1245e8bbc
10
bundles/bar/config/keter.yaml
Normal file
10
bundles/bar/config/keter.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
# bar
|
||||
static-hosts:
|
||||
- host: bar.example.com
|
||||
root: ../static
|
||||
- host: bar.*.example.com
|
||||
root: ../static
|
||||
- host: bar.*.*.example.com
|
||||
root: ../static
|
||||
- host: bar.*.*.*.example.com
|
||||
root: ../static
|
1
bundles/bar/static/test
Normal file
1
bundles/bar/static/test
Normal file
@ -0,0 +1 @@
|
||||
bar
|
10
bundles/baz/config/keter.yaml
Normal file
10
bundles/baz/config/keter.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
# baz
|
||||
static-hosts:
|
||||
- host: baz.example.com
|
||||
root: ../static
|
||||
- host: baz.*.example.com
|
||||
root: ../static
|
||||
- host: baz.*.*.example.com
|
||||
root: ../static
|
||||
- host: baz.*.*.*.example.com
|
||||
root: ../static
|
1
bundles/baz/static/test
Normal file
1
bundles/baz/static/test
Normal file
@ -0,0 +1 @@
|
||||
baz
|
10
bundles/foo/config/keter.yaml
Normal file
10
bundles/foo/config/keter.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
# foo
|
||||
static-hosts:
|
||||
- host: foo.example.com
|
||||
root: ../static
|
||||
- host: foo.*.example.com
|
||||
root: ../static
|
||||
- host: foo.*.*.example.com
|
||||
root: ../static
|
||||
- host: foo.*.*.*.example.com
|
||||
root: ../static
|
1
bundles/foo/static/test
Normal file
1
bundles/foo/static/test
Normal file
@ -0,0 +1 @@
|
||||
foo
|
23
bundles/make-bundles.sh
Executable file
23
bundles/make-bundles.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
pushd `dirname $0`
|
||||
|
||||
rm ./*.keter -f
|
||||
|
||||
pushd ./foo
|
||||
tar czfv ../foo.keter *
|
||||
popd
|
||||
|
||||
pushd ./bar
|
||||
tar czfv ../bar.keter *
|
||||
popd
|
||||
|
||||
pushd ./baz
|
||||
tar czfv ../baz.keter *
|
||||
popd
|
||||
|
||||
pushd ./qux
|
||||
tar czfv ../qux.keter *
|
||||
popd
|
||||
|
||||
cp ./*.keter /opt/keter/incoming/
|
10
bundles/qux/config/keter.yaml
Normal file
10
bundles/qux/config/keter.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
# qux
|
||||
static-hosts:
|
||||
- host: qux.example.com
|
||||
root: ../static
|
||||
- host: qux.*.example.com
|
||||
root: ../static
|
||||
- host: qux.*.*.example.com
|
||||
root: ../static
|
||||
- host: qux.*.*.*.example.com
|
||||
root: ../static
|
1
bundles/qux/static/test
Normal file
1
bundles/qux/static/test
Normal file
@ -0,0 +1 @@
|
||||
qux
|
25
bundles/readme.md
Normal file
25
bundles/readme.md
Normal file
@ -0,0 +1,25 @@
|
||||
These subfolders contain (nearly) empty example keter applications to be made
|
||||
into bundles for deployment. The goal of these different bundles is to ensure
|
||||
that adding and removing bundles is reproducible.
|
||||
|
||||
To this end, a structure of hostnames are reserved by the child applications.
|
||||
Each application also contains a script that will deploy it (on a system with
|
||||
the recommended default keter location), test that particular bundle's config,
|
||||
and un-deploy it.
|
||||
|
||||
Each bundle contains only a static "test" file that contains the name of the
|
||||
bundle. That file is then exposed to a variety of hostnames:
|
||||
|
||||
|
||||
```yaml
|
||||
# foo.yaml
|
||||
static-hosts:
|
||||
- host: foo.example.com
|
||||
root: ../static
|
||||
- host: foo.*.example.com
|
||||
root: ../static
|
||||
- host: foo.*.*.example.com
|
||||
root: ../static
|
||||
- host: foo.*.*.*.example.com
|
||||
root: ../static
|
||||
```
|
Loading…
Reference in New Issue
Block a user