Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove etcd #7

Merged
merged 17 commits into from
Aug 26, 2019
Merged

Remove etcd #7

merged 17 commits into from
Aug 26, 2019

Conversation

jeffreyscarpenter
Copy link
Member

Removal of dependence on etcd brings killrvideo-python in line with the rest of the KillrVideo application. Suggest testing with latest killrvideo-docker-common.

Copy link
Member

@HadesArchitect HadesArchitect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

so there are my notices, some of them very minor, like env var name for kafka, and two are serious:

  1. VERSION file is a dangerous way for versioning. Git tag is more reliable.
  2. Extraction of docker-compose to a separate repo leads to a more complicated and not-obvious setup.

VERSION Outdated
@@ -1 +1 @@
DOCKER_BUILD_TAG=0.9.1
DOCKER_BUILD_TAG=3.0.1-rc1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't fully agree with this VERSION file approach. Imho, git tag is much more reliable and obvious source of truth. As long as you have both, you will have inconsistencies between them. Take a look at this:

  1. We take git tag as a source of truth: https://github.com/KillrVideo/killrvideo-dse-config/blob/master/.travis.yml#L15
  2. We take hardcoded data in a file as a source of truth https://github.com/KillrVideo/killrvideo-dse-config/blob/1a31a70883597d98b4f90a86986f782d5e3319b4/build/docker-build.sh#L5

It's just a question of time when someone (like me) will forget to update the version file and - ooops - we have a wrong image.

@@ -8,7 +9,7 @@ class CommentsPublisher(object):
"""Provides methods that publish events associated with the Comments Service."""

def __init__(self):
self.producer = KafkaProducer(bootstrap_servers='10.0.75.1:9092',
self.producer = KafkaProducer(bootstrap_servers=os.getenv('KILLRVIDEO_KAFKA', 'kafka'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, KILLRVIDEO_KAFKA_HOST or anything like that? KILLRVIDEO_KAFKA doesn't sound obvious enough.

@@ -9,7 +10,7 @@ class RatingPublisher(object):
"""Provides methods that publish events associated with the Ratings Service."""

def __init__(self):
self.producer = KafkaProducer(bootstrap_servers='10.0.75.1:9092',
self.producer = KafkaProducer(bootstrap_servers=os.getenv('KILLRVIDEO_KAFKA', 'kafka'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, KILLRVIDEO_KAFKA_HOST looks better imho.

class SuggestedVideoKafkaConsumer(threading.Thread):
def __init__(self, suggested_videos_consumer):
threading.Thread.__init__(self)
self.suggested_videos_consumer = suggested_videos_consumer

def run(self):
consumer = KafkaConsumer(bootstrap_servers=BOOTSTRAP_SERVERS,
consumer = KafkaConsumer(bootstrap_servers=os.getenv('KILLRVIDEO_KAFKA', 'kafka'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, KILLRVIDEO_KAFKA_HOST looks better imho.

@@ -9,7 +10,7 @@ class UserManagementPublisher(object):
"""Provides methods that publish events associated with the User Management Service."""

def __init__(self):
self.producer = KafkaProducer(bootstrap_servers='10.0.75.1:9092',
self.producer = KafkaProducer(bootstrap_servers=os.getenv('KILLRVIDEO_KAFKA', 'kafka'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, KILLRVIDEO_KAFKA_HOST looks better imho.

@@ -9,7 +10,7 @@ class VideoCatalogPublisher(object):
"""Provides methods that publish events associated with the Video Catalog Service."""

def __init__(self):
self.producer = KafkaProducer(bootstrap_servers='10.0.75.1:9092',
self.producer = KafkaProducer(bootstrap_servers=os.getenv('KILLRVIDEO_KAFKA', 'kafka'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, KILLRVIDEO_KAFKA_HOST looks better imho.

docker-compose.yaml Show resolved Hide resolved
README.md Outdated
@@ -15,7 +15,7 @@ Install and run:
* `python3 -m venv venv`
* `source venv/bin/activate`
* Run supporting infrastructure using Docker
* `./setup-docker.sh`
* `docker-compose up -d`
* See the instructions in the [killrvideo-docker-common][https://github.com/KillrVideo/killrvideo-docker-common] repository for running the supporting infrastructure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link is not rendered by github. I think the markdown is not correct here.
image

@jeffreyscarpenter jeffreyscarpenter merged commit 1c6338a into master Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants