hi guys, I am getting this error when I try to ru...
# docker
a
hi guys, I am getting this error when I try to run
docker/sdk bootstrap
for the first time File “./deploy.yml” is not accessible. what should I do?
a
Where is the screenshot? 🙂
a
😄
a
Not that small... 😄
I hoped to see if it's windows\wsl2 or not. 🙂
a
I am running it on mac
I am running on the root dir of my existing spryker project
a
Is deploy.yml file there? 🙂
a
nope ..
a
I can't recall a single problem if the file is there and you run docker/sdk from project's root.
But then you need to specify what deploy file to use instead. 🙂
a
but this is the first time I am running it
a
Without arguments bootstrap is trying to use deploy.yml.
a
I thought I just need to run the command
can I use ci/deploy.dev.yml as a boilerplate?
a
Don't think so.
a
how can I start it then?
a
If the project previously didn't have a deploy file and you used vagrant as dev env, please look at the https://github.com/spryker-shop/b2c-demo-shop/blob/master/deploy.dev.yml as an example.
Having such a deploy file, just run
docker/sdk boot deploy.dev.yml
.
a
I am working on b2b is it different?
a
a
ok thanks
👍🏻
a
Can you share more context please? 🙂 Is it an old project that was developed via vagrant devvm? And now you would like to switch to docker/sdk one?
a
so we have an old project developed on Vagrant … recently we upgraded Spryker to 202009,
now we are planning to use docker for dev env
I started by looking at the sdk page on github
I thought the commands in the readme file to be how we should bootstrap
a
We had a migration guide once. Let me try to find it.
a
that would be great
thank you
one more thing : when I first run the command it complained that I have docker-compose version 2 and that I should have at least 1.22 😅 , I found out that I have another docker-compose command :
docker-compose-v1
so I did
mv docker-compose docker-compose-v2
and
mv docker-compose-v1 docker-compose
does this look ok ?
c
You can disable docker compose v2. Open docker preferences and you should see “disable docker compose v2” or something similar
or using cli
Copy code
docker-compose disable-v2
1
🙂 1
a
thanks I will try this
a
Yep, there is a checkbox in the Docker Desktop to use composer v2.
a
Thank you very much I will look at it
Hi @average-branch-45579 I am getting this error when I try to start
Copy code
Elastica\Exception\Connection\HttpException - Exception: Couldn't connect to host, Elasticsearch down? 
in /data/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php (190)

Command: vendor/bin/console search:setup:sources
I saw this but it talks about
Exception: Couldn't resolve host
not
Exception: Couldn't connect to host, Elasticsearch down?
any clue?
c
@acoustic-businessperson-27970 make sure that you gave Docker enough resources to start all containers.
a
I cannot give 14GB Ram!! hahah
I have 16 only
I gave 6 of them to docker
c
well, you don’t need so much, but as much as you can
a
btw I dont see a container for elastic search .. which one is it?
c
it is probably not running because it couldn’t start. Try giving docker more resources, restart the daemon and try docker/sdk up again
a
but in this case it should show an error?
I dont see errors
a
a
I copied the docker.dev.yaml as is without change from b2b demo shop code
👍 1
both store and service are defined
oh btw I found the search container
but there are no errors in the log
can I run something like verndor/bin/install I remember that we could something like that in gateway container but how?
a
docker/sdk cli
and there you will be able to run any console commands. But workflows are a bit different in docker env. For example you can just "reset" demo data by running
docker/sdk demo
. Or build the project after you checked out other branch by running
docker/sdk build
. Or reset the project completely (like vendor/bin/install) by running
docker/sdk reset
.
a
hmm thanks
I will try to do some debugging
it looks like the configs got mixed because I included a file in the docker config that shulld not be there
but now I get an exception Elastica\Exception\ResponseException - Exception: Root mapping definition has unsupported parameters:
a
This sounds like ES version mismatch. For example you have ES v7 defined in the deploy file but project's modules support only ES v6.
Please check
spryker/elastica
in you composer lock file. If it's v6, then it supports ES v7. If it's v5, it supports ES v6 only.
a
good then I have to change my docker.dev.yml to list es version 6 instead of 7
a
elastic search in my project is 6.6 I set the search service to use 6.8 Now I am getting this error
Copy code
Elastica\Exception\ResponseException - Exception: [include_in_all] is not allowed for indices created on or after version 6.0.0 as [_all] is deprecated. As a replacement, you can use an [copy_to] on mapping fields to create your own catch all field. [reason: Failed to parse mapping [page]: [include_in_all] is not allowed for indices created on or after version 6.0.0 as [_all] is deprecated. As a replacement, you can use an [copy_to] on mapping fields to create your own catch all field.]
The command is
Copy code
vendor/bin/console search:setup:sources
I dont remember this command before in my install script (in Vagrant) what is it equivalent to?
a
Some internal feedback:
Copy code
Regarding <https://docs.spryker.com/docs/scos/dev/back-end-development/data-manipulation/data-interaction/search/configuring-elasticsearch.html#defining-new-indexes-and-mappings> it looks like call updates mapping <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html>

Mapping and (or) indexes are for old EL version needs to be updated.

But it’s not an answer on his question, I don’t know how old project was, let it be one year old.

We are using spryker/install module to init project (command vendor/bin/install, the module uses project’s install config at config/install.
One year old .yml files contain such EL related commands:
vendor/bin/console search:setup:indexes
vendor/bin/console search:setup:index-map
 Will assume that's the answer :)
a
so I found out that my ES is v5.6 so I changed the service definition to use 5.6 but now search container is not starting 😞
a
Please do
docker system prune -a && docker system prune --volumes
. Volumes for different ES versions are not compatible.
Of course if you don't have other projects running in docker and there is something important...
a
thanks I did that 😄 and it could start the search container 🎉