Commit Graph

41 Commits

Author SHA1 Message Date
Stavros Panakakis
3ee2975d76 Upgrade docker sdk to moby (#491)
* Replace deprecated method

* Upgrade docker sdk to moby
2021-09-07 08:03:13 -03:00
Marcos Lilljedahl
e8486b8100 Provide support to configure privileged containers per playground 2020-10-25 19:21:31 -03:00
Marcos Lilljedahl
7fadf5bad7 Remove UserGet call in tests since it's note required for anon sessions
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2020-10-03 10:01:44 -03:00
Paul Jolly
681de41e0a provisioner: augment Networks config from caller when -unsafe (#411)
Currently container instances are hard-coded to join a single network,
the network associated with the session.

This change allows the caller of CreateInstance to specify which
additional networks should be joined. This is useful, for example, when
a container instance requires access to additional "backend" services
that may be running.

There are security implications associated with this change, hence the
additional networks are only joined when a new -unsafe flag is
specified. It is hoped the name is a sufficient indicator that thought
needs to go into using it.
2020-09-04 13:46:31 +01:00
Marcos Lilljedahl
833e71330f Allow to set env variables through the API 2020-06-19 08:26:38 -03:00
Marcos Lilljedahl
f7350b02c3 Prevent panic when checking banned user if no auth is enabled 2019-03-10 14:17:54 -03:00
Marcos Lilljedahl
6e925c9a85 Fix print formatting errors 2018-02-24 12:45:41 -03:00
marcos
386bd87385 Add support for file editor 2018-01-05 13:13:07 -03:00
Jonathan Leibiusky
da6a55fb5c New session now expects a struct with everything it needs and a context (#228)
to pass along
2017-11-28 12:14:50 -03:00
Jonathan Leibiusky
3f5b3882dd Multiple playgrounds support (#215)
* Add Playground struct and basic support for creating it and retrieving
it

* Add missing functions in pwd mock

* Get playground from request domain and validate it exists. If valid set
it on the newly created session.

* Move playground specific configurations to the playground struct and use
it everytime we need that conf.

* Don't allow to specify a duration bigger that the allowed in the
playground
2017-11-14 15:50:04 -03:00
Marcos Lilljedahl
7ce693fab5 Vendor dependencies and use docker/go-docker for API types 2017-10-20 18:42:16 -03:00
Jonathan Leibiusky @xetorthio
4c034812d2 Add support for openid with github and facebook 2017-10-04 11:41:17 -03:00
Jonathan Leibiusky @xetorthio
2a261094ff GetForSession now expects a *types.Session instead of a string 2017-09-20 17:29:58 -03:00
Jonathan Leibiusky @xetorthio
86a0f7d1e9 Refactor id generator to it's own package 2017-09-14 10:20:20 -03:00
Marcos Lilljedahl
a9474cf75e Rename Host to PlaygroundFQDN 2017-09-12 17:58:56 -03:00
Marcos Lilljedahl
4d643d04c0 Add SESSION_ID to instance and remove unnecessary stuff 2017-09-12 17:02:27 -03:00
Jonathan Leibiusky @xetorthio
954c52471b Refactor storage to support shallow types.
Add Client to storage.
Fix client resizing issues.
2017-09-01 20:12:19 -03:00
Marcos Lilljedahl
305b15ff6c Fix network options in tests 2017-08-25 15:03:03 -03:00
Jonathan Leibiusky @xetorthio
a8567d8670 Add routable IP 2017-08-25 14:55:08 -03:00
Jonathan Leibiusky @xetorthio
6941b8b69a Make networks a list so it can be decided by the provisioner to which to
connect to
2017-08-25 13:39:17 -03:00
Marcos Lilljedahl
1bdda6948e Add network opts to CreateNetwork API 2017-08-24 16:20:32 -03:00
Jonathan Leibiusky @xetorthio
438fe9f6e7 Add SessionProvisioner and InstanceProvisionerFactory
Remove AllowedImages and IsDockerHost as it is not really being used for
anything useful
2017-08-24 15:36:59 -03:00
Jonathan Leibiusky @xetorthio
1263f36bc8 Send proxy_host in the new instance event 2017-08-11 11:39:25 -03:00
Jonathan Leibiusky @xetorthio
0e9716d5b0 Set session host
Add ping to L2 router
2017-08-08 10:10:52 -03:00
Jonathan Leibiusky @xetorthio
c2b156d02a Add provisioners 2017-08-02 11:58:56 -03:00
Jonathan Leibiusky @xetorthio
5ee4bb2011 More fixes 2017-07-28 23:24:02 -03:00
Jonathan Leibiusky @xetorthio
0e08107738 Tests are working again 2017-07-28 20:42:05 -03:00
Jonathan Leibiusky @xetorthio
53e6078cc5 WIP 2017-07-25 16:36:10 -03:00
Marcos Lilljedahl
4eda861329 Merge branch 'routing_refactor' into next 2017-07-18 15:15:11 -03:00
Jonathan Leibiusky @xetorthio
08b64dadde Add storage API abstraction 2017-07-18 14:32:17 -03:00
Jonathan Leibiusky @xetorthio
4731d8ec98 Event refactor 2017-07-18 10:45:05 -03:00
Jonathan Leibiusky @xetorthio
3a13358739 Merge branch 'master' into storage_refactor 2017-06-16 10:02:20 -03:00
Jonathan Leibiusky @xetorthio
de281eb58b Fix missing host setting and fix tests 2017-06-15 18:17:02 -03:00
Jonathan Leibiusky @xetorthio
e9911abf94 Storage has now it's own package.
Remove global `sessions` map and use configured storage.
Add a `types` package so both `pwd` and `storage` can access without
circular dependencies.
Now the session is prepared when requested and not on load.
2017-06-15 16:09:41 -03:00
Jonathan Leibiusky @xetorthio
2224e6e540 Add image_name parameter to SessionDeploy 2017-06-14 21:09:20 -03:00
Jonathan Leibiusky @xetorthio
8f247794bb Add PWD_HOST_FQDN env variable to instances. 2017-06-14 19:02:07 -03:00
Jonathan Leibiusky @xetorthio
84b532b887 Instances in a session should be created sequentially 2017-06-09 10:18:30 -03:00
Jonathan Leibiusky @xetorthio
a09f90f968 Allow custom hostnames when creating instances 2017-06-05 10:08:03 -03:00
Jonathan Leibiusky @xetorthio
2e63e541f3 Make sure not to treat the instance as a docker host always, as it might
not be one.
2017-05-29 10:19:01 -03:00
Jonathan Leibiusky @xetorthio
b0b9269ccc Allow to launch instances with any kind of public image.
Images that are not whitelisted will be launched as normal containers.
Only whitelisted ones will be launched as privileged.
Additionally pull the image if it doesn't exist.
2017-05-27 20:04:37 -03:00
Jonathan Leibiusky @xetorthio
dfbf870383 Add test for InstanceResizeTerminal 2017-05-26 10:01:38 -03:00