Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import robotsTxt from "astro-robots-txt"
import searchIndex from "./src/lib/search-index.js"
import sitemap from "@astrojs/sitemap"
import tailwindcss from "@tailwindcss/vite"
import widont from "rehype-widont"
import { addCopyButton } from "shiki-transformer-copy-button"

// https://astro.build/config
Expand Down Expand Up @@ -63,7 +62,6 @@ export default defineConfig({
},
remarkPlugins: [remarkReadingTime],
rehypePlugins: [
widont,
plainTextPlugin({
contentKey: "plainText",
removeEmoji: false,
Expand Down
680 changes: 210 additions & 470 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"reading-time": "^1.5.0",
"rehype-widont": "^0.1.1",
"sanitize-html": "^2.11.0",
"sass": "^1.68.0",
"sharp": "^0.32.6",
Expand Down
6 changes: 3 additions & 3 deletions src/content/blog/amd64-on-apple-silicon-ddev.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To use these techniques, you _must_ enable Apple's virtualization layer, Rosetta

OrbStack is a great Docker provider; super lightweight and performant, and it does [nice emulation](https://docs.orbstack.dev/docker/#intel-x86-emulation) using your Mac's Rosetta system. Enable "Use Rosetta to run Intel code" in the "system" section of OrbStack's settings.

```
```bash
ddev poweroff
docker rm -f $(docker ps -aq)
export DOCKER_DEFAULT_PLATFORM=linux/amd64
Expand All @@ -49,7 +49,7 @@ You **must** enable "Use Rosetta for `x86_64/amd64` emulation on Apple Silicon"

Then:

```
```bash
ddev poweroff
docker rm -f $(docker ps -aq)
export DOCKER_DEFAULT_PLATFORM=linux/amd64
Expand All @@ -58,7 +58,7 @@ ddev start

## 3. Use [Colima](https://github.com/abiosoft/colima) with an AMD64 setting

```
```bash
ddev poweroff
colima stop
colima start amd64 --arch x86_64 --cpu 4 --memory 6 --disk 100 --dns=1.1.1.1
Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/amd64-with-rosetta-on-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Sometimes the problem is _adding_ software that is Intel-specific to the DDEV we

On an Apple Silicon machine you might get an ugly error like this when doing `ddev npm install gifsicle`:

```
```text
npm error OrbStack ERROR: Dynamic loader not found: /lib64/ld-linux-x86-64.so.2
npm error
npm error This usually means that you're running an x86 program on an arm64 OS without multi-arch libraries.
Expand Down
4 changes: 2 additions & 2 deletions src/content/blog/anatomy-advanced-ddev-addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Let’s go through the way integration is built.

To download the app we use `install.yaml` post_install_actions:

```
```yaml
- rm -rf diffy-worker && mkdir diffy-worker
- docker run -it --rm -v ./diffy-worker:/diffy-worker --user $DDEV_UID:$DDEV_GID ddev/ddev-utilities bash -c "cd /diffy-worker && wget -qO- https://github.com/DiffyWebsite/diffy-worker/archive/refs/heads/main.tar.gz | tar xz --strip-components=1"
```
Expand Down Expand Up @@ -63,7 +63,7 @@ Another interesting trick is that if that user tries to run `npm install` system

We follow DDEV path to build the Docker container for multiple architectures:

```
```bash
docker buildx build --push --platform $(BUILD_ARCHS) -t $(DOCKER_REPO):$(VERSION) --label "build-info=$(DOCKER_REPO):$(VERSION) commit=$(shell git describe --tags --always) built $$(date) by $$(id -un) on $$(hostname)" --label "maintainer=Diffy <info@diffy.website>" $(DOCKER_ARGS) .
```

Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/ddev-add-on-maintenance-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Here are some high-level practices to follow:
- Take inspiration from the [official add-ons](https://addons.ddev.com/), see how they're structured and follow similar practices
- Keep an eye on updates in [ddev-addon-template](https://github.com/ddev/ddev-addon-template)
- Track changes in [DDEV releases](https://github.com/ddev/ddev/releases)
- Configure your add-on [repository settings](#repository-configuration-bestpractices)
- Configure your add-on [repository settings](#repository-configuration-best-practices)
- Add the `ddev-get` [topic](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics) to your GitHub repository if it should be discoverable by the wider community. (If your add-on is currently just an experiment or a fork, wait until it matures to add the topic.)
- Write a clear [description](https://github.com/orgs/community/discussions/60507) and include relevant keywords to improve discoverability
- Use `#!/usr/bin/env bash` instead of `#!/bin/bash` at the top of your command scripts, it's more portable and works better across different environments.
Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/ddev-and-xz-backdoor.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ When news of this originally hit I quickly investigated and found no reason to t

- The XZ Backdoor only found its way into distributions like Arch Linux and Debian Testing (and Homebrew) that have rolling releases, meaning that they take every upstream release as it comes in. DDEV images use only stable upstream distributions, including Debian 11 Bullseye, Debian 12 Bookworm, and Ubuntu 20.04, which don't receive "hot" releases like that.
- DDEV bundles `xz` only in `ddev-dbserver`. We can see that `ddev-dbserver` has an unaffected version of xz. In any version of DDEV we can use `ddev exec -s db xz --version` to see the installed version. In various versions of the ddev-dbserver I am only able to see version 5.2.5 and 5.2.4, but check it for yourself:
```
```text
$ ddev exec -s db xz --version
xz (XZ Utils) 5.2.5
liblzma 5.2.5
Expand Down
21 changes: 11 additions & 10 deletions src/content/blog/ddev-on-linux-in-10-minutes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ _This screencast walks you through setting up a complete DDEV development enviro
Here's what happens in this screencast. You can do it yourself in just a few minutes. We're using [DDEV's get-started](/get-started), but of course there is far more detail in the [DDEV docs](https://docs.ddev.com), explaining how to use other distros or other install techniques.

1. Install Docker CE. Use the `apt` repository technique from [Docker's docs](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository).
- Do the post-install one-time action:

- Do the post-install one-time action:
```bash
sudo usermod -aG docker $USER
```
- We could log out and log back in, but instead for now:
```bash
newgrp docker
```
```bash
sudo usermod -aG docker $USER
```

2. Install DDEV, using the `apt` repository technique from [get-started](/get-started).
- We could log out and log back in, but instead for now:

```bash
newgrp docker
```

- `ddev --version` shows us being working fine with current stable.
2. Install DDEV, using the `apt` repository technique from [get-started](/get-started).
- `ddev --version` shows us being working fine with current stable.

3. One-time `mkcert -install` helps your browser trust DDEV's HTTPS certificates.
4. Check out a project. I used [rfay/d11](https://github.com/rfay/d11), a trivial demo Drupal 11 project. (DDEV's [quickstarts show many different project types](https://docs.ddev.com/en/stable/users/quickstart/) with quick startup.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In brief, [Acquia](https://www.acquia.com/) has open sourced their [Drupal migra

My Drupal migration odyssey began a few months ago with no Drupal 8+ knowledge whatsoever. It took me about 100 hours to migrate my slightly complex Drupal 7 website of _(12 custom content types, 200 custom fields, 2,500 images and documents, and a few hundred pages)_, to a 65% functional Drupal 10 site. Comparatively in a single afternoon I was able to get an 80% functional Drupal 9 website with AM:A. I hope this illustrates the power of AM:A.

[A table below compares the _learn-everything-from-scratch "traditional"_ migration from Drupal 7 to Drupal 10, to the same site migration with AM:A to Drupal 9](#comparing-traditional-migration-in-d10-to-amad9).
[A table below compares the _learn-everything-from-scratch "traditional"_ migration from Drupal 7 to Drupal 10, to the same site migration with AM:A to Drupal 9](#comparing-traditional-migration-in-d10-to-ama-d9).

Drupal 9 is the only tested path at the time of this posting. [Drupal 9 was EoL on November 1st, 2023](https://www.drupal.org/psa-2023-11-01), and [Drupal 7 will be EoL on January 5th, 2025](https://www.drupal.org/psa-2023-06-07). The community can work together to [get AM:A working with Drupal 10](https://www.drupal.org/project/acquia_migrate/issues/3399733). Please contribute if you can help move this forward.

Expand All @@ -47,20 +47,20 @@ My system information is as follows:

Create a new DDEV project directory on your local machine.

```
```bash
mkdir ddev-ama-project
```

Move into the `ddev-ama-project` directory and create subdirectories for both the D7 and D9 sites.

```
```bash
cd ddev-ama-project
mkdir d7 d9
```

Copy all of your Drupal 7 files to your newly created project's `d7` subdirectory so that your files are organized as:

```
```bash
cp -r ~/my-drupal7-source-files/ d7/
...snip...
/sites/default/settings.php
Expand All @@ -76,19 +76,19 @@ cp -r ~/my-drupal7-source-files/ d7/

Create the DDEV project (_still within the newly created `ddev-ama-project` directory_).

- For maximum compatibility we are using `php7.4`. You could use `php8.1`, but you will likely encounter errors on your Drupal 7 site. We can always [reconfigure DDEV later](#additional-notes-andtips) to use `php8.1` for the migrated D9 site after our AM:A migration is complete.
- For maximum compatibility we are using `php7.4`. You could use `php8.1`, but you will likely encounter errors on your Drupal 7 site. We can always [reconfigure DDEV later](#additional-notes-and-tips) to use `php8.1` for the migrated D9 site after our AM:A migration is complete.
- We are adding two hostnames; `d7ama-www` for **Drupal 7**, and `d9ama-www` for **Drupal 9**.

```
```bash
ddev config --project-type=drupal7 \
--php-version=7.4 \
--docroot="d7/" \
--additional-hostnames="d7ama-www,d9ama-www"
--php-version=7.4 \
--docroot="d7/" \
--additional-hostnames="d7ama-www,d9ama-www"
```

**Next, import the D7 database** to the new project. This operation adds the file `settings.ddev.php` to the `d7/sites/default` local DDEV project with the `db:db@db` credentials, imports the database, and starts the new DDEV project.

```
```bash
ddev import-db --file=../drupal7-www-database.sql
```

Expand All @@ -103,30 +103,30 @@ We will use the conveniently included version of [ACLI](https://docs.acquia.com/

Run the following command:

```
```bash
ddev exec php8.1 /usr/local/bin/acli \
app:new:from:drupal7 \
--drupal7-directory=/var/www/html/d7 \
--directory=/var/www/html/d9
app:new:from:drupal7 \
--drupal7-directory=/var/www/html/d7 \
--directory=/var/www/html/d9
```

![new D9 site has been scaffolded with the help of acli](/img/blog/2023/11/ddev-ama-blog-2-d9-acli-created.png)

The new Drupal 9 site scaffolding has been created with information from _your_ Drupal 7 site!

<mark>**Important**</mark> - SSH into the DDEV container to install the D9 site.
**Important** - SSH into the DDEV container to install the D9 site.

```
```bash
ddev ssh
```

**The command above logs you into the <mark>`/var/www/html/d7`</mark> directory, you need to change to the <mark>`/var/www/html/d9`</mark> directory** to accomplish the following:
**The command above logs you into the `/var/www/html/d7` directory, you need to change to the `/var/www/html/d9` directory** to accomplish the following:

- Install the D9 site within our single DDEV project.
- Create the D9 DDEV database named: `dbd9`.
- Configure the D9 `settings.php` with the appropriate database credentials.

```
```bash
cd ../d9

vendor/bin/drush site-install \
Expand All @@ -143,55 +143,55 @@ The new D9 site has been `site-install`ed!

### Install and configure Acquia Migrate: Accelerate (AM:A)

Initiate the AM:A magic with the following commands <mark>**_(remember we are still within the `ssh` session of the DDEV project)_**</mark>. _(Note for clarity: we are running the **D9** included version of `vendor/bin/drush` on the **D9** site. Running `drush` otherwise or elsewhere would affect the **D7** site.)_
Initiate the AM:A magic with the following commands **_(remember we are still within the `ssh` session of the DDEV project)_**. _(Note for clarity: we are running the **D9** included version of `vendor/bin/drush` on the **D9** site. Running `drush` otherwise or elsewhere would affect the **D7** site.)_

```
```bash
jq -r '.installModules[]' < acli-generated-project-metadata.json | xargs php -d memory_limit=512M vendor/bin/drush pm:install -y
```

_(the above installs all modules whose migration recommendations have been vetted, to ensure those migrations are available out of the box)_

```
```bash
vendor/bin/drush state:set --input-format=json acquia_migrate.initial_info - < acli-generated-project-metadata.json
```

_(the above provides all the metadata to the AM:A Drupal module's Module Auditor UI by storing it in Drupal's state )_

### <mark>Log out of the `ddev ssh` session</mark>, and modify the DDEV project to serve a second URL for the d9 site:
### Log out of the `ddev ssh` session, and modify the DDEV project to serve a second URL for the d9 site:

```
```bash
logout

cp .ddev/nginx_full/seconddocroot.conf.example .ddev/nginx_full/nginx-site2-d9.conf
```

Use the text editor of your choice to edit your newly created `nginx-site2-d9.conf` file.

```
```bash
vi .ddev/nginx_full/nginx-site2-d9.conf
```

Remove line #3 from the `nginx-site2-d9.conf` file.

```
```text
#ddev-generated
```

Change line #9 of `nginx-site2-d9.conf` to your D9 docroot:

```
```text
root /var/www/html/d9/docroot;
```

Change line #12 of `nginx-site2-d9.conf` to your D9 site URL:

```
```text
server_name d9ama-www.ddev.site;
```

<mark>**Save `nginx-site2-d9.conf` changes and restart DDEV**</mark>. DDEV must be restarted to serve the new D9 docroot. Until it's restarted DDEV will continue to serve the D7 site at all configured project URLs.
**Save `nginx-site2-d9.conf` changes and restart DDEV**. DDEV must be restarted to serve the new D9 docroot. Until it's restarted DDEV will continue to serve the D7 site at all configured project URLs.

```
```bash
ddev restart
```

Expand All @@ -210,49 +210,50 @@ Proceed with AM:A configuration, after _Step 2_ below you can refresh the browse

3. **Configure your source database.** Using the text editor of your choice, add your **D7** database information to your **D9** `settings.php`.

```
vi d9/docroot/sites/default/settings.php
```

```
$databases['migrate']['default'] = array (
'database' => 'db',
'username' => 'db',
'password' => 'db',
'prefix' => '',
'host' => 'db',
'port' => '',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
```

_(Refresh your browser, and ~~Configure your source database~~ should now be checked off with a strikethrough.)_
```bash
vi d9/docroot/sites/default/settings.php
```

```php
$databases['migrate']['default'] = array (
'database' => 'db',
'username' => 'db',
'password' => 'db',
'prefix' => '',
'host' => 'db',
'port' => '',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
```

_(Refresh your browser, and ~~Configure your source database~~ should now be checked off with a strikethrough.)_

4. **Configure your files directory**. Add this below your recently added database information in `d9/docroot/sites/default/settings.php` to match your use case.

```
// The directory specified here must contain the directory specified in the
// "file_public_path" Drupal 7 variable. Usually: "sites/default/files".
$settings['migrate_source_base_path'] = '/var/www/html/d7';
```php
// The directory specified here must contain the directory specified in the
// "file_public_path" Drupal 7 variable. Usually: "sites/default/files".
$settings['migrate_source_base_path'] = '/var/www/html/d7';

// The directory specified here must contain the directory specified in the
// "file_private_path" Drupal 7 variable. Usually outside the web root.
//$settings['migrate_source_private_file_path'] = '/somewhere/private';
```
// The directory specified here must contain the directory specified in the
// "file_private_path" Drupal 7 variable. Usually outside the web root.
//$settings['migrate_source_private_file_path'] = '/somewhere/private';
```

_(Refresh your browser, and ~~Configure your files directory~~ should now be checked off with a strikethrough.)_
_(Refresh your browser, and ~~Configure your files directory~~ should now be checked off with a strikethrough.)_

5. **Create matching files directory.** My specific instance required modifying the files path to a non-default directory, you may not have this requirement.

_(Refresh your browser, and ~~Create matching files directory~~ should now be checked off with a strikethrough.)_

6. **Choose which data to import from your source site.** Click the link to begin your migration journey following the specific AM:A recommendations for your site!

![Acquia Migrate: Accelerate (AM:A) Choose which data to import from your source site! ](/img/blog/2023/11/ddev-ama-blog-5-ama-check-and-ready.png)
![Acquia Migrate: Accelerate (AM:A) Choose which data to import from your source site! ](/img/blog/2023/11/ddev-ama-blog-5-ama-check-and-ready.png)

## Your AM:A Journey Begins Now!

Off you go! Best of luck on your migration! [Check out additional notes and tips below](#additional-notes-andtips) for more.
Off you go! Best of luck on your migration! [Check out additional notes and tips below](#additional-notes-and-tips) for more.

![Your AM:A Journey Begins Now! ](/img/blog/2023/11/ddev-ama-blog-6-ama-dashboard.png)

Expand Down Expand Up @@ -348,6 +349,6 @@ Looking back, my Drupal 7 site went from zero to a shaky 65% after a grueling 10

- On Windows Terminal WSL2, the GUI is _much_ faster than the CLI of `drush ama:`. The AM:A website GUI took 1 minute to import 1,500 files, the CLI in WSL2 took 9 minutes!
- `ddev snapshot` is your friend, use it as you progress and modify your D7 database. If something goes wrong you can `ddev snapshot restore` to the most recent good snapshot. I saved snapshots about every 20% as the migration progressed such as `ddev snapshot --name ama-project-20-percent`, etc.
- The the DDEV `nginx-site2-d9.conf` NGINX config had to be modified to serve generated images. [NGINX configuration options can interfere with generated thumbnails and image styles for uploaded images](https://www.drupal.org/project/drupal/issues/3120676#comment-15294229).
- The DDEV `nginx-site2-d9.conf` NGINX config had to be modified to serve generated images. [NGINX configuration options can interfere with generated thumbnails and image styles for uploaded images](https://www.drupal.org/project/drupal/issues/3120676#comment-15294229).
- `ddev config --php-version=8.1` will change the PHP version of the project at any time if you want to experiment with updating D9 or D10, be aware this change will introduce php errors on your D7 site.
- Here's a [Gist of Drush scripts for cleaning up various Drupal 7 database issues](https://gist.github.com/RowboTony/acf9ee5afb78b6a29a7a763f56d1fb11) which may be helpful _(as-is, no guarantee or warranty)_.
4 changes: 2 additions & 2 deletions src/content/blog/mariadb-dump-breaking-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The bottom line: **After 15 years of maintaining mostly-compatible client-side t

In DDEV v1.23.1 we mitigated this problem to a certain extent by updating the DDEV v1.23.1 `ddev-dbserver` image. This solved a number of problems related to `ddev import-db` and `ddev export-db` because the format used was the new (breaking-change) MariaDB format. If you see the import failure when you do `ddev import-db` or `ddev export-db` you can update to the newer version using the appropriate command below:

```
```bash
docker pull ddev/ddev-dbserver-mariadb-10.11:v1.23.1
docker pull ddev/ddev-dbserver-mariadb-10.6:v1.23.1
docker pull ddev/ddev-dbserver-mariadb-10.5:v1.23.1
Expand All @@ -46,7 +46,7 @@ However, there are many uses of DDEV where the PHP code on the `ddev-webserver`

## DDEV v1.23.2

We think we have worked around the majority of these cases in DDEV v1.23.2. See the [next section](#what-has-ddev-done-to-mitigate-the-damage-inv1232).
We think we have worked around the majority of these cases in DDEV v1.23.2. See the [next section](#what-has-ddev-done-to-mitigate-the-damage-in-v1232).

However, be aware:

Expand Down
Loading
Loading