File tree 6 files changed +39
-21
lines changed
6 files changed +39
-21
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ FROM ubuntu:16.04
2
2
3
3
MAINTAINER "René Moser" <
[email protected] >
4
4
5
+ ARG src_url=https://github.com/apache/cloudstack/archive/4.11.1.0.tar.gz
6
+
5
7
RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \
6
8
echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections;
7
9
8
- RUN apt-get -y update && apt-get install -y \
10
+ RUN apt-get -y update && apt-get dist-upgrade -y && apt-get install -y \
9
11
genisoimage \
10
12
libffi-dev \
11
13
libssl-dev \
@@ -38,7 +40,7 @@ RUN mkdir -p /var/run/mysqld; \
38
40
39
41
RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password ''
40
42
41
- RUN wget https://github.com/apache/cloudstack/archive/4.9.2.0.tar.gz -O /opt/cloudstack.tar.gz; \
43
+ RUN wget $src_url -O /opt/cloudstack.tar.gz; \
42
44
mkdir -p /opt/cloudstack; \
43
45
tar xvzf /opt/cloudstack.tar.gz -C /opt/cloudstack --strip-components=1
44
46
@@ -57,10 +59,13 @@ RUN (/usr/bin/mysqld_safe &); \
57
59
58
60
COPY zones.cfg /opt/zones.cfg
59
61
COPY nginx_default.conf /etc/nginx/sites-available/default
60
- RUN pip install cs==1.1 .1
62
+ RUN pip install cs==2.3 .1
61
63
COPY run.sh /opt/run.sh
64
+ COPY deploy.sh /opt/deploy.sh
62
65
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
63
66
67
+ RUN /opt/deploy.sh
68
+
64
69
EXPOSE 8888 8080 8096
65
70
66
71
CMD ["/usr/bin/supervisord" ]
Original file line number Diff line number Diff line change 1
1
build :
2
- docker build -t cloudstack-sim .
2
+ docker build --no-cache - t cloudstack-sim .
3
3
4
4
clean :
5
- docker rm -f cloudstack
5
+ docker rm -f cloudstack-sim
6
6
7
7
run :
8
- docker run --name cloudstack -d -p 8080:8080 -p 8888:8888 cloudstack-sim
8
+ docker run --name cloudstack-sim -d -p 8080:8080 -p 8888:8888 cloudstack-sim
9
9
10
10
shell :
11
- docker exec -it cloudstack /bin/bash
11
+ docker exec -it cloudstack-sim /bin/bash
12
12
13
13
logs :
14
- docker logs -f cloudstack
14
+ docker logs -f cloudstack-sim
Original file line number Diff line number Diff line change
1
+ #! /bin/bash +x
2
+
3
+ /usr/bin/mysqld_safe &
4
+ cd /opt/cloudstack && mvn -pl client jetty:run -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120 &
5
+
6
+ until nc -z localhost 8096; do
7
+ echo " waiting for port 8096..."
8
+ sleep 3
9
+ done
10
+
11
+ sleep 3
12
+ python /opt/cloudstack/tools/marvin/marvin/deployDataCenter.py -i /opt/zones.cfg
Original file line number Diff line number Diff line change 7
7
sleep 3
8
8
if [ ! -e /var/www/html/admin.json ]
9
9
then
10
- python /opt/cloudstack/tools/marvin/marvin/deployDataCenter.py -i /opt/zones.cfg
11
10
export CLOUDSTACK_ENDPOINT=http://127.0.0.1:8096
12
11
export CLOUDSTACK_KEY=" "
13
12
export CLOUDSTACK_SECRET=" "
14
- cs listUsers account=admin | jq .user[0] > /var/www/html/admin.json
13
+
14
+ # Workaround for Nuage VPC Offering
15
+ vpc_offering_id=" $( cs listVPCOfferings listall=true name=Nuage | jq .vpcoffering[0].id) "
16
+ cs updateVPCOffering id=$vpc_offering_id state=Disabled
17
+
18
+ admin_id=" $( cs listUsers account=admin | jq .user[0].id) "
19
+ cs getUserKeys id=$admin_id | jq .userkeys > /var/www/html/admin.json
15
20
fi
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ autorestart=true
8
8
user=root
9
9
10
10
[program:cloudstack]
11
- command=/bin/bash -c "mvn -pl client jetty:run-forked -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120"
11
+ command=/bin/bash -c "mvn -pl client jetty:run -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120"
12
12
directory=/opt/cloudstack
13
13
stdout_logfile=/dev/stdout
14
14
stdout_logfile_maxbytes=0
@@ -20,9 +20,9 @@ autostart=true
20
20
autorestart=false
21
21
user=root
22
22
23
- [program:deploy-zones ]
24
- command = /opt/run.sh
25
- startsecs = 0
26
- autorestart = false
27
- startretries = 1
23
+ [program:run ]
24
+ command= /opt/run.sh
25
+ startsecs= 0
26
+ autorestart= false
27
+ startretries= 1
28
28
user=root
Original file line number Diff line number Diff line change 288
288
},
289
289
{
290
290
" name" : " ping.timeout" ,
291
- " value" : " 1.5"
292
- },
293
- {
294
- " name" : " outofbandmanagement.sync.interval" ,
295
- " value" : " 1000"
291
+ " value" : " 2"
296
292
}
297
293
],
298
294
" mgtSvr" : [
You can’t perform that action at this time.
0 commit comments