-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new upstream 4.17.2 * use quay.io * Switch to new build process * remove upgrade, be verbosy
- Loading branch information
Showing
4 changed files
with
96 additions
and
27 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,46 @@ | ||
FROM ubuntu:xenial-20181113 | ||
FROM quay.io/bedrock/ubuntu:22.04 | ||
|
||
MAINTAINER "René Moser" <[email protected]> | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ARG src_url=https://github.com/apache/cloudstack/archive/4.13.1.0.tar.gz | ||
ARG src_url=https://github.com/apache/cloudstack/archive/refs/tags/4.17.2.0.tar.gz | ||
|
||
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 dist-upgrade -y && apt-get install -y \ | ||
RUN apt-get -y update && apt-get install -y --no-install-recommends \ | ||
genisoimage \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
sudo \ | ||
ipmitool \ | ||
maven \ | ||
netcat \ | ||
openjdk-8-jdk \ | ||
python-dev \ | ||
python-mysql.connector \ | ||
python-pip \ | ||
python-setuptools \ | ||
python-paramiko \ | ||
openjdk-11-jdk \ | ||
python3 \ | ||
python3-dev \ | ||
python3-mysql.connector \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-paramiko \ | ||
supervisor \ | ||
wget \ | ||
nginx \ | ||
jq \ | ||
mysql-server \ | ||
openssh-client \ | ||
&& apt-get clean all \ | ||
&& rm -rf /var/lib/apt/lists/*; | ||
build-essential \ | ||
npm \ | ||
nodejs \ | ||
&& 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 | ||
chown mysql /var/run/mysqld; | ||
|
||
RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password '' | ||
|
||
|
@@ -47,24 +50,30 @@ RUN wget $src_url -O /opt/cloudstack.tar.gz; \ | |
|
||
WORKDIR /opt/cloudstack | ||
|
||
RUN ln -s /usr/bin/python3 /usr/local/bin/python | ||
RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install | ||
RUN mvn -Pdeveloper -Dsimulator dependency:go-offline | ||
RUN mvn -pl client jetty:run -Dsimulator -Djetty.skip -Dorg.eclipse.jetty.annotations.maxWait=120 | ||
|
||
COPY zones.cfg /opt/zones.cfg | ||
|
||
RUN (/usr/bin/mysqld_safe &); \ | ||
sleep 5; \ | ||
mvn -Pdeveloper -pl developer -Ddeploydb; \ | ||
mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \ | ||
mvn -Pdeveloper,marvin -pl :cloud-marvin; \ | ||
MARVIN_FILE=$(find /opt/cloudstack/tools/marvin/dist/ -name "Marvin*.tar.gz"); \ | ||
pip install wheel; \ | ||
pip install $MARVIN_FILE; | ||
|
||
COPY zones.cfg /opt/zones.cfg | ||
COPY nginx_default.conf /etc/nginx/sites-available/default | ||
RUN pip install cs==2.5 | ||
RUN pip install cs | ||
COPY run.sh /opt/run.sh | ||
COPY deploy.sh /opt/deploy.sh | ||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
|
||
RUN cd ui && npm install && npm run build | ||
|
||
RUN /opt/deploy.sh | ||
|
||
EXPOSE 8888 8080 8096 | ||
|
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 |
---|---|---|
@@ -1,12 +1,73 @@ | ||
trigger: | ||
- master | ||
batch: true | ||
branches: | ||
include: | ||
- main | ||
- stable-* | ||
tags: | ||
include: | ||
- '*' | ||
|
||
pr: | ||
- master | ||
branches: | ||
include: | ||
- main | ||
- stable-* | ||
|
||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
vmImage: 'ubuntu-22.04' | ||
|
||
steps: | ||
- script: docker build . | ||
displayName: Build Container | ||
variables: | ||
container_name: "quay.io/ansible/$(System.TeamProject)" | ||
scratchpad_tag: "quay.io/ansible/scratchpad:$(System.TeamProject)-$(Build.SourceBranchName)-$(Build.BuildId)" | ||
python_version: '3.10' | ||
containmint_version: '0.2.0' | ||
${{ if ne(variables['Build.Reason'], 'PullRequest') }}: | ||
push_or_no_login: --push | ||
${{ else }}: | ||
push_or_no_login: --no-login | ||
|
||
stages: | ||
- stage: Build | ||
dependsOn: [] | ||
jobs: | ||
- job: Arch | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python_version)' | ||
displayName: Use Python | ||
- script: pip install containmint==$(containmint_version) --disable-pip-version-check --user | ||
displayName: Install containmint | ||
- script: > | ||
containmint build | ||
--tag "$(scratchpad_tag)-$(System.JobName)" | ||
--arch "$(System.JobName)" | ||
$(push_or_no_login) | ||
displayName: Build | ||
env: | ||
CONTAINMINT_PASSWORD: $(CONTAINMINT_PASSWORD) | ||
strategy: | ||
matrix: | ||
x86_64: {} | ||
|
||
- stage: Deploy | ||
dependsOn: Build | ||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) | ||
jobs: | ||
- job: Image | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python_version)' | ||
displayName: Use Python | ||
- script: pip install containmint==$(containmint_version) --disable-pip-version-check --user | ||
displayName: Install containmint | ||
- script: > | ||
containmint merge | ||
--push | ||
--tag "$(container_name):$(Build.SourceBranchName)" | ||
"$(scratchpad_tag)-x86_64" | ||
displayName: Merge | ||
env: | ||
CONTAINMINT_PASSWORD: $(CONTAINMINT_PASSWORD) |
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