gravitee-io / issues

Gravitee.io - API Platform - Issues
64 stars 26 forks source link

Documentation #3351

Closed moyogatomi closed 4 years ago

moyogatomi commented 4 years ago

Wanted to try Gravitee

Expected Behavior

Try dockerazied examples from documentation. One of the reasons of existence of docker is to do -> docker-compose up, and everything runs independently of environment

Current Behavior

After several hours I was not able to make run Gravitees examples -> dockerized nor docker-composed. Basicaly all services has some issue

Possible Solution

Simple, normal, docker composition that just works. I have never seen docker-compose that you present -> Two dependant compositions: common.yml and docker-compose-local.yml without using standard that everyone is used to. Simple is better than complicated

Steps to Reproduce (for bugs)

Follow documentation https://docs.gravitee.io/apim_installguide_docker.html

To be honest I am very disappointed in Gravitee. Why? because after several hours I was not even able to make it run and I really wanted to try it. Why I need complicated docker-composition with analytics and elastic search? I just want to try your api gateway with keycloak.

Do you even care to spread your open source or you just want people to switch to kong or tyk?

NicolasGeraud commented 4 years ago

Hello @moyogatomi .

I don't understand the link between the docker-compose and the Gravitee examples.

Are you able to just launch gravitee or not ? If not please provide your stacktrace. I've tryied and it works well on my laptop. We can find what's going wrong.

If it's about examples, tell us what example is not working.

People choose Gravitee among other things for analytics, that's why we provide it in our docker-compose, to have a full-feature platform.

Your last sentence is rude and has nothing to do in an issue tracker. We are here to help and support the community, not to receive your nervousness.

moyogatomi commented 4 years ago

@NicolasGeraud I followed the documentation and I downloaded both docker-compositions (which are version 2 and use deprecated features like link). No matter what I did, the services simply couldnt connect to elasticsearch

(Example of one of the services) ERROR i.g.e.client.http.HttpClient - Unable to get a connection to Elasticsearch managementapi | java.net.UnknownHostException: failed to resolve 'demo-elasticsearch' after 2 queries

I tried everything possible, even to rewrite it to new version of docker-compose, expose ports, link services with network. Finally I gave up and removed elastic search and all dependencies. And no, gateway simply needs elasticsearch.

I am sorry for being rude. However, the example just doesnt work out of the box. The example is obscure, has 2 docker compositions with deprecated features, and no explanations.

aelamrani commented 4 years ago

Are you sure you have enough resource allocated to docker? Usually you got this when elasticsearch cannot start properly.

NicolasGeraud commented 4 years ago

@moyogatomi what version of docker are you using and what os ?

Please provide your ES container log do understand why is not working.

fintecheando commented 4 years ago

@moyogatomi @NicolasGeraud I faced issues running the docker compose because ES was not starting, it was on a Linux Ubuntu 18.04 LTS, what I did was to add the kernel parameters, which could be added as a note or prerequisite in the documentation. I fixed following this information.

https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

But still I think that the documentation could be improved, I have open a ticket for the Docker Compose repository.

IOhacker commented 4 years ago

Another fix is that the folder "data" created in the path where the docker-compose command was executed and that is being used by ES container must have write/read permisions that can be accomplished running chmod on the HOST server.

brasseld commented 4 years ago

Hi @moyogatomi

You're right, the Docker compose files we are providing are not the simplest one for those who want to try Gravitee.

The reason behind this is that we were looking for a solution to avoid service duplication and run the same Docker compose within multiple environments. This is way you can find multiple docker-compose in https://github.com/gravitee-io/gravitee-docker/tree/master/environments/demo

An other way to go ahead without having to download all the files is to run this command:

curl -L http://bit.ly/graviteeio-apim | bash

But even with that one, you may still encounter an issue with Elasticsearch container. The error:

(Example of one of the services)
ERROR i.g.e.client.http.HttpClient - Unable to get a connection to Elasticsearch
managementapi | java.net.UnknownHostException: failed to resolve 'demo-elasticsearch' after 2 queries

is not an issue from Gravitee and is most probably due to Elasticsearch (see https://github.com/gravitee-io/issues/issues/1274#issuecomment-421572986)

Why? because after several hours I was not even able to make it run and I really wanted to try it.

A Gitter channel is available (https://gitter.im/gravitee-io/gravitee-io). Instead of loosing time on this, please come and ask your questions. I'll be more than happy to help you.

Why I need complicated docker-composition with analytics and elastic search? I just want to try your api gateway with keycloak.

Gravitee.io is not just an API Gateway, it is a complete platform providing tools like:

So yes, Elasticsearch is a required component for us, because analytics is one of the most appreciated feature provided by Gravitee.

To conclude, I think you should have a look to https://github.com/gravitee-io/gravitee-docker/tree/master/platform which is a complete (and single-file based :) ) docker-compose to run the whole platform. And if you want to go ahead, let's have a look this blog post: https://medium.com/graviteeio/5-minutes-to-secure-an-api-with-the-gravitee-ios-stack-34203620eadc

All the best,

brasseld commented 4 years ago

@moyogatomi @NicolasGeraud I faced issues running the docker compose because ES was not starting, it was on a Linux Ubuntu 18.04 LTS, what I did was to add the kernel parameters, which could be added as a note or prerequisite in the documentation. I fixed following this information.

elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

@InfotecMexico There is a ref to the fix here: https://github.com/gravitee-io/issues/issues/1274#issuecomment-421572986

But still I think that the documentation could be improved, I have open a ticket for the Docker Compose repository.

Sorry, but I do not see any ticket for this, can you provide any pointer?