Skip to content
Browse files

Remove some Micro Cloud Foundry overrides.

These overrides are no longer needed. Also add new jobs to the Micro Cloud
Foundry.

Change-Id: I9b3978b3ef401cf63607c424411105a56913e701
  • Loading branch information...
1 parent 0ab0c6c commit 11ea37bfcd3d6166a452056538517e0d12bffeb5 @mmb mmb committed Oct 3, 2012
View
10 jobs/micro/monit.yml
@@ -1,11 +1,16 @@
---
core:
- - ccdb_postgres
+ - postgres
- nats
- router
- dea
- health_manager
- cloud_controller
+ - acm
+ - serialization_data_server
+ - stager
+ - uaa
+ - vcap_redis
mongodb:
- mongodb_node
- mongodb_gateway
@@ -18,3 +23,6 @@ postgres:
redis:
- redis_node
- redis_gateway
+rabbitmq:
+ - rabbit_node
+ - rabbit_gateway
View
76 jobs/micro/override/ccdb_postgres/postgres_ctl.erb
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-PACKAGE_DIR=/var/vcap/packages/postgres
-JOB_DIR=/var/vcap/jobs/ccdb
-DATA_DIR=/var/vcap/store/ccdb_postgres
-RUN_DIR=/var/vcap/sys/run/ccdb_postgres
-PIDFILE=$RUN_DIR/postgres.pid
-
-HOST=<%= properties.ccdb.address %>
-PORT=<%= properties.ccdb.port %>
-USER=<%= properties.ccdb.user %>
-PASSWORD=<%= properties.ccdb.password %>
-DBNAME=<%= properties.ccdb.dbname %>
-
-case "$1" in
- start)
- mkdir -p $RUN_DIR
- echo $$ > $PIDFILE # Satisfy Monit in case of slow start
-
- if [ ! -d $DATA_DIR -o ! -f $DATA_DIR/postgresql.conf ]; then
- mkdir -p $DATA_DIR
- chown vcap:vcap $DATA_DIR
-
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/initdb -E utf8 -D $DATA_DIR"
-
- if [ $? != 0 ]; then
- echo "ERROR: Unable to Initialize Postgres DB"
- exit 1
- fi
-
- echo "host $DBNAME $USER 0.0.0.0/0 md5" >> $DATA_DIR/pg_hba.conf
-
- mkdir -p $DATA_DIR/pg_log
- chown vcap:vcap $DATA_DIR/pg_log
- fi
-
- echo "Starting PostgreSQL 9.0: "
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/pg_ctl -o \"-h $HOST -p $PORT\" -w start -D $DATA_DIR -l \"$DATA_DIR/pg_log/startup.log\""
-
- if [ $? == 0 ]; then
- echo "PostgreSQL 9.0 started successfully"
- head -n 1 $DATA_DIR/postmaster.pid > $PIDFILE
-
- echo "Trying to create database..."
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/createdb $DBNAME -p $PORT"
-
- echo "Trying to create user..."
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/psql -d $DBNAME -p $PORT -c 'create role $USER NOSUPERUSER LOGIN INHERIT CREATEDB'"
-
- echo "Trying to alter user (to change password)..."
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/psql -d $DBNAME -p $PORT -c \"alter role $USER with password '$PASSWORD'\""
-
- exit 0
- else
- echo "The PostgreSQL server start seems to have some problems, please see logs for details."
- exit 1
- fi
- ;;
-
- stop)
- echo "Stopping PostgreSQL 9.0: "
- PID=$(head -1 $PIDFILE)
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/pg_ctl stop -m fast -w -D $DATA_DIR"
- while [ -e /proc/$PID ]; do sleep 0.1; done
- rm -f $PIDFILE
- ;;
-
- status)
- su - vcap -c "LD_LIBRARY_PATH=$PACKAGE_DIR/lib:$LD_LIBRARY_PATH $PACKAGE_DIR/bin/pg_ctl status -D $DATA_DIR"
- ;;
-
- *)
- echo "Usage: $0 {start|stop|status}"
- exit 1
- ;;
-esac
View
5 jobs/micro/override/monit/ccdb_postgres
@@ -1,5 +0,0 @@
-check process ccdb_postgres
- with pidfile /var/vcap/sys/run/ccdb_postgres/postgres.pid
- start program "/var/vcap/jobs/ccdb_postgres/bin/postgres_ctl start"
- stop program "/var/vcap/jobs/ccdb_postgres/bin/postgres_ctl stop"
- group vcap
View
12 jobs/micro/override/monit/mysql_node
@@ -1,12 +0,0 @@
-check process mysql
- with pidfile /var/vcap/sys/run/mysqld/mysqld.pid
- start program "/var/vcap/packages/mysql/libexec/mysql.server start /var/vcap/jobs/mysql_node/config/my.cnf"
- stop program "/var/vcap/packages/mysql/libexec/mysql.server stop /var/vcap/jobs/mysql_node/config/my.cnf"
- group vcap
-
-check process mysql_node
- with pidfile /var/vcap/sys/run/mysql_node/mysql_node.pid
- start program "/var/vcap/jobs/mysql_node/bin/mysql_node_ctl start"
- stop program "/var/vcap/jobs/mysql_node/bin/mysql_node_ctl stop"
- group vcap
- depends on mysql

0 comments on commit 11ea37b

Please sign in to comment.
Something went wrong with that request. Please try again.