mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
Moved all to virtualenv
This commit is contained in:
parent
5714f0945a
commit
13e5d70ff3
6 changed files with 18 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
.vagrant
|
.vagrant
|
||||||
|
venv
|
||||||
.idea
|
.idea
|
||||||
.DS_*
|
.DS_*
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
10
README.md
10
README.md
|
@ -22,16 +22,18 @@ WebVirtMgr is a libvirt-based Web interface for managing virtual machines. It ca
|
||||||
### Install WebVirtCloud panel
|
### Install WebVirtCloud panel
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get -y install git python-pip python-dev python-libvirt python-libxml2 nginx supervisor
|
sudo apt-get -y install git python-virtualenv python-dev libxml2-dev libvirt-dev zlib1g-dev nginx supervisor
|
||||||
git clone https://github.com/retspen/webvirtcloud
|
git clone https://github.com/retspen/webvirtcloud
|
||||||
cd webvirtcloud
|
cd webvirtcloud
|
||||||
sudo pip install -r conf/requirements.txt
|
virtualenv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install -r conf/requirements.txt
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d
|
sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d
|
||||||
sudo cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d
|
sudo cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d
|
||||||
cd ..
|
cd ..
|
||||||
sudo mv webvirtcloud /var/www/
|
sudo mv webvirtcloud /srv
|
||||||
sudo chown -R www-data:www-data /var/www/webvirtcloud
|
sudo chown -R www-data:www-data /srv/webvirtcloud
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart services for running WebVirtCloud:
|
Restart services for running WebVirtCloud:
|
||||||
|
|
6
Vagrantfile
vendored
6
Vagrantfile
vendored
|
@ -10,7 +10,9 @@ Vagrant.configure(2) do |config|
|
||||||
sudo sed -i 's/auth_tcp = \"sasl\"/auth_tcp = \"none\"/g' /etc/libvirt/libvirtd.conf
|
sudo sed -i 's/auth_tcp = \"sasl\"/auth_tcp = \"none\"/g' /etc/libvirt/libvirtd.conf
|
||||||
sudo service libvirt-bin restart
|
sudo service libvirt-bin restart
|
||||||
sudo adduser vagrant libvirtd
|
sudo adduser vagrant libvirtd
|
||||||
sudo apt-get -y install python-pip python-dev python-libvirt python-libxml2
|
sudo apt-get -y install python-virtualenv python-dev libxml2-dev libvirt-dev zlib1g-dev
|
||||||
sudo pip install -r /vagrant/dev/requirements.txt
|
virtualenv /vagrant/venv
|
||||||
|
source /vagrant/venv/bin/activate
|
||||||
|
pip install -r /vagrant/dev/requirements.txt
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@ server {
|
||||||
#access_log /var/log/nginx/webvirtcloud-access_log;
|
#access_log /var/log/nginx/webvirtcloud-access_log;
|
||||||
|
|
||||||
location /static/ {
|
location /static/ {
|
||||||
root /var/www/webvirtcloud;
|
root /srv/webvirtcloud;
|
||||||
expires max;
|
expires max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
Django==1.8.2
|
Django==1.8.2
|
||||||
websockify==0.6.0
|
websockify==0.6.0
|
||||||
gunicorn==19.3.0
|
gunicorn==19.3.0
|
||||||
|
libvirt-python==1.2.16
|
||||||
|
https://github.com/retspen/retspen.github.io/raw/master/libxml2-python-2.9.1.tar.gz
|
|
@ -1,14 +1,14 @@
|
||||||
[program:webvirtcloud]
|
[program:webvirtcloud]
|
||||||
command=/usr/local/bin/gunicorn webvirtcloud.wsgi:application -c /var/www/webvirtcloud/gunicorn.conf.py
|
command=/srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py
|
||||||
directory=/var/www/webvirtcloud
|
directory=/srv/webvirtcloud
|
||||||
user=www-data
|
user=www-data
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
|
|
||||||
[program:novncd]
|
[program:novncd]
|
||||||
command=/usr/bin/python /var/www/webvirtcloud/console/novncd
|
command=/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd
|
||||||
directory=/var/www/webvirtcloud
|
directory=/srv/webvirtcloud
|
||||||
user=www-data
|
user=www-data
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
|
Loading…
Reference in a new issue