You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by is...@apache.org on 2014/03/21 17:40:32 UTC

[1/2] git commit: Add init script for vCloud

Repository: incubator-stratos
Updated Branches:
  refs/heads/master fd928f0cc -> 0e67bfd76


Add init script for vCloud


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

Branch: refs/heads/master
Commit: c3e6fead74261c6a4e83e6c25be507954aa9e655
Parents: 1fdac0b
Author: M. Isuru Tharanga Chrishantha Perera <is...@apache.org>
Authored: Fri Mar 21 22:09:08 2014 +0530
Committer: M. Isuru Tharanga Chrishantha Perera <is...@apache.org>
Committed: Fri Mar 21 22:09:08 2014 +0530

----------------------------------------------------------------------
 .../resources/conf/scripts/sh/customization     |  1 +
 tools/puppet3-agent/init-vcloud.sh              | 80 ++++++++++++++++++++
 2 files changed, 81 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c3e6fead/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/scripts/sh/customization
----------------------------------------------------------------------
diff --git a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/scripts/sh/customization b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/scripts/sh/customization
index 53eb31c..fb16ea3 100644
--- a/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/scripts/sh/customization
+++ b/features/cloud-controller/org.apache.stratos.cloud.controller.feature/src/main/resources/conf/scripts/sh/customization
@@ -1,3 +1,4 @@
 #!/bin/sh
 mkdir -p /tmp/payload
 echo "PAYLOAD" > /tmp/payload/launch-params
+/root/bin/init-vcloud.sh > /tmp/puppet_log

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c3e6fead/tools/puppet3-agent/init-vcloud.sh
----------------------------------------------------------------------
diff --git a/tools/puppet3-agent/init-vcloud.sh b/tools/puppet3-agent/init-vcloud.sh
new file mode 100755
index 0000000..168137a
--- /dev/null
+++ b/tools/puppet3-agent/init-vcloud.sh
@@ -0,0 +1,80 @@
+#!/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.
+#
+# --------------------------------------------------------------
+
+MKDIR=`which mkdir`
+UNZIP=`which unzip`
+ECHO=`which echo`
+FIND=`which find`
+GREP=`which grep`
+RM=`which rm`
+XARGS=`which xargs`
+SED=`which sed`
+CUT=`which cut`
+AWK=`which awk`
+IFCONFIG=`which ifconfig`
+HOSTNAME=`which hostname`
+SLEEP=`which sleep`
+TR=`which tr`
+HEAD=`which head`
+WGET=`which wget`
+PUPPETD=`which puppet`
+AGENT="agent"
+PUPPETAGENT="${PUPPETD} ${AGENT}"
+
+COMMAND="${PUPPETAGENT} -vt"
+IP=`${IFCONFIG} eth0 | ${GREP} -e "inet addr" | ${AWK} '{print $2}' | ${CUT} -d ':' -f 2`
+LOG=/tmp/puppet-init.log
+
+HOSTSFILE=/etc/hosts
+HOSTNAMEFILE=/etc/hostname
+PUPPETCONF=/etc/puppet/puppet.conf
+
+read_master() {
+	${COMMAND}
+}
+
+DATE=`date +%d%m%y%S`
+RANDOMNUMBER="`${TR} -c -d 0-9 < /dev/urandom | ${HEAD} -c 4`${DATE}"
+
+if [ -d /tmp/payload ]; then
+
+	cd /tmp/payload
+	SERVICE_NAME=`sed 's/,/\n/g' launch-params | grep SERVICE_NAME | cut -d "=" -f 2`
+	DEPLOYMENT=`sed 's/,/\n/g' launch-params | grep DEPLOYMENT | cut -d "=" -f 2`
+	INSTANCE_HOSTNAME=`sed 's/,/\n/g' launch-params | grep HOSTNAME | cut -d "=" -f 2`
+	PUPPET_IP=`sed 's/,/\n/g' launch-params | grep PUPPET_IP | cut -d "=" -f 2`
+	PUPPET_HOSTNAME=`sed 's/,/\n/g' launch-params | grep PUPPET_HOSTNAME | cut -d "=" -f 2`
+	PUPPET_ENV=`sed 's/,/\n/g' launch-params | grep PUPPET_ENV | cut -d "=" -f 2`
+	NODEID="${RANDOMNUMBER}.${DEPLOYMENT}.${SERVICE_NAME}"
+	#essential to have PUPPET_HOSTNAME at the end in order to auto-sign the certs
+	DOMAIN="${PUPPET_HOSTNAME}"
+	${ECHO} -e "\nNode Id ${NODEID}\n"
+	${ECHO} -e "\nDomain ${DOMAIN}\n"
+    
+    ARGS=("-n${NODEID}" "-d${DOMAIN}" "-s${PUPPET_IP}")
+    ${ECHO} "\nRunning puppet installation with arguments: ${ARGS[@]}"
+    exec /root/bin/puppetinstall/puppetinstall "${ARGS[@]}"
+
+fi
+
+# END
+


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by is...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


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

Branch: refs/heads/master
Commit: 0e67bfd768a01da7d1c51f9060881d6a3d2314e9
Parents: c3e6fea fd928f0
Author: M. Isuru Tharanga Chrishantha Perera <is...@apache.org>
Authored: Fri Mar 21 22:10:08 2014 +0530
Committer: M. Isuru Tharanga Chrishantha Perera <is...@apache.org>
Committed: Fri Mar 21 22:10:08 2014 +0530

----------------------------------------------------------------------
 .../stratos/cartridge/agent/CartridgeAgent.java |  17 +-
 .../cartridge/agent/RepositoryFileListener.java |   8 +-
 .../git/impl/GitBasedArtifactRepository.java    |  90 +--
 .../config/CartridgeAgentConfiguration.java     |  21 +-
 .../publisher/HealthStatisticsNotifier.java     |  22 +-
 .../agent/util/CartridgeAgentConstants.java     |   1 +
 .../agent/util/CartridgeAgentUtils.java         |  17 +-
 .../stratos/cli/RestCommandLineService.java     |   7 +-
 .../cli/beans/cartridge/CartridgeInfoBean.java  |  11 +
 .../stratos/cli/commands/SubscribeCommand.java  |  15 +-
 .../apache/stratos/cli/utils/CliConstants.java  |   3 +
 .../controller/iaases/OpenstackNovaIaas.java    |   3 +-
 .../impl/CloudControllerServiceImpl.java        |   5 +-
 .../balancer/cache/AlgorithmContextCache.java   |  10 +-
 .../console/themes/theme1/pages/index.hbs       |  11 +-
 .../console/themes/theme1/pages/plain.hbs       |   2 +-
 .../console/themes/theme1/partials/login.hbs    |   4 +-
 .../themes/theme1/ui/Open_Sans/LICENSE.txt      | 202 +++++
 .../theme1/ui/Open_Sans/OpenSans-Bold.ttf       | Bin 0 -> 224592 bytes
 .../theme1/ui/Open_Sans/OpenSans-BoldItalic.ttf | Bin 0 -> 213292 bytes
 .../theme1/ui/Open_Sans/OpenSans-ExtraBold.ttf  | Bin 0 -> 222584 bytes
 .../ui/Open_Sans/OpenSans-ExtraBoldItalic.ttf   | Bin 0 -> 213420 bytes
 .../theme1/ui/Open_Sans/OpenSans-Italic.ttf     | Bin 0 -> 212896 bytes
 .../theme1/ui/Open_Sans/OpenSans-Light.ttf      | Bin 0 -> 222412 bytes
 .../ui/Open_Sans/OpenSans-LightItalic.ttf       | Bin 0 -> 213128 bytes
 .../theme1/ui/Open_Sans/OpenSans-Regular.ttf    | Bin 0 -> 217360 bytes
 .../theme1/ui/Open_Sans/OpenSans-Semibold.ttf   | Bin 0 -> 221328 bytes
 .../ui/Open_Sans/OpenSans-SemiboldItalic.ttf    | Bin 0 -> 212820 bytes
 .../themes/theme1/ui/Open_Sans/open_sans.css    |  18 +
 .../theme1/ui/custom-font-new/LICENSE.txt       |  12 +
 .../themes/theme1/ui/custom-font-new/README.txt |  75 ++
 .../theme1/ui/custom-font-new/config.json       | 740 +++++++++++++++++++
 .../theme1/ui/custom-font-new/css/animation.css |  85 +++
 .../ui/custom-font-new/css/fontello-codes.css   | 112 +++
 .../custom-font-new/css/fontello-embedded.css   | 165 +++++
 .../custom-font-new/css/fontello-ie7-codes.css  | 112 +++
 .../ui/custom-font-new/css/fontello-ie7.css     | 123 +++
 .../theme1/ui/custom-font-new/css/fontello.css  | 163 ++++
 .../themes/theme1/ui/custom-font-new/demo.html  | 433 +++++++++++
 .../theme1/ui/custom-font-new/font/fontello.eot | Bin 0 -> 30296 bytes
 .../theme1/ui/custom-font-new/font/fontello.svg | 122 +++
 .../theme1/ui/custom-font-new/font/fontello.ttf | Bin 0 -> 30128 bytes
 .../ui/custom-font-new/font/fontello.woff       | Bin 0 -> 22732 bytes
 .../manager/CartridgeSubscriptionManager.java   |  15 +-
 .../manager/subscription/SubscriptionData.java  |  10 +
 .../manager/utils/CartridgeConstants.java       |   2 +
 .../rest/endpoint/bean/CartridgeInfoBean.java   |  10 +
 .../rest/endpoint/services/ServiceUtils.java    |   1 +
 .../modules/distribution/src/bin/stratos.sh     |   1 +
 tools/puppet3/modules/tomcat/manifests/init.pp  |   5 +
 .../modules/tomcat/templates/server.xml.erb     |   8 +-
 .../puppet3/modules/tomcat/templates/tomcat.erb | Bin 0 -> 1364 bytes
 .../config/sm/repository/conf/carbon.xml        |   2 +-
 tools/stratos-installer/setup.sh                |  17 +-
 54 files changed, 2542 insertions(+), 138 deletions(-)
----------------------------------------------------------------------