Add simple keter bundle tests with wildcard assignments

This commit is contained in:
Aaron Friel 2013-08-29 17:23:31 -05:00
parent 7c5a8952f3
commit f1245e8bbc
10 changed files with 92 additions and 0 deletions

View 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
View File

@ -0,0 +1 @@
bar

View 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
View File

@ -0,0 +1 @@
baz

View 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
View File

@ -0,0 +1 @@
foo

23
bundles/make-bundles.sh Executable file
View 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/

View 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
View File

@ -0,0 +1 @@
qux

25
bundles/readme.md Normal file
View 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
```