1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 01:57:32 +08:00

236 Commits

Author SHA1 Message Date
Marcos Lilljedahl
a7811b4e33 Omit race conditions and update swarm info events 2016-12-02 10:29:41 -03:00
Marcos Nils
84da622775 Remove pointer in struct method to avoid concurrent modifications to the (#64) 2016-12-02 02:19:49 +02:00
Jonathan Leibiusky
b47eac47c0 Merge pull request #63 from franela/show_proxied_ports
Show instance published ports
2016-12-01 17:57:15 -03:00
Jonathan Leibiusky @xetorthio
77905f3fd8 Query DinD instances for running containers and list the published ports
so the user can reverse proxy to the instance/port easily.
2016-12-01 17:28:55 -03:00
Jonathan Leibiusky
afa47c0bfc Periodic tasks refactor (#62)
* Once every second the session run a list of periodic tasks on every
instance concurrently. We use these tasks to do things like:
- Collect mem and cpu stats
- Check if instance is part of a swarm cluster
- Broadcast information to connected clients
2016-12-01 15:57:30 -03:00
Marcos Nils
07fee4c1bf Fix module error. 2016-12-01 02:48:42 -03:00
Marcos Nils
17b21e6fc8 Update installation instructions 2016-12-01 02:30:31 -03:00
Marcos Lilljedahl
db03019b4e Remove unnecesarry deps 2016-11-30 18:55:31 -03:00
Marcos Lilljedahl
5742e03454 Disable recaptcha to use PWD locally 2016-11-30 15:22:51 -03:00
Alex Ellis
5eda323477 Enable use of override for session timeout in hours, fix captcha bypass bug. (#51)
* - Enable use of override for session timeout. This is more useful than having to hard-code and rebuild the code for the previous 4 hour limit. Just set environmental variable and start the app.
- Future work may involve breaking down into minutes, but this is a good minimum delivery to provide value to end-user/developer.

- Fixes bug in Captcha code by introducing new landing page. This is not a new go template, it's a separate HTML file because SRP - single reponsibility principle. Happy for this to be refacted after merging commit.

- Fix for including Docker 1.12 override has been removed for later PR.

* Merge

* Reinstate 'material' JS include'

* https for JS includes

* HTTPs for JS in bypass
2016-11-30 20:17:18 +02:00
Vincent De Smet
d3e20724e9 Add fancy bash prompt from orchestration workshop (#28)
* Add bash prompt

* remove curly braces

* Change shell from ash to bash

* Add inputrc for bash
2016-11-30 05:12:34 +02:00
Marcos Lilljedahl
6371ee665e Remove the necessity to have sudo to build 2016-11-29 11:37:12 -03:00
Marcos Lilljedahl
cbdc22d8a0 Remove unnecessary log line and change default dind image 2016-11-29 11:06:43 -03:00
Marcos Nils
5f51e2bcbd Merge pull request #59 from franela/swarm_info
Return swarm info to be displayed in the FE
2016-11-29 15:53:40 +02:00
Marcos Lilljedahl
10bdf3d5f2 Return swarm info to be displayed in the FE
This requires that PWD is working as a container in the same
network as all dinds

Add icons to swarmInfo
2016-11-29 10:52:55 -03:00
Marcos Nils
0f4aea4de3 Merge pull request #43 from franela/reverse_proxy
Add reverse proxy endpoint.
2016-11-23 19:09:00 +02:00
Jonathan Leibiusky @xetorthio
6af6f42721 Make regex more restrictive to allow the proxy to be more deterministic.
Make it to not depend on a specific TLD.
2016-11-23 11:52:59 -03:00
Jonathan Leibiusky @xetorthio
b4ce06fa20 Reuse the same proxy handler 2016-11-23 11:52:59 -03:00
Jonathan Leibiusky @xetorthio
122118b9df Allow to specify port, and remove session id.
So now the way to address a node is in the form of:
`ip10_0_1_9-9200.play-with-docker.com`
2016-11-23 11:52:59 -03:00
Jonathan Leibiusky @xetorthio
ec9d34ffda Add reverse proxy endpoint.
It works by using the Host of the request. When it receives something in
the form of: `<node>.<session>.play-with-docker.com` it does a reverse
proxy http request to `node`, validating that the `node` actually belongs
to the `session`.
If the node has a prefix `ip` and continues with a valid IP address
where the dots where replaces by underscores (like `ip10_0_0_1`) then it
will remove the `ip` prefix and and replace the underscores by dots, and
assume it is an ip address.
2016-11-23 11:52:59 -03:00
Jonathan Leibiusky
a85bb4a1d7 Merge pull request #57 from alexellis/port_cli
Introduce flag for TCP port
2016-11-23 11:06:06 -03:00
Alex Ellis
11f2f48ebe Introduce flag for TCP port 2016-11-23 08:58:08 +00:00
Marcos Lilljedahl
fc9e4962d3 Create folder structure 2016-11-22 15:23:58 -03:00
Marcos Nils
370bab5e27 Merge pull request #56 from akalipetis/hotfix-instance-name-rotation
Fix issue where instance name rotation was faulty
2016-11-22 15:19:25 +02:00
Marcos Nils
73d1ae94d8 Merge pull request #55 from akalipetis/hotfix-https
Make all CSS/JS links HTTPS
2016-11-22 15:17:22 +02:00
Marcos Nils
ccb44f91b6 Merge pull request #54 from akalipetis/hotfix-dockerfile-run
Create the `/app/pwd` directory, otherwise it crashes without a volume
2016-11-22 15:14:29 +02:00
Antonis Kalipetis
dd8f63363e
Fix issue where instance name rotation was faulty
Previously, if node2 was deleted in a node1, node2, node3 set, the next node creation would fail since it would always try to assign node3 as a name.
Now, the first available name is always assigned.

Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2016-11-22 10:42:19 +02:00
Antonis Kalipetis
a2754057dd
Make all CSS/JS links HTTPS
This helps in making this work behind an HTTPS proxy

Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2016-11-22 09:54:29 +02:00
Antonis Kalipetis
d9291cc52c
Create the /app/pwd directory, otherwise it crashes without a volume
Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2016-11-22 09:48:13 +02:00
Marcos Lilljedahl
861355d4e3 Fix undetected bugs in instance renaming 2016-11-22 00:07:41 -03:00
Marcos Nils
3ec374ed95 Merge pull request #53 from franela/node_names
Add more friendly node names
2016-11-22 04:37:57 +02:00
Marcos Lilljedahl
8f5f9f2c90 Add container names to make attachable names work 2016-11-21 22:01:00 -03:00
Marcos Lilljedahl
a7d76f2720 Enumerate nodes to improve cluster configuration 2016-11-21 21:49:23 -03:00
Jonathan Leibiusky
dde46f897e Merge pull request #41 from franela/devenv
Develop on a container
2016-11-21 20:53:22 -03:00
Jonathan Leibiusky @xetorthio
903489c395 Remove unncesary make target and add instructions on how to use the
makefile
2016-11-21 20:48:29 -03:00
Jonathan Leibiusky @xetorthio
47d4ceab84 Give a good name for the nat rule 2016-11-21 20:44:58 -03:00
Jonathan Leibiusky @xetorthio
c2ec79584f Add a name to the container 2016-11-21 20:44:58 -03:00
Jonathan Leibiusky @xetorthio
60395a269a Adds a Makefile to make the virtual box creation, start and app run
reproducible.
This allows to develop PWD on a container, which is nice and also
necessary once "reverse proxy" feature is introduced.
2016-11-21 20:44:58 -03:00
Marcos Lilljedahl
69f9edc695 Change dind graph folder so it doesn't share the host 2016-11-21 14:13:48 -03:00
Marcos Nils
8b3892a34f Specify DIND image types. 2016-11-21 10:34:05 -03:00
Chris
7e368aaf1f Fix welcome image width 2016-11-21 07:17:00 -03:00
Marcos Nils
4dc98cc252 Merge pull request #39 from jpetazzo/master
Various improvements for the DinD image
2016-11-21 03:38:18 +02:00
Marcos Nils
4d16285fac Merge pull request #45 from franela/stats
Show cpu and memory stats of every node
2016-11-21 02:45:56 +02:00
Jérôme Petazzoni
130f9c8403 Update Dockerfile.dind 2016-11-18 15:53:36 -08:00
Jonathan Leibiusky @xetorthio
8b0749a9ba Show cpu and memory stats of every node 2016-11-18 13:52:47 -03:00
Jonathan Leibiusky
bc7dbead33 Merge pull request #44 from akalipetis/hotfix-xterm
Fix race conditions when initially resizing terminal
2016-11-18 09:20:46 -03:00
Antonis Kalipetis
7628864058
Fix race conditions when initially resizing terminal
Race conditions could happen if the Terminal container did not have the correct size during initialization.

Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2016-11-18 12:48:49 +02:00
Jonathan Leibiusky @xetorthio
5aa6f52292 Also update hostname of new instances 2016-11-17 17:36:59 -03:00
Marcos Lilljedahl
0f3c3c254a Add supergrok instructions 2016-11-17 12:34:48 -03:00
Jonathan Leibiusky @xetorthio
6d4c1e7e15 Remove unsed lib 2016-11-16 18:19:57 -03:00