This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copied from https://github.com/dockersamples/example-voting-app, to test the | |
# "weave" Docker Swarm network plugin https://www.weave.works/docs/net/latest/install/plugin/plugin-v2/ | |
# on a two node network (docker-server-manager and docker-server-worker). | |
# While both provide a cross-server container network, weave supports multicast and encryption. | |
# | |
# The sample app deploys fine with the standard "overlay" network: | |
# | |
# docker stack deploy -c ./docker-compose.yml voteapp | |
# | |
# The below curls work as expected -- in the container network the service names resolve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Can download libpam4j and JNA jars from: | |
* http://mvnrepository.com/artifact/org.kohsuke/libpam4j | |
* https://github.com/twall/jna | |
* https://github.com/matthiasblaesing/libpam4j/commits/gc_and_threadsave | |
* | |
* SETUP: useradd zuser1 ; echo zuser1:password | chpasswd ; useradd zuser2 ; echo zuser2:password | chpasswd | |
* BUILD 1.8: javac -classpath ./jna-4.0.0.jar:./libpam4j-1.8.jar:. PAMTest.java | |
* BUILD 1.9X: javac -classpath ./jna-4.1.0.jar:./libpam4j-1.9X.jar:. PAMTest.java | |
* FAILS: sudo java -classpath ./jna-4.0.0.jar:./libpam4j-1.8.jar:. PAMTest zuser1:password zuser2:password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If you get a strange JVM crash on CentOS 6 in code related to JNA and PAM, | |
* try uninstalling this RedHat package related to fingerprint scanners: | |
* | |
* sudo yum remove fprintd-pam | |
* | |
* Run this program with 100-500 threads -- the jvm usually crashes with | |
* a stack like below (from hs_error.log ). Probably related to issues like: | |
* https://bugzilla.redhat.com/show_bug.cgi?id=1010844. | |
* Probably also affected by machine resource limits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y bzip2-devel zlib zlib-devel openssl openssl-devel | |
cd /opt | |
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz | |
tar xf Python-2.7.6.tar.xz | |
cd Python-2.7.6 | |
./configure --prefix=/usr/local | |
make && make altinstall | |
cd /tmp | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# An alternative to "links", run this script after starting or stopping any | |
# container. It's a hack to update the host machine (vagrant) /etc/hosts with | |
# the current active docker containers and tell dnsmasq to refresh. | |
# | |
# Then start each machine with "-dns ${DOCKER_HOST_IP}", e.g. | |
# $ docker run -d -name mycontainer1 -dns 10.0.3.1 MYPRODUCT | |
# You can't seem to set the DNS during "docker build". | |
# | |
# Diagnostic command to run in host or while logged into containers: |