mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
automated integration tests for cloudstack (#20552)
This commit is contained in:
parent
b58cf0d23a
commit
aaf4f04574
92 changed files with 1248 additions and 193 deletions
64
test/utils/docker/cloudstack-simulator/Dockerfile
Normal file
64
test/utils/docker/cloudstack-simulator/Dockerfile
Normal file
|
@ -0,0 +1,64 @@
|
|||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER "René Moser" <mail@renemoser.net>
|
||||
|
||||
RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \
|
||||
echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections;
|
||||
|
||||
RUN apt-get -y update && apt-get install -y \
|
||||
genisoimage \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
sudo \
|
||||
ipmitool \
|
||||
maven \
|
||||
netcat \
|
||||
openjdk-8-jdk \
|
||||
python-dev \
|
||||
python-setuptools \
|
||||
python-pip \
|
||||
python-mysql.connector \
|
||||
supervisor \
|
||||
wget \
|
||||
nginx \
|
||||
jq \
|
||||
mysql-server \
|
||||
openssh-client \
|
||||
&& apt-get clean all \
|
||||
&& rm -rf /var/lib/apt/lists/*;
|
||||
|
||||
# TODO: check if and why this is needed
|
||||
RUN mkdir -p /root/.ssh \
|
||||
&& chmod 0700 /root/.ssh \
|
||||
&& ssh-keygen -t rsa -N "" -f id_rsa.cloud
|
||||
|
||||
RUN mkdir -p /var/run/mysqld; \
|
||||
chown mysql /var/run/mysqld; \
|
||||
echo '''sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"''' >> /etc/mysql/mysql.conf.d/mysqld.cnf
|
||||
|
||||
RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password ''
|
||||
|
||||
RUN wget https://github.com/apache/cloudstack/archive/4.9.2.0.tar.gz -O /opt/cloudstack.tar.gz; \
|
||||
mkdir -p /opt/cloudstack; \
|
||||
tar xvzf /opt/cloudstack.tar.gz -C /opt/cloudstack --strip-components=1
|
||||
|
||||
WORKDIR /opt/cloudstack
|
||||
|
||||
RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
|
||||
|
||||
RUN (/usr/bin/mysqld_safe &); \
|
||||
sleep 5; \
|
||||
mvn -Pdeveloper -pl developer -Ddeploydb; \
|
||||
mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
|
||||
MARVIN_FILE=$(find /opt/cloudstack/tools/marvin/dist/ -name "Marvin*.tar.gz"); \
|
||||
pip install $MARVIN_FILE;
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY zones.cfg /opt/zones.cfg
|
||||
COPY nginx_default.conf /etc/nginx/sites-available/default
|
||||
RUN pip install cs
|
||||
COPY run.sh /opt/run.sh
|
||||
|
||||
EXPOSE 8888 8080 8096
|
||||
|
||||
CMD ["/usr/bin/supervisord"]
|
Loading…
Add table
Add a link
Reference in a new issue