Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the stripped down docker images to allow us to have PWD buttons #3

Merged
merged 8 commits into from
Feb 13, 2019

Conversation

shankari
Copy link
Contributor

Let's see if this helps people get over challenges with using e-mission!

- Clean out tarballs + obsolete packages
- add a new Dockerfile that does not use the mkl performance extensions
- Specify a version for mongodb instead of using "latest"
- change the way the notebook dockerfile is built since juypter is not included
  in the default server docker image
- add a new "small" dockerfile and docker-compose to make it easier to deploy
  the notebook server on pwd
- Add information on the `nomkl` tag
- Add instructions for building the additional images
- Add PWD buttons and instructions
This medium post
https://medium.com/@patternrecognizer/how-to-add-a-try-in-play-with-docker-button-to-your-github-project-41cb65721e94
claimed that "Try in PWD" works with the `build` tag as well - e.g.

```
services:
  redis-commander:
    build: https://github.com/joeferner/redis-commander.git
```

and cites https://stackoverflow.com/questions/34120504/how-can-i-make-docker-compose-build-an-image-from-a-remote-git-repository/34120804#34120804

However, this only works for `docker-compose`. And as we can see from the pwd code https://github.com/play-with-docker/play-with-docker/blob/3bfb09802a6b41ad98adfee79535f813323b90a9/pwd/session.go#L183, it uses `docker stack deploy` to deploy.

And `docker stack deploy` does not support the `build` tag https://stackoverflow.com/questions/41472219/docker-usage-in-compose-swarm-mode - it only works with published images.

So this change:
- adds instructions to build the notebook using the `nomkl` server image as the base
- changes the `docker-compose-small` file to use the pre-built image instead of rebuilding
This is actually pretty much a pain. I either have to configure the password or they need to support non `-d` or something. But if we support this, we may as well document it
@shankari shankari merged commit bfca799 into e-mission:master Feb 13, 2019
@shankari shankari deleted the some_niceties branch March 29, 2020 04:42
shankari added a commit to shankari/e-mission-docker that referenced this pull request Jun 4, 2020
One line fix.
This fixes e-mission/e-mission-docs#543

This has also been pushed to dockerhub as version 2.8.2
https://hub.docker.com/layers/emission/e-mission-server.dev.server-only/2.8.2/images/sha256-1f5ef249e90fbb5b1a5dbfdb0e12ee7b5e8f2bf9d837d1c3e70d63c58373ca30?context=repo

```
C02KT61MFFT0:em-server shankari$ docker-compose -f docker-compose.dev.yml up
WARNING: Some services (db, web-server) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating em-server_db_1 ... done
Creating em-server_web-server_1 ... done
Attaching to em-server_db_1, em-server_web-server_1
web-server_1  | Cloning from repo https://github.com/e-mission/e-mission-server.git and branch master
db_1          | 2020-06-04T05:47:50.254+0000 I CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=5bb3a71c1d34
db_1          | 2020-06-04T05:47:50.256+0000 I CONTROL  [initandlisten] db version v3.4.19
db_1          | 2020-06-04T05:47:50.257+0000 I CONTROL  [initandlisten] git version: a2d97db8fe449d15eb8e275bbf318491781472bf
...
web-server_1  | Installing manually downloaded packages
web-server_1  | Downloading and Extracting Packages
web-server_1  | Preparing transaction: ...working... done
web-server_1  | Verifying transaction: ...working... done
web-server_1  | Executing transaction: ...working... done
web-server_1  |
web-server_1  | Updating using conda now
web-server_1  | Solving environment: ...working... done
web-server_1  |
...
web-server_1  | /src/e-mission-server
web-server_1  | db
web-server_1  | {
web-server_1  |     "timeseries": {
web-server_1  |         "url": "db"
web-server_1  |     }
web-server_1  | }
web-server_1  | 0.0.0.0
web-server_1  | {
web-server_1  |   "paths" : {
web-server_1  |     "static_path" : "webapp/www/",
web-server_1  |     "python_path" : "main",
web-server_1  |     "log_base_dir" : ".",
web-server_1  |     "log_file" : "debug.log"
web-server_1  |   },
web-server_1  |   "__comment" : "Fill this in for the production server. port will almost certainly be 80 or 443. For iOS, using 0.0.0.0 allows you to test without an internet connection. For AWS and android, make sure that the host 0.0.0.0, localhost does not seem to work",
web-server_1  |   "server" : {
web-server_1  |     "host" : "0.0.0.0",
web-server_1  |     "port" : "8080",
web-server_1  |     "__comment": "1 hour = 60 min = 60 * 60 sec",
web-server_1  |     "timeout" : "3600",
web-server_1  |     "auth": "skip"
web-server_1  |   }
web-server_1  | }
web-server_1  | Enabling bottle live reload
web-server_1  | Replacing run.host=server_host -> run(reloader=True,host=server_host
db_1          | 2020-06-04T06:00:16.996+0000 I NETWORK  [thread1] connection accepted from 172.19.0.3:44572 e-mission#1 (1 connection now open)
db_1          | 2020-06-04T06:00:17.049+0000 I NETWORK  [conn1] received client metadata from 172.19.0.3:44572 conn1: { driver: { name: "PyMongo", version: "3.5.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.19.76-linuxkit" }, platform: "CPython 3.6.1.final.0" }
db_1          | 2020-06-04T06:00:18.188+0000 I NETWORK  [thread1] connection accepted from 172.19.0.3:44574 e-mission#2 (2 connections now open)
db_1          | 2020-06-04T06:00:18.189+0000 I NETWORK  [conn2] received client metadata from 172.19.0.3:44574 conn2: { driver: { name: "PyMongo", version: "3.5.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.19.76-linuxkit" }, platform: "CPython 3.6.1.final.0" }
web-server_1  | ERROR:root:habitica not configured, game functions not supported
web-server_1  | Traceback (most recent call last):
web-server_1  |   File "/src/e-mission-server/emission/net/ext_service/habitica/proxy.py", line 22, in <module>
web-server_1  |     key_file = open('conf/net/ext_service/habitica.json')
web-server_1  | FileNotFoundError: [Errno 2] No such file or directory: 'conf/net/ext_service/habitica.json'
db_1          | 2020-06-04T06:00:19.162+0000 I NETWORK  [thread1] connection accepted from 172.19.0.3:44576 e-mission#3 (3 connections now open)
db_1          | 2020-06-04T06:00:19.168+0000 I NETWORK  [conn3] received client metadata from 172.19.0.3:44576 conn3: { driver: { name: "PyMongo", version: "3.5.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.19.76-linuxkit" }, platform: "CPython 3.6.1.final.0" }
db_1          | 2020-06-04T06:00:19.708+0000 I NETWORK  [thread1] connection accepted from 172.19.0.3:44578 e-mission#4 (4 connections now open)
db_1          | 2020-06-04T06:00:19.710+0000 I NETWORK  [conn4] received client metadata from 172.19.0.3:44578 conn4: { driver: { name: "PyMongo", version: "3.5.1" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "4.19.76-linuxkit" }, platform: "CPython 3.6.1.final.0" }
web-server_1  | ERROR:root:habitica not configured, game functions not supported
web-server_1  | Traceback (most recent call last):
web-server_1  |   File "/src/e-mission-server/emission/net/ext_service/habitica/proxy.py", line 22, in <module>
web-server_1  |     key_file = open('conf/net/ext_service/habitica.json')
web-server_1  | FileNotFoundError: [Errno 2] No such file or directory: 'conf/net/ext_service/habitica.json'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant