Giter Site home page Giter Site logo

bheisig / i-doit-docker Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 13.0 647 KB

Dockerized i-doit CMDB

License: GNU Affero General Public License v3.0

Dockerfile 25.96% Shell 74.04%
i-doit cmdb asset-management configuration-management docker docker-images dockerfiles idoit it-documentation it-assets it-asset- itam documentation docs documentation-of-things configuration-items

i-doit-docker's Introduction

i-doit Docker images

Dockerized i-doit CMDB

Stars Pulls Image size Build status

Not production-ready!

The provided Docker images aren't production-ready. Please do not rely on them. They come "as is" with no warranty of any kind. They are not an official product by synetics GmbH. Because of this, we can't provide you any support.

At the moment, we use these images for quality tests of i-doit and its add-ons. In the near-future we hope to provide you official i-doit Docker images which are well-tested and production-ready. In the meantime don't hesitate to test these images yourself. We love to get your feedback!

Supported tags and respective Dockerfile links

Note: Older branches are not supported anymore but can still be found in the repository.

Quick reference

What is i-doit?

i-doit ("I document IT") is a fully-featured Web application for CMDB (Configuration Management Databases), IT asset management (ITAM) and IT documentation. i-doit is maintained by the company synetics GmbH, located in Düsseldorf/Germany.

How to use this image

Each image is built on the official PHP Docker image. We've got heavily inspired by the well-documented Nextcloud docker image. Thank you!

Run i-doit with PHP-FPM (recommended)

Run the latest version of i-doit open with PHP 8.0 and FPM:

docker run --name i-doit-fpm -p 9000:9000 bheisig/idoit:1.19-open-php8.0-fpm

Run i-doit with Apache HTTPD (legacy)

Run the latest version of i-doit open with PHP 8.0 and Apache HTTPD 2.4:

docker run --name i-doit-apache -p 80:80 bheisig/idoit:1.19-open-php8.0-apache

Available volumes

Each i-doit container has one default volume containing the complete installation directory: /var/www/html. This directory includes the source code, cache files, uploaded files, installed add-ons, custom translation files, etc.

Run i-doit with Docker Compose

i-doit requires either MariaDB or MySQL as the database backend. For better performance Memcached is highly recommended. There are some examples:

Run i-doit CLI tool

i-doit has its own CLI tool named console.php for long-lasting, recurring tasks in background. You can call any CLI command in the running Docker container, for example:

docker exec -it --user www-data i-doit-fpm php console.php --help

Update i-doit

to be defined

Backup and restore

For a complete backup and restore process you need to consider at least 3 sources:

  1. i-doit installation directory (see section "Available volumes")
  2. System database (default: idoit_system)
  3. Each tenant database (default 1st one: idoit_data)

As you can see in the examples for docker-compose (see section "Run i-doit with Docker Compose") the simplest thing is to backup the named volumes. But for a running instance of MariaDB this is a bad solution because everything stored temporarily in memory won't be backed up. Run mysqldump (for backup) and mysql (for restore) to fetch every bit stored in the databases.

This is a basic example to backup everything in a running environment:

docker exec i-doit-fpm /bin/tar cvf - . | gzip -9 > backup.tar.gz
docker exec i-doit-fpm /usr/bin/mysqldump -uidoit -pidoit --all-databases | gzip -9 > backup.sql.gz

This is a basic example to restore those backups:

cat backup.tar.gz | docker exec --interactive --user www-data i-doit-fpm /bin/tar xzvf -
gunzip < backup.sql.gz | docker exec --interactive i-doit-fpm /usr/bin/mysql -uidoit -pidoit

Don't forget to alter the commands above to your needs.

Add a subscription license

Copy the file to the running i-doit container and import the file with the i-doit CLI tool:

docker cp license.txt i-doit-fpm:/tmp/
docker exec --interactive --user www-data i-doit-fpm php \
    console.php license-add \
    --user admin --password admin --no-interaction --license /tmp/license.txt

Move your CMDB data to a container

The next example assumes that i-doit is installed on the same host as the running i-doit container:

cd /var/www/html/
tar czvf - . | docker exec --interactive --user www-data i-doit-fpm /bin/tar xzvf -
mysqldump -uidoit -pidoit --all-databases | \
    docker exec --interactive i-doit-fpm /usr/bin/mysql -uidoit -pidoit

TLS/HTTPS

We strongly recommend to access i-doit in a productive environment via TLS/HTTPS. Consider to use a load balancer or reverse proxy because the provided images are unable to handle TLS/HTTPS connections themselves.

Image variants

<version>-<edition>-<php>-<service>

  • <version>: Which version of i-doit do you like to run?
  • <edition>: Which edition of i-doit do you like to run? Select open for community edition (Free Software) and pro for professional edition (proprietary).
  • <php>: Which version of PHP do you like to run?
  • <service>: Decide to run i-doit either with Apache HTTPD or PHP-FPM

Copyright & license

Copyright (C) 2019-2022 synetics GmbH

Licensed under the GNU Affero GPL version 3 or later (AGPLv3+)

i-doit-docker's People

Contributors

bheisig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

i-doit-docker's Issues

search not working

Expected behavior

i-doit search should be working...

Actual behavior

Search is not working.

Steps to reproduce the behavior

Using the latest apache based image bheisig/idoit:1.13.2-open-php7.3-apache:
When typing a search key into the search field and hitting enter, apache answers with a 404 Not found.

Environment

Question Answer
i-doit version 1.13.2
i-doit edition open
PHP version 7.3
Service apache

Server logs

[Wed Nov 13 09:30:41.139297 2019] [core:info] [pid 19] [client 172.17.0.1:37974] AH00128: File does not exist: /var/www/html/search, referer: http://localhost/
172.17.0.1 - - [13/Nov/2019:09:30:41 +0000] "GET /search?q=asdf&rand=1573637441110 HTTP/1.1" 404 271
[Wed Nov 13 09:30:41.279861 2019] [core:info] [pid 19] [client 172.17.0.1:37974] AH00128: File does not exist: /var/www/html/search, referer: http://localhost/
172.17.0.1 - - [13/Nov/2019:09:30:41 +0000] "GET /search?q=asdf HTTP/1.1" 404 271

Steps to FIX the behavior

The apache VHost configuration needs to be adjusted to alllow overrides from the i-doit shipped .htaccess file:

...
        AllowOverride All
...

instead of None.

Set AllowOverride to All

Hello,

why is AllowOverride in all vhost.conf files set to None? This disables mod_rewrite defined in .htaccess which breaks some parts of the i-doit installation.

Can the setting be changed to "All" in correspondance with non-docker installations? I will gladly provide a patch.

Regards,
Sebastian Mischke

ldap over SSL working in docker image?

I would like to doublecheck that the LDAP over SSL configuration should be working in these docker images. Everything else seems to work great! The exact ldap configuration does work with other software, so I suspect something is missing/unconfigured in the docker image. I have also installed openssl in the idoit container, to validate certs and connectivity, output in logs below does show it should work.

Expected behavior

I would expect the ldap over SSL to work, after configuring.

Actual behavior

ldap debug windows says:

Error!
LDAP Bind failed (Can't contact LDAP server). Host: ldaps.domain.com

Steps to reproduce the behavior

Configure ldap server, enable LDAPS in de TLS field

Environment

Question Answer
i-doit version 1.16
i-doit edition open
PHP version 7.4
Service fpm

Server logs

[2021-03-22T11:31:18.259787+01:00] ldap.DEBUG: Testing connection to ldaps.domain.com:636 (CN=<SNIPPED>) [] []

openssl s_client -connect ldaps.domain.com:636
CONNECTED(00000003)
..
SSL handshake has read 3812 bytes and written 487 bytes
Verification: OK

Verify return code: 0 (ok)

API Add on is missing in Docker Image

Expected behavior

Run docker Image. Test API.
Because testing on a production instance is not a good idea.

Actual behavior

Run docker image. No API Module is found.
Forget the idea because, reinstalling the Addon over GUI is no fun.

Steps to reproduce the behavior

See README in https://github.com/alexei-matveev/hello-idoit

Environment

Question Answer
i-doit version 1.15

Object browser show no objects --- File does not exist: /var/www/html/cmdb/browse/objectType/31

Expected behavior

Object browser shows objects

Actual behavior

Object browser shows none

Steps to reproduce the behaviour

Spin up a fresh instance, 1.15 or 1.14 --- same behaviour.
Add a couple of servers try linking them with Person Groups or Service.
You get an object browser popup with no actual objects.
Independent of version --- that maybe an indication of an issue in
infrastructure (Image?).
See here for an exact setup: https://github.com/alexei-matveev/hello-idoit

The message like this

File does not exist: /var/www/html/cmdb/browse/objectType/31

is a strange thing to get from a MySQL based product ...

Environment

Question Answer
i-doit version 1.14

Same behaviour with 1.15 too ..

Server logs

10.42.0.1 - - [23/Oct/2020:18:39:20 +0000] "POST /?mod=cmdb&popup=browser_object_relation&ajax=1 HTTP/1.1" 200 9302
[Fri Oct 23 18:39:20.867626 2020] [core:info] [pid 28] [client 10.42.0.1:33960] AH00128: File does not exist: /var/www/html/cmdb/browse/objectType/31, referer: http://idoit.localhost/?call=category&objID=28&viewMode=1002&tvMode=1006&catgID=78&page=1&filtered=1&tableFilter%5Boperation%5D=-1
10.42.0.1 - - [23/Oct/2020:18:39:20 +0000] "POST /cmdb/browse/objectType/31 HTTP/1.1" 404 277

Missing entry point

Expected behavior

Start of docker image using the example code.

Actual behavior

Fails with error.

Steps to reproduce the behavior

docker run --name i-doit-apache -p 6080:80 bheisig/idoit:1.14-pro-php7.4-apache

docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "entrypoint.sh": executable file not found in $PATH": unknown.
ERRO[0006] error waiting for container: context canceled

I mounted the image and found "entrypoint.sh" without execute rights:
root@c2:~/docker/i-doit# ll /mnt/usr/local/bin/entrypoint.sh
-rw-r--r-- 1 root root 259 Jan 31 23:08 /mnt/usr/local/bin/entrypoint.sh

Environment

Question Answer
i-doit version 1.14
i-doit edition pro and open
PHP version 7.4
Service apache

Server logs

NoIssue

Need help

Hi,
I don't understand how to use the docker files. When trying the given command, I get a permission errer, although i am logged in. As you can see in the first Part of the Console-Log the pull request with your repository works, but the run-command doesn't.

Server logs

root@debian9:/home/jan# docker pull  bheisig/idoit:1.13-pro-php7.3-apache
1.13-pro-php7.3-apache: Pulling from bheisig/idoit
fc7181108d40: Already exists
0e65236fc68a: Already exists
657b7ad8209d: Already exists
fe9abd6f2547: Already exists
3f3b3b58af14: Already exists
6c87b44c0319: Already exists
879171658515: Already exists
29c3b2e8a58a: Pull complete
c3a25239431e: Pull complete
12d528342619: Pull complete
9c2154884a2a: Pull complete
65330d5bd097: Pull complete
09bf81aa1690: Pull complete
51b06b672862: Pull complete
8e3891a5acf6: Pull complete
9f63ae12fd0c: Pull complete
533e8ba4d71c: Pull complete
64df962b8743: Pull complete
8c6f109d2fbc: Pull complete
Digest: sha256:241ea3a64b212e107ec3aaf5488573a3f0d0beba309252f40d341b3e9096ff36
Status: Downloaded newer image for bheisig/idoit:1.13-pro-php7.3-apache

root@debian9:/home/jan# docker run i-doit-apache -p 80:80 bheisig/idoit:1.13-pro-php7.3-apache
Unable to find image 'i-doit-apache:latest' locally
docker: Error response from daemon: pull access denied for i-doit-apache, repository does not exist or may require 'docker login'.
See 'docker run --help'.

How to launch i-doit?

Expected behavior

Using IDOIT_WEB_PORT=9000 in .env and running docker-compose -f docker-compose-apache.yml up, I can launch i-doit at http://localhost:9000/i-doit.

Actual behavior

Browser reports ERR_CONNECTION_RESET error.

Steps to reproduce the behavior

See expected behavior

Environment

Question Answer
i-doit version 1.19
i-doit edition open
PHP version 8.0
Service apache

Update from one i-doit version to another

Expected behavior

It should be possible to update i-doit by pulling a new image. There must be a logic to check whether DB backend needs an update. If check is positive then update should be performed in background before container is ready for connections.

Additionally, we should work with version independent tags, for example open-apache-latest.

Actual behavior

Update logic hasn't been implemented yet.

Steps to reproduce the behavior

  1. Run image with older version
  2. Pull new image
  3. Restart container

Environment

Any

Database error : No such file or directory when trying to login

Expected behavior

Login to i-doit using URL http://localhost:8080/ or http://localhost:8080/i-doit/ or http://localhost:8080/i-doit/admin/

Actual behavior

The error "Database error : No such file or directory" appears.
The command "docker-compose logs|grep denied" give the following output:
db_1 | 2020-11-01 0:29:17 8 [Warning] Access denied for user 'root'@'i-doit-docker_idoit_1.i-doit-docker_backend' (using password: YES)
db_1 | 2020-11-01 0:29:17 9 [Warning] Access denied for user 'root'@'i-doit-docker_idoit_1.i-doit-docker_backend' (using password: YES)

Steps to reproduce the behavior

Build a new docker installation using docker-compose-fpm.yml and .env.dist only changing IDOIT_WEB_PORT=8080.

Environment

Question Answer
i-doit version 1.15.1
i-doit edition open
PHP version 7.4
Service fpm

Server logs

db_1 | 2020-11-01 0:29:17 8 [Warning] Access denied for user 'root'@'i-doit-docker_idoit_1.i-doit-docker_backend' (using password: YES)
db_1 | 2020-11-01 0:29:17 9 [Warning] Access denied for user 'root'@'i-doit-docker_idoit_1.i-doit-docker_backend' (using password: YES)

Default logins?

What is the default user/password for CMDB? I can see in the .env that a tenant CMDB is being created, but i cannot login.
Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.