7
d = amulet.Deployment(series='trusty')
10
d.add('auth-proxy', charm='cs:~paulcz/precise/auth-proxy-0')
11
d.add('logstash-agent')
12
d.add('logstash-indexer', charm='cs:precise/logstash-indexer-4')
13
d.configure('auth-proxy', {
14
'ServerAdmin': 'kibana@example.com',
15
'ServerName': 'kibana.example.com',
16
'DestinationURL': 'http://127.0.0.1:5601/'
18
d.relate('auth-proxy:juju-info', 'kibana:juju-info')
19
d.relate('kibana:juju-info', 'logstash-agent:juju-info')
20
d.relate('kibana:rest', 'logstash-indexer:rest')
21
d.relate('logstash-agent:input', 'logstash-indexer:input')
23
d.expose('auth-proxy')
26
d.setup(timeout=seconds)
27
except amulet.helpers.TimeoutError:
28
amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
34
# Set relationship aliases
36
agent_unit = d.sentry.unit['kibana/0']
40
r = requests.get('https://%s:5601' % agent_unit.info['public_address'])
41
if r.status_code != 200:
42
amulet.raise_status(amulet.FAIL,
43
msg="Error connecting via SSL.")