Skip to content

Commit

Permalink
Merge pull request Aiven-Labs#6 from daniel-pape/refactor/separate-in…
Browse files Browse the repository at this point in the history
…stallation-step

Improve caching with separate installation step
  • Loading branch information
ftisiot authored Aug 31, 2023
2 parents e46e6b0 + 8125d65 commit cc707f0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ RUN apt-get update &&\
apt-get install -y expect &&\
apt-get install -y jq

COPY ./install_dependencies.sh .
RUN chmod +x ./install_dependencies.sh &&\
sh install_dependencies.sh

CMD [ "bash", "./run.sh" ]
6 changes: 6 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Get repository
git clone https://github.com/aiven/python-fake-data-producer-for-apache-kafka.git
pip install -r python-fake-data-producer-for-apache-kafka/requirements.txt
pip install aiven-client
5 changes: 0 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Read env parameters
. conf/env.conf

# Get repository
git clone https://github.com/aiven/python-fake-data-producer-for-apache-kafka.git
pip install -r python-fake-data-producer-for-apache-kafka/requirements.txt
pip install aiven-client

# Get Hostname and Port
HOSTNAME=$(avn --auth-token $TOKEN service get $SERVICE_NAME --project $PROJECT_NAME --json | jq -r '.components[] | select(.component=="kafka").host')
PORT=$(avn --auth-token $TOKEN service get $SERVICE_NAME --project $PROJECT_NAME --json | jq -r '.components[] | select(.component=="kafka").port')
Expand Down

0 comments on commit cc707f0

Please sign in to comment.