docker @ v-server strato, final results

Ok, so lets finalize the story. I found that the missing cgroups are the main reason for the failure.

Docker expects working cgroups, like:

# example /proc/cgroups:
#  #subsys_name	hierarchy	num_cgroups	enabled
#  cpuset	2	3	1
#  cpu	3	3	1
#  cpuacct	4	3	1
#  memory	5	3	0
#  devices	6	3	1
#  freezer	7	3	1
#  blkio	8	3	1

The v-server shows an empty /proc/cgroups, therefore this can not be used bye the “cgroupfs-mount”.

So conclusion, docker with container start does not work at the moment due to missing cgroups availability within the v-server container Trauriges Smiley.

Enjoy.

Posted in Docker | Tagged , , | 2 Comments

strato v-server upgrade

Hi, so just a ping. I was quite busy with private stuff and with the upgrade from

Virtual Server Linux Level 1 (v1304.1) to Virtual Server Linux Level 1 (v1406.1).

So everything from here is with the v14-version.

Enjoy

Posted in IT | Tagged , | Leave a comment

docker @ v-server strato.de–next steps

So after thinking about it I have work around most things so I end up with:

#> apt-get install golang
#> apt-get install lxc curl xz-utils git mercurial
#> apt-get install uml-utilities
#> tunctl
#> ifconfig tap1 10.4.0.0 netmask 255.255.255.0 up
#> ./docker -d -D -G local -b tap1

and the result is quite promising:

2014/07/01 09:13:02 WARNING: You are running linux kernel version 2.6.32-042stab090.3, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
2014/07/01 09:13:02 docker daemon: 1.0.1 990021a; execdriver: native; graphdriver:
[debug] daemon.go:784 Using graph driver vfs
[debug] daemon.go:797 Creating images graph
[debug] graph.go:66 Restored 5 elements
[debug] daemon.go:809 Creating volumes graph
[debug] graph.go:66 Restored 0 elements
[debug] daemon.go:814 Creating repository list
[477fbb4f] +job init_networkdriver()
[debug] /sbin/iptables, [-C POSTROUTING -t nat -s 10.4.0.0/24 ! -d 10.4.0.0/24 -j MASQUERADE]
[debug] /sbin/iptables, [-D FORWARD -i tap1 -o tap1 -j DROP]
[debug] /sbin/iptables, [-C FORWARD -i tap1 -o tap1 -j ACCEPT]
[debug] /sbin/iptables, [-C FORWARD -i tap1 ! -o tap1 -j ACCEPT]
[debug] /sbin/iptables, [-C FORWARD -o tap1 -m conntrack –ctstate RELATED,ESTABLISHED -j ACCEPT]
[debug] /sbin/iptables, [-t nat -D PREROUTING -m addrtype –dst-type LOCAL -j DOCKER]
[debug] /sbin/iptables, [-t nat -D OUTPUT -m addrtype –dst-type LOCAL ! –dst 127.0.0.0/8 -j DOCKER]
[debug] /sbin/iptables, [-t nat -D OUTPUT -m addrtype –dst-type LOCAL -j DOCKER]
[debug] /sbin/iptables, [-t nat -D PREROUTING -j DOCKER]
[debug] /sbin/iptables, [-t nat -D OUTPUT -j DOCKER]
[debug] /sbin/iptables, [-t nat -F DOCKER]
[debug] /sbin/iptables, [-t nat -X DOCKER]
[debug] /sbin/iptables, [-t nat -N DOCKER]
[debug] /sbin/iptables, [-t nat -A PREROUTING -m addrtype –dst-type LOCAL -j DOCKER]
[debug] /sbin/iptables, [-t nat -A OUTPUT -m addrtype –dst-type LOCAL ! –dst 127.0.0.0/8 -j DOCKER]
[477fbb4f] -job init_networkdriver() = OK (0)
2014/07/01 09:13:02 WARNING: mountpoint not found
[debug] daemon.go:344 Loaded container fa5709a2bed13b6f99010dc239cbbb9dbf609fd68f94cbb3cf51b5367c658c7d
[477fbb4f.initserver()] Creating pidfile
[477fbb4f.initserver()] Setting up signal traps
[477fbb4f] -job initserver() = OK (0)
[477fbb4f] +job acceptconnections()
[477fbb4f] -job acceptconnections() = OK (0)

ok so the server is running, but as we see already with a quite valid kernel version warning.

On the client side I see:

user@host#> ./docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
user@host#> ./docker run -t -i busybox /bin/bash
Unable to find image ‘busybox’ locally
Pulling repository busybox
a9eb17255234: Download complete
511136ea3c5a: Download complete
42eed7f1bf2a: Download complete
120e218dd395: Download complete
2014/07/01 09:16:08 Error response from daemon: Cannot start container e67e871b6f9cba47210ed16be2b9e8ec377a1e478b8a24110397a5938e9c4459: fork/exec /var/lib/docker/init/dockerinit-1.0.1: operation not permitted
user@host#> ./docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
busybox             latest              a9eb17255234        3 weeks ago         2.433 MB
user@host#> ./docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
e67e871b6f9c        busybox:latest      /bin/bash           8 seconds ago       Exited (-1) 7 seconds ago                       hungry_mcclintock  
user@host#>

Basically I am already quite happy, it looks quite well except the point that the container can not start. So still not there.

Posted in Docker | Tagged , , , | Leave a comment

docker @ v-server strato.de–second way.

Ok, so next try, with binary installation

wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker

Starting it “docker –d –D” ends in a list of problems:

[debug] server.go:1283 Warning: could not chgrp /var/run/docker.sock to docker: Group docker not found
[debug] deviceset.go:448 libdevmapper(3): ioctl/libdm-iface.c:180 (-1) /proc/misc: fopen failed: No such file or directory
[debug] deviceset.go:448 libdevmapper(3): ioctl/libdm-iface.c:415 (-1) Failure to communicate with kernel device-mapper driver.
[debug] deviceset.go:448 libdevmapper(3): ioctl/libdm-iface.c:417 (-1) Check that device-mapper is available in the kernel.
[debug] daemon.go:784 Using graph driver vfs
[debug] daemon.go:797 Creating images graph
[debug] graph.go:66 Restored 0 elements
[debug] daemon.go:809 Creating volumes graph
[debug] graph.go:66 Restored 0 elements
[debug] daemon.go:814 Creating repository list
[21f8d77a] +job init_networkdriver()
[21f8d77a.init_networkdriver()] creating new bridge for docker0
[debug] driver.go:282 Creating bridge docker0 with network 172.17.42.1/16
[debug] driver.go:312 setting bridge mac address = false
package not installed
[21f8d77a] -job init_networkdriver() = ERR (1)
package not installed
[21f8d77a] -job initserver() = ERR (1)
2014/06/29 17:52:13 package not installed

Long story short this does not work out of the box, some things a quite clear, so I have to work through the missing things. Interesting that the binary is 64-bit Smiley working on 32-bit Linux, but that maybe easy to expain if the v-server container is filled with a 32-bit installation, but the kernel is a 64-bit (as usually).

Posted in Docker | Tagged , , , , | Leave a comment

docker @ v-server at strato.de–first trails :)

Ok, so lets start with the standard installation according the docker homepage.

host#> cat ins.docker.sh
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
apt-get update
apt-get install -y apt-transport-https
fi
# Add the repository to your APT sources
echo deb
https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
# Then import the repository key
apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# Install docker
apt-get update ; apt-get install -y lxc-docker

#
# Alternatively, just use the curl-able install.sh script provided at
https://get.docker.io
#
host#> apt-get install lxc-docker
Reading package lists… Done
Building dependency tree      
Reading state information… Done
E: Unable to locate package lxc-docker
host#> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise
host#> uname -p
athlon
host#> uname -m
i686
host#>

This does not work as you see, the most likely reason is quite simple, they just provide 64-bit and the v-server (at least mine) has only 32-bit. So no go for this way. Zwinkerndes Smiley

Posted in Docker | Tagged , , , , | Leave a comment

docker @ strato vservers :)

Hi,

so this is about docker at strato.de – v-server

“Virtual Server Linux Level 1 (v1304.1)(4227571)” instances. The fist idea of docker is to contain Smiley and to self-contain services, so it would be more than helpfull for the next v-server upgrade to just docker it Smiley.

So this has just started… i will post on that in the next weeks.

Enjoy.

Posted in Docker | Tagged , , | Leave a comment

Docker own registry–first struggles …

So following all the documentation I set up my own registry, but I stumbled over one issue (reported or not I have not checked this) for a standalone server.

So starting point is the config_sample.yml which was copied to config.yml and the follow starter (one of my scripts).

#!/bin/bash

#/usr/local/lib/python2.7/dist-packages/config/config.yml

BASE=”/export/data-1/nobackup/docker.hub”

ls -l ${BASE}

export DOCKER_REGISTRY_CONFIG=”/home/local/bin/docker-reg-config.yml”

export STANDALONE=”true”
export SQLALCHEMY_INDEX_DATABASE=”sqlite://${BASE}/db/docker-registry.db”
export STORAGE_PATH=”${BASE}/registry”
export SETTINGS_FLAVOR=”local”

gunicorn –access-logfile – –debug -k gevent -b 0.0.0.0:5000 -w 1 docker_registry.wsgi:application

Ok, looks good, yes but the point is that the “export STANDALONE” does not work, for a unknown reason, due to the fact I have not found any hit via goolge, I usually assume that I did it wrong.

common:
    loglevel: _env:LOGLEVEL:debug
    storage_redirect: _env:STORAGE_REDIRECT
    standalone: true

So I have hard coded that. Smile

enjoy.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment