Skip to content

Commit

Permalink
Merge pull request #157 from skanthed/missing-dependencies
Browse files Browse the repository at this point in the history
Ensured all necessary dependencies, including mysql-connector and pymysql, are listed in requirements.txt.
  • Loading branch information
tzumainn authored Jul 4, 2024
2 parents 23facb4 + cdb1fdd commit 822016c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
25 changes: 15 additions & 10 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
# This file contains the configuration for containerized esi-leap

# Use python as the parent image for esi-leap
FROM python:3.11
FROM docker.io/python:3.11

LABEL description="ESI-LEAP -- ESI lease policy manager"

# Indicate that service listens on this port
EXPOSE 7777

# The working directory for esi-leap inside the container
WORKDIR /esi-leap

# Copy the files of esi leap inside the container
COPY run_services.sh run_services.sh
# Copy the requirements file and install dependencies
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

RUN mkdir -p /var/log/esi-leap
RUN touch /var/log/esi-leap/esi-leap-dbsync.log
# Copy the entire local directory contents to the container
COPY . ./

# Run command to install dependencies for esi-leap
RUN apt update -y && apt install -y python3-pymysql
RUN pip3 install esi-leap mysql-connector pymysql
# Install the local version of esi-leap
RUN pip install .

# Indicate that service listens on this port
EXPOSE 7777
# Create necessary directories and files
RUN mkdir -p /var/log/esi-leap
RUN touch /var/log/esi-leap/esi-leap-dbsync.log

# Command to run the services
CMD ["bash", "./run_services.sh"]
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ iso8601>=0.1.11 # MIT
keystoneauth1>=3.4.0 # Apache-2.0
keystonemiddleware>=4.17.0 # Apache-2.0
kombu!=4.0.2,>=4.0.0 # BSD
mysql-connector-python>=8.0.0 # GPL-2.0
openstacksdk<1.3.0
oslo.concurrency>=3.26.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
Expand All @@ -30,6 +31,7 @@ netaddr>=0.7.18 # BSD
python-ironicclient>=2.3.0 # Apache-2.0
python-keystoneclient>=3.8.0 # Apache-2.0
pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2,>=1.0.0 # BSD
PyMySQL>=0.7.6 # MIT License
sqlalchemy-migrate>=0.11.0 # Apache-2.0
requests>=2.18.4 # Apache-2.0
Routes>=2.3.1 # MIT
Expand Down

0 comments on commit 822016c

Please sign in to comment.