Skip to content

Commit 5fdebee

Browse files
authored
new upstream 4.17.2 (#15)
* new upstream 4.17.2 * use quay.io * Switch to new build process * remove upgrade, be verbosy
1 parent 56bea49 commit 5fdebee

File tree

4 files changed

+96
-27
lines changed

4 files changed

+96
-27
lines changed

Dockerfile

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
1-
FROM ubuntu:xenial-20181113
1+
FROM quay.io/bedrock/ubuntu:22.04
22

3-
MAINTAINER "René Moser" <[email protected]>
3+
ENV DEBIAN_FRONTEND noninteractive
44

5-
ARG src_url=https://github.com/apache/cloudstack/archive/4.13.1.0.tar.gz
5+
ARG src_url=https://github.com/apache/cloudstack/archive/refs/tags/4.17.2.0.tar.gz
66

77
RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \
88
echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections;
99

10-
RUN apt-get -y update && apt-get dist-upgrade -y && apt-get install -y \
10+
RUN apt-get -y update && apt-get install -y --no-install-recommends \
1111
genisoimage \
1212
libffi-dev \
1313
libssl-dev \
1414
sudo \
1515
ipmitool \
1616
maven \
1717
netcat \
18-
openjdk-8-jdk \
19-
python-dev \
20-
python-mysql.connector \
21-
python-pip \
22-
python-setuptools \
23-
python-paramiko \
18+
openjdk-11-jdk \
19+
python3 \
20+
python3-dev \
21+
python3-mysql.connector \
22+
python3-pip \
23+
python3-setuptools \
24+
python3-paramiko \
2425
supervisor \
2526
wget \
2627
nginx \
2728
jq \
2829
mysql-server \
2930
openssh-client \
30-
&& apt-get clean all \
31-
&& rm -rf /var/lib/apt/lists/*;
31+
build-essential \
32+
npm \
33+
nodejs \
34+
&& apt-get clean all && rm -rf /var/lib/apt/lists/*;
35+
3236

3337
# TODO: check if and why this is needed
3438
RUN mkdir -p /root/.ssh \
3539
&& chmod 0700 /root/.ssh \
3640
&& ssh-keygen -t rsa -N "" -f id_rsa.cloud
3741

3842
RUN mkdir -p /var/run/mysqld; \
39-
chown mysql /var/run/mysqld; \
40-
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
43+
chown mysql /var/run/mysqld;
4144

4245
RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password ''
4346

@@ -47,24 +50,30 @@ RUN wget $src_url -O /opt/cloudstack.tar.gz; \
4750

4851
WORKDIR /opt/cloudstack
4952

53+
RUN ln -s /usr/bin/python3 /usr/local/bin/python
5054
RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
5155
RUN mvn -Pdeveloper -Dsimulator dependency:go-offline
5256
RUN mvn -pl client jetty:run -Dsimulator -Djetty.skip -Dorg.eclipse.jetty.annotations.maxWait=120
5357

58+
COPY zones.cfg /opt/zones.cfg
59+
5460
RUN (/usr/bin/mysqld_safe &); \
5561
sleep 5; \
5662
mvn -Pdeveloper -pl developer -Ddeploydb; \
5763
mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
64+
mvn -Pdeveloper,marvin -pl :cloud-marvin; \
5865
MARVIN_FILE=$(find /opt/cloudstack/tools/marvin/dist/ -name "Marvin*.tar.gz"); \
66+
pip install wheel; \
5967
pip install $MARVIN_FILE;
6068

61-
COPY zones.cfg /opt/zones.cfg
6269
COPY nginx_default.conf /etc/nginx/sites-available/default
63-
RUN pip install cs==2.5
70+
RUN pip install cs
6471
COPY run.sh /opt/run.sh
6572
COPY deploy.sh /opt/deploy.sh
6673
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
6774

75+
RUN cd ui && npm install && npm run build
76+
6877
RUN /opt/deploy.sh
6978

7079
EXPOSE 8888 8080 8096

azure-pipelines.yml

+67-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,73 @@
11
trigger:
2-
- master
2+
batch: true
3+
branches:
4+
include:
5+
- main
6+
- stable-*
7+
tags:
8+
include:
9+
- '*'
310

411
pr:
5-
- master
12+
branches:
13+
include:
14+
- main
15+
- stable-*
616

717
pool:
8-
vmImage: 'ubuntu-18.04'
18+
vmImage: 'ubuntu-22.04'
919

10-
steps:
11-
- script: docker build .
12-
displayName: Build Container
20+
variables:
21+
container_name: "quay.io/ansible/$(System.TeamProject)"
22+
scratchpad_tag: "quay.io/ansible/scratchpad:$(System.TeamProject)-$(Build.SourceBranchName)-$(Build.BuildId)"
23+
python_version: '3.10'
24+
containmint_version: '0.2.0'
25+
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
26+
push_or_no_login: --push
27+
${{ else }}:
28+
push_or_no_login: --no-login
29+
30+
stages:
31+
- stage: Build
32+
dependsOn: []
33+
jobs:
34+
- job: Arch
35+
steps:
36+
- task: UsePythonVersion@0
37+
inputs:
38+
versionSpec: '$(python_version)'
39+
displayName: Use Python
40+
- script: pip install containmint==$(containmint_version) --disable-pip-version-check --user
41+
displayName: Install containmint
42+
- script: >
43+
containmint build
44+
--tag "$(scratchpad_tag)-$(System.JobName)"
45+
--arch "$(System.JobName)"
46+
$(push_or_no_login)
47+
displayName: Build
48+
env:
49+
CONTAINMINT_PASSWORD: $(CONTAINMINT_PASSWORD)
50+
strategy:
51+
matrix:
52+
x86_64: {}
53+
54+
- stage: Deploy
55+
dependsOn: Build
56+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
57+
jobs:
58+
- job: Image
59+
steps:
60+
- task: UsePythonVersion@0
61+
inputs:
62+
versionSpec: '$(python_version)'
63+
displayName: Use Python
64+
- script: pip install containmint==$(containmint_version) --disable-pip-version-check --user
65+
displayName: Install containmint
66+
- script: >
67+
containmint merge
68+
--push
69+
--tag "$(container_name):$(Build.SourceBranchName)"
70+
"$(scratchpad_tag)-x86_64"
71+
displayName: Merge
72+
env:
73+
CONTAINMINT_PASSWORD: $(CONTAINMINT_PASSWORD)

deploy.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ until nc -z localhost 8096; do
99
done
1010

1111
sleep 3
12-
python /opt/cloudstack/tools/marvin/marvin/deployDataCenter.py -i /opt/zones.cfg
12+
python3 /opt/cloudstack/tools/marvin/marvin/deployDataCenter.py -i /opt/zones.cfg
1313

1414
export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
1515
export CLOUDSTACK_KEY=dummy
1616
export CLOUDSTACK_SECRET=dummy
1717

1818
# Add Simulator to supported hypervisors exclusively
1919
cs updateConfiguration name=hypervisor.list value=Simulator
20-

nginx_default.conf

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ upstream cloudstack-backend {
44

55
server {
66
listen 8888 default_server;
7+
server_name _;
78

89
root /var/www/html;
910

10-
server_name _;
11-
1211
# waiting for zone to be deployed
1312
if (!-f /var/www/html/admin.json) {
1413
return 503;
@@ -18,6 +17,7 @@ server {
1817
proxy_pass http://cloudstack-backend;
1918
}
2019
location / {
21-
20+
root /opt/cloudstack/ui/dist;
21+
index index.html;
2222
}
2323
}

0 commit comments

Comments
 (0)