summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/ubuntu
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-04-10 23:01:32 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-04-10 23:01:32 +0000
commit2120ffe5068a7a8078c04475816295708248b63b (patch)
tree4ca8e7e67f434f41a327a0887675ba5843fe639e /sca-cpp/trunk/ubuntu
parent604fc67a15eda2df9ee0ffe13480069e3e7766dc (diff)
Minor build cleanup and fixes. Add a few scripts to help run automated builds on EC2 Ubuntu 9.10 images.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@932801 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/ubuntu/ubuntu-bin-image4
-rwxr-xr-xsca-cpp/trunk/ubuntu/ubuntu-dev-image (renamed from sca-cpp/trunk/ubuntu/ubuntu-source-image)0
-rwxr-xr-xsca-cpp/trunk/ubuntu/ubuntu-install16
-rwxr-xr-xsca-cpp/trunk/ubuntu/uec2-bin-image23
-rwxr-xr-xsca-cpp/trunk/ubuntu/uec2-conf39
-rwxr-xr-xsca-cpp/trunk/ubuntu/uec2-setenv34
-rwxr-xr-xsca-cpp/trunk/ubuntu/uec2-start29
-rwxr-xr-xsca-cpp/trunk/ubuntu/uec2-status23
-rwxr-xr-xsca-cpp/trunk/ubuntu/uec2-stop24
9 files changed, 180 insertions, 12 deletions
diff --git a/sca-cpp/trunk/ubuntu/ubuntu-bin-image b/sca-cpp/trunk/ubuntu/ubuntu-bin-image
index 5c8a89d2a4..9bca168920 100755
--- a/sca-cpp/trunk/ubuntu/ubuntu-bin-image
+++ b/sca-cpp/trunk/ubuntu/ubuntu-bin-image
@@ -35,11 +35,11 @@ sudo apt-get -y install wget git-core autoconf automake g++ libtool
if [ "$?" != "0" ]; then
exit $?
fi
-sudo apt-get -y install privbind
+sudo apt-get -y install libssl-dev
if [ "$?" != "0" ]; then
exit $?
fi
-sudo apt-get -y install libssl-dev
+sudo apt-get -y install libevent-dev
if [ "$?" != "0" ]; then
exit $?
fi
diff --git a/sca-cpp/trunk/ubuntu/ubuntu-source-image b/sca-cpp/trunk/ubuntu/ubuntu-dev-image
index a2b45ece3b..a2b45ece3b 100755
--- a/sca-cpp/trunk/ubuntu/ubuntu-source-image
+++ b/sca-cpp/trunk/ubuntu/ubuntu-dev-image
diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install b/sca-cpp/trunk/ubuntu/ubuntu-install
index ac5017e255..fc50f0cb2e 100755
--- a/sca-cpp/trunk/ubuntu/ubuntu-install
+++ b/sca-cpp/trunk/ubuntu/ubuntu-install
@@ -30,12 +30,6 @@ if [ "$?" != "0" ]; then
exit $?
fi
-# Install the required binaries
-sudo apt-get -y install privbind
-if [ "$?" != "0" ]; then
- exit $?
-fi
-
# Build Apache HTTP server
sudo apt-get -y install libssl-dev
if [ "$?" != "0" ]; then
@@ -68,7 +62,7 @@ if [ "$?" != "0" ]; then
fi
cd $build
-# Build tinycdb
+# Build Tinycdb
wget http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz
tar xzf tinycdb_0.77.tar.gz
cd tinycdb-0.77
@@ -181,6 +175,9 @@ if [ "$?" != "0" ]; then
exit $?
fi
cd $build
+mkdir -p $build/libstrophe-bin/include
+cp $build/libstrophe/*.h $build/libstrophe-bin/include
+cp $build/libstrophe/src/*.h $build/libstrophe-bin/include
# Install Apache Vysper
sudo apt-get -y install openjdk-6-jdk
@@ -210,12 +207,11 @@ fi
cd $build
# Build Tuscany SCA
-#git clone git://git.apache.org/tuscany-sca-cpp
-git clone ssh://delfinoj@10.1.1.58/home/delfinoj/SCAZone/Source/tuscany-sca-cpp/.git
+git clone git://git.apache.org/tuscany-sca-cpp
cd tuscany-sca-cpp
cp etc/git-exclude .git/info/exclude
./bootstrap
-./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --with-memcached=$build/memcached-1.4.4-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --enable-threads --enable-python --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe --with-vysper=$build/vysper-0.5 --enable-sqldb --with-pgsql=$build/postgresql-9.0-bin
+./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --with-memcached=$build/memcached-1.4.4-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --enable-threads --enable-python --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --with-vysper=$build/vysper-0.5 --enable-sqldb --with-pgsql=$build/postgresql-9.0-bin
make
make install
if [ "$?" != "0" ]; then
diff --git a/sca-cpp/trunk/ubuntu/uec2-bin-image b/sca-cpp/trunk/ubuntu/uec2-bin-image
new file mode 100755
index 0000000000..f4d738a050
--- /dev/null
+++ b/sca-cpp/trunk/ubuntu/uec2-bin-image
@@ -0,0 +1,23 @@
+# 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.
+
+# Install a Tuscany image on an EC2 instance
+host=$1
+
+# Download and execute Tuscany SCA install script
+ssh -i $HOME/.ec2/ec2-tuscany-keypair.pem ubuntu@$host "wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-image; chmod 700 ./ubuntu-bin-image; ./ubuntu-bin-image"
+
diff --git a/sca-cpp/trunk/ubuntu/uec2-conf b/sca-cpp/trunk/ubuntu/uec2-conf
new file mode 100755
index 0000000000..34ec6f5d49
--- /dev/null
+++ b/sca-cpp/trunk/ubuntu/uec2-conf
@@ -0,0 +1,39 @@
+# 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.
+
+# Configure EC2 for use with Tuscany SCA
+here=`readlink -f $0`; here=`dirname $here`
+$here/uec2-setenv
+
+# Display commands as they are executed
+set -x
+
+# Install EC2 tools
+# See https://help.ubuntu.com/community/EC2StartersGuide for more info
+sudo apt-get install ec2-api-tools
+
+# Create an EC2 SSH keypair if necessary
+if [ ! -f $HOME/.ec2/ec2-tuscany-keypair.pem ]; then
+ ec2-add-keypair ec2-tuscany-keypair --region us-west-1 > $HOME/.ec2/ec2-tuscany-keypair.pem
+ chmod 600 $HOME/.ec2/ec2-tuscany-keypair.pem
+fi
+
+# Authorize SSH, HTTP and HTTPS access to EC2 instances
+ec2-authorize default -p 22 --region us-west-1
+ec2-authorize default -p 80 --region us-west-1
+ec2-authorize default -p 443 --region us-west-1
+
diff --git a/sca-cpp/trunk/ubuntu/uec2-setenv b/sca-cpp/trunk/ubuntu/uec2-setenv
new file mode 100755
index 0000000000..67d57df83a
--- /dev/null
+++ b/sca-cpp/trunk/ubuntu/uec2-setenv
@@ -0,0 +1,34 @@
+# 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.
+
+# Configure EC2 environment variables
+export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+
+# Expect to find your EC2 private key and X.509 certificate in $HOME/.ec2
+key=`ls $HOME/.ec2/pk-*.pem`
+if [ "$key" = "" ]; then
+ echo "Couldn't find EC2 private key $HOME/.ec2/pk-*.pem"
+ exit 1
+fi
+cert=`ls $HOME/.ec2/cert-*.pem`
+if [ "$cert" = "" ]; then
+ echo "Couldn't find EC2 X.509 certificate $HOME/.ec2/pk-*.pem"
+ exit 1
+fi
+export EC2_PRIVATE_KEY=$key
+export EC2_CERT=$cert
+
diff --git a/sca-cpp/trunk/ubuntu/uec2-start b/sca-cpp/trunk/ubuntu/uec2-start
new file mode 100755
index 0000000000..86c47a3c36
--- /dev/null
+++ b/sca-cpp/trunk/ubuntu/uec2-start
@@ -0,0 +1,29 @@
+# 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.
+
+# Start an Ubuntu 9.10 EC2 instance for use with Tuscany
+
+here=`readlink -f $0`; here=`dirname $here`
+$here/uec2-setenv
+
+# Here are the AMIs you can use in the different EC2 regions:
+# US east 1 - ami-bb709dd2
+# US west 1 - ami-c32e7f86
+# EU west 1 - ami-2fc2e95b
+
+ec2-run-instances "ami-c32e7f86" -k ec2-tuscany-keypair --region us-west-1
+
diff --git a/sca-cpp/trunk/ubuntu/uec2-status b/sca-cpp/trunk/ubuntu/uec2-status
new file mode 100755
index 0000000000..46d426b6f1
--- /dev/null
+++ b/sca-cpp/trunk/ubuntu/uec2-status
@@ -0,0 +1,23 @@
+# 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.
+
+# Display the status of EC2 instances
+here=`readlink -f $0`; here=`dirname $here`
+$here/uec2-setenv
+
+ec2-describe-instances --region us-west-1
+
diff --git a/sca-cpp/trunk/ubuntu/uec2-stop b/sca-cpp/trunk/ubuntu/uec2-stop
new file mode 100755
index 0000000000..0399f2b3f2
--- /dev/null
+++ b/sca-cpp/trunk/ubuntu/uec2-stop
@@ -0,0 +1,24 @@
+# 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.
+
+# Terminate an EC2 instance
+instance=$1
+here=`readlink -f $0`; here=`dirname $here`
+$here/uec2-setenv
+
+ec2-terminate-instances $instance --region us-west-1
+