Docker image with Combodo iTop
The image is based on phusion/baseimage and uses runit to manage services (apache, mysql, etc).
Usage
Run new iTop 3.0.0-beta (see tags for other iTop versions) container named my-itop:
sudo docker run -d -p 8000:80 --name=my-itop vbkunin/itop:3.0.0-beta
Then go to http://localhost:8000/ to continue the installation.
Use this command to get the MySQL user credentials:
sudo docker logs my-itop | grep -A7 -B1 "Your MySQL user 'admin' has password:"
or use username root with blank password.
Expose iTop extensions folder if you need it:
sudo docker run -d -p 8000:80 --name=my-itop -v /home/user/itop-extensions:/var/www/html/extensions vbkunin/itop:3.0.0-beta
Image without MySQL
Starting from 2.6.0 you can get base
image without MySQL database server (only Apache and PHP) to use with your own one:
sudo docker run -d -p 8000:80 --name=my-itop vbkunin/itop:3.0.0-beta-base
Useful scripts and helpers
The image ships with several useful scripts you can run like this:
sudo docker exec my-itop /script-name.sh [script_params]
If you need the iTop Toolkit you can simply get this:
sudo docker exec my-itop /install-toolkit.sh
A cron setup helper is aboard:
sudo docker exec my-itop /setup-itop-cron.sh Cron Pa$5w0rD
Then you should create iTop user account with login Cron and password Pa$5w0rD and grant him Administrator profile. The third argument (optional) is the absolute path to the log file or --without-logs
key. By default, the log file is /var/log/itop-cron.log
.
There are other scripts:
- make-itop-config-writable.sh (or you can use
conf-w
shortcut without the leading slash:docker exec my-itop conf-w
) - make-itop-config-read-only.sh (or
conf-ro
shortcut:docker exec my-itop conf-ro
) - update-russian-translations.sh - pull and install latest version from https://github.com/itop-itsm-ru/itop-rus
Developer's corner
If you're using this image for development (especially with PhpStorm), there are a few things for you.
install-xdebug.sh – install Xdebug PHP extension and setup it for remote debugging. Two arguments are
xdebug.client_port
andxdebug.idekey
(defaults are9003
andPHPSTORM
, respectively).sudo docker exec my-itop /install-xdebug.sh [client_port] [idekey]
start-itop-cron-debug.sh – start remote debugging of iTop background tasks script (cron.php). The first two arguments are iTop user and his password (
admin
andpassword
) and the third argument is debug server configuration name (default islocalhost
) in PhpStorm which specified through PHP_IDE_CONFIG environment variable (more details).sudo docker exec my-itop /start-itop-cron-debug.sh [auth_user] [auth_pwd] [php_ide_server_name]
enable-mysql-remote-connections.sh – add the
bind-address = 0.0.0.0
directive to the MySQL configuration to allow connections from outside the container.sudo docker exec my-itop /enable-mysql-remote-connections.sh
Do not forget to expose the MySQL port with
-p 3306:3306
when running the container.
Links
root@172.16.7.88's password:
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-162-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Dec 1 08:35:20 UTC 2021
System load: 0.0
Usage of /: 45.1% of 98.30GB
Memory usage: 71%
Swap usage: 0%
Processes: 230
Users logged in: 0
IP address for ens160: 172.16.7.88
IP address for br-0626f7e487fe: 192.168.160.1
IP address for br-9e69c77998e9: 172.20.0.1
IP address for docker0: 172.17.9.1
IP address for br-2a24191d81c8: 172.19.0.1
IP address for br-eabc5783c744: 172.21.0.1
IP address for br-df91caf185cc: 172.22.0.1
IP address for br-5108d8b06ab2: 172.25.0.1
* Super-optimized for small spaces - read how we shrank the memory
footprint of MicroK8s to make it the smallest full K8s around.
https://ubuntu.com/blog/microk8s-memory-optimisation
##########>>> Welcome to Docker_Training <<<##########
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
164 packages can be updated.
8 updates are security updates.
New release '20.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
*** System restart required ***
Last login: Wed Dec 1 07:59:09 2021 from 172.17.47.152
root@ubuntu:~#
========================================================================
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
*** Booting runit daemon...
*** Runit started as PID 340
Your MySQL user 'admin' has password: YNX6WMiy5llx
You can now connect to this MySQL Server using:
mysql -uadmin -pYNX6WMiy5llx -h<host> -P<port>
Please remember to change the above password as soon as possible!
MySQL user 'root' has no password but only allows local connections
========================================================================
Tidak ada komentar:
Posting Komentar