forked from erkfel/manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LAMP.manifest
67 lines (55 loc) · 1.81 KB
/
LAMP.manifest
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
# Manifest
# Simple implementation of LAMP
name: LAMP
version: 0.1
launch:
parameters:
- sourceCodeUrl:
name: Url to your php application
# check: validUrl
- adminPassword:
name: Admin password for MySql DataBase
length:
min: 6
max: 20
steps:
- provision:
provisionDb: &PDB
action: $::com.gd.vmpool.provision
provider: gogrid
parameters:
hardwareId: 2
onError:
action: fail
provisionApp: *PDB
- install:
installMySql:
action: $::com.gd.chef.run
runList: 'recipe[mysql]'
parameters:
adminPassword: $parameters:adminPassword
hosts: $steps.provision.provisionDb.ip
installApplication:
action: $::com.gd.chef.run
runList: 'recipe[myApplicationRecipe]'
parameters:
adminPassword: $parameters:adminPassword
applicationUrl: $parameters:sourceCodeUrl
connectionString: $steps.provision.provisionDb.connectionString
hosts: $steps.provision.provisionApp.ip
return:
- appUrl:
name: MySql url
value: http://$($steps.provision.provisionApp.ip)/myapp
- vmDbIds:
name: IDs of running DB VMs
value: $steps.provision.provisionDb.instanceId
- vmAppIds:
name: IDs of running APP VMs
value: $steps.provision.provisionApp.instanceId
destroy:
steps:
- destroy:
destroyVMs:
action: $::com.gd.vmpool.destroy
instanceIds: $:vmIds