通过螺旋动物园在IIS上部署Django项目

时间:2022-06-17 23:33:29

I have been struggling to have an existing Django project (Graphite webapp it is) on windows IIS via Helicon Zoo. So far I really just guess and try on every step but still can't make it work. Could anyone point me to any helpful manual or article? Thanks very much.

我一直在努力拥有现有的Django项目(石墨webapp)在windows IIS通过螺旋动物园。到目前为止,我真的只是猜测和尝试每一步,但仍然不能使它工作。谁能给我指一下有用的手册或文章吗?非常感谢。

Django project: Graphite-web - yes, managed to port Graphite carbon, whisper and webapp on windows, but webapp now is only runnable with django-admin.py runserver

Django项目:Graphite-web——是的,成功地在windows上移植了石墨碳、耳语和webapp,但是webapp现在只能在Django -admin上运行。py runserver

Win8 64bit, Python2.7 32bit

Win8中的64位,Python2.7 32位

manage.py and grahpite.settings is in c:\graphite\webapp\graphite

管理。py和grahpite。设置在c:\ \ webapp \石墨石墨

Regards

问候

James

詹姆斯

1 个解决方案

#1


1  

We tried to install Graphite webapp out of curiosity and my colleague managed to do this (while I lost my patience collecting all Graphite requirements).

出于好奇,我们尝试安装了石墨webapp,我的同事成功地做到了这一点(而我却失去了收集所有石墨要求的耐心)。

  • So to install it first you need to install "Zoo -> Templates -> Python project" in the location where you want this web site. Request is so all startup scripts did their job and virtualenv is created so you should see welcome Python project page.

    所以要安装它首先你需要安装“Zoo ->模板-> Python项目”在你想要这个网站的位置。请求是这样的,所以所有的启动脚本都完成了它们的工作,并且创建了virtualenv,所以您应该会看到欢迎Python项目页面。

  • Now copy all your Graphite files into this web site's folder. When you asked to overwrite some files please be wise, like don't overwrite web.config file as it is needed.

    现在把你所有的石墨文件复制到这个网站的文件夹。当你要求重写一些文件时,请明智一些,比如不要覆盖web。根据需要配置文件。

  • Modify prefix line in setup.cfg as follows:

    在设置中修改前缀行。cfg如下:

    prefix = $APPL_PHYSICAL_PATH

    前缀= $ APPL_PHYSICAL_PATH

  • Modify <environmentVariables> section of web.config as follows:

    修改web的 节。配置如下:

    <environmentVariables> <add name="VIRTUAL_ENV" value="%APPL_PHYSICAL_PATH%.env" /> <add name="PATH" value="%APPL_PHYSICAL_PATH%\venv\Scripts;%PATH%" /> <add name="PYTHONPATH" value="%APPL_PHYSICAL_PATH%\venv\lib\site-packages;%APPL_PHYSICAL_PATH%\venv\lib;%APPL_PHYSICAL_PATH%;%APPL_PHYSICAL_PATH%\webapp\graphite" /> <add name="DJANGO_SETTINGS_MODULE" value="settings" /> <add name="ERROR_LOG_DIR" value="log" />

    < environmentVariables > <添加name = value="“VIRTUAL_ENV" % appl_physical_path %。mso - fareast font family:宋体;mso bidi family: " times new roman "; mso theme font< p>

(sorry for formatting, it is all *)

(不好意思格式化了,都是*)

  • Then launch Start->Helicon->Zoo->Helicon Zoo Manager, select your web site and click on either Start IDE or Start Web Console button to start console for the virtualenv of the web site. Please use this console to run all python commands so the virtualenv is used.

    然后启动启动->解码器->动物园->解码器动物园管理器,选择您的网站,点击启动IDE或启动网络控制台按钮,为网站的虚拟主机启动控制台。请使用此控制台运行所有python命令,以便使用virtualenv。

  • Run "python setup.py install" using Zoo console.

    “python运行设置。使用动物园控制台安装。

  • Now the hardest part - download and install Graphite webapp requirements. Some of them may be installed using "pip install" command (don't forget to use Zoo console for it. Others require to be downloaded separately and have some pre-historic installers that can be user only for global installations. Many of them can then be copied under web site virtualenv manually so you can even restore Zoo application portability. Or leave it as is if you don't plan to move application to another server.

    现在最难的部分-下载和安装石墨网络应用的要求。其中一些可以使用“pip安装”命令进行安装(不要忘记使用Zoo控制台进行安装)。另一些则需要单独下载,并拥有一些历史前的安装程序,这些安装程序只能用于全局安装。然后可以在web站点virtualenv中手动复制其中的许多,这样您甚至可以恢复Zoo应用程序的可移植性。或者,如果您不打算将应用程序移动到另一个服务器,那么就保留它。

After that you should be able to run Graphite with "django-admin.py runserver" from Zoo console. If it works then it should work as IIS web site from Zoo as well.

在那之后,你应该可以用“django-admin”来运行石墨了。从动物园控制台。如果它能正常工作,那么它也可以作为来自Zoo的IIS网站工作。

If you have further questions please contact Helicon Tech support

如果您有任何问题,请联系解旋科技支持

#1


1  

We tried to install Graphite webapp out of curiosity and my colleague managed to do this (while I lost my patience collecting all Graphite requirements).

出于好奇,我们尝试安装了石墨webapp,我的同事成功地做到了这一点(而我却失去了收集所有石墨要求的耐心)。

  • So to install it first you need to install "Zoo -> Templates -> Python project" in the location where you want this web site. Request is so all startup scripts did their job and virtualenv is created so you should see welcome Python project page.

    所以要安装它首先你需要安装“Zoo ->模板-> Python项目”在你想要这个网站的位置。请求是这样的,所以所有的启动脚本都完成了它们的工作,并且创建了virtualenv,所以您应该会看到欢迎Python项目页面。

  • Now copy all your Graphite files into this web site's folder. When you asked to overwrite some files please be wise, like don't overwrite web.config file as it is needed.

    现在把你所有的石墨文件复制到这个网站的文件夹。当你要求重写一些文件时,请明智一些,比如不要覆盖web。根据需要配置文件。

  • Modify prefix line in setup.cfg as follows:

    在设置中修改前缀行。cfg如下:

    prefix = $APPL_PHYSICAL_PATH

    前缀= $ APPL_PHYSICAL_PATH

  • Modify <environmentVariables> section of web.config as follows:

    修改web的 节。配置如下:

    <environmentVariables> <add name="VIRTUAL_ENV" value="%APPL_PHYSICAL_PATH%.env" /> <add name="PATH" value="%APPL_PHYSICAL_PATH%\venv\Scripts;%PATH%" /> <add name="PYTHONPATH" value="%APPL_PHYSICAL_PATH%\venv\lib\site-packages;%APPL_PHYSICAL_PATH%\venv\lib;%APPL_PHYSICAL_PATH%;%APPL_PHYSICAL_PATH%\webapp\graphite" /> <add name="DJANGO_SETTINGS_MODULE" value="settings" /> <add name="ERROR_LOG_DIR" value="log" />

    < environmentVariables > <添加name = value="“VIRTUAL_ENV" % appl_physical_path %。mso - fareast font family:宋体;mso bidi family: " times new roman "; mso theme font< p>

(sorry for formatting, it is all *)

(不好意思格式化了,都是*)

  • Then launch Start->Helicon->Zoo->Helicon Zoo Manager, select your web site and click on either Start IDE or Start Web Console button to start console for the virtualenv of the web site. Please use this console to run all python commands so the virtualenv is used.

    然后启动启动->解码器->动物园->解码器动物园管理器,选择您的网站,点击启动IDE或启动网络控制台按钮,为网站的虚拟主机启动控制台。请使用此控制台运行所有python命令,以便使用virtualenv。

  • Run "python setup.py install" using Zoo console.

    “python运行设置。使用动物园控制台安装。

  • Now the hardest part - download and install Graphite webapp requirements. Some of them may be installed using "pip install" command (don't forget to use Zoo console for it. Others require to be downloaded separately and have some pre-historic installers that can be user only for global installations. Many of them can then be copied under web site virtualenv manually so you can even restore Zoo application portability. Or leave it as is if you don't plan to move application to another server.

    现在最难的部分-下载和安装石墨网络应用的要求。其中一些可以使用“pip安装”命令进行安装(不要忘记使用Zoo控制台进行安装)。另一些则需要单独下载,并拥有一些历史前的安装程序,这些安装程序只能用于全局安装。然后可以在web站点virtualenv中手动复制其中的许多,这样您甚至可以恢复Zoo应用程序的可移植性。或者,如果您不打算将应用程序移动到另一个服务器,那么就保留它。

After that you should be able to run Graphite with "django-admin.py runserver" from Zoo console. If it works then it should work as IIS web site from Zoo as well.

在那之后,你应该可以用“django-admin”来运行石墨了。从动物园控制台。如果它能正常工作,那么它也可以作为来自Zoo的IIS网站工作。

If you have further questions please contact Helicon Tech support

如果您有任何问题,请联系解旋科技支持