Comments (9)
Hi @rfay
thanks to @lolautruche, i understand what i was missing and maybe i misunderstood the starting point of this addon, which is : "having a project already configure for using ddev (aka. ddev config
already executed)"
and the addon permit to copy/duplicate the existing PSH provisioning".
So, if i recap :
- first step is to download PSH project, using
platform get <IDProject>
- run
ddev config
- then we can use the command
ddev get platformsh/ddev-platformsh
and it will read PSH provisioning and create docker containers.
so, as a suggestion, maybe next steps for this addons should/could be :
- if
ddev get platformsh/ddev-platformsh
and there is no config.yaml file --> ask to user if we need to execute it? - if config.yaml exists but no sources exists in the current folder (no .platform.app.yaml file) --> ask the user to download the project using
platform get <ProjectID>
(or ideally, ddev run it for him with: PSH login, then user choose a project in the list of existing PSH projects and runplatform get <choosenProjectId)
)...
My 2 cents
ps: you can close the issue :P
from ddev-platformsh.
ok,
so now, my Symfony project seems to be configured but with an error at the end, while getting DATABASE infos
flovntp@VNTP-Book-2 sfcon2022-workshop-ddev % ddev get platformsh/ddev-platformsh
Downloading https://api.github.com/repos/platformsh/ddev-platformsh/tarball/v0.4.3
v0.4.3_3495880585.tar.gz 96.44 KiB / ? [------------------------------------------------=------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 987.51% 0s
Please enter your platform.sh token:
XXXXXXXXX-XXXX-XXXX-XXXX-XXXXdbd638
Global configuration:
instrumentation-opt-in=true
omit-containers=[]
web-environment=[BLACKFIRE_CLIENT_ID=XXXX,BLACKFIRE_CLIENT_TOKEN=XXXX,BLACKFIRE_SERVER_ID=XXXX,BLACKFIRE_SERVER_TOKEN=XXXX,PLATFORMSH_CLI_TOKEN=XXXXXXXXX-XXXX-XXXX-XXXX-XXXXdbd638]
mutagen-enabled=false
nfs-mount-enabled=false
router-bind-all-interfaces=false
internet-detection-timeout-ms=3000
disable-http2=false
use-letsencrypt=false
letsencrypt-email=
table-style=default
simple-formatting=false
auto-restart-containers=false
use-hardened-images=false
fail-on-hook-fail=false
required-docker-compose-version=
use-docker-compose-from-path=false
no-bind-mounts=false
project-tld=
PLATFORMSH_CLI_TOKEN set globally
Please enter your platform.sh project ID (like '6k4ypl5iendqd'):
4qqp5j5vtvnom
platform_project = '4qqp5j5vtvnom'
You are reconfiguring the project at /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev.
The existing configuration will be updated and replaced.
Configuring unrecognized codebase as project type 'php' at /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev/_www
v1.21.3: Pulling from drud/ddev-webserver
e54debc59c92: Pulling fs layer
e54debc59c92: Download complete
e54debc59c92: Pull complete
Digest: sha256:XXXXXXXXX
Status: Downloaded newer image for drud/ddev-webserver:v1.21.3
docker.io/drud/ddev-webserver:v1.21.3
Configuration complete. You may now run 'ddev start'.
PLATFORM_PROJECT set to 4qqp5j5vtvnom
You are reconfiguring the project at /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev.
The existing configuration will be updated and replaced.
Configuring unrecognized codebase as project type 'php' at /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev/_www
Configuration complete. You may now run 'ddev start'.
Please enter your platform.sh project environment (like 'main'):
You are reconfiguring the project at /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev.
The existing configuration will be updated and replaced.
Configuring unrecognized codebase as project type 'php' at /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev/_www
Configuration complete. You may now run 'ddev start'.
Installed file /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev/.ddev/web-build/Dockerfile.platformsh
Installed file /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev/.ddev/homeadditions/.bashrc.d/platformsh-environment.sh
Installed file /Users/flovntp/Sites/Customers/PlatformSH/sfcon2022-workshop-ddev/.ddev/providers/platform.yaml
Installed file /Users/flovntp/.ddev/commands/web/platform
could not process post-install action '#ddev-nodisplay
cd ..
unset DDEV_DEBUG
project_type=$(ddev describe -j | jq -r .raw.type)
case $project_type in
laravel)
# TODO: This depends on perl, but we can't start the project unless these are created
# so can't use ddev exec yet.
perl -p -e 's/DB_(HOST|DATABASE|USERNAME|PASSWORD)=(.*)/DB_\1=db/g' .env.example >.env
perl -pi.bak -e "s#APP_URL=.*#APP_URL=${DDEV_PRIMARY_URL}#g" .env
;;
drupal9)
mkdir -p .drush
;;
esac
': Unable to run action set -eu -o pipefail
#ddev-nodisplay
cd ..
unset DDEV_DEBUG
project_type=$(ddev describe -j | jq -r .raw.type)
case $project_type in
laravel)
# TODO: This depends on perl, but we can't start the project unless these are created
# so can't use ddev exec yet.
perl -p -e 's/DB_(HOST|DATABASE|USERNAME|PASSWORD)=(.*)/DB_\1=db/g' .env.example >.env
perl -pi.bak -e "s#APP_URL=.*#APP_URL=${DDEV_PRIMARY_URL}#g" .env
;;
drupal9)
mkdir -p .drush
;;
esac
: exit status 127, output=bash: line 4: jq: command not found
So i guess it is the step where you try to find in the environment variable, all info about DATABASE_* ?
Let me know, i could help on this part.
from ddev-platformsh.
It's probably because you don't have jq
locally. Can you please try to install it?
brew install jq
from ddev-platformsh.
you're right, now it's fine :
...
Installed file /Users/flovntp/.ddev/commands/web/platform
Downloaded add-on platformsh/ddev-platformsh, use `ddev restart` to enable.
Please read instructions for this addon at the source repo at
https://github.com/platformsh/ddev-platformsh
Please file issues and create pull requests there to improve it.
from ddev-platformsh.
However, I didn't know that DDEV required jq
, and if so, it should be marked as a dependency in the Homebrew formula. Did you install it (DDEV itself) with Homebrew or using another way?
from ddev-platformsh.
homebrew
from ddev-platformsh.
Could you please report an issue about this on DDEV Homebrew tap?
https://github.com/drud/homebrew-ddev/issues
from ddev-platformsh.
I didn't think there was anything in the current release of this add-on that required jq, but there is.
There's nothing about ddev that requires jq, it's just that this add-on uses it one place. That's a mistake. So no need to fiddle with homebrew tap
from ddev-platformsh.
This is important to solve, both because we don't want to depend on user configuration, but also because base64
, for example, behaves differently on macOS than on Linux. So we'll need a small docker image or something.
from ddev-platformsh.
Related Issues (20)
- shasum is also required and must be handled
- Support redis 7.0 + 6.2 HOT 3
- How to override platform.sh environment variables set in `.ddev/config.platformsh.yaml` ? HOT 5
- ddev get ddev/ddev-platformsh ends with Syntax Error (Ibexa) HOT 9
- Problem on MacOs with base64 option HOT 2
- Python-based app fails to start HOT 2
- Support `composer_version: 2.5.x` or warn if it is not supported HOT 1
- There are no commands defined in the "self" namespace. HOT 1
- upstream value in `PLATFORM_ROUTES` is incorrect HOT 2
- Move ddev-platformsh to drud org and make official HOT 3
- Consider `settings_management_disabled: true` for platform.sh projects
- Remove PLATFORM_MOUNTS and PLATFORM_DIR
- Environment variables must be set much earlier for php-fpm HOT 7
- Tests aren't valid if they don't get to content-checking point HOT 1
- config files and config mismatches HOT 1
- Support multi-app configuration (.platform.app.yaml isn't always in the root (and applications.yaml is a thing too)) HOT 10
- Homebrew base64 does not support `base64 -w` HOT 18
- interface conversion: interface {} is bool, not string HOT 6
- Magento2 doesn't work with add-on: "Cannot find the main route for Magento. Please add `id: magento_route` to your routes.yaml" HOT 6
- [docs] README should explain that `ddev get` is when config translation happens, and you need to repeat if changing Platform config
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddev-platformsh.