Repository: stratos
Updated Branches:
  refs/heads/master d8443ac36 -> 5ab240d50


add initial docker puppet test node


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5ab240d5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5ab240d5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5ab240d5

Branch: refs/heads/master
Commit: 5ab240d50223877d88fcc8d52f390f4e2986b5bb
Parents: d8443ac
Author: Chris Snow <[email protected]>
Authored: Mon Aug 25 21:02:50 2014 +0000
Committer: Chris Snow <[email protected]>
Committed: Mon Aug 25 21:03:18 2014 +0000

----------------------------------------------------------------------
 .../puppettestnode/Dockerfile                   | 36 ++++++++++++++++++
 .../puppettestnode/docker-build.sh              | 25 ++++++++++++
 tools/stratos-docker-images/puppettestnode/run  | 32 ++++++++++++++++
 .../puppettestnode/run-example.sh               | 40 ++++++++++++++++++++
 4 files changed, 133 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab240d5/tools/stratos-docker-images/puppettestnode/Dockerfile
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/puppettestnode/Dockerfile 
b/tools/stratos-docker-images/puppettestnode/Dockerfile
new file mode 100755
index 0000000..b7aad48
--- /dev/null
+++ b/tools/stratos-docker-images/puppettestnode/Dockerfile
@@ -0,0 +1,36 @@
+# ----------------------------------------------------------------------------
+#
+#  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 ubuntu:14.04
+
+RUN apt-get update -qq 
+RUN apt-get install -y wget dnsutils
+
+RUN wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
+RUN dpkg -i puppetlabs-release-precise.deb
+RUN apt-get update -qq 
+RUN apt-get install -y puppet
+
+ADD run /usr/local/bin/run
+RUN chmod +x /usr/local/bin/run
+
+CMD ["/usr/local/bin/run"]
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab240d5/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
new file mode 100755
index 0000000..2359cb6
--- /dev/null
+++ b/tools/stratos-docker-images/puppettestnode/docker-build.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+#
+#  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.
+#
+# ----------------------------------------------------------------------------
+
+set -e # exit on error
+
+docker build -t=apachestratos/puppettestnode .

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab240d5/tools/stratos-docker-images/puppettestnode/run
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/puppettestnode/run 
b/tools/stratos-docker-images/puppettestnode/run
new file mode 100755
index 0000000..4cf6015
--- /dev/null
+++ b/tools/stratos-docker-images/puppettestnode/run
@@ -0,0 +1,32 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+#
+#  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.
+#
+# ----------------------------------------------------------------------------
+
+set -e
+
+echo =============================
+echo Environment Variable Settings
+echo =============================
+echo Setting PUPPET_HOST=${PUPPET_HOST}
+echo Setting PUPPET_PORT=${PUPPET_PORT}
+echo =============================
+
+puppet agent --masterport ${PUPPET_PORT} --server ${PUPPET_HOST} --verbose 
--test

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab240d5/tools/stratos-docker-images/puppettestnode/run-example.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-docker-images/puppettestnode/run-example.sh 
b/tools/stratos-docker-images/puppettestnode/run-example.sh
new file mode 100755
index 0000000..e7105d7
--- /dev/null
+++ b/tools/stratos-docker-images/puppettestnode/run-example.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+#
+#  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.
+#
+# ----------------------------------------------------------------------------
+
+set -e 
+
+cat > addpuppettestnode.txt <<EOF
+server 127.0.0.1
+zone example.com
+prereq nxdomain testnode.$DOMAIN.
+update add testnodde.$DOMAIN. 10  A $IP_ADDR
+send
+EOF
+nsupdate addpuppettestnode.txt
+rm -f addpuppettestnode.txt
+
+export DNS_IP_ADDR=172.17.42.1
+
+echo Setting DNS to $DNS_IP_ADDR
+
+docker run -i -t --dns=$DNS_IP_ADDR -h testnode.$DOMAIN -e 
"PUPPET_HOST=puppet.$DOMAIN" -e "PUPPET_PORT=$PUPPET_PORT" 
apachestratos/puppettestnode /bin/bash
+

Reply via email to