Skip to content

Commit

Permalink
Remove ddev-live docs and integration, etc (#2976)
Browse files Browse the repository at this point in the history
* Remove ddev-live docs and integration, etc
* Bump golangci-lint
* Stop changing --out-format for golangci-lint
  • Loading branch information
rfay committed Apr 30, 2021
1 parent efdf7a1 commit 20ac1db
Show file tree
Hide file tree
Showing 25 changed files with 101 additions and 465 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
env:
BUILDKIT_PROGRESS: plain
DOCKER_CLI_EXPERIMENTAL: enabled
DDEV_LIVE_NO_ANALYTICS: true
DDEV_DEBUG: true


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
version: v1.39

# Optional: working directory, useful for monorepos
# working-directory: somedir

args: --out-format=line-number --disable-all --enable=gofmt --enable=govet --enable=golint --enable=errcheck --enable=staticcheck --enable=ineffassign --enable=varcheck --enable=deadcode
args: --disable-all --enable=gofmt --enable=govet --enable=golint --enable=errcheck --enable=staticcheck --enable=ineffassign --enable=varcheck --enable=deadcode

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
Expand Down
4 changes: 2 additions & 2 deletions cmd/ddev/cmd/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestCustomCommands(t *testing.T) {
assert.NoError(err)

// Make sure that all the official ddev-provided custom commands are usable by just checking help
for _, c := range []string{"launch", "live", "mysql", "xdebug"} {
for _, c := range []string{"launch", "mysql", "xdebug"} {
_, err = exec.RunCommand(DdevBin, []string{c, "-h"})
assert.NoError(err, "Failed to run ddev %s -h", c)
}
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestCustomCommands(t *testing.T) {
assert.FileExists(filepath.Join(globalCommandsDir, f))
}
// Make sure that the non-command stuff we installed is in project commands dir
for _, f := range []string{"db/mysql", "db/README.txt", "host/launch", "host/README.txt", "host/solrtail.example", "solr/README.txt", "solr/solrtail.example", "web/live", "web/README.txt", "web/xdebug"} {
for _, f := range []string{"db/mysql", "db/README.txt", "host/launch", "host/README.txt", "host/solrtail.example", "solr/README.txt", "solr/solrtail.example", "web/README.txt", "web/xdebug"} {
assert.FileExists(filepath.Join(projectCommandsDir, f))
}

Expand Down
8 changes: 0 additions & 8 deletions cmd/ddev/cmd/dotddev_assets/commands/web/live

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/ddev/cmd/dotddev_assets/providers/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Providers README

## Introduction to Hosting Provider Integration

As of DDEV-Local v1.17, the hosting provider integration has been completely rewritten and reorganized, and integrations for Platform.sh and Acquia hosting have been added to the previous ones for Pantheon.io and DDEV-Live.
As of DDEV-Local v1.17, the hosting provider integration has been completely rewritten and reorganized, and integrations for Platform.sh and Acquia hosting have been added to the previous integration for Pantheon.io.

The best part of this is you can change them and adapt them in any way you need to, they're all short scripted recipes. There are several example recipes created in the .ddev/providers directory of every project or see them in the code at https://github.com/drud/ddev/tree/master/cmd/ddev/cmd/dotddev_assets/providers.

Expand Down
73 changes: 0 additions & 73 deletions cmd/ddev/cmd/dotddev_assets/providers/ddev-live.yaml.example

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# 10. Run `ddev pull pantheon`. The ddev environment download the Pantheon database and files, and import the database and files into the ddev environment. You should now be able to access the project locally.
#
# 11. Optionally use `ddev push pantheon` to push local files and database to DDEV-Live. Note that `ddev push` is a command that can potentially damage your production site, so this is not recommended.
# 11. Optionally use `ddev push pantheon` to push local files and database to Pantheon. Note that `ddev push` is a command that can potentially damage your production site, so this is not recommended.
#

# Debugging: Use `ddev exec terminus auth:whoami` to see what terminus knows about
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 4. Obtain your project id with `ddev exec platform`. The platform tool should show you all the information about your account and project.
# 5. In your project's .ddev/providers directory, copy platform.yaml.example to platform.yaml and edit the `project_id` and `environment_name`.
# 6. Run `ddev pull platform`. After you agree to the prompt, the current upstream database and files will be downloaded.
# 7. Optionally use `ddev push platform` to push local files and database to DDEV-Live. Note that `ddev push` is a command that can potentially damage your production site, so this is not recommended.
# 7. Optionally use `ddev push platform` to push local files and database to platform.sh. Note that `ddev push` is a command that can potentially damage your production site, so this is not recommended.
# Debugging: Use `ddev exec platform` to see what platform.sh knows about
# your configuration and whether it's working correctly.

Expand Down
1 change: 0 additions & 1 deletion cmd/ddev/cmd/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var PullCmd = &cobra.Command{
Running pull will connect to the configured provider and download + import the
database and files.`,
Example: `ddev pull pantheon
ddev pull ddev-live
ddev pull platform
ddev pull pantheon -y
ddev pull platform --skip-files -y`,
Expand Down
1 change: 0 additions & 1 deletion cmd/ddev/cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var PushCmd = &cobra.Command{
Running push will connect to the configured provider and export and upload the
database and/or files. It is not recommended for most workflows since it is extremely dangerous to your production hosting.`,
Example: `ddev push pantheon
ddev push ddev-live
ddev push platform
ddev push pantheon -y
ddev push platform --skip-files -y
Expand Down
10 changes: 1 addition & 9 deletions containers/ddev-webserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

### ---------------------------ddev-webserver-base--------------------------------------
### Build ddev-php-base from ddev-webserver-base
### ddev-php-base is the basic of ddev-php-prod (for DDEV-Live)
### ddev-php-base is the basic of ddev-php-prod
### and ddev-webserver-* (For DDEV-Local)
FROM drud/ddev-php-base:v1.17.1-alpha4 as ddev-webserver-base

Expand Down Expand Up @@ -67,11 +67,9 @@ SHELL ["/bin/bash", "-c"]
RUN mkdir /tmp/ddev && \
if [[ $TARGETPLATFORM == "linux/arm64" ]]; then \
printf 'MKCERT_ARCH="linux-arm64" \n\
DDEV_LIVE_ARCH=arm64 \n\
MAILHOG_ARCH="linux_arm64"' > /tmp/ddev/vars; \
else \
printf 'MKCERT_ARCH="linux-amd64" \n\
DDEV_LIVE_ARCH=amd64 \n\
MAILHOG_ARCH="linux_amd64"' > /tmp/ddev/vars; \
fi

Expand Down Expand Up @@ -104,9 +102,6 @@ RUN source /tmp/ddev/vars && curl -sSL https://github.com/drud/MailHog/releases/
RUN curl -sSL https://github.com/pantheon-systems/terminus/releases/download/$(curl --silent "https://api.github.com/repos/pantheon-systems/terminus/releases/latest" | perl -nle'print $& while m{"tag_name": "\K.*?(?=")}g')/terminus.phar --output /usr/local/bin/terminus && chmod 777 /usr/local/bin/terminus
RUN curl -sSL https://github.com/platformsh/platformsh-cli/releases/download/$(curl --silent "https://api.github.com/repos/platformsh/platformsh-cli/releases/latest" | perl -nle'print $& while m{"tag_name": "\K.*?(?=")}g')/platform.phar --output /usr/local/bin/platform && chmod 777 /usr/local/bin/platform
RUN curl -sSL --output /usr/local/bin/acli https://github.com/acquia/cli/releases/latest/download/acli.phar && chmod 777 /usr/local/bin/acli

RUN source /tmp/ddev/vars && curl -fsSL -o ddev-live.zip https://downloads.ddev.com/ddev-live-cli/latest/linux_${DDEV_LIVE_ARCH}/ddev-live.zip && unzip ddev-live.zip && mv ddev-live /usr/local/bin && chmod 777 /usr/local/bin/ddev-live && rm ddev-live.zip

RUN curl -sSL https://github.com/backdrop-contrib/drush/releases/download/${BACKDROP_DRUSH_VERSION}/backdrop-drush-extension.zip -o /tmp/backdrop-drush-extension.zip && unzip -o /tmp/backdrop-drush-extension.zip -d /var/tmp/backdrop_drush_commands

RUN mkdir -p /etc/nginx/sites-enabled /var/log/apache2 /var/run/apache2 /var/lib/apache2/module/enabled_by_admin /var/lib/apache2/module/disabled_by_admin && \
Expand Down Expand Up @@ -162,9 +157,6 @@ ENV APACHE_SITE_TEMPLATE /etc/apache2/apache-site.conf
ENV TERMINUS_CACHE_DIR=/mnt/ddev-global-cache/terminus/cache
ENV CAROOT /mnt/ddev-global-cache/mkcert

ENV DDEV_LIVE_CONFIG_FILE_PATH /mnt/ddev-global-cache/ddev-live/cli-config.json
ENV DDEV_LIVE_NO_VERSION_PROMPT true

ENV COMPOSER_ALLOW_SUPERUSER=1
ENV COMPOSER_CACHE_DIR=/mnt/ddev-global-cache/composer
ENV COMPOSER_PROCESS_TIMEOUT=2000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ phpenmod assert
ls /var/www/html >/dev/null || (echo "/var/www/html does not seem to be healthy/mounted; docker may not be mounting it., exiting" && exit 101)

# Make sure the TERMINUS_CACHE_DIR (/mnt/ddev-global-cache/terminus/cache) exists
# Along with ddev-live, platform.sh equivalents
sudo mkdir -p ${TERMINUS_CACHE_DIR} /mnt/ddev-global-cache/ddev-live
sudo mkdir -p ${TERMINUS_CACHE_DIR}

sudo mkdir -p /mnt/ddev-global-cache/bashhistory/${HOSTNAME}
sudo chown -R "$(id -u):$(id -g)" /mnt/ddev-global-cache/ ~/{.ssh*,.drush,.gitconfig,.my.cnf}
Expand Down
4 changes: 2 additions & 2 deletions containers/ddev-webserver/tests/ddev-webserver/general.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@test "Verify required binaries are installed in normal image" {
if [ "${IS_HARDENED}" == "true" ]; then skip "Skipping because IS_HARDENED==true"; fi
COMMANDS="composer ddev-live drush8 git magerun magerun2 mkcert node npm platform sudo terminus wp"
COMMANDS="composer drush8 git magerun magerun2 mkcert node npm platform sudo terminus wp"
for item in $COMMANDS; do
# echo "# looking for $item" >&3
docker exec $CONTAINER_NAME bash -c "command -v $item >/dev/null"
Expand All @@ -11,7 +11,7 @@

@test "Verify some binaries binaries (sudo) are NOT installed in hardened image" {
if [ "${IS_HARDENED}" != "true" ]; then skip "Skipping because IS_HARDENED==false"; fi
COMMANDS="ddev-live sudo terminus"
COMMANDS="sudo terminus"
for item in $COMMANDS; do
rv=1
docker exec $CONTAINER_NAME bash -c "command -v $item >/dev/null 2>/dev/null" || rv=$?
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-webserver/tests/ddev-webserver/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ trap cleanup EXIT
cleanup

# We have to push the CA into the ddev-global-cache volume so it will be respected
docker run --rm -v "$(mkcert -CAROOT):/mnt/mkcert" -v ddev-global-cache:/mnt/ddev-global-cache ${DOCKER_IMAGE} bash -c "mkdir -p /mnt/ddev-global-cache/{mkcert,bashhistory,ddev-live,terminus} && cp -R /mnt/mkcert /mnt/ddev-global-cache/ && chown -Rf ${MOUNTUID}:${MOUNTGID} /mnt/ddev-global-cache/* && chmod -Rf ugo+w /mnt/ddev-global-cache/*"
docker run --rm -v "$(mkcert -CAROOT):/mnt/mkcert" -v ddev-global-cache:/mnt/ddev-global-cache ${DOCKER_IMAGE} bash -c "mkdir -p /mnt/ddev-global-cache/{mkcert,bashhistory,terminus} && cp -R /mnt/mkcert /mnt/ddev-global-cache/ && chown -Rf ${MOUNTUID}:${MOUNTGID} /mnt/ddev-global-cache/* && chmod -Rf ugo+w /mnt/ddev-global-cache/*"

# Run general tests with a default container
docker run -u "$MOUNTUID:$MOUNTGID" -p $HOST_HTTP_PORT:$CONTAINER_HTTP_PORT -p $HOST_HTTPS_PORT:$CONTAINER_HTTPS_PORT -e "DOCROOT=docroot" -e "DDEV_PHP_VERSION=${PHP_VERSION}" -e "DDEV_WEBSERVER_TYPE=${WEBSERVER_TYPE}" -d --name $CONTAINER_NAME -v ddev-global-cache:/mnt/ddev-global-cache -d $DOCKER_IMAGE >/dev/null
Expand Down
4 changes: 2 additions & 2 deletions docs/users/alternate-uses.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ An experimental feature of DDEV-local is simplified small-project hosting on the

This may be completely appropriate for small or abandoned sites that have special requirements like old versions of PHP that aren't supported elsewhere.

**Note that this is no replacement for a scalable managed hosting offering like [DDEV-Live](https://www.ddev.com/ddev-live/) or other similar services. It's unknown how much traffic it can handle in a given environment. And it's EXPERIMENTAL. And it will never replace managed hosting.**
**Note that this is no replacement for a scalable managed hosting offering. It's unknown how much traffic it can handle in a given environment. And it's EXPERIMENTAL. And it will never replace managed hosting.**

1. Install DDEV-Local on a regular Linux server that is directly connected to the Internet. You're responsible for your firewall and maintenance of the server, of course.
2. On Debian/Ubuntu, you can set up a simple firewall with `ufw allow 80 && ufw allow 443 && ufw allow 22 && ufw enable`
Expand Down Expand Up @@ -81,7 +81,7 @@ display_startup_errors = Off
Caveats:

* It's unknown how much traffic a given server and docker setup can sustain, or what the results will be if the traffic is more than the server can handle.
* DDEV-Local does not provide outgoing SMTP mailhandling service, and the development-focused MailHog feature is disabled if you're using `use_hardened_images`. You can provide SMTP service a number of ways, but the recommended way is to enable SMTP mailsending in your application and leverage a third-party transactional email service such as SendGrid, Mandrill, or Mailgun. This is the best way to make sure your mail actually gets delivered. See [DDEV-Live email sending docs](https://docs.ddev.com/services/#email) for hints.
* DDEV-Local does not provide outgoing SMTP mailhandling service, and the development-focused MailHog feature is disabled if you're using `use_hardened_images`. You can provide SMTP service a number of ways, but the recommended way is to enable SMTP mailsending in your application and leverage a third-party transactional email service such as SendGrid, Mandrill, or Mailgun. This is the best way to make sure your mail actually gets delivered.
* You may need an external cron trigger for some types of CMS.
* Debugging Let's Encrypt failures requires viewing the ddev-router logs with `docker logs ddev-router`
* A malicious attack on a website hosted with `use_hardened_images` will likely not be able to do anything significant to the host, but it can certainly change your code, which is mounted on the host.
Expand Down
1 change: 0 additions & 1 deletion docs/users/extend/config_yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ the .ddev/config.yaml is the primary configuration for the project.
| project_tld | defaults to "ddev.site" so project urls become "someproject.ddev.site" | This can be changed to anything that works for you; to keep things the way they were before ddev v1.9, use "ddev.local" |
| ngrok_args | Extra flags for ngrok when using the `ddev share` command | For example, `--subdomain mysite --auth user:pass`. See [ngrok docs on http flags](https://ngrok.com/docs#http) |
| disable_settings_management | defaults to false | If true, ddev will not create or update CMS-specific settings files | |
| provider| hosting provider for `ddev pull` | "pantheon" or "ddev-live" or "default" |
| hooks | | See [Extending Commands](../extending-commands.md) for more information. |
| no_project_mount | Skip mounting the project into the web container | If true, the project will not be mounted by ddev into the web container. This is to enable experimentation with alternate file mounting strategies. Advanced users only! |

Expand Down

0 comments on commit 20ac1db

Please sign in to comment.