diff options
author | Benjamin W. Smith <benjaminwarfield@just-another.net> | 2009-11-06 19:10:39 -0500 |
---|---|---|
committer | Benjamin W. Smith <benjaminwarfield@just-another.net> | 2009-11-06 19:10:39 -0500 |
commit | d7b33833bc2a81e68d98a7fd6c0c22e75de53817 (patch) | |
tree | 74a6511d0af14a5cca1dbc8f9a2d01d52ae59732 | |
parent | a957418489e9d8068628440c66488825496fcbc9 (diff) | |
download | mrbelvedere-d7b33833bc2a81e68d98a7fd6c0c22e75de53817.tar.bz2 mrbelvedere-d7b33833bc2a81e68d98a7fd6c0c22e75de53817.tar.xz mrbelvedere-d7b33833bc2a81e68d98a7fd6c0c22e75de53817.zip |
Decided to use YAML. It just makes sense. Added an example config, updated the readme.
-rw-r--r-- | LANGUAGE_IDEAS | 31 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | examples/webserver.yaml | 38 |
3 files changed, 39 insertions, 32 deletions
diff --git a/LANGUAGE_IDEAS b/LANGUAGE_IDEAS deleted file mode 100644 index eb5f041..0000000 --- a/LANGUAGE_IDEAS +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | Example template: | ||
2 | |||
3 | - Define template "webserver": | ||
4 | ; describe template here | ||
5 | |||
6 | - My Roles: | ||
7 | - webserver | ||
8 | |||
9 | - I need to use: | ||
10 | ; this is where we define the services/dependencies needed | ||
11 | - network | ||
12 | - ssh | ||
13 | - python_modules as modules | ||
14 | |||
15 | - I need these accounts: | ||
16 | - bsmith | ||
17 | |||
18 | - I need these packages: | ||
19 | - apache | ||
20 | - version: 2.2.14 | ||
21 | - python | ||
22 | - version: 2.6.2 | ||
23 | - modules: modules.all | ||
24 | |||
25 | - Runtime | ||
26 | """ | ||
27 | #!/usr/bin/env python | ||
28 | from mrbelvedere import module | ||
29 | |||
30 | module.do_stuff(arg) | ||
31 | """ | ||
@@ -6,7 +6,7 @@ multiple servers. | |||
6 | Several goals for this project: | 6 | Several goals for this project: |
7 | 7 | ||
8 | 8 | ||
9 | 1. Easy to read/understand config templates kind of like Ruby's RSpec. | 9 | 1. Easy to read/understand config templates via YAML |
10 | 2. Distributed Version Control using mercurial | 10 | 2. Distributed Version Control using mercurial |
11 | 3. Notion of roles | 11 | 3. Notion of roles |
12 | 4. Notion of environment (use branching to achieve) | 12 | 4. Notion of environment (use branching to achieve) |
diff --git a/examples/webserver.yaml b/examples/webserver.yaml new file mode 100644 index 0000000..7dd937c --- /dev/null +++ b/examples/webserver.yaml | |||
@@ -0,0 +1,38 @@ | |||
1 | # YAML | ||
2 | template: | ||
3 | name: webserver | ||
4 | description: | | ||
5 | Basic webserver template | ||
6 | roles: | ||
7 | # Define my roles here | ||
8 | - webserver | ||
9 | services: | ||
10 | # This is where we define the | ||
11 | # services/dependencies needed | ||
12 | use: | ||
13 | - network | ||
14 | - ssh | ||
15 | - accounts: | ||
16 | users: | ||
17 | - bsmith | ||
18 | groups: | ||
19 | - bsmith | ||
20 | disable: | ||
21 | - selinux | ||
22 | software_packages: | ||
23 | apache: | ||
24 | - version: 2.2.14 | ||
25 | python: | ||
26 | - version: 2.6.2 | ||
27 | python_modules: python_modules.all | ||
28 | runtime_script: | | ||
29 | #!/usr/bin/env python | ||
30 | """ Make subset of runtime methods available | ||
31 | """ | ||
32 | from mrbelvedere import module | ||
33 | |||
34 | module.do_stuff(arg) | ||
35 | # Nice thing about YAML/PyYAML is defining variables | ||
36 | # And calling code in-line. Can do tricks like below | ||
37 | dir: &DIR /tmp | ||
38 | adhoc: !!python/object/apply:os.listdir [*DIR] | ||