hi All, This is how Domain Mapping functionality is currently being implemented in App Factory front as a generic solution.
Only AppOwner has permissions to do the domain mapping. The Domain "cloudapps.com" is configurable in appfactory.xml Under each Deployment stage defined in appfactory.xml a new tag has introduced in order to enable/disable url mapper on that particular stage as follows: <AllowDomainMapping>false</AllowDomainMapping> Add a subdomain --------------- User can add a subdomain via the Application Home page. When user add a subdomain it will be saved in application.rxt file. Based on the assigned subdomain, urls get generated for the app versions for the Domain mappings enabled stages as follows. Say Domain Mapping has enabled only for "Development" and "Production" stages and there are 3 branches of the application. Given subdomain is "foo". foo 1.0.0 Porduction foo 1.1.0 Test foo 1.2.o Development foo master Development So in the above scenario following urls will be created on the fly: foo 1.0.0 Production http://foo-1.0.0-dev.cloudapps.com http://foo-1.0.0-prod.cloudapps.com foo 1.1.0 Test http://foo-1.1.0-dev.cloudapps.com http://foo-1.1.0-prod.cloudapps.com foo 1.2.0 Development http://foo-1.2.0-dev.cloudapps.com http://foo-1.2.0-prod.cloudapps.com foo master Development http://foo-master-dev.cloudapps.com These url mappings will be send to respective AppServer (Cartridge) based on the stage. These url mappings will be send to respective Stratos Manager based on the stage. The CNAME records will be send to AWS Route 53. Update a subdomain ----------------- User can update the subdomain via the Aplication Home page. When user edit the subdomain it will be saved in application.rxt file. Based on the assigned subdomain, urls get generated for the app versions for the Domain mappings enabled stages as follows. Say Domain Mapping has enabled only for "Development" and "Production" stages and there are 3 branches of the application. Updated subdomain is "bar". foo 1.0.0 Porduction foo 1.1.0 Test foo 1.2.o Development foo master Development So in the above scenario following urls will be created on the fly: foo 1.0.0 Porduction http://bar-1.0.0-dev.cloudapps.com http://bar-1.0.0-prod.cloudapps.com foo 1.1.0 Test http://bar-1.1.0-dev.cloudapps.com http://bar-1.1.0-prod.cloudapps.com foo 1.2.0 Development http://bar-1.2.0-dev.cloudapps.com http://bar-1.2.0-prod.cloudapps.com foo master Development http://bar-master-dev.cloudapps.com The old url mappings will be updated with new url mappings in respective AppServer (Cartridge) based on the stage. The old url mappings will be deleted and new url mappings will be saved in Stratos Manager based on the stage. The old CNAME records will be deleted and new CNAME records will be added to AWS Route 53. SubDomain validation -------------------- Each subdomain is validated against already existing domains via Stratos Manager of a particular stage for it's availability. Production Stage specific customization --------------------------------------- For all the versions in Production stage will get a option to specify which version will get the fine-grained url. Say I choose 1.1.0 version. Then the mapped url of the 1.1.0 will be as follows: foo 1.0.0 Porduction foo 1.1.0 Porduction http://foo.cloudapps.com foo 1.2.0 Porduction This url mapping will be send to Prod AppServer (Cartridge). This url mappings will be send to Prod Stratos Manager. This CNAME record will be send to AWS Route 53. I do not delete the http://foo-1.1.0-prod.cloudapps.com entry from AS/SM or AWS. Because user can choose any other version in Production instead of 1.1.0. Then we only need to do the following: The old url mapping will be updated with new url mapping in Prod AppServer (Cartridge). It doesn't require to change Prod SM or AWS entry as the url invocation can be handled on the fly via jaggery front based on the selected version. The previous version can go ahead with it's old url which is http://foo-1.1.0-prod.cloudapps.com. SubDomain deleteion will not be implemented for this release. On Sat, Apr 26, 2014 at 1:52 PM, Imesh Gunaratne <[email protected]> wrote: > Domain mapping implementation in Stratos has been started after completing > 4.0.0-rc1 release work. I will update the status ASAP. > > Thanks > > > On Fri, Apr 25, 2014 at 4:26 PM, Punnadi Gunarathna <[email protected]>wrote: > >> Yes Amila, I was wrong. We can validate that from AF front itself. >> >> >> On Fri, Apr 25, 2014 at 3:54 PM, Amila Maha Arachchi <[email protected]>wrote: >> >>> My question is based on your statement "Subdomain will be *validated*for >>> its availability via the API provided in Stratos Manager >>> " >>> >>> Why do we need to validate the availability of the subdomain, if we >>> maintain the list of mapped domains within AF. >>> >>> >>> On Fri, Apr 25, 2014 at 3:46 PM, Punnadi Gunarathna <[email protected]>wrote: >>> >>>> Hi Amila, >>>> >>>> Of course we will store the production url corresponding to the given >>>> Application version in AF side. >>>> But we have to pass the "Host | Service | Tenant" to Stratos side via >>>> SM. That is what we discussed in the meeting. Please refer the mail thread >>>> "[Update] Cloud URL Mapping story" for more details. >>>> >>> >>> Yes, this I am aware of. >>> >>>> >>>> >>>> On Fri, Apr 25, 2014 at 3:35 PM, Amila Maha Arachchi >>>> <[email protected]>wrote: >>>> >>>>> >>>>> >>>>> >>>>> On Fri, Apr 25, 2014 at 3:16 PM, Punnadi Gunarathna >>>>> <[email protected]>wrote: >>>>> >>>>>> hi All, >>>>>> >>>>>> In Dimtry's uber stories he came up with URL Mapping requirement for >>>>>> the applications deployed in Production. >>>>>> >>>>>> This is how it will be implemented in App Factory front. >>>>>> >>>>>> AppOwner only has permissions to domain mapping. >>>>>> >>>>>> 1. If there are more than one version of the same Application in >>>>>> production, the domain mapping is available only for one version and it >>>>>> is >>>>>> configuarable in AppHome. >>>>>> (That is because in reality there can't be multiple versions of the >>>>>> same application in Production. So only one domain mapping would be >>>>>> enough. >>>>>> But in App Factory there can be multiple versions of the same application >>>>>> in production) >>>>>> 2. User can only set the subdomian in App Home page. Subdomain will >>>>>> be validated for its availability via the API provided in Stratos >>>>>> Manager. >>>>>> Based on the available subdomain the Production URL will be created and >>>>>> displayed in AppHome as follows: >>>>>> >>>>> Don't we keep these mapped domains with AF? If we are keeping them, >>>>> why do we need to ask from SM? >>>>> >>>>>> http://<subdomain>.cloudapps.com >>>>>> >>>>>> >>>>>> 3.When a particualr app version is promoted to production, the above >>>>>> url, cartridge type and the tenant id need to be passed to Stratos >>>>>> Manager >>>>>> via the API. >>>>>> 4. The App version which has domain mapping will be highlighted. When >>>>>> the deploy button is hit from Build n Repo page/AppHome page for this App >>>>>> version, if AS is fronted by LB then LB will forward the request to >>>>>> correct >>>>>> cluster node or else the request will directly hit AS. >>>>>> 6. Using the Virtual Host concept in AS, the deployed application >>>>>> will be available in the browser. >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks and Regards, >>>>>> >>>>>> Punnadi Gunarathna >>>>>> Senior Software Engineer, >>>>>> WSO2, Inc.; http://wso2.com <http://wso2> >>>>>> Blog: http://hi-my-world.blogspot.com/ >>>>>> Tel : 94 11 214 5345 >>>>>> Fax :94 11 2145300 >>>>>> >>>>>> >>>>>> >>>>>> <http://lalajisureshika.blogspot.com/> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> *Amila Maharachchi* >>>>> Senior Technical Lead >>>>> WSO2, Inc.; http://wso2.com >>>>> >>>>> Blog: http://maharachchi.blogspot.com >>>>> Mobile: +94719371446 >>>>> >>>>> >>>> >>>> >>>> -- >>>> Thanks and Regards, >>>> >>>> Punnadi Gunarathna >>>> Senior Software Engineer, >>>> WSO2, Inc.; http://wso2.com <http://wso2> >>>> Blog: http://hi-my-world.blogspot.com/ >>>> Tel : 94 11 214 5345 >>>> Fax :94 11 2145300 >>>> >>>> >>>> >>>> <http://lalajisureshika.blogspot.com/> >>>> >>> >>> >>> >>> -- >>> *Amila Maharachchi* >>> Senior Technical Lead >>> WSO2, Inc.; http://wso2.com >>> >>> Blog: http://maharachchi.blogspot.com >>> Mobile: +94719371446 >>> >>> >> >> >> -- >> Thanks and Regards, >> >> Punnadi Gunarathna >> Senior Software Engineer, >> WSO2, Inc.; http://wso2.com <http://wso2> >> Blog: http://hi-my-world.blogspot.com/ >> Tel : 94 11 214 5345 >> Fax :94 11 2145300 >> >> >> >> <http://lalajisureshika.blogspot.com/> >> > > > > -- > *Imesh Gunaratne* > Technical Lead > WSO2 Inc: http://wso2.com > T: +94 11 214 5345 M: +94 77 374 2057 > W: http://imesh.gunaratne.org > Lean . Enterprise . Middleware > > -- Thanks and Regards, Punnadi Gunarathna Senior Software Engineer, WSO2, Inc.; http://wso2.com <http://wso2> Blog: http://hi-my-world.blogspot.com/ Tel : 94 11 214 5345 Fax :94 11 2145300 <http://lalajisureshika.blogspot.com/>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
