Closed BenjaminVadant closed 5 years ago
Hi @BenjaminVadant,
I'm not able to reproduce your issue with Kuzzle 1.6.0. Here is the docker-compose file I used:
version: '2'
services:
kuzzle:
image: kuzzleio/kuzzle:1.6.0
ports:
- "7512:7512"
cap_add:
- SYS_PTRACE
depends_on:
- redis
- elasticsearch
volumes:
- "./kuzzle:/var/app"
environment:
- kuzzle_services__db__client__host=http://elasticsearch:9200
- kuzzle_services__internalCache__node__host=redis
- kuzzle_services__memoryStorage__node__host=redis
- NODE_ENV=development
redis:
image: redis:3.2
elasticsearch:
image: kuzzleio/elasticsearch:5.4.1
environment:
- cluster.name=kuzzle
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
About the createFirstAdmin
action of the CLI, it's simply use the security:createFirstAdmin route from the API. Here you can the query send to Kuzzle through the Javascript SDK.
Actually, I'm having this issue with all commands of the kuzzle CLI.
My docker-compose file is fairly similar (I'm using version 3 of docker compose)
I found the issue: in kuzzle:1.6.0, here https://github.com/kuzzleio/kuzzle/blob/1.6.0/bin/commands/sendAction.js#L51
the first parameter is a string but in the kuzzle-sdk beta 6: https://github.com/kuzzleio/sdk-javascript/blob/6.0.0-beta-6/src/Kuzzle.js the constructor expects directly the protocol object.
So the build 1.6.0 is not good when using the kuzzle CLI. I'm surprise that you were able to make it work... can you check which version of the kuzzle sdk you have installed on it?
@ffly4u @BenjaminVadant
Ok I managed to reproduce. Actually I was using the 1.6.0
version of the code but didn't do a new npm install so the kuzzle-sdk version was the latest and not 6.0.0-beta-6
.
The CLI has been fixed in 1.6.4. (See https://github.com/kuzzleio/kuzzle/pull/1249)
We are aware that the CLI is not part of our test suite and that many improvement could be done but unfortunately we have other priorities for now.
For your usecase, you can use a simple Node.js script that call the corresponding API action so you can automate the setup of Kuzzle instances.
An other way would be the use a default securities definitions with your default roles, profiles and user. This file can then be loaded using the --securities
option of the CLI start command.
Hi,
when trying to run the following command: kuzzle createFirstAdmin, I'm getting an error before entering any inputs.
Expected Behavior
I should be able to enter details for the first admin
Current Behavior
An error is thrown:
Steps to Reproduce
docker exec -it kuzzle /bin/bash
kuzzle createFirstAdmin
Context (Environment)
Kuzzle version: 1.6.0 Node.js version: v8.11.3 SDK version: ^6.0.0-beta-6
Additional request
Would it be possible to have an "non-interactive" version of this command in order to easily automate setting up kuzzle instances.