Automating new Zoo site creation

Repository of web frameworks and applications for Microsoft IIS.
User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Automating new Zoo site creation

17 Nov 2013, 13:15

Hi,

Is it possible to automate new site creation, once the base Python template is installed?

I.e. not do it via the new site wizard, but call a necessary API to create a new site?

Thanks.

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

18 Nov 2013, 07:00

Hello!

In order to create new IIS site use appcmd.exe tool.
Tutorial: http://www.iis.net/learn/get-started/getting-started-with-iis/getting-started-with-appcmdexe
Example:

Code: Select all
%systemroot%\system32\inetsrv\APPCMD add site /name:MySite /id:2 /bindings:http/*:81: /physicalPath:C:\inetpub\mysite


To install applications and template into sites use WebPICMD.exe tool.
Tutorial: http://www.iis.net/learn/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release

Example:

Code: Select all
WebPICMD.exe /Application:[email protected] /feeds:http://www.helicontech.com/zoo/feed.xml /AcceptEula


Content of pythonproject-app-options.txt:

Code: Select all
ApplicationPath[@]MySite


Thank you!

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

21 Nov 2013, 14:40

Hi,

Thanks for the explanation.

Just to clarify, after adding the site via appcmd, I'm enabling Zoo on it via WebPICMD using pythonproject-app-options.txt?

Thanks again.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

22 Nov 2013, 00:55

Just tried the 2nd command, getting following error:
"Unknown command line option: 'Application:[email protected]'"

Any ideas?

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

22 Nov 2013, 07:28

Hello!

Sorry, right command is:

Code: Select all
WebPICMD.exe /Install /Application:[email protected] /feeds:http://www.helicontech.com/zoo/feed.xml /AcceptEula


If you skip "@pythonproject-app-options.txt" string, then WebPICmd will be answer you app specific parameters (app path, db host, db port, db user, ...) interactively in command line. To avoid this the pythonproject-app-options.txt file must contain this parsameters formatting as follows:

Code: Select all
ParameterName1[@]Value1
ParameterName2[@]Value2


The PythonProject app have only one parameter ApplicationPath.

Thank you.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

27 Nov 2013, 14:20

Thanks - will give a try.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

29 Nov 2013, 01:23

Hi,

Getting the following message when trying the provided command:
WebPICMD.exe /Install /Application:[email protected] /feeds:http://www.helicontech.com/zoo/feed.xml /AcceptEula

The software that you obtain using the Web Plaform Installer Command Line Tool is licensed to you by its owner. Microsoft grants you no rights for third party
software.
Successfully loaded primary feed: https://go.microsoft.com/?linkid=9824573
Successfully loaded custom feed: http://www.helicontech.com/zoo/feed.xml
The following applications are not available: PythonProject
No products to be installed (either not available or already installed)

Any ideas?

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

29 Nov 2013, 06:32

Hello,

sorry, the right name is ZooPythonProject.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

01 Dec 2013, 06:10

Thanks, it works now.

The created application assigns the directory some "DefaultAppPool" rights, while via Zoo UI the rights are site name and site name + 1.

Any idea how to resolve it?

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

02 Dec 2013, 07:13

Hello,

This is default behavior of Web PI.

You can update app pool for the created application using appcmd utility.
http://www.iis.net/learn/get-started/ge ... -appcmdexe

Thank you.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

02 Dec 2013, 10:47

Hi,

Can you explain how Zoo tool works today with permissions?

From what I seen, it creates actually two pool users, on what each user goes?

Thanks.

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

02 Dec 2013, 11:59

Hello,

Zoo does not work with permissions.

Zoo consists of two parts: Zoo Module and Zoo Feed.

Zoo module is just IIS native module which can communicate with different app servers (on Python, Ruby, Node etc). It works inside IIS worker process and has some permissions as the application pool of IIS worker.

Zoo feed is just xml feed embedded into Web Platform Installer to easy install Zoo module and different engines and frameworks (Python/Django, Ruby/Rails ...)

Web Platform Installer creates and deploy site with Microsoft Web Deploy tool:
http://www.iis.net/downloads/microsoft/web-deploy

Web Deploy creates user and app pool on every new deployment process by default.
Likely, it creates two pool users because you have did two deployment.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

03 Dec 2013, 14:16

Hi,

For example a screenshot from Zoo deployed instance:
http://2.take.ms/Uycrr

It appears to have 2 poolls, vs the "DefaultAppPool" used by the command line.

Any idea?

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

04 Dec 2013, 12:32

Reading again what you mentioned, it appears that Zoo GUI created the two pools and assigned proper security rights to the 2nd pool on site folder.

This does not happen with the WebPI command line - it just re-uses the "Default Application Pool".

Is there any parameter I can use?

Thanks.

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

09 Dec 2013, 07:34

Hello,

Web Platform Installer is not Zoo GUI, it is tool from Microsoft.
You are sure, if you create new site and deploy app is not in the site root, then WebPI creates one app pool for site root application and one pool for deployed app.
Web Platform Installer has not any settings to fix this, it is by default.

Thanks.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

16 Dec 2013, 07:32

Hi,

To clarify, this tool is MS provided, correct?
http://take.ms/gTWOz

Any idea what params will make the command line to act the same, with 2 different security pools assigned?

Thanks.

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

16 Dec 2013, 08:21

Hello,

1. Yes, it is Web Deploy tool provided by MS.
2. As i understand, Web Deploy creates 2 different app pool if you create new website and new app inside during deployment.

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

16 Dec 2013, 11:26

Hi,

So you mean, instead of pre-creating the site via:
%systemroot%\system32\inetsrv\APPCMD add site...

Just go ahead and create all via:
WebPICMD.exe /Install /Application:PythonProject...
?

Thanks.

P.S.:

Just tried that, unfortunately not working:

Started installing: 'Python project'
Install completed (Failure): 'Python project'
ZooPythonProject : Failed.
Site 'qa7' does not exist. Learn more at: http://go.microsoft.com/fwlink/?LinkI
d=221672#ERROR_SITE_DOES_NOT_EXIST.

Verifying successful installation...
Python project False
Log Location: C:\Users\Administrator\AppData\Local\Microsoft\Web Platform In
staller\logs\install\2013-12-16T14.29.01\Python project.txt
Helicon Zoo Module True
Install of Products: FAILURE

User avatar
Posts: 56
Joined: 01 Nov 2013, 01:50

Re: Automating new Zoo site creation

16 Dec 2013, 12:34

Also, calling WebPI via SSHD returns the following error:
There was an error reading IIS configuration schema from 'C:\Windows\system32\inetsrv\config\schema\'.

Seems some permissions are missing for the command line to be called via Cygwin SSHD, any ideas?

User avatar
Posts: 110
Joined: 07 Mar 2012, 10:22

Re: Automating new Zoo site creation

17 Dec 2013, 06:24

Hello,

Under which user the sshd process works?

Next

Return to Helicon Zoo

Who is online

Users browsing this forum: No registered users and 14 guests