Publishing Web app on different node

Discussion in 'Plesk Automation Suggestions and Feedback' started by RomainA, Sep 12, 2013.

  1. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi all,


    I'm working for a Software company. We distribute our software using APS and Plesk Panels 11.5.
    Here is how we do today:
    Plesk Panel is installed on a single server and manages a domain (let's say app-name.com) with a wildcard SSL certificate.

    For each new customer, we use Plesk Panel API, to:
    - create a sub-domain like client1.app-name.com and the associated shared hosting
    - install our web application (APS packaged) to this sub-domain/shared hosting

    It works great.


    We are growing, and we now need to balance our clients on multiple servers in different locations (USA, Europe, Asia). Customers must be able to choose the location of their data, ie an American customer will choose to have its application installed on our US servers.

    Plesk Automation seems to be a good solution as we can manage multiple servers with it.

    My questions are:
    - Is the same domain name (app-name.com) can be in used in multiple nodes managed by Plesk Automation?

    - How can I create the subdomain "john.app-name.com" on my US web server, and "lee.app-name.com" on my Asian server. From the Plesk Automation administration interface, as well as from the API?

    - Does Plesk Automation can manage my wilcard certificate on multiples Web servers?

    - I don't find any way to install an APS application from the Plesk Automation API. How can I do this?


    Many thanks in advance for your support.
     
  2. IgorG

    IgorG Guru

    Messages:
    19,081
    1. What exactly do you mean "can be in used in multiple nodes"? Domain databases can be located on one database service node, web - on other web service node, mail - on third mail service node.
    2. I think it is possible with using Provisioning attributes. In short - you can assign US provisioning attributes on US service nodes, Asian attributes on Asian nodes. Provisioning new instances will be processed according to these attributes. Read more about provisioning attributes in PPA guide.

    On other questions we will reply later.
     
  3. IgorG

    IgorG Guru

    Messages:
    19,081
    3. No. We haven't this possibility.
    4. You can't do it through PPA API but as possible workaround you can use Plesk API.
     
  4. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Thanks Igor for your reply.

    1 & 2/ Your suggestion of using Provisioning attributes sounds good. I will try it.


    3/ Regarding SSL. How can I do this ? Should I have to install the certificate on every web node ? How can i do this ?


    4/ Plesk Panel API: can you pease confirm my understanding. The Plesk Panel Api is also available on the Plesk Automation management node?
    I take an exemple :
    Plesk Automation is installed on the IP address IP1. A domain domain.com is configure on a Web node which is on the IP address IP2.
    If I call on the address IP1 the "install" operation of Plesk Planel API with the parameter "domain.com" (dedicated to install an APS application on a domain http://download1.parallels.com/Ples...ne/plesk-api-rpc/index.htm?fileName=64496.htm) the API will be able to find that the domain domain.com is on Node "IP2" and install the APS application under this domain ?




    Kind regards,
     
  5. Andrew Andriatis

    Andrew Andriatis Odin Team

    Messages:
    437
    Hi, Romain,

    You have several options here:
    1. You may create a webspace on each node manually, install your SSL cert on it. After that you can create subdomains under the main domain name of the webspace, and it'll reuse the main domain certificate.
    The biggest disadvantage is that you will not be able to have same main domain names on different nodes, and therefore your naming will be like
    john.node1.app-name.com; lee.node2.app-name.com

    2. You can create independent webspaces using PPA API (not Plesk API) right away with the 3-rd level names, like john.app-name.com; lee.app-name.com. In this case you'll have them distributed across multiple nodes. To use the same certificate you can:
    a) use Plesk API to assign the same cert to each webspace
    b) manually replace the default cert. on each node with yours wildcard certificate.

    You can still use Plesk API to provision an APS package on the website.
    The rules about API usage are that the business objects (accounts, subscriptions) are created via PPA API. The objects inside a subscription are created by Plesk API.

    Regards,
    Andrey Andriatis
    Parallels Plesk Automation Program Manager
     
  6. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi Andrew,

    Thanks for your help.


    So far, ihaven't test SSL on different nodes, but with your explanation it's pretty clear.


    I've tested the API to provision an APS package on the Website. And it's seems not to work as expected.
    Here is the steps :

    - Create a new customer and a new webspace on test.app-name.com using PPA API. The service template used is configure to deploy the webspace on service node => OK
    - Provision the APS package on the webspace using PPP API (on the management node). The webapp files are well deploy on the webspace of the service node. However the associated database is created on the management node, not on the service node.


    If I do the same thing from the adminstration interface of PPA (ie not using the API) everything is fine.


    Any idea?
     
  7. Andrew Andriatis

    Andrew Andriatis Odin Team

    Messages:
    437
    Hi, Romain,
    Are you saying that the DB assigned for subscription is not used for the APS app deployment, and instead the system instance is used? If this is the case, then thank for reporting an important bug. We'll fix it.

    Regards,
    Andrey
     
  8. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi Andrew,

    Yes, the subscription is provision on the service node. The APS files of the app too.
    But the DB is created on the management node not on the service node.

    I will make more tests and open a bug if necessary .


    Regards,
     
  9. Andrew Andriatis

    Andrew Andriatis Odin Team

    Messages:
    437
    Thanks. I filed a bug in our system already.
     
  10. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi Andrew,

    Any update on this problem?

    We 've also test with other APS package (wordpress): same issue.


    Here are the steps to reproduce :

    Prerequis:
    - PPA : Management node + Web node + BD node (mysql)
    - Ensure the defaut mysql server is the service node, not the mangement node


    1/ From PPA administration interface:
    1.1 create a Share Hosting subscription template
    1.2 Create a reseller
    1.3 Create a subscription on domain.tld with the previously created subscription template and reseller


    2/ From the PP API, call the "install application" method on domain.tld (http://download1.parallels.com/Plesk/PP11/11.5/Doc/en-US/online/plesk-api-rpc/64496.htm#)
    => The database is created on the mangement node while PPA pass the IP of the service node to the APS installation script.


    Note that if you do the same think by deploying the APS application using the web interface. It works properly.






    Regards,
    Romain
     
  11. Andrew Andriatis

    Andrew Andriatis Odin Team

    Messages:
    437
    Hi, Romain,
    We have the issue in our tracking system. It will be fixed before the release.

    Regards,
    Andrey
     
  12. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi Andrew,

    To get around this issue, I try to specify the optional "server" parameter in the database information we can pass to the API call as explain in the document here : http://download1.parallels.com/Plesk/PP11/11.5/Doc/en-US/online/plesk-api-rpc/64502.htm#


    Looks like this parameter is no working (at least on PPA) as I get the following result :

    <packet version="1.6.3.5">
    <system>
    <status>error</status>
    <errcode>1014</errcode>
    <errtext>Parser error: Request is invalid. Error in line 1: Element 'server': This element is not expected.</errtext>
    </system>
    </packet>


    Here is the database element of my request :
    <database>
    <name>romain11-v8ootf</name>
    <login>96405718A</login>
    <password>4271i18mr</password>
    <server>149.7.99.30:3306</server>
    </database>


    I guess you can add this issue/inconsistency to your opened issue...


    Regards,
    Romain
     
  13. Andrew Andriatis

    Andrew Andriatis Odin Team

    Messages:
    437
    Thanks for the reporting. I will add this to the bug description.

    Regards,
    Andrey
     
  14. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi Andrew

    I'm exploring workaround to create the database by myself using the Plesk API. Not the better solution but this issue is pressing for me, so I need to go ahead.

    Previously in this thread you say we can install a certificate in a webspace using the API with this method.
    I've successfully do it using the "install" operation : http://download1.parallels.com/Ples...ne/plesk-api-rpc/index.htm?fileName=64489.htm

    However this do not activate the certificate on the website even if SSL is checked. Any advice on how to have the installed certificate used through the API?
     
  15. Alexander Nesterenko

    Alexander Nesterenko Bit Poster

    Messages:
    6
    Roman, could you please show full API packet that you used for package installation?
    I can not reproduce bug on latest 11.5

    P.S Please use proto version 1.6.5.0 instead 1.6.3.5
     
  16. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Same issue with version 1.6.5.0 of the API call.
    I will try to update my version of PPA, I'm using version 11.1#15

    Here is the request, maybe you can find something wrong :

    <packet version="1.6.5.0">
    <aps>
    <install>
    <domain-name>sub.domain.com</domain-name>
    <package>
    <name>my-app</name>
    </package>
    <database>
    <name>test1</name>
    <login>test1</login>
    <password>123456789</password>
    </database>
    <settings>
    .....
    </settings>
    </install>
    </aps>
    </packet>
     
  17. RomainA

    RomainA Kilo Poster

    Messages:
    16
    Hi Alexander,

    I'm using PPA not PPP so I have the laster version 1.11. Event with version 1.6.5.0 of the API call I get the same issue.

    Let me know if you need more information to reproduce.

    Regards,
     

Share This Page