grycap / im-web Goto Github PK
View Code? Open in Web Editor NEWIM - Infrastructure Manager web GUI
License: GNU General Public License v3.0
IM - Infrastructure Manager web GUI
License: GNU General Public License v3.0
In particular with IAM ones.
Hi,
I am using the im to deploy an infrastructure but it looks neither the im-web nor the im_client.py can retreive the infrastructure information:
im:
image: grycap/im:1.9.1 # <-- This is the im container version
container_name: im
volumes:
- ~/Documents/im:/etc/im
ports:
- "8899:8899"
- "8800:8800" # <-- API port is map to 8800
im_use_rest=true
im_use_ssl=false
im_host=localhost
im_port=8800
When using the im-web I get on the infrastructure page:
Error: Code: 0. Error connecting to URL: http://localhost:8800/infrastructures
The configuration on the im_client.cfg
[im_client]
restapi_url=http://172.17.0.1:8800 # <-- inside docker, so this addr is localhost
auth_file=auth.dat
verify-ssl=false
#xmlrpc_ssl_ca_certs=/tmp/pki/ca-chain.pem
When using the im_client.py I get:
root@509881c7fbd6:/home# im_client.py create tosca-templates/simple-node.yml
Connected with: http://172.17.0.1:8800
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
(base) borja@eoan-dev:~$ telnet localhost 8800
Trying 127.0.0.1...
Connected to localhost.
Connection closed by foreign host.
(base) borja@eoan-dev:~$ telnet localhost 8899
Trying 127.0.0.1...
Connected to localhost.
telnet> close
Connection closed.
(base) borja@eoan-dev:~$ telnet localhost 8805 # <-- sample not opened
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
BR Borja
The im-web allows the creation of infrastructures with unsuported Auth Version but does not allow to destroy them.
Using the following template simple-node (with line 81 uncommented) .
Output:
aefd1abc-74b7-11ea-8dbb-0242ac110002 | 0 | Show | Show | failed | N/A | |
-- | -- | -- | -- | -- | -- | -- | --
If I press delete:
Error: Error: Code: 400. Error Destroying Inf: Error destroying the infrastructure:
<LibcloudError in None 'Unsupported Auth Version requested'>
Not sure if it is an issue on the destroying process, but I should be able to delete any infrastructure in my "Infrastructure" menu.
I would like to make my session data persistent (to save my templates, etc.). Therefore I need to have the database on the host. Following the documentation there is a parameter which indicates the location to place the .db:
im-web>configuration>im_db
runnning the following command:
docker run -p 80:80 -e "im_db=/home/www-data/im.db" -d --name im-web grycap/im-web
When I access the im-web url '' I get the following error after log-in:
Fatal error: Uncaught Exception: Unable to open database: unable to open database file in /var/www/html/im-web/db_sqlite.php:26 Stack trace: #0 /var/www/html/im-web/db_sqlite.php(26): SQLite3->open('/home/www-data/...') #1 /var/www/html/im-web/user.php(65): IMDBSQLite3->__construct() #2 /var/www/html/im-web/list.php(32): check_session_user() #3 {main} thrown in /var/www/html/im-web/db_sqlite.php on line 26
If I do an export docker export im-web > web.tar
I can see there is no such /home/www-data/im.db, therefore the system complains is not able to open it.
So let's add the database file: I extract the im.db from the web.tar created with export from /var/www/www-data/ and place it in a ./im-web/db folder with the following docker-compose.yml:
im-web:
image: grycap/im-web
container_name: im-web
environment:
- im_db=/home/www-data/im.db
volumes:
- ./im-web/db:/home/www-data
ports:
- "80:80"
Then it is possible to log-in, however, if you try to save a topology using Topologies > Add+ write something (and a name) and then Save, you will get the following error:
Warning: SQLite3::exec(): attempt to write a readonly database in /var/www/html/im-web/db_sqlite.php on line 82
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/im-web/db_sqlite.php:82) in /var/www/html/im-web/user.php on line 26
It looks the im-web cannot wrtie into the database.
It seems you have to give write permissions for everyone (group is not sufficient) to the database file AND the folder which contains the data. So you can run:
chmod -R a+w im-web/db
You do not need to restart the im-web container, you can see directly it is possible to save your templates.
I could be possible to explain this procedure in the documentation (or kind of) but I think it would be easier for the users to:
Hi,
I am trying to deploy a simple HelloWorld example.
However, when I click on "Launch" I always get the following error:
Error: Error: Line 1: Parse error in: LexToken(VAR,'tosca_definitions_version',1,0)
Br, Borja
The error is located here:
https://github.com/grycap/im-web/blob/master/getvminfo.php#L154
ivmd => vmid
Fatal error: Uncaught ArgumentCountError: Too few arguments to function insert_credential(), 13 passed in /var/www/html/im-web/userinfo.php on line 85 and exactly 14 expected in /var/www/html/im-web/cred.php:41 Stack trace: #0 /var/www/html/im-web/userinfo.php(85): insert_credential('mark12345', '', 'InfrastructureM...', '', 'mark12345', 'test12345', '', '', '', '', '', '', '') #1 {main} thrown in /var/www/html/im-web/cred.php on line 41
Current xmlrpc implemetation fails in php 7.
Warning: Undefined array key "rand" in /var/www/html/im-web/userinfo.php on line 38
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/im-web/userinfo.php:38) in /var/www/html/im-web/userinfo.php on line 107
Hi,
I am just following the examples at the documentation main page:
https://imdocs.readthedocs.io/en/latest/gstarted.html
Using the im in docker with im-web. But I cannot access to the dashboard. Always I try to get to http://localhost the access is denied:
403: Forbidden
You don't have permission to access / on this server.
Apache/2.4.25 (Debian) Server at localhost Port 80
Log:
im-web_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.2. Set the 'ServerName' directive globally to suppress this message
im-web_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.22.0.2. Set the 'ServerName' directive globally to suppress this message
im-web_1 | [Thu Mar 12 14:14:38.921800 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.3.0 configured -- resuming normal operations
im-web_1 | [Thu Mar 12 14:14:38.921907 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
im-web_1 | [Thu Mar 12 14:15:19.545952 2020] [autoindex:error] [pid 16] [client 172.22.0.1:54894] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
im-web_1 | 172.22.0.1 - - [12/Mar/2020:14:15:19 +0000] "GET / HTTP/1.1" 403 501 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
Here is a docker-compose.yml file implemented to deployn the application fast:
version: '3'
services:
im:
image: grycap/im
container_name: im
volumes:
- ~/Documents/im:/etc/im
ports:
- "8899:8899"
- "8800:8800"
im-web:
image: grycap/im-web
container_name: im-web
ports:
- "80:80"
BR, Borja
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.