Koozali.org: home of the SME Server

Docker on SME Server

Offline michelandre

  • *
  • 261
  • +0/-0
Re: Docker on SME Server
« Reply #15 on: March 10, 2015, 03:12:21 AM »
Hi all,

Another small victory. I finally have an image of SME-9 working on the boot2docker server.

I followed http://wiki.contribs.org/Docker_design_concept.

I had a small problem loading the tar file into the repository of the boot2docker server.
- In the document, the command to load the tar file into the repository is:
  docker load -i < /downloads/copyofsme9.tar
- It gave me an error saying the load command was missing an argument.
- After googling, I finally took off the "<" after the -i and then all worked fine.
* I think there is a typo error on the web page...

I tried to ping google.com but to no avail.
I was able to ping the IP address but not the FQDN.
boot2docker was able to ping the IP and the FQDN.
I modified the profile for boot2docker to pass the IP of my DNS server to the image and then it was possible to ping google.com
I created a /temp directory to see if the image will keep it.
I commit the image and restarted. The /temp was still there.

The next step will be to have the 2 network cards running.
I started reading http://docs.docker.com/articles/networking/.
A simple example will be easier...

I am writing a small document on how I did all the procedures. I hope it will not take too long.

It is getting there slowy,

Michel-André

Offline michelandre

  • *
  • 261
  • +0/-0
Re: Docker on SME Server
« Reply #16 on: March 13, 2015, 07:06:18 PM »
Hi all,

I just finished the documentation on the creation of the SME-9 image to be managed by a boot2docker server.
http://www.micronator.org/?page_id=1837

If someone does an image based on this documentation and finds errors or have any suggestions, I am interested to know. To connact me: http://www.micronator.org/?page_id=8

I am looking for the exact procedure to "push" the image on Docker Hub so people will be able to "pull" it. A little help will be appreciated.

As I wrote before, the next step will be to have the 2 network cards running.

Thank you all,

Michel-André

guest22

Re: Docker on SME Server
« Reply #17 on: March 15, 2015, 10:20:16 AM »
As always, your documentation skills deliver impeccable documents!

Offline michelandre

  • *
  • 261
  • +0/-0
Re: Docker on SME Server
« Reply #18 on: March 16, 2015, 05:53:27 PM »
Hi all,

I tested, for the nth times, both documentations and I found that I made an error specifying "other_args".

I cannot have nultiple lines of "other_args" in the configuration file. If I do that, Docker will take only the last line and forget the previous ones.

The right way:
other_args="-g /home/e-smith/files/docker --dns 192.168.1.1 -H unix:///var/run/docker.sock"

I updated the documents on the web site: http://www.micronator.org/?page_id=1826 & http://www.micronator.org/?page_id=1837

Thank you all,

Michel-André

guest22

Re: Docker on SME Server
« Reply #19 on: March 16, 2015, 05:57:14 PM »
Thank you all,

Michel-André

Thank YOU Michel-Andre :)
guest

Offline michelandre

  • *
  • 261
  • +0/-0
Re: Docker on SME Server
« Reply #20 on: March 17, 2015, 05:15:22 PM »
Hi all,

I tried again to make the image of SME-9 uptodate. I tried different --enablerepo etc... but to no avail. So I decided I will update the image I have.

The path was not complete in the image.

Quote
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#

I took the path from a running SME-9 and I changed the path in the image.
Quote
# export PATH=/sbin/e-smith:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
#

# echo $PATH
/sbin/e-smith:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
#

I verified:
Quote
# which signal-event
/sbin/e-smith/signal-event
#

I tried to update:
Quote
# yum update -y
Loaded plugins: fastestmirror, smeserver
base                                                                 | 3.7 kB     00:00
base/primary_db                                                      | 4.6 MB     00:11
extras                                                               | 3.4 kB     00:00
extras/primary_db                                                    |  30 kB     00:00
updates                                                              | 3.4 kB     00:00
updates/primary_db                                                   | 2.6 MB     00:04
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package ORBit2.x86_64 0:2.14.17-3.2.el6_3 will be updated
---> Package ORBit2.x86_64 0:2.14.17-5.el6 will be an update
---> Package audit.x86_64 0:2.2-4.el6_5 will be updated
---> Package audit.x86_64 0:2.3.7-5.el6 will be an update
...
...
...
no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598
Migrating existing database configuration
WARNING in /etc/e-smith/db/configuration/migrate//05sysconfig: readline() on closed filehandle F at /etc/e-smith/db/configuration/migrate//05sysconfig line 3.
WARNING in /etc/e-smith/db/configuration/migrate//05sysconfig: Use of uninitialized value $line in pattern match (m//) at /etc/e-smith/db/configuration/migrate//05sysconfig line 6.
ERROR in /etc/e-smith/db/configuration/migrate//05sysconfig: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//10SystemID: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//20DHCPServer: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//20InstallEpoch: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//20StatusReport: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//35enableImap: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//HordePassword: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//HordeSecret: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR in /etc/e-smith/db/configuration/migrate//nutPass: Program fragment delivered error <<no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/config.pm line 598>> at template line 1
ERROR: Template processing failed for /: 2 fragments generated warnings, 9 fragments generated errors
 at /usr/share/perl5/vendor_perl/esmith/DB.pm line 459

The image hang here, so I enter [CTL]c
Quote
^CTraceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    if os.environ['YUM_PROF'] == 'cprof':
  File "/usr/share/yum-cli/yummain.py", line 219, in main
    logger.critical(_('Unknown Error(s): Exit Code: %d:'), result)
  File "/usr/share/yum-cli/cli.py", line 586, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1590, in runTransaction

  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/smeserver.py", line 70, in posttrans_hook
    os.spawnl(os.P_WAIT, initialize_database, initialize_database)
  File "/usr/lib64/python2.6/os.py", line 612, in spawnl
    return spawnv(mode, file, args)
  File "/usr/lib64/python2.6/os.py", line 567, in spawnv
    return _spawnvef(mode, file, args, None, execv)
  File "/usr/lib64/python2.6/os.py", line 550, in _spawnvef
    wpid, sts = waitpid(pid, 0)
OSError: [Errno 4] Interrupted system call

==============================================================
WARNING: You now need to run BOTH of the following commands
to ensure consistent system state:

signal-event post-upgrade; signal-event reboot

You should run these commands unless you are certain that
yum made no changes to your system.
==============================================================
#

I tried signal-event
Quote
# signal-event post-upgrade; signal-event reboot
no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/Logger.pm line 42
no connection to syslog available
        - /dev/log is not a socket at /usr/share/perl5/vendor_perl/esmith/Logger.pm line 42
#

Somebody have an idea what will be the next thing to do?

Thank you,

Michel-André

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Docker on SME Server
« Reply #21 on: March 17, 2015, 05:44:45 PM »
In fact syslog is not started and you can not do a signal-event if syslog is not running. From memory i was able to do a docker image of sme but all services were not started....maybe you should look after that in first
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!