Test Suite - Docker: Difference between revisions

From Libreswan
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Libreswan testing suite docker adventures.
Libreswan testing suite docker adventures.


Line 27: Line 26:
ipsec version |grep klips && echo you need netkey
ipsec version |grep klips && echo you need netkey
cd /home/build/libreswan/testing/pluto/ikev2-36-docker
cd /home/build/libreswan/testing/pluto/ikev2-36-docker
../../utils/swantest
../../utils/swantest --docker


cd /testing/pluto/ikev2-37-docker-rw
cd /testing/pluto/ikev2-37-docker-rw
../../utils/swantest
../../utils/swantest --docker


</pre>
</pre>
Line 54: Line 53:
fedora              20                  7d3f07f8de5f        6 weeks ago        374.1 MB
fedora              20                  7d3f07f8de5f        6 weeks ago        374.1 MB
</pre>
</pre>
=== Prerequisites ===
The latest one need Python 3.3 or later, necessary for subprocess to deal with 10-100s of threads.
Also pexpect is works better.
<pre>
sudo yum install python3-setproctitle python3-pexpect

Revision as of 04:52, 21 November 2014

Libreswan testing suite docker adventures.

# install docker 1.3

yum -y remove docker
yum -y install docker-io bridge-utils
yum -y update docker-io
systemctl start docker
systemctl enable docker

wget -O /usr/local/bin/pipework  https://github.com/jpetazzo/pipework/raw/master/pipework
chmod a+x /usr/local/bin/pipework

# cd /home/build/
# git clone libreswan 

cd /home/build/libreswan/testing/docker/

docker build -t swanbase .
# coffee break. It will download fedora, about 200 packages 
# on swantest real 19m31.907s
# on parallels vm from toronto real 7m1.228s

# make sure the host has netkey stack loaded 
ipsec version |grep klips && echo you need netkey
cd /home/build/libreswan/testing/pluto/ikev2-36-docker
../../utils/swantest --docker

cd /testing/pluto/ikev2-37-docker-rw
../../utils/swantest --docker

Docker diagnostics

Stop all Docker containers

#will stop ALL containers 
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Check if you got correct image

cd /home/build/libreswan/testing/docker

docker build -t swanbase .

root@jes:/home/build/libreswan/testing/docker# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
swanbase            latest              e8e73564a0ae        55 minutes ago      2.84 GB
fedora              20                  7d3f07f8de5f        6 weeks ago         374.1 MB

Prerequisites

The latest one need Python 3.3 or later, necessary for subprocess to deal with 10-100s of threads. Also pexpect is works better.

sudo yum install python3-setproctitle python3-pexpect