Commit Graph

35 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
72222dddf9 self-contained "testing" infrastructure 2015-09-06 23:25:07 -04:00
Jose Diaz-Gonzalez
7f8b77d4df reorder shellcheck excludes 2015-09-06 22:50:53 -04:00
Jose Diaz-Gonzalez
e168d5222a make test 2015-09-06 22:49:07 -04:00
Jose Diaz-Gonzalez
81280ea224 Fix lint 2015-09-06 22:48:56 -04:00
Jose Diaz-Gonzalez
89fbc799e2 run linting 2015-09-06 22:36:32 -04:00
Jose Diaz-Gonzalez
89b48a2e3b Service must be started before we can call unpause 2015-09-06 20:42:23 -04:00
Jose Diaz-Gonzalez
75b36f2781 Merge pull request #1 from dokku/service-expose
Service expose/unexpose
2015-09-06 20:21:43 -04:00
Jose Diaz-Gonzalez
f0c800b81d Do not fail on service_start when a service is already started
The desired state already exists, so this isn't strictly an error state.
2015-09-06 19:59:01 -04:00
Jose Diaz-Gonzalez
61d61eae70 Do not fail on service_stop when a service is already stopped
The desired state already exists, so this isn't strictly an error state.
2015-09-06 19:39:41 -04:00
Jose Diaz-Gonzalez
f72bf5402d Label running containers
This will avoid issues where `dokku cleanup` removes the stopped containers (it should not do so, and instead should allow them to stay in stopped mode).

Containers will be labeled as follows:

- service: dokku=service dokku.service=SERVICE_NAME
- ambassador: dokku=ambassador dokku.ambassador=SERVICE_NAME

To destroy the containers, simply run the `service:destroy` command.
2015-09-06 19:29:28 -04:00
Jose Diaz-Gonzalez
2289c5f3dc Allow docker kill command to fail 2015-09-06 19:27:04 -04:00
Jose Diaz-Gonzalez
b457a82256 Ensure container is running before attempting to delete files in the container 2015-09-06 19:26:50 -04:00
Jose Diaz-Gonzalez
f1ac4bbe71 Fix logging output for start/stop of container 2015-09-06 18:23:52 -04:00
Jose Diaz-Gonzalez
d1f6f64f23 Pull the ambassador image 2015-09-06 18:19:35 -04:00
Jose Diaz-Gonzalez
c2f115df86 fix name of container in readme 2015-09-06 18:19:22 -04:00
Jose Diaz-Gonzalez
18ad9bb441 Add sleep before removing container 2015-09-06 18:14:28 -04:00
Jose Diaz-Gonzalez
418c7bfc66 Add docker kill statement back 2015-09-06 18:10:08 -04:00
Jose Diaz-Gonzalez
a311957af3 Update docs on start/stop/restart commands 2015-09-06 18:08:24 -04:00
Jose Diaz-Gonzalez
cf9b8a9a59 Add expose/unexpose to readme 2015-09-06 18:08:02 -04:00
Jose Diaz-Gonzalez
70d86b17f5 Remove unused iptables sudoers config 2015-09-06 18:01:41 -04:00
Loïc Guitaut
16fb91cf16 Enable working expose/unexpose commands
`expose` and `unexpose` commands are now fully functionnal using the
ambassador pattern. This has the advantage to be a 100% docker solution
and to not have to restart the service container. Multiple ports are
exposed when service specify them.

`start` and `stop` commands have been made more robust. When calling
`start` or `stop` on an already started (or stopped) service, an error
will be printed out instead of issuing failing commands.

Exposed services will still be exposed after a `restart`. Also the
service containers (and ambassador containers) will start automatically
when docker boot up.
2015-09-06 15:23:04 +02:00
Loïc Guitaut
b2051f86fa Use $PLUGIN_PATH instead of dirname 2015-09-03 00:43:07 +02:00
Jose Diaz-Gonzalez
ac50d9c37c first - broken - pass at start/stop commands and working expose/expose commands
note that at the moment the iptables calls complete successfully but the container isn't actually exposed. We'll probably need to use the ambassador pattern to do this properly.
2015-08-31 15:29:23 -04:00
Jose Diaz-Gonzalez
075a39fe13 Move alias, link, unlink and logs commands into functions 2015-08-29 03:18:34 -04:00
Jose Diaz-Gonzalez
3fcdb0b869 Move service checks into commands file 2015-08-29 02:58:38 -04:00
Jose Diaz-Gonzalez
08f90bf4c6 Move info and list commands into shared functions
Also add better output formatting for both commands
2015-08-29 02:53:39 -04:00
Jose Diaz-Gonzalez
fb51474367 Remove service verification from service_url function
It is not necessary to do so in a function that is called from other places that already verify the name.
2015-08-29 02:49:16 -04:00
Jose Diaz-Gonzalez
ce5e9086c2 use config for ports 2015-08-29 02:37:50 -04:00
Jose Diaz-Gonzalez
5736336276 Use central config for env vars 2015-08-29 01:52:55 -04:00
Jose Diaz-Gonzalez
c2530b3b24 add central place for configuration 2015-08-29 01:51:06 -04:00
Jose Diaz-Gonzalez
53e54f0938 quiet grep output 2015-08-28 23:26:05 -04:00
Jose Diaz-Gonzalez
f13cdb52da Ensure container exists before attempting to kill it 2015-08-25 17:21:29 -04:00
Jose Diaz-Gonzalez
52114da734 Remove -plugin suffix from clone url 2015-08-25 14:04:45 -04:00
Jose Diaz-Gonzalez
1f3d9a7d91 Fix logs subcommand 2015-08-23 22:07:12 -04:00
Jose Diaz-Gonzalez
c64b7c07be initial commit 2015-08-23 19:17:51 -04:00