Hi there,
As I'm trying to setup infrastructure for my upcoming projects, I've started to learn about BOSH recently. I've got some bosh-lite setup locally, created some releases, deployments, etc. Most of pieces are clear to me and I generally like what I've seen, yet there are few areas I'd like to learn more. Here are my questions:
- My bosh lite doesnt have DNS enabled by default:
Config
/Users/nopik/.bosh_config
Director
Name Bosh Lite Director
URL https://192.168.50.4:25555
Version 1.2922.0 (00000000)
User admin
UUID 4796378f-cc91-4d93-a1b0-75a9af101708
CPI cpi
dns disabled
compiled_package_cache enabled (provider: local)
snapshots disabled
How can I enable DNS in order to be able to play with it?
- There seem to be quite a lot of functionality related to health monitor, in the docs I've seen mentions about email plugin, some logger plugin, event queues, possibility to write custom plugins for that, etc. I've been digging quickly through the sources and I've also seen some Graphite plugin, etc. I'm not sure how to untap this functionality, though. In my deployment I've added this (with real data of course):
properties:
hm:
resurrector_enabled: true
email_notifications: true
email_recipients: [my_email@example.com]
smtp:
from: my_email@example.com
host: my_smtp.example.com
port: 25
domain: example.com
tls: 1
auth: plain
user: my_username
password: secret
Yet, no email ever arrived ;) When I inspected vm created by bosh for my deployment, it seems that monit is using config:
root@e75b6f93-5c68-4c1a-9d18-a6abf26f16d1:~# cat /var/vcap/monit/alerts.monitrc
set alert agent@local
set mailserver localhost port 2825
with timeout 15 seconds
set eventqueue
basedir /var/vcap/monit/events
slots 5000
set mail-format {
from: monit@localhost
subject: Monit Alert
message: Service: $SERVICE
Event: $EVENT
Action: $ACTION
Date: $DATE
Description: $DESCRIPTION
}
and while it seems that bosh-agent is really listening on 2825, /var/vcap/monit/events is non-existing. How to see those events? Is there any good doc/tutorial/blog/whatever about this HM functionality?
- my probably most important question - is related to the DNS above and public IPs. I will be using vSphere for my production deployments, there will be some domain pointed to it and I'd like to expose some web app there. I will include some http load balancer (e.g. haproxy) which will then route traffic to any web app vms I'll have configured. Now, the question is - how to setup the public IP in the network configuration? Or the only way is to specify some static IP there for my load balancer and route domain to that static IP? I'd prefer something more automatic, though.
- I'm also having hard time understanding what would be the best choice to register my web app vms into load balancer vm. The solutions I am aware now:
a) specify static IP for each VM, add static IPs to LB config
b) enable DNS on Bosh, specify a bunch of dns names into LB config
c) use consul
Are there any other, better, options? What others are using? Ideally I'd like to have things fully automatic, so when I increase number of workers, LB will notice that. One way (not necessarily elegant) to achieve that would be to create large pool of IPs/DNS entries and make LB talk to all of them. Almost all of the IPs would be unused at the beginning, so LB would mark them as down, and when new instance would pop up and claimed the IP, LB would notice that after few seconds. That would work, but of course would be ugly. I wasn't playing much with consul, but from what I've read about it, it would be possible to run some shell script whenever new instance appears, so we could reconfigure LB on the fly. So far that is my best option, though I'd love to see some other solutions.
Thanks in advance!