Creating and Deploying an Application Using the Django Deployment Template
Deploy a Django Python background application on the host and start the service.
- Ensure that the Nginx has been installed on the target host. If the Nginx has been installed, remove the Install Nginx action from the template.
- Ensure that the uWSGI has been installed on the target host. If the uWSGI has been installed, remove the Install uWSGI action from the template.
- You have configured the pip and yum sources. yum and pip are used to install software. The corresponding source addresses are configured to ensure normal installation.
- You have created a Django project and uploaded the project files to Artifact. You can use CodeArts Build to compress the Django project files and upload the package to Artifact. Then, download and decompress the package during the deployment.
The related deployment actions are as follows.
- Install Python.
- Install Django and uWSGI.
- Install Nginx.
- Start Nginx.
- Download the software package.
- Decompress the software package.
- Restart the uWSGI
- Reload the Nginx configuration file.
- Test services.
Table 1 describes the parameters to be set in the template.
Parameter |
Description |
---|---|
host_group |
Target environment where the application is deployed. |
service_port |
Port number of a Django application. The default value is 8080. |
uwsgi_pid_file_path |
Path of the uWSGI process ID file. |
uwsgi_lni_file_path |
Path of the uWSGI configuration file. |
package_path |
Path for downloading the Django application release package to the target host. |
package_name |
Name of the Django application release package downloaded to the target host. |
package_url |
Software package download link. To obtain it, go to the Artifact > Release Repos page. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot