retspen / webvirtmgr

WebVirtMgr panel for manage virtual machine
http://retspen.github.io
2.04k stars 536 forks source link

Can't Log Into Web Gui #645

Open ghost opened 7 years ago

ghost commented 7 years ago

Just installed on Centos 7.

http://xxx.xxx.47.18:8000/ Page not found

`[root@localhost www]# ./manage.py runserver 0:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found September 05, 2017 - 19:38:17 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://0:8000/ Quit the server with CONTROL-C.`

Also a heads up:

[root@localhost www]# yum -y install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm Loaded plugins: fastestmirror Cannot open: http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm. Skipping. Error: Nothing to do

[root@localhost ~]# cat /etc/nginx/conf.d/webvirtmgr.conf
server {
    listen 80 default_server;

    server_name $hostname;
    #access_log /var/log/nginx/webvirtmgr_access_log; 

    location /static/ {
        root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var
        expires max;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_connect_timeout 600;
        proxy_read_timeout 600;
        proxy_send_timeout 600;
        client_max_body_size 1024M; # Set higher depending on your needs 
    }
}
[root@localhost ~]# cat /etc/nginx/nginx.conf
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

#    server {
#        listen       80 default_server;
#        server_name  localhost;
#        root         /usr/share/nginx/html;
#
#        #charset koi8-r;
#
#        #access_log  /var/log/nginx/host.access.log  main;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        # redirect server error pages to the static page /40x.html
#        #
#        error_page  404              /404.html;
#        location = /40x.html {
#        }
#
#        # redirect server error pages to the static page /50x.html
#        #
#        error_page   500 502 503 504  /50x.html;
#        location = /50x.html {
#        }
#    }

# Settings for a TLS enabled server.
#
#    server {
#        listen       443 ssl http2 default_server;
#        listen       [::]:443 ssl http2 default_server;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers HIGH:!aNULL:!MD5;
#        ssl_prefer_server_ciphers on;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

}
[root@localhost ~]# chown -R nginx:nginx /var/www/webvirtmgr
[root@localhost ~]# cat /etc/supervisord.d/webvirtmgr.ini
[program:webvirtmgr]
command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
logfile=/var/log/supervisor/webvirtmgr.log
log_stderr=true
user=nginx

[program:webvirtmgr-console]
command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/webvirtmgr-console.log
redirect_stderr=true
user=nginx
ghost commented 7 years ago

I would appreciate help on this, thanks.

ghost commented 6 years ago

Is this project dead?

rightkick commented 6 years ago

You should be able to install on Centos 7 without issues. The site has all info. Apart from the errors mentioned, what do you receive when you try to acess with browser? I might be able to provide tomorrow steps I follow.

Alex

On Sep 5, 2017 19:44, "Chad Abizeid" notifications@github.com wrote:

Just installed on Centos 7.

http://xxx.xxx.47.18:8000/ Page not found

`[root@localhost www]# ./manage.py runserver 0:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found September 05, 2017 - 19:38:17 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://0:8000/ Quit the server with CONTROL-C.`

Also a heads up:

[root@localhost www]# yum -y install http://dl.fedoraproject.org/ pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm Loaded plugins: fastestmirror Cannot open: http://dl.fedoraproject.org/ pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm. Skipping. Error: Nothing to do

`[root@localhost ~]# cat /etc/nginx/conf.d/webvirtmgr.conf server { listen 80 default_server;

server_name $hostname;

access_log /var/log/nginx/webvirtmgr_access_log;

location /static/ { root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var expires max; }

location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; client_max_body_size 1024M; # Set higher depending on your needs }

}`

`[root@localhost ~]# cat /etc/nginx/nginx.conf For more information on configuration, see: Official English Documentation: http://nginx.org/en/docs/ Official Russian Documentation: http://nginx.org/ru/docs/

user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; Load dynamic modules. See /usr/share/nginx/README.dynamic.

include /usr/share/nginx/modules/*.conf;

events { worker_connections 1024; }

http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048;

include /etc/nginx/mime.types; default_type application/octet-stream;

Load modular configuration files from the /etc/nginx/conf.d directory.

See http://nginx.org/en/docs/ngx_core_module.html#include

for more information.

include /etc/nginx/conf.d/*.conf;

server { listen 80 default_server; server_name localhost; root /usr/share/nginx/html; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; # Load configuration files for the default server block. include /etc/nginx/default.d/.conf; location / { } # redirect server error pages to the static page /40x.html error_page 404 /404.html; location = /40x.html { } # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { } } Settings for a TLS enabled server. server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; servername ; root /usr/share/nginx/html; ssl_certificate "/etc/pki/nginx/server.crt"; ssl_certificate_key "/etc/pki/nginx/private/ server.key"; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; # Load configuration files for the default server block. include /etc/nginx/default.d/.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }

}`

`[root@localhost ~]# chown -R nginx:nginx /var/www/webvirtmgr [root@localhost ~]# cat /etc/supervisord.d/webvirtmgr.ini [program:webvirtmgr] command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py directory=/var/www/webvirtmgr autostart=true autorestart=true logfile=/var/log/supervisor/webvirtmgr.log log_stderr=true user=nginx

[program:webvirtmgr-console] command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console directory=/var/www/webvirtmgr autostart=true autorestart=true stdout_logfile=/var/log/supervisor/webvirtmgr-console.log redirect_stderr=true user=nginx`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfGqIt7zeshestuamG_f1owdRCHcXks5sfXqGgaJpZM4PNORu .

rightkick commented 6 years ago

Steps for Centos7:

git clone git://github.com/retspen/webvirtmgr.git

cd webvirtmgr

pip install -r requirements.txt

./manage.py syncdb

./manage.py collectstatic

Create User

./manage.py createsuperuser

username: someuser

passwd: yourpass

Change user password

python manage.py changepassword

Configure nginx

mkdir /var/www/

cp -r /usr/src/webvirtmgr /var/www/

nano /etc/nginx/conf.d/webvirtmgr.conf

server {

listen 80 default_server;

server_name $hostname;

access_log /var/log/nginx/webvirtmgr_access_log;

location /static/ {

root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var

expires max;

}

location / {

proxy_pass http://127.0.0.1:8000;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;

proxy_set_header Host $host:$server_port;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_connect_timeout 600;

proxy_read_timeout 600;

proxy_send_timeout 600;

client_max_body_size 1024M; # Set higher depending on your needs

}

}

comment our the server part from /etc/nginx/nginx.conf

systemctl restart nginx

Enable services at startup:

systemctl enable supervisord

systemctl enable nginx

Setup supervisor:

chown -R nginx:nginx /var/www/webvirtmgr

Create file

/etc/supervisord.d/webvirtmgr.ini as following:

[program:webvirtmgr]

command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py

directory=/var/www/webvirtmgr

autostart=true

autorestart=true

logfile=/var/log/supervisor/webvirtmgr.log

log_stderr=true

user=nginx

[program:webvirtmgr-console]

command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console

directory=/var/www/webvirtmgr

autostart=true

autorestart=true

stdout_logfile=/var/log/supervisor/webvirtmgr-console.log

redirect_stderr=true

user=nginx

service supervisord stop

service supervisord start

usermod -a -G libvirt nginx

systemctl restart libvirtd

Alex

On Wed, Oct 11, 2017 at 8:20 PM, Alex K rightkicktech@gmail.com wrote:

You should be able to install on Centos 7 without issues. The site has all info. Apart from the errors mentioned, what do you receive when you try to acess with browser? I might be able to provide tomorrow steps I follow.

Alex

On Sep 5, 2017 19:44, "Chad Abizeid" notifications@github.com wrote:

Just installed on Centos 7.

http://xxx.xxx.47.18:8000/ Page not found

`[root@localhost www]# ./manage.py runserver 0:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found September 05, 2017 - 19:38:17 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://0:8000/ Quit the server with CONTROL-C.`

Also a heads up:

[root@localhost www]# yum -y install http://dl.fedoraproject.org/pu b/epel/7/x86_64/e/epel-release-7-5.noarch.rpm Loaded plugins: fastestmirror Cannot open: http://dl.fedoraproject.org/pu b/epel/7/x86_64/e/epel-release-7-5.noarch.rpm. Skipping. Error: Nothing to do

`[root@localhost ~]# cat /etc/nginx/conf.d/webvirtmgr.conf server { listen 80 default_server;

server_name $hostname;

access_log /var/log/nginx/webvirtmgr_access_log;

location /static/ { root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var expires max; }

location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; client_max_body_size 1024M; # Set higher depending on your needs }

}`

`[root@localhost ~]# cat /etc/nginx/nginx.conf For more information on configuration, see: Official English Documentation: http://nginx.org/en/docs/ Official Russian Documentation: http://nginx.org/ru/docs/

user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; Load dynamic modules. See /usr/share/nginx/README.dynamic.

include /usr/share/nginx/modules/*.conf;

events { worker_connections 1024; }

http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048;

include /etc/nginx/mime.types; default_type application/octet-stream;

Load modular configuration files from the /etc/nginx/conf.d directory.

See http://nginx.org/en/docs/ngx_core_module.html#include

for more information.

include /etc/nginx/conf.d/*.conf;

server { listen 80 default_server; server_name localhost; root /usr/share/nginx/html; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; # Load configuration files for the default server block. include /etc/nginx/default.d/.conf; location / { } # redirect server error pages to the static page /40x.html error_page 404 /404.html; location = /40x.html { } # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { } } Settings for a TLS enabled server. server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; servername ; root /usr/share/nginx/html; ssl_certificate "/etc/pki/nginx/server.crt"; ssl_certificate_key "/etc/pki/nginx/private/server.key"; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; # Load configuration files for the default server block. include /etc/nginx/default.d/.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }

}`

`[root@localhost ~]# chown -R nginx:nginx /var/www/webvirtmgr [root@localhost ~]# cat /etc/supervisord.d/webvirtmgr.ini [program:webvirtmgr] command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py directory=/var/www/webvirtmgr autostart=true autorestart=true logfile=/var/log/supervisor/webvirtmgr.log log_stderr=true user=nginx

[program:webvirtmgr-console] command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console directory=/var/www/webvirtmgr autostart=true autorestart=true stdout_logfile=/var/log/supervisor/webvirtmgr-console.log redirect_stderr=true user=nginx`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfGqIt7zeshestuamG_f1owdRCHcXks5sfXqGgaJpZM4PNORu .

ghost commented 6 years ago

Thanks. So far getting these errors already...

Installed:
  git.x86_64 0:1.8.3.1-12.el7_4                                                                                                                                                            

Dependency Installed:
  libgnome-keyring.x86_64 0:3.12.0-1.el7       perl.x86_64 4:5.16.3-292.el7                       perl-Carp.noarch 0:1.26-244.el7               perl-Encode.x86_64 0:2.51-7.el7            
  perl-Error.noarch 1:0.17020-2.el7            perl-Exporter.noarch 0:5.68-3.el7                  perl-File-Path.noarch 0:2.09-2.el7            perl-File-Temp.noarch 0:0.23.01-3.el7      
  perl-Filter.x86_64 0:1.49-3.el7              perl-Getopt-Long.noarch 0:2.40-2.el7               perl-Git.noarch 0:1.8.3.1-12.el7_4            perl-HTTP-Tiny.noarch 0:0.033-3.el7        
  perl-PathTools.x86_64 0:3.40-5.el7           perl-Pod-Escapes.noarch 1:1.04-292.el7             perl-Pod-Perldoc.noarch 0:3.20-4.el7          perl-Pod-Simple.noarch 1:3.28-4.el7        
  perl-Pod-Usage.noarch 0:1.63-3.el7           perl-Scalar-List-Utils.x86_64 0:1.27-248.el7       perl-Socket.x86_64 0:2.010-4.el7              perl-Storable.x86_64 0:2.45-3.el7          
  perl-TermReadKey.x86_64 0:2.30-20.el7        perl-Text-ParseWords.noarch 0:3.29-4.el7           perl-Time-HiRes.x86_64 4:1.9725-3.el7         perl-Time-Local.noarch 0:1.2300-2.el7      
  perl-constant.noarch 0:1.27-2.el7            perl-libs.x86_64 4:5.16.3-292.el7                  perl-macros.x86_64 4:5.16.3-292.el7           perl-parent.noarch 1:0.225-244.el7         
  perl-podlators.noarch 0:2.5.1-3.el7          perl-threads.x86_64 0:1.87-4.el7                   perl-threads-shared.x86_64 0:1.43-6.el7       rsync.x86_64 0:3.0.9-18.el7                

Complete!
[root@localhost ~]# cd webvirtmgr
-bash: cd: webvirtmgr: No such file or directory
rightkick commented 6 years ago

On Oct 16, 2017 22:21, "Chad Abizeid" notifications@github.com wrote:

Thanks. So far getting these errors already...

`Installed: git.x86_64 0:1.8.3.1-12.el7_4

Dependency Installed: libgnome-keyring.x86_64 0:3.12.0-1.el7 perl.x86_64 4:5.16.3-292.el7 perl-Carp.noarch 0:1.26-244.el7 perl-Encode.x86_64 0:2.51-7.el7 perl-Error.noarch 1:0.17020-2.el7 perl-Exporter.noarch 0:5.68-3.el7 perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7 perl-Filter.x86_64 0:1.49-3.el7 perl-Getopt-Long.noarch 0:2.40-2.el7 perl-Git.noarch 0:1.8.3.1-12.el7_4 perl-HTTP-Tiny.noarch 0:0.033-3.el7 perl-PathTools.x86_64 0:3.40-5.el7 perl-Pod-Escapes.noarch 1:1.04-292.el7 perl-Pod-Perldoc.noarch 0:3.20-4.el7 perl-Pod-Simple.noarch 1:3.28-4.el7 perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 perl-Socket.x86_64 0:2.010-4.el7 perl-Storable.x86_64 0:2.45-3.el7 perl-TermReadKey.x86_64 0:2.30-20.el7 perl-Text-ParseWords.noarch 0:3.29-4.el7 perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch 0:1.2300-2.el7 perl-constant.noarch 0:1.27-2.el7 perl-libs.x86_64 4:5.16.3-292.el7 perl-macros.x86_64 4:5.16.3-292.el7 perl-parent.noarch 1:0.225-244.el7 perl-podlators.noarch 0:2.5.1-3.el7 perl-threads.x86_64 0:1.87-4.el7 perl-threads-shared.x86_64 0:1.43-6.el7 rsync.x86_64 0:3.0.9-18.el7

Complete! [root@localhost ~]# cd webvirtmgr -bash: cd: webvirtmgr: No such file or directory [root@localhost ~]# `

This is saying that the directory webvirtmgr does not exist. Did you got clone first? Did you follow all the steps one by one?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-337005043, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfMKfqk0say8iyieSbvAsFR7owhSRks5ss6zIgaJpZM4PNORu .

ghost commented 6 years ago

Ok tried again, now this:

Username (leave blank to use 'root'): 
Email address: none@none.com
Password: 
Password (again): 
Superuser created successfully.
[root@localhost webvirtmgr]# mkdir /var/www/
[root@localhost webvirtmgr]# cp -r /usr/src/webvirtmgr /var/www/
cp: cannot stat ‘/usr/src/webvirtmgr’: No such file or directory
rightkick commented 6 years ago

Please follow all steps carefully. You are receiving simple errors that show you where the issue is. You need few linux commands knowledge in order to complete the steps.

cp: cannot stat ‘/usr/src/webvirtmgr’: No such file or directory

indicates that /usr/src/webvirtmgr does not exist.

On Tue, Oct 17, 2017 at 6:17 PM, Chad Abizeid notifications@github.com wrote:

Ok tried again, now this:

Username (leave blank to use 'root'): Email address: none@none.com Password: Password (again): Superuser created successfully. [root@localhost webvirtmgr]# mkdir /var/www/ [root@localhost webvirtmgr]# cp -r /usr/src/webvirtmgr /var/www/ cp: cannot stat ‘/usr/src/webvirtmgr’: No such file or directory

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-337263022, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfPzxMpwDXmw-bxRm4cIJg7tqyyY1ks5stMTxgaJpZM4PNORu .

ghost commented 6 years ago

I did follow steps correctly, but that directory does not exist. What command do you think I missed here?

ghost commented 6 years ago
[root@localhost ~]# pip install --upgrade pip
Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 511kB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
Successfully installed pip-9.0.1

[root@localhost ~]# cd webvirtmgr

[root@localhost webvirtmgr]# pip install -r requirements.txt
Requirement already satisfied: django==1.5.5 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: gunicorn==18.0 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied: lockfile>=0.9 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 5))

[root@localhost webvirtmgr]# ./manage.py syncdb
WARNING:root:No local_settings file found.
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 6 object(s) from 1 fixture(s)

[root@localhost webvirtmgr]# ./manage.py collectstatic
WARNING:root:No local_settings file found.

You have requested to collect static files at the destination
location as specified in your settings.

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied, 75 unmodified.

[root@localhost webvirtmgr]# ./manage.py createsuperuser
WARNING:root:No local_settings file found.
Username: chadzeid
Email address: none@none.com
Password: 
Password (again): 
Superuser created successfully.

[root@localhost webvirtmgr]# manage.py changepassword chadzeid
-bash: manage.py: command not found
rightkick commented 6 years ago

The last command is showing you are running a second time manage.py, and this time without ./. Why? Is this in the steps provided? You either run it as ./manage.py or as python manage.py

Please check the steps carefully again. Some lines may have been moved during copy-paste on newines and perhaps are confusing you but it should be easy to understand the correct commands to run.

On Oct 17, 2017 21:44, "Chad Abizeid" notifications@github.com wrote:

[root@localhost ~]# pip install --upgrade pip Collecting pip Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 511kB/s Installing collected packages: pip Found existing installation: pip 8.1.2 Uninstalling pip-8.1.2: Successfully uninstalled pip-8.1.2 Successfully installed pip-9.0.1

[root@localhost ~]# cd webvirtmgr

[root@localhost webvirtmgr]# pip install -r requirements.txt Requirement already satisfied: django==1.5.5 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied: gunicorn==18.0 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 2)) Requirement already satisfied: lockfile>=0.9 in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 5))

[root@localhost webvirtmgr]# ./manage.py syncdb WARNING:root:No local_settings file found. Creating tables ... Installing custom SQL ... Installing indexes ... Installed 6 object(s) from 1 fixture(s)

[root@localhost webvirtmgr]# ./manage.py collectstatic WARNING:root:No local_settings file found.

You have requested to collect static files at the destination location as specified in your settings.

This will overwrite existing files! Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied, 75 unmodified.

[root@localhost webvirtmgr]# ./manage.py createsuperuser WARNING:root:No local_settings file found. Username: chadzeid Email address: none@none.com Password: Password (again): Superuser created successfully.

[root@localhost webvirtmgr]# manage.py changepassword chadzeid -bash: manage.py: command not found

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-337327758, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfBgef2j7OzHFoIT2D8v6pePLULTjks5stPQ-gaJpZM4PNORu .

ghost commented 6 years ago

Hello,

I just noticed that line was broken in 2 lines, yes. Ran it fine, but still hanging up the cp -r portion.

[root@localhost webvirtmgr]# python manage.py changepassword chadzeid
WARNING:root:No local_settings file found.
Changing password for user 'chadzeid'
Password: 
Password (again): 
Password changed successfully for user 'chadzeid'
[root@localhost webvirtmgr]# cp -r /usr/src/webvirtmgr /var/www/
cp: cannot stat ‘/usr/src/webvirtmgr’: No such file or directory
[root@localhost webvirtmgr]# cd /usr/src/
[root@localhost src]# ls
debug  kernels
rightkick commented 6 years ago

Can you give all command that you run from start?

On Oct 17, 2017 22:12, "Chad Abizeid" notifications@github.com wrote:

Hello,

I just noticed that line was broken in 2 lines, yes. Ran it fine, but still hanging up the cp -r portion.

[root@localhost webvirtmgr]# python manage.py changepassword chadzeid WARNING:root:No local_settings file found. Changing password for user 'chadzeid' Password: Password (again): Password changed successfully for user 'chadzeid' [root@localhost webvirtmgr]# cp -r /usr/src/webvirtmgr /var/www/ cp: cannot stat ‘/usr/src/webvirtmgr’: No such file or directory [root@localhost webvirtmgr]# cd /usr/src/ [root@localhost src]# ls debug kernels

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-337338614, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfGinJTi4rPwtM-4U4UsPqk_ZKSjtks5stPwdgaJpZM4PNORu .

ghost commented 6 years ago

Here you go, it get's stuck on the last line "cp -r..."

git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb
./manage.py collectstatic
./manage.py createsuperuser

python manage.py changepassword chadzeid 
mkdir /var/www/
cp -r /usr/src/webvirtmgr /var/www/

No errors on previous commands ran.

ghost commented 6 years ago

Instructions are not working fully on Centos 7....

https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

I followed through every step carefully, no errors. But, still cannot access web GUI.

http://xxx.xxx.xxx.130:8000/
[root@localhost webvirtmgr]# ./manage.py runserver 0:8000
WARNING:root:No local_settings file found.
WARNING:root:No local_settings file found.
Validating models...

0 errors found
October 23, 2017 - 20:33:23
Django version 1.5.5, using settings 'webvirtmgr.settings'
Development server is running at http://0:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.

[root@localhost webvirtmgr]# ./manage.py runserver xxx.xxx.xxx.130:8000
WARNING:root:No local_settings file found.
WARNING:root:No local_settings file found.
Validating models...

0 errors found
October 23, 2017 - 20:33:46
Django version 1.5.5, using settings 'webvirtmgr.settings'
Development server is running at http://xxx.xxx.xxx.130:8000/
Quit the server with CONTROL-C.
rightkick commented 6 years ago

The issue is that my instructions assume that you git clone inside /usr/src.

I might be able to compile a doc with some more general instructions if this helps.

On Oct 23, 2017 8:37 PM, "Chad Abizeid" notifications@github.com wrote:

Instructions are not working fully on Centos 7....

https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

I followed through every step carefully, no errors. But, still cannot access web GUI.

http://xxx.xxx.xxx.130:8000/

[root@localhost webvirtmgr]# ./manage.py runserver 0:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found October 23, 2017 - 20:33:23 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://0:8000/ Quit the server with CONTROL-C. Error: That port is already in use.

[root@localhost webvirtmgr]# ./manage.py runserver xxx.xxx.xxx.130:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found October 23, 2017 - 20:33:46 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://xxx.xxx.xxx.130:8000/ Quit the server with CONTROL-C.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-338738042, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfFltP3WRpftBPLb9K-xKaXl4ipXdks5svM7LgaJpZM4PNORu .

rightkick commented 6 years ago

For a quick check I would suggest to start with:

cd /usr/src

... then all other provided commands.

In case you already have any webvirtmgr folder at /var/www remove it to start clean.

On Oct 23, 2017 11:40 PM, "Alex K" rightkicktech@gmail.com wrote:

The issue is that my instructions assume that you git clone inside /usr/src.

I might be able to compile a doc with some more general instructions if this helps.

On Oct 23, 2017 8:37 PM, "Chad Abizeid" notifications@github.com wrote:

Instructions are not working fully on Centos 7....

https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

I followed through every step carefully, no errors. But, still cannot access web GUI.

http://xxx.xxx.xxx.130:8000/

[root@localhost webvirtmgr]# ./manage.py runserver 0:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found October 23, 2017 - 20:33:23 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://0:8000/ Quit the server with CONTROL-C. Error: That port is already in use.

[root@localhost webvirtmgr]# ./manage.py runserver xxx.xxx.xxx.130:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found October 23, 2017 - 20:33:46 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://xxx.xxx.xxx.130:8000/ Quit the server with CONTROL-C.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-338738042, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfFltP3WRpftBPLb9K-xKaXl4ipXdks5svM7LgaJpZM4PNORu .

ghost commented 6 years ago

Ok, did you're steps again...

Now, I'm stuck on this?

[root@localhost webvirtmgr]# cd /var/www/webvirtmgr
[root@localhost webvirtmgr]# git pull
Already up-to-date.
[root@localhost webvirtmgr]# ./manage.py collectstatic
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 263, in fetch_command
    app_name = get_commands()[subcommand]
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 109, in get_commands
    apps = settings.INSTALLED_APPS
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 134, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'webvirtmgr.settings' (Is it on sys.path?): No module named webvirtmgr.settings

Steps followed...

cd /usr/src
git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb
./manage.py collectstatic
./manage.py createsuperuser

python manage.py changepassword chadzeid 
mv webvirtmgr /var/www/ 

nano /etc/nginx/conf.d/webvirtmgr.conf
nano /etc/nginx/nginx.conf

service nginx restart
/usr/sbin/setsebool httpd_can_network_connect true 
chkconfig supervisord on

chown -R nginx:nginx /var/www/webvirtmgr
nano /etc/supervisord.d/webvirtmgr.ini

service supervisord stop
service supervisord start

cd /var/www/webvirtmgr
git pull
./manage.py collectstatic
service supervisord restart

./manage.py runserver xxx.xxx.xxx.130:8000
rightkick commented 6 years ago

Im not sure about the errors you are receiving now. Also I have not tested the steps with selinux enabled. If you start clean and with disabled selinux do you still receive errors?

On Oct 24, 2017 3:46 AM, "Chad Abizeid" notifications@github.com wrote:

Ok, did you're steps again...

Now, I'm stuck on this?

[root@localhost webvirtmgr]# cd /var/www/webvirtmgr [root@localhost webvirtmgr]# git pull Already up-to-date. [root@localhost webvirtmgr]# ./manage.py collectstatic Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 453, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 263, in fetch_command app_name = get_commands()[subcommand] File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 109, in get_commands apps = settings.INSTALLED_APPS File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 53, in getattr self._setup(name) File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 48, in _setup self._wrapped = Settings(settings_module) File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 134, in init raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) ImportError: Could not import settings 'webvirtmgr.settings' (Is it on sys.path?): No module named webvirtmgr.settings

Steps followed...

cd /usr/src git clone git://github.com/retspen/webvirtmgr.git cd webvirtmgr pip install -r requirements.txt ./manage.py syncdb ./manage.py collectstatic ./manage.py createsuperuser

python manage.py changepassword chadzeid mv webvirtmgr /var/www/

nano /etc/nginx/conf.d/webvirtmgr.conf nano /etc/nginx/nginx.conf

service nginx restart /usr/sbin/setsebool httpd_can_network_connect true chkconfig supervisord on

chown -R nginx:nginx /var/www/webvirtmgr nano /etc/supervisord.d/webvirtmgr.ini

service supervisord stop service supervisord start

cd /var/www/webvirtmgr git pull ./manage.py collectstatic service supervisord restart

./manage.py runserver xxx.xxx.xxx.130:8000

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-338837463, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfP7F1n7FODQnsSfYoWk_bqNb-R9-ks5svTNhgaJpZM4PNORu .

ghost commented 6 years ago

I simply followed the documentation.

https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

Update SELinux policy /usr/sbin/setsebool httpd_can_network_connect true

ghost commented 6 years ago

Can't believe how frustrating this has been to get this working. Virtually impossible.

Reinstalled Centos 7 fresh

Followed below steps:

yum install epel-release
yum update -y
yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx
yum -y install gcc python-devel
pip install numpy

cd /usr/src
yum install git -y
git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt 
./manage.py syncdb 
./manage.py collectstatic 
./manage.py createsuperuser 

python manage.py changepassword chad
cd ..
mv webvirtmgr /var/www/ 

nano /etc/nginx/conf.d/webvirtmgr.conf
nano /etc/nginx/nginx.conf

service nginx restart
**SKIPPED THIS ONE AS YOU INSTRUCTED:** /usr/sbin/setsebool httpd_can_network_connect true 
chkconfig supervisord on

chown -R nginx:nginx /var/www/webvirtmgr
nano /etc/supervisord.d/webvirtmgr.ini

service supervisord stop
service supervisord start

cd /var/www/webvirtmgr
git pull
./manage.py collectstatic
service supervisord restart

./manage.py runserver xxx.xxx.xxx.130:8000

Got the same error:

[root@localhost webvirtmgr]# ./manage.py collectstatic
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 263, in fetch_command
    app_name = get_commands()[subcommand]
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 109, in get_commands
    apps = settings.INSTALLED_APPS
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 134, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'webvirtmgr.settings' (Is it on sys.path?): No module named webvirtmgr.settings
rightkick commented 6 years ago

SKIPPED THIS ONE AS YOU INSTRUCTED: /usr/sbin/setsebool httpd_can_network_connect true

Ok, but did you disable selinux?

On Thu, Oct 26, 2017 at 10:37 PM, Chad Abizeid notifications@github.com wrote:

Can't believe how frustrating this has been to get this working. Virtually impossible.

Reinstalled Centos 7 fresh

Followed below steps:

yum install epel-release yum update -y yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx yum -y install gcc python-devel pip install numpy

cd /usr/src yum install git -y git clone git://github.com/retspen/webvirtmgr.git cd webvirtmgr pip install -r requirements.txt ./manage.py syncdb ./manage.py collectstatic ./manage.py createsuperuser

python manage.py changepassword chad cd .. mv webvirtmgr /var/www/

nano /etc/nginx/conf.d/webvirtmgr.conf nano /etc/nginx/nginx.conf

service nginx restart SKIPPED THIS ONE AS YOU INSTRUCTED: /usr/sbin/setsebool httpd_can_network_connect true chkconfig supervisord on

chown -R nginx:nginx /var/www/webvirtmgr nano /etc/supervisord.d/webvirtmgr.ini

service supervisord stop service supervisord start

cd /var/www/webvirtmgr git pull ./manage.py collectstatic service supervisord restart

./manage.py runserver xxx.xxx.xxx.130:8000

Got the same error:

[root@localhost webvirtmgr]# ./manage.py collectstatic Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 453, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 263, in fetch_command app_name = get_commands()[subcommand] File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 109, in get_commands apps = settings.INSTALLED_APPS File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 53, in getattr self._setup(name) File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 48, in _setup self._wrapped = Settings(settings_module) File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 134, in init raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) ImportError: Could not import settings 'webvirtmgr.settings' (Is it on sys.path?): No module named webvirtmgr.settings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-339777482, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfG_H1EXM4djSEPhIlBgq5Xk0Aw-6ks5swN-DgaJpZM4PNORu .

ghost commented 6 years ago

I disabled it after I ran the commands actually, but rebooted and same error. Now, I reloaded Centos 7 and disabled it first before running the steps below after disabling SELINUX.

  1. Disable SELINUX
  2. Reboot server
    [root@localhost ~]# sestatus
    SELinux status:                 disabled
  3. Done below steps.
yum install epel-release -y 
yum update -y 
yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx 
yum -y install gcc python-devel 
pip install numpy 
pip install --upgrade pip 

cd /usr/src 
git clone git://github.com/retspen/webvirtmgr.git 
cd webvirtmgr 
pip install -r requirements.txt 
./manage.py syncdb 
./manage.py collectstatic 
./manage.py createsuperuser 

python manage.py changepassword chad 
cd .. 
mv webvirtmgr /var/www/ 

nano /etc/nginx/conf.d/webvirtmgr.conf 
nano /etc/nginx/nginx.conf 

service nginx restart 
*** /usr/sbin/setsebool httpd_can_network_connect true 
chkconfig supervisord on 

chown -R nginx:nginx /var/www/webvirtmgr 
nano /etc/supervisord.d/webvirtmgr.ini 

service supervisord stop 
service supervisord start 

cd /var/www/webvirtmgr 
git pull 
./manage.py collectstatic 
service supervisord restart 

I did notice this warning on a few commands...

[root@localhost webvirtmgr]# ./manage.py syncdb 
WARNING:root:No local_settings file found.

[root@localhost webvirtmgr]# ./manage.py collectstatic 
WARNING:root:No local_settings file found.

[root@localhost webvirtmgr]# ./manage.py createsuperuser 
WARNING:root:No local_settings file found.

Now look where the problem is, missing files. Unbelievable. No errors on all previous commands except missing files on 3rd last command.

[root@localhost webvirtmgr]# cd /var/www/webvirtmgr 

[root@localhost webvirtmgr]# ls -lh
total 32K
-rw-r--r-- 1 nginx nginx    0 Oct 30 13:53 __init__.py
-rw-r--r-- 1 nginx nginx  129 Oct 30 13:54 __init__.pyc
drwxr-xr-x 2 nginx nginx  103 Oct 30 13:54 local
-rw-r--r-- 1 nginx nginx  333 Oct 30 13:53 settings-dev.py
-rw-r--r-- 1 nginx nginx 7.3K Oct 30 13:53 settings.py
-rw-r--r-- 1 nginx nginx 4.5K Oct 30 13:54 settings.pyc
drwxr-xr-x 6 nginx nginx   51 Oct 30 13:53 static
-rw-r--r-- 1 nginx nginx 2.0K Oct 30 13:53 urls.py
drwxr-xr-x 2 nginx nginx   88 Oct 30 13:54 utils
-rw-r--r-- 1 nginx nginx 1.4K Oct 30 13:53 wsgi.py

[root@localhost webvirtmgr]# ./manage.py collectstatic 
-bash: ./manage.py: No such file or directory

[root@localhost webvirtmgr]# cd ..

[root@localhost www]# ls -lh
total 72K
drwxr-xr-x 6 root  root   114 Oct 30 13:53 conf
drwxr-xr-x 2 root  root   116 Oct 30 13:53 console
drwxr-xr-x 3 root  root   144 Oct 30 13:54 create
drwxr-xr-x 4 root  root    36 Oct 30 13:53 deploy
-rw-r--r-- 1 root  root    85 Oct 30 13:53 dev-requirements.txt
drwxr-xr-x 2 root  root    57 Oct 30 13:53 hostdetail
drwxr-xr-x 2 root  root    23 Oct 30 13:53 images
drwxr-xr-x 3 root  root   132 Oct 30 13:54 instance
drwxr-xr-x 2 root  root    73 Oct 30 13:53 interfaces
drwxr-xr-x 5 root  root    42 Oct 30 13:53 locale
-rwxr-xr-x 1 root  root   253 Oct 30 13:53 manage.py
-rw-r--r-- 1 root  root   722 Oct 30 13:53 MANIFEST.in
drwxr-xr-x 2 root  root    73 Oct 30 13:53 networks
-rw-r--r-- 1 root  root  2.5K Oct 30 13:53 README.rst
-rw-r--r-- 1 root  root   147 Oct 30 13:53 requirements.txt
drwxr-xr-x 2 root  root    73 Oct 30 13:53 secrets
drwxr-xr-x 2 root  root    74 Oct 30 13:53 serverlog
drwxr-xr-x 2 root  root   128 Oct 30 13:54 servers
-rw-r--r-- 1 root  root  2.3K Oct 30 13:53 setup.py
drwxr-xr-x 6 root  root    51 Oct 30 13:54 static
drwxr-xr-x 2 root  root    73 Oct 30 13:53 storages
drwxr-xr-x 2 root  root  4.0K Oct 30 13:53 templates
-rw-r--r-- 1 root  root   580 Oct 30 13:53 Vagrantfile
drwxr-xr-x 2 root  root   224 Oct 30 13:53 vrtManager
drwxr-xr-x 5 nginx nginx  177 Oct 30 13:54 webvirtmgr
-rw-r--r-- 1 root  root   38K Oct 30 13:56 webvirtmgr.sqlite3
ghost commented 6 years ago

I think the issue is this in your documentation...

cd .. 
mv webvirtmgr /var/www/ 

Hence why the files end up in /var/www/ instead of /var/www/webvirtmgr

Now I ran that collectstatic command again, but in /var/www and no errors. However, still no GUI access.

[root@localhost www]# ./manage.py collectstatic 
WARNING:root:No local_settings file found.

You have requested to collect static files at the destination
location as specified in your settings.

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied, 75 unmodified.
[root@localhost www]# service supervisord restart 
Redirecting to /bin/systemctl restart supervisord.service
[root@localhost www]# ./manage.py runserver xxx.xxx.xxx.130:8000 
WARNING:root:No local_settings file found.
WARNING:root:No local_settings file found.
Validating models...

0 errors found
October 30, 2017 - 20:15:01
Django version 1.5.5, using settings 'webvirtmgr.settings'
Development server is running at http://xxx.xxx.xxx:8000/

I moved the files from /var/www to /var/www/webvirtmgr and re-ran the last few commands. Then, ended up once again with the previous error. Documentation is all screwed up at this point. Never had such a difficult time installing any script like this.

[root@localhost www]# mv * /var/www/webvirtmgr 
mv: overwrite ‘/var/www/webvirtmgr/static’? y
mv: cannot move ‘static’ to ‘/var/www/webvirtmgr/static’: File exists
mv: cannot move ‘webvirtmgr’ to a subdirectory of itself, ‘/var/www/webvirtmgr/webvirtmgr’

[root@localhost www]# cd /var/www/webvirtmgr 

[root@localhost webvirtmgr]# ls -lh
total 108K
drwxr-xr-x 6 root  root   114 Oct 30 13:53 conf
drwxr-xr-x 2 root  root   116 Oct 30 13:53 console
drwxr-xr-x 3 root  root   144 Oct 30 13:54 create
drwxr-xr-x 4 root  root    36 Oct 30 13:53 deploy
-rw-r--r-- 1 root  root    85 Oct 30 13:53 dev-requirements.txt
drwxr-xr-x 2 root  root    57 Oct 30 13:53 hostdetail
drwxr-xr-x 2 root  root    23 Oct 30 13:53 images
-rw-r--r-- 1 nginx nginx    0 Oct 30 13:53 __init__.py
-rw-r--r-- 1 nginx nginx  129 Oct 30 13:54 __init__.pyc
drwxr-xr-x 3 root  root   132 Oct 30 13:54 instance
drwxr-xr-x 2 root  root    73 Oct 30 13:53 interfaces
drwxr-xr-x 2 nginx nginx  103 Oct 30 13:54 local
drwxr-xr-x 5 root  root    42 Oct 30 13:53 locale
-rwxr-xr-x 1 root  root   253 Oct 30 13:53 manage.py
-rw-r--r-- 1 root  root   722 Oct 30 13:53 MANIFEST.in
drwxr-xr-x 2 root  root    73 Oct 30 13:53 networks
-rw-r--r-- 1 root  root  2.5K Oct 30 13:53 README.rst
-rw-r--r-- 1 root  root   147 Oct 30 13:53 requirements.txt
drwxr-xr-x 2 root  root    73 Oct 30 13:53 secrets
drwxr-xr-x 2 root  root    74 Oct 30 13:53 serverlog
drwxr-xr-x 2 root  root   128 Oct 30 13:54 servers
-rw-r--r-- 1 nginx nginx  333 Oct 30 13:53 settings-dev.py
-rw-r--r-- 1 nginx nginx 7.3K Oct 30 13:53 settings.py
-rw-r--r-- 1 nginx nginx 4.5K Oct 30 13:54 settings.pyc
-rw-r--r-- 1 root  root  2.3K Oct 30 13:53 setup.py
drwxr-xr-x 6 nginx nginx   51 Oct 30 13:53 static
drwxr-xr-x 2 root  root    73 Oct 30 13:53 storages
drwxr-xr-x 2 root  root  4.0K Oct 30 13:53 templates
-rw-r--r-- 1 nginx nginx 2.0K Oct 30 13:53 urls.py
drwxr-xr-x 2 nginx nginx   88 Oct 30 13:54 utils
-rw-r--r-- 1 root  root   580 Oct 30 13:53 Vagrantfile
drwxr-xr-x 2 root  root   224 Oct 30 13:53 vrtManager
-rw-r--r-- 1 root  root   38K Oct 30 13:56 webvirtmgr.sqlite3
-rw-r--r-- 1 nginx nginx 1.4K Oct 30 13:53 wsgi.py
-rw-r--r-- 1 root  root  1020 Oct 30 14:15 wsgi.pyc

[root@localhost webvirtmgr]# chown -R nginx:nginx /var/www/webvirtmgr 

[root@localhost webvirtmgr]# service supervisord stop 
service supervisord start Redirecting to /bin/systemctl stop supervisord.service

[root@localhost webvirtmgr]# service supervisord start 
Redirecting to /bin/systemctl start supervisord.service

[root@localhost webvirtmgr]# git pull 
Already up-to-date.

[root@localhost webvirtmgr]# ./manage.py collectstatic 
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 263, in fetch_command
    app_name = get_commands()[subcommand]
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 109, in get_commands
    apps = settings.INSTALLED_APPS
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 134, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'webvirtmgr.settings' (Is it on sys.path?): No module named webvirtmgr.settings
rightkick commented 6 years ago

I will try to reproduce this. I have been setting this up many times without issues. There were few times which the GUI simply was not working but repeating the steps usually resolved the issue.

On Oct 30, 2017 20:20, "Chad Abizeid" notifications@github.com wrote:

I think the issue is this in your documentation...

cd .. mv webvirtmgr /var/www/

Hence why the files end up in /var/www/ instead of /var/www/webvirtmgr

Now I ran that collectstatic command again, but in /var/www and no errors. However, still no GUI access.

[root@localhost www]# ./manage.py collectstatic WARNING:root:No local_settings file found.

You have requested to collect static files at the destination location as specified in your settings.

This will overwrite existing files! Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied, 75 unmodified. [root@localhost www]# service supervisord restart Redirecting to /bin/systemctl restart supervisord.service [root@localhost www]# ./manage.py runserver xxx.xxx.xxx.130:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models...

0 errors found October 30, 2017 - 20:15:01 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://xxx.xxx.xxx:8000/

I moved the files from /var/www to /var/www/webvirtmgr and re-ran the last few commands. Then, ended up once again with the previous error. Documentation is all screwed up at this point. Never had such a difficult time installing any script like this.

[root@localhost www]# mv * /var/www/webvirtmgr mv: overwrite ‘/var/www/webvirtmgr/static’? y mv: cannot move ‘static’ to ‘/var/www/webvirtmgr/static’: File exists mv: cannot move ‘webvirtmgr’ to a subdirectory of itself, ‘/var/www/webvirtmgr/webvirtmgr’

[root@localhost www]# cd /var/www/webvirtmgr

[root@localhost webvirtmgr]# ls -lh total 108K drwxr-xr-x 6 root root 114 Oct 30 13:53 conf drwxr-xr-x 2 root root 116 Oct 30 13:53 console drwxr-xr-x 3 root root 144 Oct 30 13:54 create drwxr-xr-x 4 root root 36 Oct 30 13:53 deploy -rw-r--r-- 1 root root 85 Oct 30 13:53 dev-requirements.txt drwxr-xr-x 2 root root 57 Oct 30 13:53 hostdetail drwxr-xr-x 2 root root 23 Oct 30 13:53 images -rw-r--r-- 1 nginx nginx 0 Oct 30 13:53 init.py -rw-r--r-- 1 nginx nginx 129 Oct 30 13:54 init.pyc drwxr-xr-x 3 root root 132 Oct 30 13:54 instance drwxr-xr-x 2 root root 73 Oct 30 13:53 interfaces drwxr-xr-x 2 nginx nginx 103 Oct 30 13:54 local drwxr-xr-x 5 root root 42 Oct 30 13:53 locale -rwxr-xr-x 1 root root 253 Oct 30 13:53 manage.py -rw-r--r-- 1 root root 722 Oct 30 13:53 MANIFEST.in drwxr-xr-x 2 root root 73 Oct 30 13:53 networks -rw-r--r-- 1 root root 2.5K Oct 30 13:53 README.rst -rw-r--r-- 1 root root 147 Oct 30 13:53 requirements.txt drwxr-xr-x 2 root root 73 Oct 30 13:53 secrets drwxr-xr-x 2 root root 74 Oct 30 13:53 serverlog drwxr-xr-x 2 root root 128 Oct 30 13:54 servers -rw-r--r-- 1 nginx nginx 333 Oct 30 13:53 settings-dev.py -rw-r--r-- 1 nginx nginx 7.3K Oct 30 13:53 settings.py -rw-r--r-- 1 nginx nginx 4.5K Oct 30 13:54 settings.pyc -rw-r--r-- 1 root root 2.3K Oct 30 13:53 setup.py drwxr-xr-x 6 nginx nginx 51 Oct 30 13:53 static drwxr-xr-x 2 root root 73 Oct 30 13:53 storages drwxr-xr-x 2 root root 4.0K Oct 30 13:53 templates -rw-r--r-- 1 nginx nginx 2.0K Oct 30 13:53 urls.py drwxr-xr-x 2 nginx nginx 88 Oct 30 13:54 utils -rw-r--r-- 1 root root 580 Oct 30 13:53 Vagrantfile drwxr-xr-x 2 root root 224 Oct 30 13:53 vrtManager -rw-r--r-- 1 root root 38K Oct 30 13:56 webvirtmgr.sqlite3 -rw-r--r-- 1 nginx nginx 1.4K Oct 30 13:53 wsgi.py -rw-r--r-- 1 root root 1020 Oct 30 14:15 wsgi.pyc

[root@localhost webvirtmgr]# chown -R nginx:nginx /var/www/webvirtmgr

[root@localhost webvirtmgr]# service supervisord stop service supervisord start Redirecting to /bin/systemctl stop supervisord.service

[root@localhost webvirtmgr]# service supervisord start Redirecting to /bin/systemctl start supervisord.service

[root@localhost webvirtmgr]# git pull Already up-to-date.

[root@localhost webvirtmgr]# ./manage.py collectstatic Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 453, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 263, in fetch_command app_name = get_commands()[subcommand] File "/usr/lib/python2.7/site-packages/django/core/management/init.py", line 109, in get_commands apps = settings.INSTALLED_APPS File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 53, in getattr self._setup(name) File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 48, in _setup self._wrapped = Settings(settings_module) File "/usr/lib/python2.7/site-packages/django/conf/init.py", line 134, in init raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) ImportError: Could not import settings 'webvirtmgr.settings' (Is it on sys.path?): No module named webvirtmgr.settings

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-340537618, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfLn-AZ3PZPgUy4NjtFfZgR079uiLks5sxhNqgaJpZM4PNORu .

ghost commented 6 years ago

I literally started install oVirt on the same box and somehow, that fixed the web GUI access.

I added a new "connection". Went to infrastructure area and see this:

" unable to connect to server at 'xxx.xxx.xxx.130:16509': Connection refused"

I also tried adding new "local socket" connection, this time green but still getting an error.

Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

rightkick commented 6 years ago

For remote connections I do it with ssh, configuring keys. For the local socket issue, is libvirtd started?

On Oct 31, 2017 18:35, "Chad Abizeid" notifications@github.com wrote:

I literally started install oVirt on the same box and somehow, that fixed the web GUI access.

I added a new "connection". Went to infrastructure area and see this:

" unable to connect to server at 'xxx.xxx.xxx.130:16509': Connection refused"

I also tried adding new "local socket" connection, this time green but still getting an error.

Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-340821908, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfFSQXvfdGIXBCBbYu1x-nQPS4fiMks5sx0xHgaJpZM4PNORu .

ghost commented 6 years ago

Output...

[root@localhost ~]# systemctl restart libvirtd
Failed to restart libvirtd.service: Unit not found.
[root@localhost ~]# systemctl start libvirtd
Failed to start libvirtd.service: Unit not found.

So I ran: yum install libvirt libvirt-python libvirt-client -y

New error now... authentication unavailable: no polkit agent available to authenticate action org.libvirt.unix.manage

rightkick commented 6 years ago

I recommend to install KVM with the following;

yum groupinstall -y "Virtualization Host"

yum groupinstall -y "Virtualization Platform"

You may need also the following: yum -y install @virt dejavu-lgc- xorg-x11-xauth tigervnc libguestfs-tools policycoreutils-python bridge-utils

In regards to the Webvirt installation the same steps apply and have been tested once again to install without issues... I am attaching a doc in case this is more easy for you (changed the mv step to cp -r as it is easy to mishandle the mv command).

On Wed, Nov 1, 2017 at 2:38 PM, Chad Abizeid notifications@github.com wrote:

Output...

[root@localhost ~]# systemctl restart libvirtd Failed to restart libvirtd.service: Unit not found. [root@localhost ~]# systemctl start libvirtd Failed to start libvirtd.service: Unit not found.

So I ran: yum install libvirt libvirt-python libvirt-client -y

New error now... authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-341094858, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfFRmNwL678NeDujKohrjZbSLEHzsks5syGYygaJpZM4PNORu .

ghost commented 6 years ago

Thanks, but nothing is attached?

ghost commented 6 years ago

Hello, please follow up when you can. Thank you.

rightkick commented 6 years ago

I was replying with email on this and the attachment might have been stripped. I am putting again the steps for a clean CentOS7 further down, this time formatted. It is assumed that selinux is disabled.

yum update
yum -y install python-pip python-websockify supervisor nginx gcc python-devel
pip install numpy
pip install --upgrade pip

rm -rf webvirtmgr
git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb
./manage.py collectstatic

# Create User
./manage.py createsuperuser

# Configure nginx
cd ..
mkdir   /var/www/
cp -r webvirtmgr /var/www/

# Edit nginx config
cat << EOF > /etc/nginx/conf.d/webvirtmgr.conf
####
server {
listen 80 default_server;

server_name \$hostname;
#access_log /var/log/nginx/webvirtmgr_access_log;

location /static/ {
    root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var
    expires max;
}

location / {
    proxy_pass http://127.0.0.1:8000;
    proxy_set_header X-Real-IP \$remote_addr;
    proxy_set_header X-Forwarded-for \$proxy_add_x_forwarded_for;
    proxy_set_header Host \$host:\$server_port;
    proxy_set_header X-Forwarded-Proto \$scheme;
    proxy_connect_timeout 600;
    proxy_read_timeout 600;
    proxy_send_timeout 600;
    client_max_body_size 1024M; # Set higher depending on your needs
}

}
####
EOF

cat << EOF > /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '\$remote_addr - \$remote_user [\$time_local] "\$request" '
                      '\$status \$body_bytes_sent "\$http_referer" '
                      '"\$http_user_agent" "\$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    include /etc/nginx/conf.d/*.conf;

}
EOF

systemctl restart nginx

systemctl enable supervisord
systemctl enable nginx

chown -R nginx:nginx /var/www/webvirtmgr

cat << EOF > /etc/supervisord.d/webvirtmgr.ini
###
[program:webvirtmgr]
command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
logfile=/var/log/supervisor/webvirtmgr.log
log_stderr=true
user=nginx

[program:webvirtmgr-console]
command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/webvirtmgr-console.log
redirect_stderr=true
user=nginx
###
EOF

service supervisord stop
service supervisord start

usermod -a -G libvirt nginx
systemctl restart libvirtd

Needless to say that you need libvirt installed. In case not installed install it as below:

yum groupinstall -y "Virtualization Host"
yum -y groupinstall "Virtualization Platform"
yum -y install @virt* dejavu-lgc-* xorg-x11-xauth tigervnc libguestfs-tools policycoreutils-python bridge-utils

Caution: the steps assume that you do not have any nginx configuration in place, as it will overwrite it.

Attached also the script. You can rename it as webvirt-install.sh and make it executable to run it. webvirt-install.txt

rightkick commented 6 years ago

In case this worked, you may close also #637

rightkick commented 6 years ago

Any luck with this? Show some community spirit and let us know. Other users might be interested also...

On Nov 7, 2017 00:07, "Chad Abizeid" notifications@github.com wrote:

Hello, please follow up when you can. Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/retspen/webvirtmgr/issues/645#issuecomment-342303965, or mute the thread https://github.com/notifications/unsubscribe-auth/AOedfAnrjnFwUbEe6FUfYZDSOylmqp8Kks5sz4MbgaJpZM4PNORu .