0

I trying to setup as part of a study a PaaS (Platform as a service) for Ruby on Rails applications. I have already played with Amazon EC2 and Chef creating EC2 instances based on Chef's recipes and roles.

Now I need to be able to give every "customer" account or every app a unique subdomain like app1.mydomain.com, app2.mydomain.com, etc. which points to my customer's app on an EC2 instance. I then need to allow the customer to point their domain to their customized subdomain (app1.mydomain.com, app2.mydomain.com).

Can someone explain to me how I can achieve that?

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
Newtonx
  • 305
  • 1
  • 4
  • 11

2 Answers2

1

It's a Simple Matter Of Programming. You should have something that maps customers to instances, like a database (assuming you're not going to run everything through a single frontend proxy) and then a script or whatever to generate the DNS zone from that data.

womble
  • 96,255
  • 29
  • 175
  • 230
0

We wrote a cookbook for dynamically setting DNS entries in DynDNS Inc's Dynect API.

You could also use one of our published cookbooks for djbdns, powerdns or unbound.

jtimberman
  • 7,587
  • 2
  • 34
  • 42