You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ch...@apache.org on 2014/08/29 20:48:15 UTC
git commit: add versioning to stratos docker images
Repository: stratos
Updated Branches:
refs/heads/master 3eedcf743 -> beffcb3a8
add versioning to stratos docker images
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/beffcb3a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/beffcb3a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/beffcb3a
Branch: refs/heads/master
Commit: beffcb3a85196b840291e2d1fafd9c87bf09a8af
Parents: 3eedcf7
Author: Chris Snow <ch...@apache.org>
Authored: Fri Aug 29 18:47:42 2014 +0000
Committer: Chris Snow <ch...@apache.org>
Committed: Fri Aug 29 18:47:42 2014 +0000
----------------------------------------------------------------------
pom.xml | 1 +
tools/pom.xml | 39 +++++++++++
tools/stratos-docker-images/README.md | 5 +-
.../activemq/docker-build.sh | 2 +-
.../stratos-docker-images/bind/docker-build.sh | 2 +-
tools/stratos-docker-images/build-all.sh | 4 ++
.../stratos-docker-images/mysql/docker-build.sh | 3 +-
tools/stratos-docker-images/pom.xml | 74 ++++++++++++++++++++
.../puppetmaster/docker-build.sh | 2 +-
.../puppettestnode/docker-build.sh | 2 +-
tools/stratos-docker-images/push-all.sh | 14 ++--
.../stratos/docker-build.sh | 2 +-
12 files changed, 136 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7b6ce65..3f8454e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -84,6 +84,7 @@
<module>extensions</module>
<module>features</module>
<module>products</module>
+ <module>tools</module>
</modules>
<repositories>
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/pom.xml
----------------------------------------------------------------------
diff --git a/tools/pom.xml b/tools/pom.xml
new file mode 100644
index 0000000..b61f0b2
--- /dev/null
+++ b/tools/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>stratos-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>stratos-tools</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Stratos - Tools</name>
+ <description>Apache Stratos plafrom tools</description>
+ <url>http://apache.org</url>
+
+ <modules>
+ <module>stratos-docker-images</module>
+ </modules>
+</project>
+
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/README.md
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/README.md b/tools/stratos-docker-images/README.md
index 17b0b49..3d01a28 100644
--- a/tools/stratos-docker-images/README.md
+++ b/tools/stratos-docker-images/README.md
@@ -7,7 +7,10 @@ docker images for installing stratos
To build mysql, activemq and stratos images:
-`./build-all.sh`
+`mvn install -Pdocker-build`
+
+The above command requires you to be able to execute the docker command without sudo usually by being in the 'docker' group.
+
### Upload to registry.hub.docker.com
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/activemq/docker-build.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/activemq/docker-build.sh b/tools/stratos-docker-images/activemq/docker-build.sh
index 81daa41..36ce6c2 100755
--- a/tools/stratos-docker-images/activemq/docker-build.sh
+++ b/tools/stratos-docker-images/activemq/docker-build.sh
@@ -23,4 +23,4 @@
# Server configuration script for Apache Stratos
# ----------------------------------------------------------------------------
-docker build -t=apachestratos/activemq .
+docker build -t=apachestratos/activemq:$VERSION .
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/bind/docker-build.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/bind/docker-build.sh b/tools/stratos-docker-images/bind/docker-build.sh
index 0edb9e7..243886e 100755
--- a/tools/stratos-docker-images/bind/docker-build.sh
+++ b/tools/stratos-docker-images/bind/docker-build.sh
@@ -20,4 +20,4 @@
#
# ----------------------------------------------------------------------------
-docker build -t=apachestratos/bind .
+docker build -t=apachestratos/bind:$VERSION .
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/build-all.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/build-all.sh b/tools/stratos-docker-images/build-all.sh
index a57568a..af9443b 100755
--- a/tools/stratos-docker-images/build-all.sh
+++ b/tools/stratos-docker-images/build-all.sh
@@ -20,10 +20,14 @@
#
# ----------------------------------------------------------------------------
+# This script is executed by mvn - see the README for more information
+
set -e
export STRATOS_SOURCE="$(cd ../../; pwd)"
+export VERSION=$VERSION
+
cd bind
./docker-build.sh
cd ..
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/mysql/docker-build.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/mysql/docker-build.sh b/tools/stratos-docker-images/mysql/docker-build.sh
index 98346d1..1477c9c 100755
--- a/tools/stratos-docker-images/mysql/docker-build.sh
+++ b/tools/stratos-docker-images/mysql/docker-build.sh
@@ -43,5 +43,4 @@ rm files/mysql.tmp.*
### build docker
-docker build -t=apachestratos/mysql .
-#sudo docker push apachestratos/mysql
+docker build -t=apachestratos/mysql:$VERSION .
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/pom.xml
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/pom.xml b/tools/stratos-docker-images/pom.xml
new file mode 100644
index 0000000..3e4f187
--- /dev/null
+++ b/tools/stratos-docker-images/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ # 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.apache.stratos</groupId>
+ <artifactId>stratos-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>stratos-docker-images</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Stratos - Docker Images</name>
+ <description>Apache Stratos plafrom docker images</description>
+ <url>http://apache.org</url>
+
+ <dependencies>
+
+ </dependencies>
+
+ <profiles>
+ <!-- Build docker images -->
+ <profile>
+ <id>docker-build</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <configuration>
+ <executable>bash</executable>
+ <workingDirectory>.</workingDirectory>
+ <arguments>
+ <argument>build-all.sh</argument>
+ </arguments>
+ <environmentVariables>
+ <VERSION>${project.version}</VERSION>
+ </environmentVariables>
+ </configuration>
+ <id>docker-build</id>
+ <phase>install</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/puppetmaster/docker-build.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/puppetmaster/docker-build.sh b/tools/stratos-docker-images/puppetmaster/docker-build.sh
index 62be759..f18c264 100755
--- a/tools/stratos-docker-images/puppetmaster/docker-build.sh
+++ b/tools/stratos-docker-images/puppetmaster/docker-build.sh
@@ -57,4 +57,4 @@ cd files/
tar -cvzf agentfiles.tgz apache-stratos-cartridge-agent-*.zip apache-stratos-load-balancer-*.zip
cd ..
-docker build -t=apachestratos/puppetmaster .
+docker build -t=apachestratos/puppetmaster:$VERSION .
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/puppettestnode/docker-build.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/puppettestnode/docker-build.sh b/tools/stratos-docker-images/puppettestnode/docker-build.sh
index 2359cb6..e0d2270 100755
--- a/tools/stratos-docker-images/puppettestnode/docker-build.sh
+++ b/tools/stratos-docker-images/puppettestnode/docker-build.sh
@@ -22,4 +22,4 @@
set -e # exit on error
-docker build -t=apachestratos/puppettestnode .
+docker build -t=apachestratos/puppettestnode:$VERSION .
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/push-all.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/push-all.sh b/tools/stratos-docker-images/push-all.sh
index abee36d..f0be3fd 100755
--- a/tools/stratos-docker-images/push-all.sh
+++ b/tools/stratos-docker-images/push-all.sh
@@ -22,26 +22,28 @@
set -e
+version=
+
cd bind
-docker push apachestratos/bind
+docker push apachestratos/bind:$version
cd ..
cd puppetmaster
-docker push apachestratos/puppetmaster
+docker push apachestratos/puppetmaster:$version
cd ..
cd puppettestnode
-docker push apachestratos/puppettestnode
+docker push apachestratos/puppettestnode:$version
cd ..
cd mysql
-docker push apachestratos/mysql
+docker push apachestratos/mysql:$version
cd ..
cd activemq
-docker push apachestratos/activemq
+docker push apachestratos/activemq:$version
cd ..
cd stratos
-docker push apachestratos/stratos
+docker push apachestratos/stratos:$version
cd ..
http://git-wip-us.apache.org/repos/asf/stratos/blob/beffcb3a/tools/stratos-docker-images/stratos/docker-build.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/stratos/docker-build.sh b/tools/stratos-docker-images/stratos/docker-build.sh
index fc890cc..cc6a248 100755
--- a/tools/stratos-docker-images/stratos/docker-build.sh
+++ b/tools/stratos-docker-images/stratos/docker-build.sh
@@ -32,4 +32,4 @@ cp -rf $STRATOS_SOURCE/tools/stratos-installer files/
cp -rf $STRATOS_SOURCE/extensions/ files/
-docker build -t=apachestratos/stratos .
+docker build -t=apachestratos/stratos:$VERSION .