1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-13 17:42:53 +08:00

37 Commits

Author SHA1 Message Date
Jonathan Leibiusky @xetorthio
24f8c9fc62 Change import statements accordingly 2017-05-08 15:35:42 -03:00
Marcos Lilljedahl
6acb6f47c5 Fix port ordering 2017-04-16 20:22:37 -03:00
Marcos Lilljedahl
6fba4f3b3a Add session to list in the end 2017-03-15 17:41:53 -03:00
Marcos Nils
a4b0a98df3 Scaling (#109)
Make PWD scalable
2017-03-13 18:07:20 -03:00
Jonathan Leibiusky @xetorthio
d71799954f Code update because of dependecy changes 2017-02-24 10:01:06 -03:00
Jonathan Leibiusky
f816be6f69 Add DNS support for PWD instances (#94)
* Add DNS support for PWD instances

* Store IP address of PWD in all session networks and restore it with the
same IP address

* Remove unnecesary print

* Change url format to pwd<ip>-port for better DNS filtering

* Make PWD listen on 80 and 443 for DNS resolve to work
2017-02-17 11:10:01 -03:00
Marcos Nils
640d64c3aa Update proxy to handle port redirects (#92) 2017-02-12 02:25:25 +02:00
Marcos Nils
a5d1e5c207 Allow to override session timeout. (#86)
* Allow to override session timeout.

This comes useful as it can be overriden from the SDK now

* Fix comments
2017-01-31 13:51:57 +02:00
Marcos Nils
dea778440e Add TLS certificates for machine drivers (#73) 2016-12-27 18:53:50 +02:00
Jonathan Leibiusky
54045d02f6 Delete zombie sessions and instances (#71) 2016-12-17 12:48:15 -08:00
Jonathan Leibiusky (@xetorthio)
93226e30ff Fixes prometheus gauges
Fix session close. Now PWD gets disconnected from network before
deleting it.
2016-12-17 11:41:24 -08:00
Jonathan Leibiusky
70eaf37d4b Add metrics (#70)
* Add prometheus support to count sessions, instances and clientes over
time

* Track counters on server reload

* Change to gauges
2016-12-15 17:12:17 -08:00
Jonathan Leibiusky (@xetorthio)
69050373d7 Show docker swarm used ports 2016-12-13 08:02:48 -06:00
Marcos Lilljedahl
a7811b4e33 Omit race conditions and update swarm info events 2016-12-02 10:29:41 -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
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
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
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 @xetorthio
8b0749a9ba Show cpu and memory stats of every node 2016-11-18 13:52:47 -03:00
Jonathan Leibiusky @xetorthio
802375bbf7 After loading saved sessions schedule them to expire 2016-11-15 14:49:50 -03:00
Jonathan Leibiusky @xetorthio
db074a5804 Add expiration clock to sessions 2016-11-15 13:20:59 -03:00
Marcos Lilljedahl
939c045198 Change default dind image and prevent session panic 2016-11-15 01:46:29 -03:00
Marcos Lilljedahl
e8d69d6a21 Fix session config for docker image 2016-11-14 22:08:53 -03:00
Marcos Lilljedahl
23bb4eaf69 Add session persistence and use attach instead of exec 2016-11-14 21:29:32 -03:00
Marcos Lilljedahl
3e142c91e8 Revert transport preference 2016-11-14 11:56:26 -03:00
Marcos Lilljedahl
54378862b3 Use docker 1.13 to allow overlay networks
- Print error if resizing fails
2016-11-13 01:11:45 -03:00
Jonathan Leibiusky (@xetorthio)
e8b38fe717 Add session close button 2016-11-12 18:58:30 -03:00
Jonathan Leibiusky (@xetorthio)
1be40005e8 Increase session time 2016-11-11 20:18:47 -03:00
Jonathan Leibiusky (@xetorthio)
d05fe56fea Better session lock management 2016-11-11 20:10:19 -03:00
Jonathan Leibiusky (@xetorthio)
e49245dfe9 Increase session TTL to 4 hours 2016-11-11 09:17:01 -03:00
Jonathan Leibiusky (@xetorthio)
8e4981d24f Huge refactor to have everything working with socket.io
It fixes lots of bugs, can fallback to long polling, resize viewport of
terminals and share clients state of the session, so they all see the
same thing.
2016-11-10 10:42:08 -03:00
Marcos Lilljedahl
a56af3dc22 Refactor sessions and add locking to avoid concurrent requests to create
more instances
2016-10-14 12:54:25 -03:00
Alex
74e8502f3f - Fix .gitignore
- Note about bug with Docker driver
- Implement experimental pid ulimit of 150.
2016-10-09 18:58:32 +02:00
Marcos Lilljedahl
97f39ca375 Remove writer if websocket disconnects 2016-10-08 15:04:30 +02:00
Jonathan Leibiusky (@xetorthio)
4950f03404 Show when session has expired 2016-10-08 11:26:16 +02:00
Jonathan Leibiusky (@xetorthio)
b6b849e2c6 Change import paths
Add session cleanup
2016-10-08 10:25:10 +02:00
Jonathan Leibiusky (@xetorthio)
dde49d8700 Initial commit 2016-10-08 03:12:48 +02:00