Skip to content

Instantly share code, notes, and snippets.

@akashin
Created May 24, 2014 14:01
Show Gist options
  • Save akashin/d32694581e1247221351 to your computer and use it in GitHub Desktop.
Save akashin/d32694581e1247221351 to your computer and use it in GitHub Desktop.
Scripts for uploading wookie pipeline to cocaine
#!/bin/sh
# Upload application into cocaine
# argument: Path to application executable
APP_PATH=$1
APP=${APP_PATH##*/}
cocaine-tool app stop --name $APP
cocaine-tool app remove --name $APP
rm -rf temp 2>/dev/null
mkdir temp
cd temp
cp $APP_PATH .
cat ../manifest-template.json | sed "s/APP/$APP/g" > manifest.json
tar -cf ${APP}.tar $APP
cocaine-tool app upload --manifest manifest.json --package ${APP}.tar --name $APP
cocaine-tool profile upload --name default --profile=../profile.json
cocaine-tool app start --name ${APP} --profile default
#!/bin/sh
# Uploads pipeline applications into cocaine
# argument: Path to folder with pipeline executables
APP_PATH=$1
./upload.sh $APP_PATH/first_processor
./upload.sh $APP_PATH/html_processor
./upload.sh $APP_PATH/feature_extractor
./upload.sh $APP_PATH/last_processor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment