update comment in the template
[heat-templates.git] / staging / chef_mysql_single.template
blobe8c9c652570211e5e2bdfcadcbd6de1e9adc142f
1 heat_template_version: 2013-05-23
3 description: |
4   Configures a cloud server with chef-solo
6 parameters:
7   keypair_name:
8     type: string
10   stack_id:
11     type: string
12     default: "mysql_stack"
14   mysql_server_flavor:
15     type: string
16     default: "performance1-1"
18   mysql_server_name:
19     type: string
20     default: "mysql_server"
22   mysql_root_password:
23     type: string
24     default: "verybadpass123"
26   database_name:
27     type: string
28     default: "mysql_database"
30   database_username:
31     type: string
32     default: "mysql_user"
34   database_password:
35     type: string
36     default: "verybadpass123"
38   keypair_name:
39     type: string
40     default: "badkeypair"
42   private_key:
43    type: string
44    default: "badprivatekey"
46 resources:
47     mysql_server:
48         type: "Rackspace::Cloud::Server"
49         properties:
50             flavor: {get_param: mysql_server_flavor}
51             image: bba8bce7-403a-4dd6-80e7-0c40dcc7cd06  # Ubuntu 12.04 LTS (Precise Pangolin)
52             name: { get_param: mysql_server_name }
53             key_name: {get_param: keypair_name}
55     update_apt:
56         type: "OS::Heat::ChefSolo"
57         properties:
58             username: root
59             private_key: {get_param: private_key}
60             host: {get_attr: [mysql_server, accessIPv4]}
61             Berksfile: |
62                 site :opscode
63                 cookbook 'apt',
64                     git: 'github_heat_cookbooks:rackerlabs/heat-cookbooks.git',
65                     rel: 'apt'
66             node:
67                 run_list: ["recipe[apt]"]
69     install_make:
70         type: "OS::Heat::ChefSolo"
71         depends_on: update_apt
72         properties:
73             username: root
74             private_key: {get_param: private_key}
75             host: {get_attr: [mysql_server, accessIPv4]}
76             Berksfile: |
77                 site :opscode
78                 cookbook 'build-essential'
79             node:
80                 run_list: ["recipe[build-essential]"]
82     mysql_config: 
83         type: "OS::Heat::ChefSolo"
84         depends_on: install_make
85         properties:
86             username: root
87             private_key: {get_param: private_key}
88             host: {get_attr: [mysql_server, accessIPv4]}
89             Berksfile: |
90                 site :opscode
91                 cookbook 'build-essential'
92                 cookbook 'chef-client'
93                 cookbook 'chef-solo-search'
94                 cookbook 'apt',
95                     git: 'github_heat_cookbooks:rackerlabs/heat-cookbooks.git',
96                     rel: 'apt'
97                  cookbook 'firewall',
98                     git: 'github_heat_cookbooks:rackerlabs/heat-cookbooks.git',
99                     rel: 'firewall'                   
100                  cookbook 'mysql',
101                     git: 'github_heat_cookbooks:rackerlabs/heat-cookbooks.git',
102                     rel: 'checkmate-solo-mysql'                   
103                 cookbook 'holland',
104                     git: 'github_heat_cookbooks:rackerlabs/heat-cookbooks.git',
105                     rel: 'holland'
106                 cookbook 'monit',
107                     git: 'github_heat_cookbooks:rackerlabs/heat-cookbooks.git',
108                     rel: 'monit'
109             node:
110                 deployment:
111                     id: {get_param: stack_id}
112                 mysql:
113                     server_root_password: {get_param: mysql_root_password}
114                 run_list: [
115                     "recipe[build-essential]",
116                     "recipe[apt]",
117                     "recipe[chef-solo-search]",
118                     "recipe[firewall]",
119                     "recipe[mysql::server]",
120                     "recipe[holland]",
121                     "recipe[holland::common]",
122                     "recipe[holland::mysqldump]",
123                     "recipe[monit]"]
125             data_bags:
126                 mysql: 
127                     encrypted: true
128                     id: {get_param: stack_id}
129                     mysql:
130                         database_name: {get_param: database_name}
132 outputs:
133     private_key:
134         value: {get_param: private_key}