This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed TGT version (+5 squashed commits)
Squashed commits: [639b713] Fixed tgt [57c9d09] test [2a588f7] Changed to centos [a177944] Added ceph tag [8b29689] CI Final Commit (+1 squashed commit) Squashed commits: [50097a9] Commented docker files (+1 squashed commit) Squashed commits: [e4c0f50] Added comments (+6 squashed commits) Squashed commits: [14e426c] Update images [876b6bd] Repo change [2ae8ab0] Added new lines [314830d] Changed to docker hub [51c5d61] Added build status [2faa0b0] Dockerfile for environment (+1 squashed commit) Squashed commits: [c338292] Travis
- Loading branch information
1 parent
003737b
commit 3e8098a
Showing
6 changed files
with
185 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This will be by CI tool to build BMI image that will be used for testing. | ||
|
||
# Basing on image stored in docker hub for faster build | ||
FROM bmis/bmi-ci | ||
|
||
# Copy source code | ||
USER bmi | ||
COPY ims/ /home/bmi/ims/ | ||
COPY tests/ /home/bmi/tests/ | ||
COPY scripts/ /home/bmi/scripts/ | ||
COPY setup.py /home/bmi/setup.py | ||
|
||
# Install | ||
USER root | ||
WORKDIR /home/bmi | ||
RUN python setup.py develop | ||
|
||
# Create DB | ||
USER bmi | ||
RUN bmi db ls | ||
|
||
# Start dependencies when container starts | ||
CMD dumb-init /home/bmi/runbmi.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This File is to create the image for BMI environment. | ||
# It will install all dependencies and create the required folder structure | ||
# The CI Tool will just create a new image based of this and run tests | ||
|
||
# Using ubuntu as base | ||
FROM ubuntu | ||
|
||
# Install all dependencies except dnsmasq | ||
RUN apt-get -y update && apt-get install -y tgt-rbd ceph-common python python-dev python-setuptools build-essential python-pip sudo sqlite3 git | ||
|
||
# Install test stuff | ||
RUN pip install dumb-init pytest pytest-random-order | ||
|
||
# Create user and remove password for root | ||
RUN useradd -ms /bin/bash bmi | ||
RUN passwd -d bmi | ||
RUN passwd -d root | ||
RUN usermod -aG sudo bmi | ||
|
||
# Create required folders | ||
RUN mkdir /etc/bmi/ | ||
RUN mkdir /var/log/bmi/ | ||
RUN mkdir /var/lib/tftpboot/ | ||
RUN mkdir /var/lib/tftpboot/pxelinux.cfg/ | ||
RUN mkdir /var/lib/bmi/ | ||
|
||
# Add config file | ||
COPY docker/bmi_config.cfg /etc/bmi/bmiconfig.cfg | ||
ENV BMI_CONFIG=/etc/bmi/bmiconfig.cfg | ||
|
||
# Set Permissions | ||
RUN chown bmi:bmi /etc/tgt/conf.d/ | ||
RUN chown bmi:bmi /var/log/bmi/ | ||
RUN chown bmi:bmi /var/lib/tftpboot/ | ||
RUN chown bmi:bmi /var/lib/tftpboot/pxelinux.cfg/ | ||
RUN chown bmi:bmi /var/lib/bmi/ | ||
|
||
# Add the BMI execute script | ||
COPY docker/runbmi.sh /home/bmi/runbmi.sh | ||
RUN chmod a+x /home/bmi/runbmi.sh | ||
|
||
# Set Environment variables | ||
ENV HAAS_USERNAME=admin | ||
ENV HAAS_PASSWORD=admin | ||
|
||
# Expose as volume to get keyring and ceph config | ||
VOLUME /etc/ceph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This File is to create the image for BMI environment. | ||
# It will install all dependencies and create the required folder structure | ||
# The CI Tool will just create a new image based of this and run tests | ||
|
||
# Using ubuntu as base | ||
FROM centos | ||
|
||
# Install all dependencies except dnsmasq | ||
RUN yum install -y epel-release | ||
RUN rpm --import 'https://download.ceph.com/keys/release.asc' | ||
COPY docker/yum.repo /etc/yum.repos.d/ceph.repo | ||
RUN yum -y update && yum install -y ceph-common-0.94.9 librbd1-devel-0.94.9 librados2-devel-0.94.9 python python-setuptools python-pip sudo sqlite cpan perl-Config-General libxslt-devel git make gcc | ||
|
||
# Install test stuff | ||
RUN pip install dumb-init pytest pytest-random-order coverage==4.3 pytest-cov coveralls | ||
|
||
RUN git clone https://github.com/fujita/tgt | ||
WORKDIR tgt/ | ||
RUN git reset --hard 3c8c9e96b82d87a334b1d340fa29218b7b94f26d | ||
RUN sudo make CEPH_RBD=1 clean | ||
RUN sudo make CEPH_RBD=1 | ||
RUN sudo make CEPH_RBD=1 install | ||
|
||
WORKDIR ../ | ||
# Create user and remove password for root | ||
RUN useradd -ms /bin/bash bmi | ||
RUN passwd -d bmi | ||
RUN passwd -d root | ||
RUN usermod -aG wheel bmi | ||
|
||
# Create required folders | ||
RUN mkdir /etc/bmi/ | ||
RUN mkdir /var/log/bmi/ | ||
RUN mkdir /var/lib/tftpboot/ | ||
RUN mkdir /var/lib/tftpboot/pxelinux.cfg/ | ||
RUN mkdir /var/lib/bmi/ | ||
|
||
# Add config file | ||
COPY docker/bmi_config.cfg /etc/bmi/bmiconfig.cfg | ||
ENV BMI_CONFIG=/etc/bmi/bmiconfig.cfg | ||
|
||
# Set Permissions | ||
RUN chown bmi:bmi /etc/tgt/conf.d/ | ||
RUN chown bmi:bmi /var/log/bmi/ | ||
RUN chown bmi:bmi /var/lib/tftpboot/ | ||
RUN chown bmi:bmi /var/lib/tftpboot/pxelinux.cfg/ | ||
RUN chown bmi:bmi /var/lib/bmi/ | ||
|
||
# Add the BMI execute script | ||
COPY docker/runbmi.sh /home/bmi/runbmi.sh | ||
RUN chmod a+x /home/bmi/runbmi.sh | ||
|
||
# Set Environment variables | ||
ENV HAAS_USERNAME=admin | ||
ENV HAAS_PASSWORD=admin | ||
|
||
# Expose as volume to get keyring and ceph config | ||
VOLUME /etc/ceph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[ceph] | ||
name=Ceph packages for $basearch | ||
baseurl=https://download.ceph.com/rpm-hammer/el7/$basearch | ||
enabled=1 | ||
priority=2 | ||
gpgcheck=1 | ||
gpgkey=https://download.ceph.com/keys/release.asc | ||
|
||
[ceph-noarch] | ||
name=Ceph noarch packages | ||
baseurl=https://download.ceph.com/rpm-hammer/el7/noarch | ||
enabled=1 | ||
priority=2 | ||
gpgcheck=1 | ||
gpgkey=https://download.ceph.com/keys/release.asc | ||
|
||
[ceph-source] | ||
name=Ceph source packages | ||
baseurl=https://download.ceph.com/rpm-hammer/el7/SRPMS | ||
enabled=0 | ||
priority=2 | ||
gpgcheck=1 | ||
gpgkey=https://download.ceph.com/keys/release.asc |