You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by pdion891 <gi...@git.apache.org> on 2015/07/20 01:38:09 UTC
[GitHub] cloudstack pull request: Dockerfile
GitHub user pdion891 opened a pull request:
https://github.com/apache/cloudstack/pull/605
Dockerfile
Initial PR for Dockerization of CloudStack.
Important Changes:
* scripts/vm/systemvm/injectkeys.sh: script execution will pass event if /dev/loop0 not detected and will skip verification of sshkey, this is a limiation in Docker container.
* Dockerfile for simulator move into /tools/docker: Need to change Jenkins jobs and Dockerhub build after the merge.
Current docker file working:
* simulator (Seb's original file)
* management-server on centos6 (using RPM's)
* marvin
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pdion891/cloudstack dockerfile
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/605.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #605
----
commit f1ce83d894d1501da13d72269f7b8deea3ae4b4a
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:23Z
add check to not mount systemvm.iso if inside unprivileged docker container
commit b2e6143a4838bad1265fa321317ee56b34525d00
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T19:54:37Z
move Dockerfile into tools/docker
commit a3b76e201dbcf70e753e8c13721bc749c8a17b13
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:47Z
initial README.md file for Dockerfiles instructions
commit a0019a1befd010abf78df5a4234ed1c8834414db
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:23Z
Dockerfile to create images for CloudStack management server using RPMs based on CentOS 6
commit 28556e2eda9d2875f1969016c19ee66e8667cb7d
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:23Z
RPM download URL using TEST URL for validation
commit a6e7c40015dd126a3192126a381e9982fc75097b
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:23Z
add check to not mount systemvm.iso if inside unprivileged docker container
commit c020c65aee16e16fafdf8b21257a6d3124f66438
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:23Z
RPM download URL using TEST URL for validation
commit 6b07d43815a273af54b343dcf8b2d7083b804210
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:23Z
Dockerfile to create images for CloudStack management server using RPMs based on CentOS 6
commit ef23d7da3323b7fb5198523f1efb0114f5bb7733
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T18:13:47Z
initial README.md file for Dockerfiles instructions
commit 408615daea4d431a6c8594b7194e411293abb815
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T19:54:37Z
move Dockerfile into tools/docker
commit 73b1ab2cddc880a4d784fc6b6c8e43bb0b504708
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T20:39:04Z
move supervisord.conf, fix Dockerfile.centos6: comment copy of fixed file
commit cf1797974883540a4a6c1d691552a7c0c97adeea
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T20:41:06Z
fix conflict Dockerfile.centos6
commit bd1a29930e5f715b6428832ce8dba463e8522606
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-07T20:42:15Z
set init.sh to executable
commit 64b79581763c93a63c0fa96207e64fd526f1cd9a
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-08T01:16:14Z
add licenses
commit 3f7cdc4f030009b5fe9ae71bb2cf6bcda61373cb
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-08T01:20:46Z
change titles
commit 2e1c02aa26e924833d916ca926296bf07be784f8
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-09T02:32:15Z
add docker container for Marvin including test and config examples
commit 096fa16d33066c32ee94d436a459b877a99f8c9c
Author: Pierrre-Luc Dion <pd...@users.noreply.github.com>
Date: 2015-06-09T02:35:42Z
add license header
commit 981c479a11ce72b0c7e289ef630ac6f972dc2942
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-09T02:35:49Z
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack into dockerfile
commit ef109663f41f5bf4b1cc93b60e640a28f6901e36
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-09T02:36:19Z
Merge branch 'dockerfile' of github.com:pdion891/cloudstack into dockerfile
commit 0fc4f9aa680738f7009e62d8c6317c516e4fe132
Author: Pierrre-Luc Dion <pd...@users.noreply.github.com>
Date: 2015-06-10T02:43:58Z
add marvin scripts into /marvin
commit 616285604fc007bcdcf82e1ed04be3dc76c6c4b0
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-13T19:31:44Z
use another container for mysql database
commit 7e6fbc1e5fc0e68a6755e7b15d1913c07c5fe260
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-13T19:49:02Z
rename init.sh
commit a7cdf1019828c2d6386eb0d7ef7a9fe1b44b3aee
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-13T19:49:52Z
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack into dockerfile
commit efdeaef72bf1cbad14634a2d198de29946999ace
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-13T19:50:33Z
Merge branch 'dockerfile' of github.com:pdion891/cloudstack into dockerfile
commit 07dee393883451580e90848202de830db4ee1040
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-19T23:48:41Z
rename init.sh, update README.md
commit 5ccf8446d69f160bc65c737d87a1b084f9825ed6
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-19T23:53:13Z
Merge remote-tracking branch 'refs/remotes/origin/master' into dockerfile
commit 39fa9eb6033fbba5eb1968f57a0edf511348d324
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-20T00:04:38Z
remove installation of awsapi rpm
commit 0e01bf4963d550939753bc7b40c34ec744046150
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-06-20T13:15:44Z
fix init script output
commit fa6f1690187f4ad16b96a80606d68e3a42015144
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-07-19T13:47:40Z
add license header
commit 1f4c0d555949f8baaf5ac09d63453376394db9b2
Author: Pierre-Luc Dion <pd...@apache.org>
Date: 2015-07-19T13:55:32Z
add comment about the /dev/loop0 verfication (Docker limitation)
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by runseb <gi...@git.apache.org>.
Github user runseb commented on the pull request:
https://github.com/apache/cloudstack/pull/605#issuecomment-124565789
@DaanHoogland ( cc/ @pdion891 @wido ), this one is not Java so I am comfortable reviewing it. The bottom line is that I don't review the 33 commits I review the final state of the PR. So why keep the crap that led to it ? it moves two files, create a new one, edits a markdown.
It's simple enough. I don't care if PL rewrites history of his own fork, I want clean history in our master. you might see this as necessary documentation, but I see it as unnecessary garbage that will pollute our source, I don't need a one commit that removes one comment in master.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by pdion891 <gi...@git.apache.org>.
Github user pdion891 commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/605#discussion_r35436991
--- Diff: tools/docker/Dockerfile.marvin ---
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+# build for cloudstack_home_dir not this folder
+FROM python:2
+
+MAINTAINER "Apache CloudStack" <de...@cloudstack.apache.org>
+LABEL Vendor="Apache.org"
+LABEL License=ApacheV2
+LABEL Version=4.6.0
+
+ENV PKG_URL=http://jenkins.buildacloud.org/job/cloudstack-marvin-master/lastSuccessfulBuild/artifact/tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz
+
+RUN pip install --allow-external mysql-connector-python mysql-connector-python
+RUN pip install ${PKG_URL}
+
+RUN mkdir -p /marvin
+COPY setup/dev /marvin/dev
+COPY tools/marvin/marvin /marvin/marvin
+COPY test/integration /marvin/integration
+
+WORKDIR /marvin
--- End diff --
yeah, that make more sense, I'll update it.
Thanks :-)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:
https://github.com/apache/cloudstack/pull/605#issuecomment-124263885
come on guys, if this is what happened this is what we have got. Squash wht is not atomic and nothing else.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by runseb <gi...@git.apache.org>.
Github user runseb commented on the pull request:
https://github.com/apache/cloudstack/pull/605#issuecomment-123779835
LGTM if you address my couple comments.
And really, I would squash this (33 commits), I don't see why we need to keep all those tiny commits in our master branch.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by runseb <gi...@git.apache.org>.
Github user runseb commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/605#discussion_r35232143
--- Diff: tools/docker/Dockerfile.marvin ---
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+# build for cloudstack_home_dir not this folder
+FROM python:2
+
+MAINTAINER "Apache CloudStack" <de...@cloudstack.apache.org>
+LABEL Vendor="Apache.org"
+LABEL License=ApacheV2
+LABEL Version=4.6.0
+
+ENV PKG_URL=http://jenkins.buildacloud.org/job/cloudstack-marvin-master/lastSuccessfulBuild/artifact/tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz
+
+RUN pip install --allow-external mysql-connector-python mysql-connector-python
+RUN pip install ${PKG_URL}
+
+RUN mkdir -p /marvin
+COPY setup/dev /marvin/dev
+COPY tools/marvin/marvin /marvin/marvin
+COPY test/integration /marvin/integration
+
+WORKDIR /marvin
--- End diff --
no CMD or ENTRYPOINT here ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by runseb <gi...@git.apache.org>.
Github user runseb commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/605#discussion_r35232181
--- Diff: tools/docker/README.md ---
@@ -0,0 +1,66 @@
+
+# Docker Files
+
+Dockerfiles used to build CloudStack images available on Docker hub.
+
+
+## Use images from docker.io
+
+### CloudStack Management-server
+
+```
+docker pull docker.io/mysql:5.5
--- End diff --
remove .io ...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by pdion891 <gi...@git.apache.org>.
Github user pdion891 commented on the pull request:
https://github.com/apache/cloudstack/pull/605#issuecomment-124282315
I'll squash, I've been told it was better for code review many small commits than one big fat ass commit that nobody want to understand.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by pdion891 <gi...@git.apache.org>.
Github user pdion891 closed the pull request at:
https://github.com/apache/cloudstack/pull/605
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by runseb <gi...@git.apache.org>.
Github user runseb commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/605#discussion_r35435993
--- Diff: tools/docker/Dockerfile.marvin ---
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+# build for cloudstack_home_dir not this folder
+FROM python:2
+
+MAINTAINER "Apache CloudStack" <de...@cloudstack.apache.org>
+LABEL Vendor="Apache.org"
+LABEL License=ApacheV2
+LABEL Version=4.6.0
+
+ENV PKG_URL=http://jenkins.buildacloud.org/job/cloudstack-marvin-master/lastSuccessfulBuild/artifact/tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz
+
+RUN pip install --allow-external mysql-connector-python mysql-connector-python
+RUN pip install ${PKG_URL}
+
+RUN mkdir -p /marvin
+COPY setup/dev /marvin/dev
+COPY tools/marvin/marvin /marvin/marvin
+COPY test/integration /marvin/integration
+
+WORKDIR /marvin
--- End diff --
so you want to get a shell into the container everytime ?
$ docker run -ti marvin
34543534#
something like that ?
Because you will not use the same scripts everytime ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by runseb <gi...@git.apache.org>.
Github user runseb commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/605#discussion_r35232136
--- Diff: tools/docker/Dockerfile.centos6 ---
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+FROM centos:6
+
+MAINTAINER "Apache CloudStack" <de...@cloudstack.apache.org>
+LABEL Vendor="Apache.org"
+LABEL License=ApacheV2
+LABEL Version=4.6.0
+
+ENV PKG_URL=http://jenkins.buildacloud.org/job/build-dockerfile-centos6/lastSuccessfulBuild/artifact/dist/rpmbuild/RPMS/x86_64
+
+# MySQLd
+#RUN yum install mysql-server -y
+#RUN /usr/bin/mysql_install_db --user=mysql
+#RUN /usr/bin/mysqld_safe --user=mysql >/dev/null 2>&1 &
+#RUN (mysqld_safe &); sleep 5; mysqladmin -u root -p password 'password'
+
--- End diff --
Maybe you can merge some of those RUNS to reduce the number of layers ?
https://docs.docker.com/articles/dockerfile_best-practices/
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:
https://github.com/apache/cloudstack/pull/605#issuecomment-124246163
LGTM, but as @runseb says, please squash this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by pdion891 <gi...@git.apache.org>.
Github user pdion891 commented on the pull request:
https://github.com/apache/cloudstack/pull/605#issuecomment-124988512
closing this, another PR in progress from another branch.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Dockerfile
Posted by pdion891 <gi...@git.apache.org>.
Github user pdion891 commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/605#discussion_r35387474
--- Diff: tools/docker/Dockerfile.marvin ---
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+# build for cloudstack_home_dir not this folder
+FROM python:2
+
+MAINTAINER "Apache CloudStack" <de...@cloudstack.apache.org>
+LABEL Vendor="Apache.org"
+LABEL License=ApacheV2
+LABEL Version=4.6.0
+
+ENV PKG_URL=http://jenkins.buildacloud.org/job/cloudstack-marvin-master/lastSuccessfulBuild/artifact/tools/marvin/dist/Marvin-4.6.0-SNAPSHOT.tar.gz
+
+RUN pip install --allow-external mysql-connector-python mysql-connector-python
+RUN pip install ${PKG_URL}
+
+RUN mkdir -p /marvin
+COPY setup/dev /marvin/dev
+COPY tools/marvin/marvin /marvin/marvin
+COPY test/integration /marvin/integration
+
+WORKDIR /marvin
--- End diff --
No, because it's a set of tool that use the command line, so yes every time you /bin/bash into it will spawn a new process of the image. Do you see a better aproach ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---