Commit Graph

276 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
62a3eff5bb refactor: move apps listing from common plugin to apps plugin
This helps centralize app-related listing fetching.
2022-02-26 00:37:51 -05: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
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
257abfaee8 refactor: move pre-deploy call to post-release-builder
Some of the hooks should happen before we push images out...
2021-08-14 01:58:35 -04:00
Jose Diaz-Gonzalez
7bf61b401f fix: call pre-deploy before deploy but after release
The dokku_release command adds more "stuff" by virtue of calling builder-release (the herokuish builder injects env vars).

This more closely matches previous order of operations.

Closes #4737
2021-08-12 17:35:54 -04:00
Jose Diaz-Gonzalez
e1f1531d42 refactor: call golang version of docker cleanup from shell
This ensures there is only a single implementation.
2021-08-08 01:56:43 -04:00
Jose Diaz-Gonzalez
f0ca3fef54 fix: correct count check for user-auth trigger
There are cases where the user-auth plugin exists but the events plugin is not enabled, and this accounts for that.
2021-08-07 17:55:56 -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
e0a513650e Merge pull request #4715 from dokku/2574-use-sslip
Switch from xip.io to sslip.io
2021-08-06 02:15:53 -04:00
Jose Diaz-Gonzalez
ecb8a02356 feat: switch from xip.io to sslip.io
xip.io appears to be unsupported after an exodus at basecamp. Switching to sslip.io seems like a decent move.

Refs #2574
2021-08-05 23:30:58 -04:00
Jose Diaz-Gonzalez
30a15aaa7a fix: respect pre-deploy task image manipulation
This requires a bc-incompatible break in terms of what triggers the pre-deploy hook (dokku internals vs schedulers).
2021-08-05 04:17:21 -04:00
Jose Diaz-Gonzalez
14b511d673 fix: correct lint error 2021-07-27 13:16:33 -04:00
Jose Diaz-Gonzalez
61d4b478ce feat: add --no-tty flag to run and run:detached commands 2021-07-27 02:58:45 -04:00
Jose Diaz-Gonzalez
350a84d253 refactor: deprecate the --detach flag in favor of run:detached 2021-07-27 02:58:44 -04:00
Jose Diaz-Gonzalez
618158a0f3 refactor: deprecate the --rm and --rm-container flags
These flags are not commonly invoked by users, causing issues when cleaning up old containers. Rather than instruct users to use some random flag, just change the default to what is likely to be more common.
2021-07-27 02:58:19 -04:00
Jose Diaz-Gonzalez
26a3a8fd0a feat: output message explaining how to remove a deploy lock when a lock is encountered 2021-07-11 21:33:32 -04: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
ccdbaa84f9 feat: override the exit code when verifying the app name 2021-02-28 15:18:04 -05:00
Jose Diaz-Gonzalez
7aa1334af9 feat: respect DOKKU_FAIL_EXIT_CODE value in dokku_log_fail functions 2021-02-28 15:18:04 -05:00
Jose Diaz-Gonzalez
627a6bf8a5 tests: fix issue with assert urls 2021-02-13 03:52:28 -05:00
Jose Diaz-Gonzalez
d4e832c27b tests: fix SC2145 issue 2021-02-13 02:31:24 -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
5614475521 refactor: reverse if statements
The shell version of IsImageHerokuishBased returns true if it is CNB for legacy reasons...
2021-02-11 06:48:38 -05:00
Jose Diaz-Gonzalez
308927adce refactor: log what stack is being used if it is modified 2021-01-23 17:40:53 -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
1599120c3e fix: hardcode cnb workdir to /workspace
Closes #4317
2021-01-14 08:33:26 -05:00
Jose Diaz-Gonzalez
3419f18c9f fix: correct issue where verifying an app name would bail early
Refs #4308
2021-01-09 07:40:45 -05:00
Jose Diaz-Gonzalez
b927c1b84d feat: add the pid of the dokku process to event logs 2021-01-02 05:23:12 -05:00
Jose Diaz-Gonzalez
fd162f8895 feat: add verify_app_name calls to all shell subcommands
Without this, folks could potentially run commands against invalid applications.
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
08fdfd1e38 feat: drop internal calls to verify_app_name 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
d7b23b84f0 fix: allow renaming old applications to new format
0.22.0 changed allowed values for app names, making it more difficult for users to fix their app names - you need to either downgrade+rename or recreate the app. The `apps:rename`  command can now rename these old applications to the new standard.

Also drop some app name verification from internal commands. Duplicate verification doesn't help much, and though it isn't excessively slow, it does prevent us from running commands against old apps that exist.

Refs #4267
2020-12-22 13:29:32 -05:00
Jose Diaz-Gonzalez
c6976499ad fix: do not delete app when the app name is invalid
Let folks call apps:destroy instead.

Refs #4129
2020-12-15 01:14:30 -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
bde77dbf78 feat: cleanup log output for failure case
Also mark DOKKU_DISABLE_ANSI_PREFIX_REMOVAL as deprecated (it will be removed in 0.23.0 and no prefixes will be removed at that time).
2020-11-28 03:32:11 -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
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
Jose Diaz-Gonzalez
ecc6c9e01d Merge pull request #4129 from dokku/4102-prohibit-non-dns-names
Prohibit non-dns names for apps and process types
2020-09-09 23:39:27 -04:00
Jose Diaz-Gonzalez
7e9f98b513 Merge pull request #4080 from hugopeixoto/fix/app-vhost-usage 2020-09-09 21:23:15 -04:00
Jose Diaz-Gonzalez
0f514f300e feat: prohibit non-dns names for apps and process types
This is necessary for ensuring ssl certificates can be auto-retrieved for apps, and also easing integration into schedulers that use names and process types as part of DNS records.

As well, this fixes an issue where we may potentially have invalid DNS entries when adding apps to custom networks.

Closes #4102
Closes #4114
2020-09-09 20:07:50 -04:00
Jose Diaz-Gonzalez
0351bf73b0 fix: update deprecated function name 2020-08-30 13:41:14 -04:00
Hugo Peixoto
d5b2d0d98e Stop using VHOST when listing app domains and urls 2020-07-19 16:29:35 +01:00
Roland van Laar
5f312d7347 Make make test pass on linting 2020-07-04 00:08:44 +02: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
46287cac0f feat: allow apps named tls
The `tls` name is no longer a reserved app name, and can be used by applications. This was previously a reserved app name due to it's use as a place for global SSL certificate files; Dokku has not supported global SSL certificates for many releases, and thus there is no need to reserve the name.
2020-05-08 23:58:06 -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
Jose Diaz-Gonzalez
61a306664f refactor: move domain manipulation into triggers
This allows other plugins to avoid understanding the underlying details of how domains might be integrated with.
2020-05-06 00:16:51 -04:00
Jose Diaz-Gonzalez
d35576302d chore: drop dokku references in logging output
This isn't super useful outside of branding. Users that rely on this information may wish to turn on event logging to trace output that way.
2020-05-05 23:39:38 -04:00
Jose Diaz-Gonzalez
38a13ecd39 feat: expose network listeners to nginx templates for all process types
This change allows users to specify a custom nginx.conf.sigil that can expose non-web process types to the outside world in addition to the web process type.

Closes #3258
2020-03-11 12:34:38 -04:00
Jose Diaz-Gonzalez
054bf26b0e chore: remove unnecessary source/import statements 2020-02-28 06:03:53 -05:00