DDEV and Ibexa Cloud¶
Two ways are available to run an Ibexa Cloud project locally with DDEV:
- by using the
ddev-platformsh
andddev-ibexa-cloud
add-ons - like other existing project, without these add-ons.
Note
The following examples use Ibexa Cloud CLI (ibexa_cloud
).
With Ibexa Cloud add-ons¶
To configure ddev/ddev-platformsh
add-on and ddev/ddev-ibexa-cloud
add-on, you need a Platform.sh API Token.
The ddev/ddev-platformsh
add-on configures the document root, the PHP version, the database, and the cache pool according to the Ibexa Cloud configuration.
About the search engine, the add-on can configure Elasticsearch but can't configure Solr.
If you use Solr on Ibexa Cloud and want to add it to your DDEV stack, see Clustering with DDEV and ibexa/ddev-solr
add-on.
The ddev/ddev-ibexa-cloud
add-on integrates the ibexa_cloud
command inside the container,
and eases the pull of cloud contents into the local installation.
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.
But the variable must exist for Platform.sh hooks
scripts to work.
To use an auth.json
file for this purpose, see Using auth.json
.
The following sequence of commands:
- Downloads the Ibexa Cloud project from the default environment "production"
into a new directory (for example
my-ddev-project
), using theibexa_cloud
command. (Replace<project-ID>
with the hash of your own project. Seeibexa_cloud help get
for options like selecting another environment). - Configures a new DDEV project.
- Configures the
ddev/ddev-ibexa-cloud
add-on with<project-ID>
, environment name (for example,production
), and application name (for example,app
fromname: app
line in.platform.app.yaml
file). - Configures
ibexa_cloud
command token. See Create an API token for more information. - Ignores
.ddev/
directory from Git. (Some DDEV config could be committed like in this documentation.) - Sets Composer authentication by using an already existing
auth.json
file. - Installs the
ddev/ddev-platformsh
add-on which prompts for the Platform.sh API token, project ID and environment name. - Changes
maxmemory-policy
from defaultallkeys-lfu
to a value accepted by theRedisTagAwareAdapter
. (Check.ddev/config.platformsh.yaml
and adapt if needed. For example, you may have to comment out New Relic.) - Installs the
ddev/ddev-ibexa-cloud
add-on. - Starts the project.
- Gets the content from Ibexa Cloud, both database and binary files by using
ddev pull ibexa-cloud
feature from the add-on. - Displays information about the project services.
- Opens the project in a browser.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Note
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
.
Without Ibexa Cloud add-ons¶
The following example adapts the manual method to run an already existing project to the Platform.sh case:
The following sequence of commands:
- Downloads the Ibexa Cloud Platform.sh project from the default environment "production" into a new directory, using the Ibexa Cloud CLI.
(Replace
<project-ID>
with the hash of your own project. Seeibexa_cloud help get
for options like selecting another environment). - Configures a new DDEV project.
- Ignores
.ddev/
directory from Git. (Some DDEV config could be committed like in this documentation.) - Starts the DDEV project.
- Sets Composer authentication.
- Gets the database content from Platform.sh.
- Imports this database content into DDEV project's database.
- Downloads the Platform.sh public/var locally to have the content binary files.
- Install the dependencies and run post-install scripts.
- Displays information about the project services.
- Opens the DDEV project in a browser.
1 2 3 4 5 6 7 8 9 10 11 |
|
From there, services can be added to get closer to Ibexa Cloud Platform.sh architecture.
.platform/services.yaml
indicates the services used.
For more information, see Clustering with DDEV.