You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ibexa_cloud/ddev_and_ibexa_cloud.md
+27-24Lines changed: 27 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,59 +6,62 @@ description: Use DDEV to run an Ibexa Cloud project locally.
6
6
7
7
Two ways are available to run an [[= product_name_cloud =]] project locally with DDEV:
8
8
9
-
-[by using the Platform.sh's `ddev-platformsh` add-on](#with-the-ddev-platformsh-add-on)
10
-
-[like other existing project, without this add-on](#without-the-platformsh-add-on).
9
+
-[by using the `ddev-platformsh`and `ddev-ibexa-cloud`add-ons](#with-ibexa-cloud-add-ons)
10
+
-[like other existing project, without these add-ons](#without-ibexa-cloud-add-ons).
11
11
12
12
!!! note
13
13
14
14
The following examples use [[[= product_name_cloud =]] CLI (`ibexa_cloud`)](https://cli.ibexa.co/).
15
15
16
-
## With the `ddev-platformsh` add-on
16
+
## With Ibexa Cloud add-ons
17
17
18
-
To configure the [`ddev/ddev-platformsh` add-on](https://github.com/ddev/ddev-platformsh), you need a [Platform.sh API Token](https://docs.platform.sh/administration/cli/api-tokens.html).
18
+
To configure [`ddev/ddev-platformsh` add-on](https://github.com/ddev/ddev-platformsh) and [`ddev/ddev-ibexa-cloud` add-on](https://github.com/ddev/ddev-ibexa-cloud), you need a [Platform.sh API Token](https://docs.platform.sh/administration/cli/api-tokens.html).
19
19
20
20
The `ddev/ddev-platformsh` add-on configures the document root, the PHP version, the database, and the cache pool according to the [[= product_name_cloud =]] configuration.
21
21
About the search engine, the add-on can configure Elasticsearch but can't configure Solr.
22
22
If you use Solr on [[= product_name_cloud =]] and want to add it to your DDEV stack, see [Clustering with DDEV and `ibexa/ddev-solr` add-on](clustering_with_ddev.md#solr).
23
23
24
-
`COMPOSER_AUTH` from Platform.sh can't be used, because JSON commas are incorrectly interpreted by `--web-environment-add`, which sees them as multiple variable separators.
24
+
The `ddev/ddev-ibexa-cloud` add-on integrates the `ibexa_cloud` command inside the container,
25
+
and eases the pull of cloud contents into the local installation.
26
+
27
+
`env:COMPOSER_AUTH` from Platform.sh can't be used, because JSON commas are incorrectly interpreted by `--web-environment-add`, which sees them as multiple variable separators.
25
28
But the variable must exist for Platform.sh `hooks` scripts to work.
26
29
To use an `auth.json` file for this purpose, see [Using `auth.json`](install_with_ddev.md#using-authjson).
27
30
28
-
You must remove Node.js and NVM installations as they're already included in DDEV.
29
-
30
31
The following sequence of commands:
31
32
32
-
1. Downloads the [[= product_name_cloud =]] Platform.sh project from the default environment "production" into a new directory, based on the [Platform.sh CLI alias `ibexa_cloud` defined in introduction](#ibexa-cloud-and-ddev).
33
-
(Replace `<project-ID>` with the hash of your own project.
33
+
1. Downloads the [[= product_name_cloud =]] project from the default environment "production"
34
+
into a new directory (for example `my-ddev-project`), using the [`ibexa_cloud` command](https://cli.ibexa.co/).
35
+
(Replace `<project-ID>` with the hash of your own project.
34
36
See [`ibexa_cloud help get`](https://docs.platform.sh/administration/cli.html#3-use) for options like selecting another environment).
35
37
1. Configures a new DDEV project.
38
+
1. Configures the `ddev/ddev-ibexa-cloud` add-on with `<project-ID>`, environment name (for example, `production`),
39
+
and application name (for example, `app` from `name: app` line in `.platform.app.yaml` file).
40
+
1. Configures `ibexa_cloud` command token. See [Create an API token](https://docs.platform.sh/administration/cli/api-tokens.html#2-create-an-api-token) for more information.
36
41
1. Ignores `.ddev/` directory from Git.
37
-
(Some DDEV config could be committed like in [this documentation](https://ddev.readthedocs.io/en/latest/users/extend/customization-extendibility/#extending-configyaml-with-custom-configyaml-files).)
42
+
(Some DDEV config could be committed like in [this documentation](https://ddev.readthedocs.io/en/latest/users/extend/customization-extendibility/#extending-configyaml-with-custom-configyaml-files).)
38
43
1. Sets Composer authentication by using an already existing `auth.json` file.
39
-
1. Creates a `public/var` directory if it doesn't exist, to allow the creation of `public/var/.platform.installed` by Platform.sh hook script.
40
44
1. Installs the `ddev/ddev-platformsh` add-on which prompts for the Platform.sh API token, project ID and environment name.
41
-
1. Comments out the Node.js and NVM installations from the hooks copied in `.ddev/config.platformsh.yaml`.
42
-
(In this file, you may have to discard other specific features like New Relic.)
43
45
1. Changes `maxmemory-policy` from default `allkeys-lfu` to a [value accepted by the `RedisTagAwareAdapter`](https://github.com/symfony/cache/blob/5.4/Adapter/RedisTagAwareAdapter.php#L95).
46
+
(Check `.ddev/config.platformsh.yaml` and adapt if needed. For example, you may have to comment out New Relic.)
47
+
1. Installs the `ddev/ddev-ibexa-cloud` add-on.
44
48
1. Starts the project.
45
-
1. Gets the content from Platform.sh, both database and binary files by using `ddev pull platform` feature from the add-on.
46
-
1. Restarts the project.
49
+
1. Gets the content from [[= product_name_cloud =]], both database and binary files by using `ddev pull ibexa-cloud` feature from the add-on.
47
50
1. Displays information about the project services.
sed -i -E "s/( +)(.*nvm (install|use).*)/\1#\2/" .ddev/config.platformsh.yaml
60
+
ddev add-on get ddev/ddev-platformsh
58
61
sed -i 's/maxmemory-policy allkeys-lfu/maxmemory-policy volatile-lfu/' .ddev/redis/redis.conf
62
+
ddev add-on get ddev/ddev-ibexa-cloud
59
63
ddev start
60
-
ddev pull platform -y
61
-
ddev restart
64
+
ddev pull ibexa-cloud -y
62
65
ddev describe
63
66
ddev launch
64
67
```
@@ -67,13 +70,13 @@ ddev launch
67
70
68
71
The Platform.sh API token is set at user profile level, therefore it's stored globally under current user root as `PLATFORMSH_CLI_TOKEN` in `~/.ddev/global_config.yaml`.
69
72
70
-
## Without the Platform.sh add-on
73
+
## Without Ibexa Cloud add-ons
71
74
72
75
The following example adapts the [manual method to run an already existing project](install_with_ddev.md#run-an-already-existing-project) to the Platform.sh case:
73
76
74
77
The following sequence of commands:
75
78
76
-
1. Downloads the [[= product_name_cloud =]] Platform.sh project from the default environment "production" into a new directory, based on the [Platform.sh CLI alias `ibexa_cloud` defined in introduction](#ibexa-cloud-and-ddev).
79
+
1. Downloads the [[= product_name_cloud =]] Platform.sh project from the default environment "production" into a new directory, using the [[[= product_name_cloud =]] CLI](https://cli.ibexa.co/).
77
80
(Replace `<project-ID>` with the hash of your own project. See [`ibexa_cloud help get`](https://docs.platform.sh/administration/cli.html#3-use) for options like selecting another environment).
0 commit comments