OLD | NEW |
(Empty) | |
| 1 from charmhelpers.core import services |
| 2 from charmhelpers.contrib.cloudfoundry import contexts |
| 3 |
| 4 HM9K_PACKAGES = ['python-jinja2', 'cfhm9000'] |
| 5 |
| 6 HM_DIR = '/var/lib/cloudfoundry/cfhm9000' |
| 7 WORKSPACE_DIR = '/var/lib/cloudfoundry/hm-workspace' |
| 8 |
| 9 hm_relations = [contexts.NatsRelation(), |
| 10 contexts.EtcdRelation(), |
| 11 contexts.CloudControllerRelation()] |
| 12 |
| 13 SERVICES = [ |
| 14 { |
| 15 'service': 'cf-hm9k-fetcher', |
| 16 'required_data': hm_relations, |
| 17 'data_ready': [ |
| 18 services.template(source='hm9000.json', |
| 19 target=HM_DIR + '/config/hm9000.json'), |
| 20 services.template(source='cf-hm9k-fetcher.conf', |
| 21 target='/etc/init/cf-hm9k-fetcher.conf'), |
| 22 ], |
| 23 }, |
| 24 { |
| 25 'service': 'cf-hm9k-listener', |
| 26 'required_data': hm_relations, |
| 27 'data_ready': [ |
| 28 services.template(source='cf-hm9k-listener.conf', |
| 29 target='/etc/init/cf-hm9k-listener.conf'), |
| 30 ], |
| 31 }, |
| 32 { |
| 33 'service': 'cf-hm9k-analyzer', |
| 34 'required_data': hm_relations, |
| 35 'data_ready': [ |
| 36 services.template(source='cf-hm9k-analyzer.conf', |
| 37 target='/etc/init/cf-hm9k-analyzer.conf'), |
| 38 ], |
| 39 }, |
| 40 { |
| 41 'service': 'cf-hm9k-sender', |
| 42 'required_data': hm_relations, |
| 43 'data_ready': [ |
| 44 services.template(source='cf-hm9k-sender.conf', |
| 45 target='/etc/init/cf-hm9k-sender.conf'), |
| 46 ], |
| 47 }, |
| 48 { |
| 49 'service': 'cf-hm9k-metrics-server', |
| 50 'required_data': hm_relations, |
| 51 'data_ready': [ |
| 52 services.template(source='cf-hm9k-metrics-server.conf', |
| 53 target='/etc/init/cf-hm9k-metrics-server.conf'), |
| 54 ], |
| 55 }, |
| 56 { |
| 57 'service': 'cf-hm9k-api-server', |
| 58 'required_data': hm_relations, |
| 59 'data_ready': [ |
| 60 services.template(source='cf-hm9k-api-server.conf', |
| 61 target='/etc/init/cf-hm9k-api-server.conf'), |
| 62 ], |
| 63 }, |
| 64 { |
| 65 'service': 'cf-hm9k-evacuator', |
| 66 'required_data': hm_relations, |
| 67 'data_ready': [ |
| 68 services.template(source='cf-hm9k-evacuator.conf', |
| 69 target='/etc/init/cf-hm9k-evacuator.conf'), |
| 70 ], |
| 71 }, |
| 72 { |
| 73 'service': 'cf-hm9k-shredder', |
| 74 'required_data': hm_relations, |
| 75 'data_ready': [ |
| 76 services.template(source='cf-hm9k-shredder.conf', |
| 77 target='/etc/init/cf-hm9k-shredder.conf'), |
| 78 ], |
| 79 }, |
| 80 ] |
OLD | NEW |