Beginning with https://github.com/researchstudio-sat/webofneeds/tree/master/webofneeds/won-docker I followed the steps:
(1) Install docker
Start with https://docs.docker.com/get-started/
https://docs.docker.com/engine/installation/linux/debian/#install-using-the-repository
(2) Install docker-compose
https://docs.docker.com/compose/install/
https://docs.docker.com/compose/overview/
and follow the tutorial
https://docs.docker.com/compose/gettingstarted/
(3) Create base_folder (mkdir data), .env file (see below), and docker-compose file (wget https://raw.githubusercontent.com/researchstudio-sat/webofneeds/master/webofneeds/won-docker/deploy/local/docker-compose.yml)
~/Documents/dockerexperiments/webofneeds$ ls -a
. .. data docker-compose.yml .env
~/Documents/dockerexperiments/webofneeds$ cat .env
deploy_host=localhost
base_folder=./data/
edit: see: https://docs.docker.com/compose/env-file/
(4) Run docker compose in the same directory without the detached option to enable debugging:
sudo docker-compose up (also "sudo service tomcat7 stop" and "sudo service mongodb stop" to prevent port conflicts)
(5) There is an error when trying to create a resource over https on localhost. Here are some instructions that may help set it up:
https://docs.docker.com/engine/security/https/
(6) Investigate the server cert:
~/Documents/dockerexperiments/webofneeds/data/won-server-certs$ openssl x509 -noout -text -in t-cert.pem
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 9744456803442286009 (0x873b43d59a50ddb9)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=localhost
Validity
Not Before: May 25 00:12:13 2017 GMT
Not After : May 25 00:12:14 2018 GMT
Subject: CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:f5:a7:56:1a:c6:91:dc:3e:ed:82:ec:bc:73:87:
89:34:fc:e7:63:d8:e3:b6:21:0b:76:db:44:f8:6d:
5c:e7:e1:64:2b:48:76:a1:2e:b2:fe:28:dd:8b:3f:
8c:4c:1d:42:ca:bf:92:c0:90:fe:05:a6:db:2a:d6:
17:86:dd:5d:76:a0:86:7f:c2:ec:32:85:0a:91:d3:
7d:52:bf:43:bf:c1:84:8b:e0:30:e6:08:39:1c:c2:
63:3c:49:c2:11:8b:2e:b9:f9:39:78:40:59:4c:a2:
d7:b5:f4:c8:5b:68:72:72:51:f1:2d:8f:e7:0d:f5:
de:f7:38:42:4a:13:b0:23:c4:58:61:bc:1a:c0:b0:
09:38:4b:aa:06:76:b2:67:24:80:b2:71:81:bd:5e:
55:e4:6c:86:14:62:71:e5:e0:c8:97:f2:59:17:41:
b1:78:44:49:8c:28:bb:ab:9c:72:e1:7b:ec:7c:9b:
b5:31:da:66:18:8e:9e:61:89:a8:29:79:84:89:a2:
4f:dc:c0:39:4e:a8:e3:35:e1:0e:b8:2f:26:c8:2a:
7a:ad:11:23:25:5b:39:cc:81:bd:4b:66:b7:aa:31:
1c:69:79:6f:e6:03:fe:c0:eb:c9:98:6a:a6:32:3c:
b8:3e:c3:2b:f4:6b:34:66:6c:ae:ba:8f:b0:ef:23:
c0:b1
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
36:B7:33:A7:6D:AC:CE:1C:99:51:84:20:64:F4:A2:62:98:97:32:71
X509v3 Authority Key Identifier:
keyid:36:B7:33:A7:6D:AC:CE:1C:99:51:84:20:64:F4:A2:62:98:97:32:71
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption
be:73:e7:58:dd:78:38:36:56:14:90:bf:da:f1:ca:1f:1e:32:
bf:92:8f:e7:ee:16:48:38:13:83:8d:ce:d2:ec:fd:45:9b:31:
eb:b2:07:d0:b6:bf:5c:78:32:89:a2:e1:0c:18:ce:d0:19:ee:
ae:75:85:6f:da:a5:81:d6:f2:aa:01:b1:65:33:ce:9d:ec:99:
9f:3a:69:3f:66:68:c1:39:27:5f:23:ae:26:9b:60:d7:ef:48:
74:41:b0:d2:0c:c9:fc:2c:7a:70:35:75:70:6f:71:64:72:78:
d9:b1:b9:fb:f3:4e:45:a0:5c:83:b0:c4:35:25:7a:41:b3:4a:
21:34:67:2d:af:28:1f:66:64:42:ab:e5:46:30:4a:6f:8e:d9:
5a:62:bf:04:d5:fb:e7:3a:ca:86:60:35:9e:93:b3:94:89:81:
d0:6a:5f:c9:80:27:c2:b2:88:54:a8:61:c9:b6:47:07:c0:3b:
91:26:8e:7f:c7:62:44:48:a9:5b:30:96:27:22:1f:9c:ad:dd:
30:42:b2:a7:71:39:2b:30:85:7b:0f:f4:8a:36:1a:ec:75:96:
6e:53:c4:2e:f5:28:2c:57:de:e8:56:82:84:99:e1:1b:f0:d3:
1d:6b:37:d6:53:da:e6:74:00:bb:69:f8:64:ba:83:b8:5e:49:
7f:91:f4:60
========================
other interesting things
======================================
Interesting part of the log:
owner_1 | 25-May-2017 19:35:01.759 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Interesting part of the log:
java.util.concurrent.TimeoutException
Interesting part of the log:
Connection refused:
Interesting part of the log:
blue hard drive light on...perhaps the RAM is low and SWAP space is being used, perhaps there are memory leaks
Fix the certificate due to https://localhost:8890 unable to create resource errors?:
/home/brent/Documents/dockerexperiments/webofneeds/data/won-server-certs# cp *.pem /home/brent/.docker/
(will this really work? The "Protect the Docker daemon socket" has a secure by default section that says to set the DOCKER_HOST and DOCKER_TLS_VERIFY variables (setting DOCKER_TLS_VERIFY=1 in the .env file causes an error))
=================================
Edit 6/02/2016: On Linode (http://linode.com) I used the 8192 standard instance [1]. (This provides greater than a ~1.3 GHz CPU). Then I pointed the public ip of the Linode instance at a domain (I used a subdomain from https://freedns.afraid.org). The environment variable deploy_host in the .env file was set to the subdomain (it seems it cannot be an IP address or the docker container name). I only went to (3).
I did not need to do any special network configuration. I'm guessing that the docker-compose.yml took care of opening the necessary ports and linking docker containers.
[1] Linode 8192
8
GB RAM | |
4 | CPU Cores (Intel® Xeon® processor E5 --- 2.3 GHz each??) |
96 | GB SSD Storage |
4 | TB Transfer |
40 | Gbps Network In |
1000 | Mbps Network Out |
$40/mo or (.06/hr) |
No comments:
Post a Comment