Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
export TMPDIR=/tmp
# Download the package to stage
echo "Downloading to /app"
curl $STAGER_URL/data > $TMPDIR/raw.tar.gz 2>/dev/null
cd /app
$ apc app create rubytest --staging=ruby
...
Packaging... done
Uploading package... done
[STAGING] Subscribing to the staging process...
[STAGING] Beginning staging with 'ruby' pipeline, 2 stager(s) defined.
[STAGING] Launching instance of stager 'ruby'...
[STAGING] Downloading package for processing...
[STAGING] Found Rack application
[STAGING] Stager needs relaunching
@apcera-code
apcera-code / apache-java.yml
Last active April 19, 2016 18:12
Deploying Spark on the Apcera Cloud Platform: creating a custom java package manifest
name: "java-1.8"
version: "1.8.77"
provides [
{ runtime: "java" },
{ runtime: "java-1" },
{ runtime: "java-1.8" },
{ runtime: "java-1.8.0" },
{ runtime: "java-1.8.0_77" } ]
@apcera-code
apcera-code / command-deploy-java-package
Last active September 7, 2016 16:44
Deploying Spark on the Apcera Cloud Platform: This is the command line to deploy the Java 1.8 package with the custom package manifest
apc package build --name java-1.8 java-package.conf
@apcera-code
apcera-code / apace-spark.yml
Created April 19, 2016 18:13
Deploying Spark on the Apcera Cloud Platform: creating a custom spark package manifest
name: "spark"
version: "1.6.1"
sources [
{url: "http://apache.mirror.anlx.net/spark/spark-1.6.1/spark-1.6.1-bin-hadoop2.6.tgz"},
]
build_depends [
{ package: "build-essential" }
]
@apcera-code
apcera-code / command-deploy-spark-package
Created April 19, 2016 18:16
Deploying Spark on the Apcera Cloud Platform: This is the command line to deploy the Spark 1.6 package with the custom manifest
apc package build --name spark-1.6 spark-package.conf
@apcera-code
apcera-code / apache-spark-apcera.yml
Created April 19, 2016 18:19
Deploying Spark on the Apcera Cloud Platform: this goes one step further and define one last package as much as possible, so that Spark cluster could be created, repeatedly, as simply and as fast as possible
name: "spark-apcera"
version: "1.6.1"
build_depends [
{package: "build-essential"}
]
depends [
{runtime: "spark-1.6.0"}
]
@apcera-code
apcera-code / command-deploy-spark-apcera-package
Created April 19, 2016 18:24
Deploying Spark on the Apcera Cloud Platform: This is the command line to deploy the Spark 1.6 cluster with the custom manifest
apc package build --name spark-apcera-1.6 spark-apcera-package.conf
@apcera-code
apcera-code / start-master.sh
Last active April 19, 2016 18:28
Deploying Spark on the Apcera Cloud Platform: this is the start master bash script for the Spark package
#!/bin/bash
set -e
export SPARK_LOG_DIR=/app/logs
export VIRTUAL_NETWORK_IP=`ifconfig | grep "inet addr" | cut -d: -f2 | grep -v "169." | grep -v "127.0.0.1" | cut -d ' ' -f1`
$SPARK_HOME/sbin/start-master.sh -h $VIRTUAL_NETWORK_IP
tail -f /app/logs/*
@apcera-code
apcera-code / start-slave.sh
Last active April 19, 2016 18:28
Deploying Spark on the Apcera Cloud Platform: this is the start slave bash script for the Spark package
export SPARK_WORKER_DIR=/app/work
export SPARK_LOG_DIR=/app/logs
export VIRTUAL_NETWORK_IP=`ifconfig | grep "inet addr" | cut -d: -f2 | grep -v "169." | grep -v "127.0.0.1" | cut -d ' ' -f1`
$SPARK_HOME/sbin/start-slave.sh -h $VIRTUAL_NETWORK_IP $SPARK_MASTER
tail -f /app/logs/*