apache / kibble-1

Apache Kibble - a tool to collect, aggregate and visualize data about any software project
https://kibble.apache.org/
Apache License 2.0
58 stars 27 forks source link

Refactor setup scripts as kibble cli command #91

Closed skekre98 closed 3 years ago

skekre98 commented 3 years ago

Hi, really sorry about the delay. I was able to completely migrate the setup workflow to be implemented with click. I am running into a minor error while running create_es_index which I don't believe has anything to do with the new cli implementation. Was wondering if I could get some assistance with figuring out the issue as I am a bit new to ElasticSearch πŸ˜…?

Seems I am receiving a connection error when calling elasticsearch:

elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x111424fd0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x111424fd0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known)

The actual cli commands and arguments are working now though πŸ‘

$ kibble version
1.0.0dev
$ kibble setup --help
Usage: kibble setup [OPTIONS]

Options:
  -u, --uri TEXT          Pre-defined connection uri for ElasticSearch.
  -d, --dbname TEXT       Pre-defined Database prefix.
  -s, --shards TEXT       Predefined number of ES shards.
  -r, --replicas TEXT     Predefined number of replicas for ES.
  -m, --mailhost TEXT     Pre-defined mail server host.
  -a, --autoadmin TEXT    Generate generic admin account.
  -k, --skiponexist TEXT  Skip DB creation if DBs exist.
  --help                  Show this message and exit.
turbaszek commented 3 years ago

@skekre98 have you tried using docker? https://github.com/apache/kibble/blob/main/CONTRIBUTING.md#development-installation

skekre98 commented 3 years ago

@skekre98 have you tried using docker? https://github.com/apache/kibble/blob/main/CONTRIBUTING.md#development-installation

Got it working now, still getting used to the repository πŸ˜… . I've also made the change to the docker compose file to use the new setup workflow with the cli.

$ docker-compose -f docker-compose-dev.yaml up setup
kibble_elasticsearch_1 is up-to-date
Recreating kibble_setup_1 ... 
Recreating kibble_setup_1 ... done
Attaching to kibble_setup_1
setup_1          | Welcome to the Apache Kibble setup script!
setup_1          | Elasticsearch: elasticsearch:9200
setup_1          | Trying to create ES index...
setup_1          | {'name': 'es01', 'cluster_name': 'kibble', 'cluster_uuid': '8-2XRavIQiaZFKLh7n0u_w', 'version': {'number': '7.9.2', 'build_flavor': 'default', 'build_type': 'docker', 'build_hash': 'd34da0ea4a966c4e49417f2da2f244e3e97b4e6e', 'build_date': '2020-09-23T00:45:33.626720Z', 'build_snapshot': False, 'lucene_version': '8.6.2', 'minimum_wire_compatibility_version': '6.8.0', 'minimum_index_compatibility_version': '6.0.0-beta1'}, 'tagline': 'You Know, for Search'}
setup_1          | DB prefix exists, but --skiponexist used, skipping this step.
setup_1          | 
setup_1          | All done, Kibble should...work now :)
michalslowikowski00 commented 3 years ago

Hi, really sorry about the delay. I was able to completely migrate the setup workflow to be implemented with click. I am running into a minor error while running create_es_index which I don't believe has anything to do with the new cli implementation. Was wondering if I could get some assistance with figuring out the issue as I am a bit new to ElasticSearch πŸ˜…?

Seems I am receiving a connection error when calling elasticsearch:

elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x111424fd0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x111424fd0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known)

The actual cli commands and arguments are working now though πŸ‘

$ kibble version
1.0.0dev
$ kibble setup --help
Usage: kibble setup [OPTIONS]

Options:
  -u, --uri TEXT          Pre-defined connection uri for ElasticSearch.
  -d, --dbname TEXT       Pre-defined Database prefix.
  -s, --shards TEXT       Predefined number of ES shards.
  -r, --replicas TEXT     Predefined number of replicas for ES.
  -m, --mailhost TEXT     Pre-defined mail server host.
  -a, --autoadmin TEXT    Generate generic admin account.
  -k, --skiponexist TEXT  Skip DB creation if DBs exist.
  --help                  Show this message and exit.

Easy, it's open source. :)

michalslowikowski00 commented 3 years ago

Great job @skekre98. Thanks!