Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.