Commit Graph

199 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
cce7c5cb97 Merge pull request #4862 from dokku/4464-deploy-source
Set deploy-source and metadata at deploy time
2021-10-10 02:07:16 -04:00
Jose Diaz-Gonzalez
c0b6942392 refactor: set deploy-source and metadata at deploy time
This ensures the value is correct, where previously it was computed based on a file - and therefore did not distinguish between git:from-archive and git:from-image.

Closes #4464
2021-10-09 23:37:53 -04:00
Jose Diaz-Gonzalez
55554ce9bd feat: add ability to increase the max parallelism when deploying a given process type 2021-10-09 22:44:03 -04:00
Jose Diaz-Gonzalez
b48b79f5ca feat: allow specifying a single process type to restart
This changes restarts to drop the 'release' part that currently gets triggered, which also helps reduce the possibility that a new image layer will be added due to predeploy deploy triggers.

Note that the old method essentially halfway-rebuilt the app (which was what added the extra layer). This refactor removes that, which is a bc-break.

Additionally, scaling processes will result in deploying _only_ restarting the processes being scaled.

Closes #2184
2021-10-09 18:46:17 -04:00
Jose Diaz-Gonzalez
d1a16717b3 chore: remove deprecated tar plugin
This plugin was deprecated in 0.24.0 in favor of git:from-archive. Users should migrate to the new command.
2021-10-09 18:43:53 -04:00
Jose Diaz-Gonzalez
e893ac2aaa chore: remove deprecated tags plugin
This plugin was deprecated in 0.24.0 in favor of git:from-image. Users should migrate to the new command.
2021-10-09 18:34:01 -04:00
Jose Diaz-Gonzalez
3c6396fbca feat: implement the scheduler plugin
This also performs a one-time migration of the DOKKU_SCHEDULER values the scheduler plugin properties.

Closes #4739
2021-10-09 18:31:59 -04:00
Jose Diaz-Gonzalez
db239debf1 feat: expose git-from-archive and git-from-image plugin triggers
This will allow other plugins to create apps on the fly by specifying either an archive url or a docker image.

Closes #4778
2021-09-22 12:32:17 -04:00
Jose Diaz-Gonzalez
bb4a2da52e docs: add missing argument from trigger documentation 2021-09-14 02:25:08 -04:00
Jose Diaz-Gonzalez
9e18736475 feat: add ability to scope retire call to a single app
Also cleanup the log output a bit for the ps:retire command.
2021-08-08 03:04:25 -04:00
Jose Diaz-Gonzalez
e8d9982330 chore: drop unnecessary scheduler-docker-cleanup hook
All the logic was already called from docker-cleanup, so this just lengthened the cleanup time.
2021-08-08 01:57:44 -04:00
Jose Diaz-Gonzalez
a1c768b9b3 refactor: drop web installer in favor of setup via cli
This makes the installation a bit more secure by ensuring a user does not accidentally expose a way for unauthorized users to add new ssh keys to the system.

Additionally, this removes the extra HOSTNAME file to make the initial install process easier (that file was not modifiable by any dokku commands.

Closes #2247
2021-08-07 16:36:41 -04:00
Jose Diaz-Gonzalez
9ecfa843f0 feat: add support for routing an app to a specified host:port
This is useful when there is a service not managed by Dokku but should be exposed via the Dokku routing layer. As an example, some binaries (consul, nomad, vault) expose web uis, and are traditionally run on the host directly vs in a container.

Closes #4665
2021-08-06 01:29:25 -04:00
Jose Diaz-Gonzalez
b02f8ba88b docs: fix deprecation warning 2021-08-05 20:14:30 -04:00
Jose Diaz-Gonzalez
9930c0493d docs: update docs for new features 2021-08-04 21:49:38 -04:00
Jose Diaz-Gonzalez
a7593db0c3 refactor: allow specifying clearExisting when calling ps-set-scale 2021-08-01 17:54:12 -04:00
Jose Diaz-Gonzalez
823629d332 docs: document ps-can-scale 2021-08-01 17:53:25 -04:00
Jose Diaz-Gonzalez
46d333df4b feat: implement ps-set-scale trigger 2021-08-01 16:13:03 -04:00
Jose Diaz-Gonzalez
213f7d224c refactor: use ps-current-scale instead of parsing DOKKU_SCALE file when iterating over deployed processes 2021-08-01 01:43:35 -04:00
Jose Diaz-Gonzalez
5901c57bde docs: fix style issues 2021-07-10 14:57:58 -04:00
Jose Diaz-Gonzalez
6d40d52d7d feat: add ability to specify a custom build directory for an app 2021-07-10 14:57:55 -04:00
Jose Diaz-Gonzalez
539f08f627 docs: more cleanup 2021-07-09 23:06:38 -04:00
Jose Diaz-Gonzalez
1599afa74f docs: add docs for git-from-directory trigger 2021-03-25 20:37:37 -04:00
Jose Diaz-Gonzalez
5804cd11bc chore: standardize popd calls 2021-03-01 00:33:06 -05:00
Jose Diaz-Gonzalez
1ec71cd509 refactor: switch detected builder so first one wins
Also rename internal cnb references to pack (where possible).
2021-02-28 16:19:41 -05:00
Jose Diaz-Gonzalez
353438dbd3 feat: allow builders to be detected based on repository contents
Rather than hardcode two builders, allow builders to specify a `builder-detect` trigger. This trigger can be used to specify if the builder should or should not be used for an application. Each builder takes stdin and can decide if it wants to emit it or emit it's own image source type.

If the final value is empty, then Dokku will default to herokuish (and cnb once that is stable). In addition, a future change may allow users to manually specify a builder in the case they wish to override the choice selected by Dokku.

This change enables users to build custom builder plugins and have those plugins used for building an image asset. By way of example, an enterprising user could create a `builder-lambda` based on lambci, and then pair this with a scheduler plugin that updates a lambda function on AWS. Alternatively, a user might decide they wish to place their Dockerfile in a specific directory for their applications - such as an `_infrastructure` directory - and create a plugin to override how that is detected within Dokku.
2021-02-28 16:19:41 -05:00
Jose Diaz-Gonzalez
1e915968b5 fix: correctly handle is-deployed check
Previously, checking if an app was deployed actually checked if there were any running processes. This is not only incorrect, but also fails to take into account applications that do not have running processes and are only used for one-off commands.

This fix migrates apps to the new "deployed" property which is set in core-post-deploy. The result is a slightly faster "deployed" check that is correct and allows non-scaled apps to actually work.

Closes #4398
2021-02-13 00:46:35 -05:00
Jose Diaz-Gonzalez
0405b36ab4 fix: implement config-export hook
This will allow dropping many of the "source config/functions" calls littered over the codebase. Plugin triggers are the way to perform cross-plugin communication :)
2021-02-11 06:41:11 -05:00
Jose Diaz-Gonzalez
be84325de1 feat: add support for injected cron entries
This allows alternative plugins - such as dokku-letsencrypt - to inject scheduled cron tasks into the cron system used by Dokku. Cron systems can choose to include or not include a cron task based on the specified scheduler, and can also optionally use a third parameter to store arbitrary information.
2021-02-07 16:45:34 -05:00
Jose Diaz-Gonzalez
9137be814c refactor: remove need for internal dokku calls
Avoid internal dokku calls will avoid potentially expensive subprocesses - in particular, user-auth will be re-invoked, which can be expensive.
2021-01-23 14:27:16 -05:00
Jose Diaz-Gonzalez
815b839eeb feat: add trigger for fetching logs properties 2021-01-23 13:39:29 -05:00
Jose Diaz-Gonzalez
ed84f21c08 refactor: standardize apt-get usage
- Always put flags in same location
- Always use apt-get
- Add --no-install-recommends where possible
2021-01-17 20:19:56 -05:00
Jose Diaz-Gonzalez
2a6c411edf docs: remove extra verify_app_name call in documentation 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
451abcf8f3 feat: add initial support for cloud native buildpacks
This change adds a new builder - builder-cnb - via the 'DOKKU_CNB_EXPERIMENTAL' environment variable. While support for customizing pack builds is not currently implemented and there may be other missing functionality, this initial implementation allows folks to start playing with CNB.

Future releases of Dokku will provide tighter CNB integration and eventually switch to CNB for default building, as well as allow users to better select builders needed for their applications.

All new code for CNB support should be considered experimental and subject to change as the support evolves over time.
2020-12-01 14:50:27 -05:00
Jose Diaz-Gonzalez
0786954d34 feat: schedule related images for cleanup when retiring containers
If the containers no longer exist and the images are unused, we should remove the images as well.

Note that images may sometimes stick around for a little while, depending on the retire schedule and the wait time specified for the container.

Closes #4104
2020-11-26 03:21:45 -05:00
Jose Diaz-Gonzalez
c343316864 Merge pull request #4198 from dokku/4083-fewer-extracts
Reference extracted Procfile
2020-11-23 01:36:53 -05:00
Jose Diaz-Gonzalez
fceb412fb1 fix: reference extracted Procfile
Rather than attempting to always extract the Procfile, reference the one that was extracted by the last deploy. This fixes issues where 'docker container cp' may fail intermittently for lord knows what reason.

Closes #4083
2020-11-22 17:14:18 -05:00
Jose Diaz-Gonzalez
ef490f0a05 feat: retire intermediate containers after use
Rather than waiting for the next deploy, take advantage of the retire system to retire these containers immediately.

Note that since the retire process happens out of band, the containers may stick around for up to 5 minutes, after which point they will be removed.

Customization of the wait time to retire - currently 60 seconds - is up for future debate. The containers ultimately haven't been useful for debugging, so keeping them around for longer won't help in most cases, and folks can disable the dokku-retire service (or cron) if that is desired.
2020-11-22 16:57:39 -05:00
Jose Diaz-Gonzalez
5b21cabff3 Merge pull request #4128 from mailformfemi/master
Added the container index to the network-compute-ports trigger
2020-11-21 23:08:06 -05:00
Jose Diaz-Gonzalez
a19efc1cfa chore: drop all references to all commands where possible. 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
f9969a0e61 refactor: drop extra args from procfile-extract
They were not necessary.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
ab1d15216c refactor: drop the last argument from procfile-get-command
No external plugin should need to know the internals of where processes are.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
696df45306 refactor: extract release_and_deploy calls to a plugin trigger
Better would be to separate the release and deploy aspects into distinct triggers - as well as have it release a specific image - but this is a good first pass.
2020-11-21 20:57:33 -05:00
Femi Omojola
81512504a7 Added the container index to the network-compute-ports trigger: useful for alternative proxy implementations. Updated the documentation for the network-compute-ports trigger to clarify the arguments 2020-09-08 09:26:35 -04:00
Jose Diaz-Gonzalez
becf7c1f86 feat: allow customizing the various nginx templates
This will let custom distributions of Dokku to override the internal templates without needing to repackage Dokku or overwrite core files.
2020-09-06 13:57:35 -04:00
Jose Diaz-Gonzalez
1ea60a16e5 refactor: move external procfile manipulation into triggers
This also cleans up the internal APIs a bit.
2020-08-30 13:41:14 -04:00
Gurpreet Atwal
8ab1342110 docs: add more details to nginx-dokku-template-source trigger
[ci skip]
2020-07-18 13:26:17 -07:00
Jose Diaz-Gonzalez
2dfb0ef3e6 fix: correct entering running containers
This functionality was broken due to a refactor of argument handling in a previous release.

In addition to the fix, all the functionality was moved to scheduler-enter, which allows scheduler plugins to implement ways of entering containers in the relevant scheduler.

Closes #3972
2020-05-12 23:06:10 -04:00
Jose Diaz-Gonzalez
962aa66965 Merge pull request #3971 from dokku/3674-customize-dokku-conf
feat: allow users to customize the source of the dokku.conf nginx template
2020-05-06 19:57:12 -04:00
Jose Diaz-Gonzalez
92621a3187 Merge pull request #3966 from dokku/domains-triggers
Move domain manipulation into triggers
2020-05-06 14:21:06 -04:00