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
|
#!/usr/bin/python
from charmhelpers.core import hookenv
from charmhelpers.core.services.base import ServiceManager
from charmhelpers.core.services import helpers
import actions
def manage():
config = hookenv.config()
manager = ServiceManager([
{
'service': 'snappy-proposed-image-builder',
'required_data': [config],
'data_ready': [
actions.basenode,
actions.install_packages,
actions.install_service_tarball,
actions.install_ubuntu_device_flash,
actions.install_python_packages,
actions.update_config_file,
actions.create_user,
helpers.render_template(
source='upstart.conf',
target='/etc/init/snappy-proposed-image-builder.conf'),
helpers.render_template(
source='sudoers.conf',
target='/etc/sudoers.d/snappy-proposed-image-builder'),
actions.log_start,
],
},
])
manager.manage()
|