Lightweight BOSH job installer

522 views
Skip to first unread message

Iwasaki Yudai

unread,
Mar 11, 2013, 4:51:40 AM3/11/13
to vcap...@cloudfoundry.org
Hi folks,

We released a lightweight (or restricted)  BOSH job/package installer.


You can install jobs/packages included in cf-release repository with this installer on your existing servers.
Since it does not depend on any CPI and it just runs the packaging script for the given job on the server, you do not need any IaaS layer support to use well-configured jobs/packages in cf-release.
We are using this installer to test components which are not supported by vcap_dev_setup script, such as DEA/NG and CC/NG.

The scripts included in the installer do not completely emulate the original BOSH's behavior, so some jobs/packages could not work properly.
Any feed backs and bug reports are welcome.

Dr Nic Williams

unread,
Mar 11, 2013, 6:10:44 AM3/11/13
to vcap...@cloudfoundry.org

This very cool seeing more bosh/cf-release by-products being created as people figure out new ways to use the core cf-release asset!

--
Dr Nic Williams
Stark & Wayne LLC - the consultancy for Cloud Foundry
http://starkandwayne.com
+1 415 860 2185
twitter: drnic

Iwasaki Yudai

unread,
May 10, 2013, 4:47:53 AM5/10/13
to vcap...@cloudfoundry.org
I've released the Nise BOSH version 2.


It was rewritten to introduce BOSH's codebase and supports job collocation and 'properties' definitions in job template spec files.

You can create a devbox (like MCF) with the new Nise BOSH with the manifest below (base on micro/deploy/manifest-ng.yml):

https://gist.github.com/yudai/5553213

Run `nise-bosh` command twice to install:
sudo env PATH=$PATH bundle exec ./bin/nise-bosh ~/cf-release ~/micro.yml micro
sudo env PATH=$PATH bundle exec --keep-monit-files ./bin/nise-bosh ~/cf-release ~/micro.yml micro_ng

See the README.md for the detail.

Dr Nic Williams

unread,
May 10, 2013, 1:50:42 PM5/10/13
to vcap...@cloudfoundry.org
nise!
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users
twitter @drnic

Brian McClain

unread,
May 10, 2013, 3:25:11 PM5/10/13
to vcap...@cloudfoundry.org
VERY cool! Saw the PR to add colocation, excited to see the feature's in place. Firing up a Vagrant machine as I type this :)

- Brian
@BrianMMcClain

Gandalf Corvotempesta

unread,
May 10, 2013, 5:07:57 PM5/10/13
to vcap...@cloudfoundry.org
2013/3/11 Iwasaki Yudai <iwasak...@gmail.com>:
> You can install jobs/packages included in cf-release repository with this
> installer on your existing servers.

Is this multiserver or it will install everything on a single node?

Iwasaki Yudai

unread,
May 11, 2013, 10:11:14 AM5/11/13
to vcap...@cloudfoundry.org
You can install everything both on a single node and multiple servers.

I'll write some chef specs or scripts to install all components on a single server with a single command.

cbus...@voxeolabs.com

unread,
May 13, 2013, 12:59:20 PM5/13/13
to vcap...@cloudfoundry.org
Hi,

just for clarification, in the case of a multi-server install, can this directly install on the server operating system ('bare metal') or does it need a virtual machine infrastructure?

Thanks,

Christoph

Iwasaki Yudai

unread,
May 13, 2013, 9:58:41 PM5/13/13
to vcap...@cloudfoundry.org
Nise BOSH installs CF components on pre-installed Ubuntu servers. You don't need any IaaS layers to use Nise BOSH (if you have an IaaS infrastructure, I would recommend to use BOSH).
When you want to install CF components on multiple servers, you need to run Nise BOSH on each of the servers. You can use Capistrano to do so.

Iwasaki Yudai

unread,
May 14, 2013, 2:44:14 AM5/14/13
to vcap...@cloudfoundry.org
I created a install script for devbox. It works with Ubuntu 10.04 64bit.


You can login to your CF instance with mi...@vcap.me / micr0@micr0 .
(https://github.com/cloudfoundry/cf-release/commit/baaef065bab706e5deca37cf447ba3181731bec0 made short passwords such as 'micro' prohibited. This change might make MCF-ng broken too?)

Use admin-cf-plugin to set auth tokens and make services workable.

Matt Reider

unread,
May 14, 2013, 3:21:33 AM5/14/13
to vcap...@cloudfoundry.org, vcap...@cloudfoundry.org
Excited to try this tomorrow.

Sent from my iPhone

David Dauer

unread,
May 15, 2013, 3:04:59 AM5/15/13
to vcap...@cloudfoundry.org
Great work! Could you also let us know how to proceed in case we want to update a devbox installed with this script?

Yudai Iwasaki

unread,
May 15, 2013, 3:13:33 AM5/15/13
to vcap...@cloudfoundry.org
You can update your instance by the following steps:

1. recreate a new release

cd ~/cf-release
# do something to update your release
bosh create release
--force

2. stop all job processes once

sudo/var/vcap/bosh/bin/monit stop all

3. modify your deployment manifest if needed

vi ~/micro.yml


4. rerun Nise BOSH

cd ~/nise-bosh
sudo env PATH=$PATH bundle install./
bin/nise-bosh ~/cf-release ~/micro.yml micro
sudo env PATH=$PATH bundle install./bin/nise-bosh --keep-monit-files ~/cf-release ~/micro.yml micro_ng

5. launch processes

sudo/var/vcap/bosh/bin/monit start all

Have fun!

Yudai Iwasaki

unread,
May 15, 2013, 3:16:18 AM5/15/13
to vcap...@cloudfoundry.org
Oops, in the step 4,  replace two lines please;

s/bundle install./bundle exec ./g

Gandalf Corvotempesta

unread,
May 15, 2013, 3:26:27 AM5/15/13
to vcap...@cloudfoundry.org
2013/5/11 Iwasaki Yudai <iwasak...@gmail.com>:
> You can install everything both on a single node and multiple servers.

But doing this require a manual install over each server, right?
Actually is not possible to use Nise Bosh like the real bosh starting
from a workstation and then updating the whole infrastructure across
multiple servers?

Just to better understand.

Yudai Iwasaki

unread,
May 15, 2013, 3:57:46 AM5/15/13
to vcap...@cloudfoundry.org
Yes, your understanding is exactly correct. I'm sorry my wording was ambiguous.
Nise BOSH itself does not has functionality to configurate multiple servers.
You need to write some Capistrano tasks to do so.

Brian McClain

unread,
May 15, 2013, 9:13:27 PM5/15/13
to vcap...@cloudfoundry.org
By the way, I spun up a machine with this and it worked like a charm. Amazing work on this! First time I've had a working CF v2 system up and running, and I've been giggling like a child all night

FWIW, I might have have overlooked something, or might just not know how the bootstrap admin account works, but if it helps anyone else, the login after CF was up and running was the following:

Password: micr0@micr0

- Brian

Matt Reider

unread,
May 16, 2013, 1:43:48 AM5/16/13
to vcap...@cloudfoundry.org, vcap...@cloudfoundry.org
Yep. Huge kudos. This is a real milestone.

Sent from my iPhone

Gandalf Corvotempesta

unread,
May 16, 2013, 3:35:17 AM5/16/13
to vcap...@cloudfoundry.org
2013/5/16 Brian McClain <brianm...@gmail.com>:
> By the way, I spun up a machine with this and it worked like a charm.
> Amazing work on this! First time I've had a working CF v2 system up and
> running, and I've been giggling like a child all night

I would like to test this system.
The only thing that I have to run is this:
https://gist.github.com/yudai/5553213
right?

And if I would like to try with multiple server, should I run the same
script buy changing micro.yml according to my configuration?

If this is good, this will be the better system to use to install CF,
even in production.

Iwasaki Yudai

unread,
May 16, 2013, 3:49:42 AM5/16/13
to vcap...@cloudfoundry.org
Basically yes.

Modify the manifest file as you like and run Nise BOSH on each server.
You can separate 'micro' and 'micro_ng' job into multiple jobs if needed, like:

jobs:
  - name: for_server1
    template:
       - nats
  - name: for_server2
    template:
       - dea_next
...

You can also use the "-i" option to set index property for each server. This is useful when use install the same job template into multiple servers.

Gandalf Corvotempesta

unread,
May 16, 2013, 4:14:30 AM5/16/13
to vcap...@cloudfoundry.org
2013/5/16 Iwasaki Yudai <iwasak...@gmail.com>:
> Modify the manifest file as you like and run Nise BOSH on each server.
> You can separate 'micro' and 'micro_ng' job into multiple jobs if needed,
> like:
>
> jobs:
> - name: for_server1
> template:
> - nats
> - name: for_server2
> template:
> - dea_next
> ...
>
> You can also use the "-i" option to set index property for each server. This
> is useful when use install the same job template into multiple servers.

Great, in this way i'll be able to use a single file everywhere.
Putting this under a local git will be easy to script a whole
infrastructure installation and sync everything.

I'll try immediatly.

Gandalf Corvotempesta

unread,
May 16, 2013, 5:51:23 AM5/16/13
to vcap...@cloudfoundry.org
2013/3/11 Iwasaki Yudai <iwasak...@gmail.com>:
> Hi folks,
>
> We released a lightweight (or restricted) BOSH job/package installer.
>
> * https://github.com/nttlabs/nise_bosh

I've found a small bug in your install.sh:

typeset: not found

you should check that shell is set to bash and not to dash (as Ubuntu default).
I've solved with dpkg-reconfigure dash

Gandalf Corvotempesta

unread,
May 16, 2013, 7:09:46 AM5/16/13
to vcap...@cloudfoundry.org
2013/5/16 Gandalf Corvotempesta <gandalf.co...@gmail.com>:
> I've found a small bug in your install.sh:
>
> typeset: not found
>
> you should check that shell is set to bash and not to dash (as Ubuntu default).
> I've solved with dpkg-reconfigure dash

Another bug: if an IPv6 address is set, ip replacement doesn't work
properly because "ip addr" will output 2 lines insted of only one.
This will break sed.
Fix:

# Manifest (added -O to force file name. If you run install.sh
multiple times, micro.yml will be downloaded with different names,
this will fix)
wget https://gist.github.com/yudai/5553213/raw/micro.yml -O micro.yml

# Set current ip to nats server
current_ip=`ip addr | grep 'inet .*global' | cut -f 6 -d ' ' | cut -f1
-d '/'` #added a space between inet and global. This avoid to
catch ipv6 address
sed -i "s/@CURRENT_IP@/${current_ip}/g" micro.yml

Gandalf Corvotempesta

unread,
May 16, 2013, 11:25:40 AM5/16/13
to vcap...@cloudfoundry.org
2013/5/16 Gandalf Corvotempesta <gandalf.co...@gmail.com>:
> I would like to test this system.
> The only thing that I have to run is this:
> https://gist.github.com/yudai/5553213
> right?

After a succesfultl installation i'm unable to get mysql_worker,
postgresql_worker and gorouter up and running:

# sudo /var/vcap/bosh/bin/monit start all
'postgres' start: /var/vcap/jobs/postgres/bin/postgres_ctl
'nats' start: /var/vcap/jobs/nats/bin/nats_ctl
'warden' start: /var/vcap/jobs/dea_next/bin/warden_ctl
'dea_next' start: /var/vcap/jobs/dea_next/bin/dea_ctl
'dir_server' start: /var/vcap/jobs/dea_next/bin/dir_server_ctl
'health_manager_next' start:
/var/vcap/jobs/health_manager_next/bin/health_manager_next_ctl
'serialization_data_server' start:
/var/vcap/jobs/serialization_data_server/bin/serialization_data_server_ctl
'uaa' start: /var/vcap/jobs/uaa/bin/uaa_ctl
'vcap_registrar' start: /var/vcap/jobs/uaa/bin/vcap_registrar_ctl
'vcap_redis' start: /var/vcap/jobs/vcap_redis/bin/vcap_redis_ctl
'mysql55' start: /var/vcap/jobs/mysql_node_ng/bin/mysql55_ctl
'mysql_node' start: /var/vcap/jobs/mysql_node_ng/bin/mysql_node_ctl
'mysql_worker_0' start: /var/vcap/jobs/mysql_node_ng/bin/mysql_worker_ctl
'mysql_worker_0' failed to start
'mysql_worker_1' start: /var/vcap/jobs/mysql_node_ng/bin/mysql_worker_ctl
'mysql_worker_1' failed to start
'mysql_worker_2' start: /var/vcap/jobs/mysql_node_ng/bin/mysql_worker_ctl
'mysql_worker_2' failed to start
'mysql_worker_3' start: /var/vcap/jobs/mysql_node_ng/bin/mysql_worker_ctl
'mysql_worker_3' failed to start
'mysql_worker_4' start: /var/vcap/jobs/mysql_node_ng/bin/mysql_worker_ctl
'mysql_worker_4' failed to start
'mysql_gateway' start: /var/vcap/jobs/mysql_gateway/bin/mysql_gateway_ctl
'cloud_controller_ng' start:
/var/vcap/jobs/cloud_controller_ng/bin/cloud_controller_ng_ctl
'postgresql91' start: /var/vcap/jobs/postgresql_node_ng/bin/postgresql_ctl
'postgresql_node' start:
/var/vcap/jobs/postgresql_node_ng/bin/postgresql_node_ctl
'postgresql_worker_0' start:
/var/vcap/jobs/postgresql_node_ng/bin/postgresql_worker_ctl
'postgresql_worker_0' failed to start
'postgresql_worker_1' start:
/var/vcap/jobs/postgresql_node_ng/bin/postgresql_worker_ctl
'postgresql_worker_1' failed to start
'postgresql_worker_2' start:
/var/vcap/jobs/postgresql_node_ng/bin/postgresql_worker_ctl
'postgresql_worker_2' failed to start
'postgresql_worker_3' start:
/var/vcap/jobs/postgresql_node_ng/bin/postgresql_worker_ctl
'postgresql_worker_3' failed to start
'postgresql_worker_4' start:
/var/vcap/jobs/postgresql_node_ng/bin/postgresql_worker_ctl
'postgresql_worker_4' failed to start
'gorouter' start: /var/vcap/jobs/gorouter/bin/gorouter_ctl
'gorouter' failed to start
'postgresql_gateway' start:
/var/vcap/jobs/postgresql_gateway/bin/postgresql_gateway_ctl

Iwasaki Yudai

unread,
May 16, 2013, 10:28:40 PM5/16/13
to vcap...@cloudfoundry.org
Thanks a lot for your feedback!
I've updated install.sh and introduced your suggestions.
However, I could not figure out which command makes the error 'typeset: not found'. Could you show me the line number or command? Since install.sh has #!/bin/bash at the beginning, it might be raised in a child process.

I confirmed sometimes some processes fail to start at the first run. I'm not sure why this happens, but it may be because of the order of starting up the jobs because some jobs takes longer time to initialize their environments at the first run.
I recommend you to use a Monit daemon to retry launching jobs. You can start a monit daemon by executing the 'sudo /var/vcap/bosh/bin/monit' command with no options. Or, you can manually retry starting up by repeating the 'start up' command.

If the problem continues, you can examine the cause by looking into logs in /var/vcap/sys/log (root privilege required). Logs in /var/vcap/sys/log/monit is especially helpful for trouble shooting.

Gandalf Corvotempesta

unread,
May 17, 2013, 3:05:57 AM5/17/13
to vcap...@cloudfoundry.org

In Ubuntu default shell is dash and bash is usually linked to dash. Changing dash to dash will solve the issue.

I've tried many times to start all processes with no success. My SQL doesn't start. It seems an issue related to some deprecated function in Ruby and it also trying to connect to redis service.

I'll post some log in next hour

Gandalf Corvotempesta

unread,
May 17, 2013, 4:59:16 AM5/17/13
to vcap...@cloudfoundry.org
2013/5/17 Gandalf Corvotempesta <gandalf.co...@gmail.com>:
> I'll post some log in next hour

this is mysql_node_worker log:

http://pastebin.com/raw.php?i=vmfP38PX

Gandalf Corvotempesta

unread,
May 17, 2013, 5:00:18 AM5/17/13
to vcap...@cloudfoundry.org
2013/5/17 Iwasaki Yudai <iwasak...@gmail.com>:
> I confirmed sometimes some processes fail to start at the first run. I'm not
> sure why this happens, but it may be because of the order of starting up the
> jobs because some jobs takes longer time to initialize their environments at
> the first run.
> I recommend you to use a Monit daemon to retry launching jobs. You can start
> a monit daemon by executing the 'sudo /var/vcap/bosh/bin/monit' command with
> no options. Or, you can manually retry starting up by repeating the 'start
> up' command.

Monit is stuck here:
# sudo /var/vcap/bosh/bin/monit status
The Monit daemon 5.2.4 uptime: 3m

Process 'postgres'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'nats'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'warden'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'dea_next'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'dir_server'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'health_manager_next'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'serialization_data_server'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'uaa'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'vcap_registrar'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'vcap_redis'
status initializing
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql55'
status initializing - start pending
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql_node'
status initializing - start pending
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql_worker_0'
status initializing - start pending
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql_worker_1'
status initializing - start pending
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql_worker_2'
status initializing - start pending
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql_worker_3'
status initializing - start pending
monitoring status initializing
data collected Fri May 17 10:56:31 2013

Process 'mysql_worker_4'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'mysql_gateway'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'cloud_controller_ng'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'nginx_ccng'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql91'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_node'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_worker_0'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_worker_1'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_worker_2'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_worker_3'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_worker_4'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'gorouter'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

Process 'postgresql_gateway'
status not monitored - start pending
monitoring status not monitored
data collected Fri May 17 10:56:31 2013

System 'system_microcloudfoundry'
status running - start pending
monitoring status monitored
load average [1.35] [0.59] [0.22]
cpu 0.7%us 0.6%sy 0.3%wa
memory usage 47348 kB [4.6%]
swap usage 0 kB [0.0%]
data collected Fri May 17 10:56:31 2013

Iwasaki Yudai

unread,
May 17, 2013, 5:09:28 AM5/17/13
to vcap...@cloudfoundry.org
It seems all the processes are still initializing. On my environment, it takes about 6 minutes to complete startup.
Could you show me the monit status after waiting for about 10 minutes?

Gandalf Corvotempesta

unread,
May 17, 2013, 5:36:48 AM5/17/13
to vcap...@cloudfoundry.org
2013/5/17 Iwasaki Yudai <iwasak...@gmail.com>:
> It seems all the processes are still initializing. On my environment, it
> takes about 6 minutes to complete startup.
> Could you show me the monit status after waiting for about 10 minutes?

I'm using a VPS and it's very very slow. I'll try on a physical server.

MySQL Workers should be real mysql server used by customers and placed
multiple times on Micro CloudFoudry to simulate resource distribution,
right? How can I decrease their number to 2? Having 5 MySQL and 5
Postres on the same server is very heavy.

Gandalf Corvotempesta

unread,
May 17, 2013, 9:07:25 AM5/17/13
to vcap...@cloudfoundry.org
2013/5/17 Iwasaki Yudai <iwasak...@gmail.com>:
> Thanks a lot for your feedback!
> I've updated install.sh and introduced your suggestions.

You have updated install.sh without proper quotes:

current_ip=`ip addr | grep 'inet .*global' | cut -f 6 -d ' ' | cut -f1 -d '/'`

inet .*global

must be quoted, due to the space.

Iwasaki Yudai

unread,
May 17, 2013, 9:33:45 AM5/17/13
to vcap...@cloudfoundry.org
Thanks! I fixed it.

Workers are used to manage lifecycles. To my best knowledge, they are not so heavy themselves.
Anyway, you can change the number of workers by editing 'worker_count' in each 'plans' property.

Gandalf Corvotempesta

unread,
May 21, 2013, 3:16:06 AM5/21/13
to vcap...@cloudfoundry.org
2013/5/17 Iwasaki Yudai <iwasak...@gmail.com>:
> Thanks! I fixed it.
>
> Workers are used to manage lifecycles. To my best knowledge, they are not so
> heavy themselves.
> Anyway, you can change the number of workers by editing 'worker_count' in
> each 'plans' property.
> (See also:
> https://github.com/cloudfoundry/cf-release/blob/master/jobs/postgresql_node_ng/monit#L66)


Now i'm able to use this new installation as target for "cf" but there
isn't any service provided.
Is this normal? It's a blank installation?

cf services

doesn't show any available service.

Iwasaki Yudai

unread,
May 21, 2013, 3:30:33 AM5/21/13
to vcap...@cloudfoundry.org
Try 'cf info --services'. You need to create a organization (create-org) and a space (create-space, switch-space) before doing that.

I did the same mistake as you a few days ago. It's a trap indeed.

Manuel Garcia

unread,
May 23, 2013, 1:20:24 PM5/23/13
to vcap...@cloudfoundry.org
Hi all,

I followed the steps from the gist and got into the following problem:  cloud_controller_ng is not initialised

Any ideas why? I do run the monit start all with sudo.

tks

Gandalf Corvotempesta

unread,
May 23, 2013, 4:04:53 PM5/23/13
to vcap...@cloudfoundry.org
Only databases?

$ cf info --services
Getting services... OK

service version provider plans description
mysql 5.5 core 100 MySQL database
postgresql 9.1 core 100 PostgreSQL database (vFabric)

2013/5/21 Iwasaki Yudai <iwasak...@gmail.com>:

Gandalf Corvotempesta

unread,
May 23, 2013, 4:17:10 PM5/23/13
to vcap...@cloudfoundry.org
2013/5/23 Gandalf Corvotempesta <gandalf.co...@gmail.com>:
> Only databases?
>
> $ cf info --services
> Getting services... OK
>
> service version provider plans description
> mysql 5.5 core 100 MySQL database
> postgresql 9.1 core 100 PostgreSQL database (vFabric)

This is what I see in dea_next log:

{"timestamp":1369339989.8300583,"message":"Connecting to NATS on
nats://nats:nats@x:4222","log_level":"info","source":"Dea::Nats","data":{},"thread_id":18999420,"fiber_id":27446020,"process_id":21803,"file":"/var/vcap/packages/dea_next/lib/dea/nats.rb","lineno":95,"method":"create_nats_client"}
{"timestamp":1369339992.782844,"message":"Received on
\"router.start\": {\"id\"=>\"7bfa9dab89b3d833cbb4f4cb5c69c630\",
\"hosts\"=>[\"x\"]}","log_level":"debug","source":"Dea::Nats","data":{},"thread_id":18999420,"fiber_id":27446020,"process_id":21803,"file":"/var/vcap/packages/dea_next/lib/dea/nats.rb","lineno":75,"method":"block
in subscribe"}
{"timestamp":1369340022.7827835,"message":"Received on
\"router.start\": {\"id\"=>\"7bfa9dab89b3d833cbb4f4cb5c69c630\",
\"hosts\"=>[\"x\"]}","log_level":"debug","source":"Dea::Nats","data":{},"thread_id":18999420,"fiber_id":27446020,"process_id":21803,"file":"/var/vcap/packages/dea_next/lib/dea/nats.rb","lineno":75,"method":"block
in subscribe"}

Iwasaki Yudai

unread,
May 23, 2013, 10:17:00 PM5/23/13
to vcap...@cloudfoundry.org
Hi Manuel,

Did you start the monit daemon with 'sudo /var/vcap/bosh/bin/monit' ?
I assume CCNG fails to start when it is launched before NATS server is ready.
If the monit daemon is running, it retries launching jobs including CCNG in such a case. Please try using monit daemon.  
Of course, you can manually retry launching by rerunning the 'monit start all' command.

I checked out my daily CI build using the script in gist this morning and it was completed with success.
I therefore assume it is not the problem of cf-release nor nise-bosh itself.

Iwasaki Yudai

unread,
May 23, 2013, 10:23:47 PM5/23/13
to vcap...@cloudfoundry.org
Yes. My script currently installs only postgres and mysql.

If you need any other services, you can add them by modifying your manifest.
However, as far as I know, mongodb conflicted with something other job templates installed and did not work. It probably works if it is installed in an isolated VM. 

Which service especially do you need?

Gandalf Corvotempesta

unread,
May 24, 2013, 3:34:32 AM5/24/13
to vcap...@cloudfoundry.org
2013/5/24 Iwasaki Yudai <iwasak...@gmail.com>:
> Yes. My script currently installs only postgres and mysql.
>
> If you need any other services, you can add them by modifying your manifest.
> However, as far as I know, mongodb conflicted with something other job
> templates installed and did not work. It probably works if it is installed
> in an isolated VM.
>
> Which service especially do you need?

I need a webserver. I've seen that dea_next and warden are both
installed, up and running, but not available. MySQL and PGSQL are
enough, but I also need a web.

Iwasaki Yudai

unread,
May 24, 2013, 3:42:44 AM5/24/13
to vcap...@cloudfoundry.org
Try 'cf info --all'. It shows other information on your CF instance.
If you cannot push any applications, let me know.

Gandalf Corvotempesta

unread,
May 24, 2013, 4:32:58 AM5/24/13
to vcap...@cloudfoundry.org
2013/5/24 Iwasaki Yudai <iwasak...@gmail.com>:
> Try 'cf info --all'. It shows other information on your CF instance.
> If you cannot push any applications, let me know.

I'm reinstalling the whole system right now. It seems pretty unstable,
sometimes services die and monit is unable to start them again.
I have services in "initializing" state from yersteday.

Gandalf Corvotempesta

unread,
May 24, 2013, 6:01:02 AM5/24/13
to vcap...@cloudfoundry.org
2013/5/24 Gandalf Corvotempesta <gandalf.co...@gmail.com>:
> I'm reinstalling the whole system right now. It seems pretty unstable,
> sometimes services die and monit is unable to start them again.
> I have services in "initializing" state from yersteday.

After a full reinstall, i'm unable to taget the new installation.
It seems that no service is listening on port 80:

# netstat -na4 | grep ":80 "
#

The Monit daemon 5.2.4 uptime: 10m

Process 'postgres' Does not exist
Process 'nats' running
Process 'warden' running
Process 'dea_next' running
Process 'dir_server' running
Process 'health_manager_next' running
Process 'serialization_data_server' running
Process 'uaa' running
Process 'vcap_registrar' running
Process 'vcap_redis' running
Process 'mysql55' running
Process 'mysql_node' running
Process 'mysql_worker_0' running
Process 'mysql_worker_1' running
Process 'mysql_worker_2' running
Process 'mysql_worker_3' running
Process 'mysql_worker_4' running
Process 'mysql_gateway' running
Process 'cloud_controller_ng' running
Process 'postgresql91' Does not exist
Process 'postgresql_node' initializing
Process 'postgresql_worker_0' not monitored
Process 'postgresql_worker_1' not monitored
Process 'postgresql_worker_2' not monitored
Process 'postgresql_worker_3' not monitored
Process 'postgresql_worker_4' not monitored
Process 'gorouter' running
Process 'postgresql_gateway' running
System 'system_microcloudfoundry' running

Gandalf Corvotempesta

unread,
May 24, 2013, 6:24:17 AM5/24/13
to vcap...@cloudfoundry.org
2013/5/24 Iwasaki Yudai <iwasak...@gmail.com>:
> Try 'cf info --all'. It shows other information on your CF instance.
> If you cannot push any applications, let me know.

$ cf info --all
Getting services... OK

Cloud Foundry sponsored by Pivotal

target: http://api.vcap.me
version: 2
support: http://support.cloudfoundry.com

user: mi...@vcap.me

service version provider plans description
mysql 5.5 core 100 MySQL database
postgresql 9.1 core 100 PostgreSQL database (vFabric)


$ cf restart prova
Using manifest file manifest.yml

Stopping prova... OK

Starting prova... OK
-----> Downloaded app package (4.0K)
/var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:52:in
`build_pack': Unable to detect a supported application type
(RuntimeError)
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:26:in
`block in compile_with_timeout'
from /usr/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:25:in
`compile_with_timeout'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:16:in
`block in stage_application'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:12:in `chdir'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:12:in
`stage_application'
from /var/vcap/packages/dea_next/buildpacks/bin/run:10:in `<main>'
Checking prova...
Application failed to stage

Iwasaki Yudai

unread,
May 24, 2013, 7:56:35 AM5/24/13
to vcap...@cloudfoundry.org
It seems your application is not compatible with buildpack support.
You may need to modify your application to push it to CFv2.

The official docs would be helpful (but not completed yet) to make your application workable.


You can also consult Heroku's documentation. Heroku's build pack support is almost compatible with that of CF.

I cannot figure out why your instance is unstable. If you re-installed your instance without re-installing your OS, it may be the reason.

Gandalf Corvotempesta

unread,
May 24, 2013, 8:14:57 AM5/24/13
to vcap...@cloudfoundry.org
2013/5/24 Iwasaki Yudai <iwasak...@gmail.com>:
> It seems your application is not compatible with buildpack support.
> You may need to modify your application to push it to CFv2.

I'm trying to publish a plain HTML webpage.
Do I need a buildpack also for plain-html ?

Do you also know if a buildpack for PHP is available ?

Gandalf Corvotempesta

unread,
May 24, 2013, 8:17:16 AM5/24/13
to vcap...@cloudfoundry.org
2013/5/24 Gandalf Corvotempesta <gandalf.co...@gmail.com>:
> Do you also know if a buildpack for PHP is available ?

Solved with this:
https://github.com/heroku/heroku-buildpack-php

Manuel Garcia

unread,
May 24, 2013, 11:13:18 AM5/24/13
to vcap...@cloudfoundry.org
I run again the release creation and the following commands.
Now is running ok :S My mistake.

Great work btw.

Tks.

Gandalf Corvotempesta

unread,
May 28, 2013, 6:33:44 PM5/28/13
to vcap...@cloudfoundry.org


Il giorno 11/mag/2013 16:11, "Iwasaki Yudai" <iwasak...@gmail.com> ha scritto:
> I'll write some chef specs or scripts to install all components on a single server with a single command.

Did you have time to create some chef recipes?
With some chef recipes that will install a whole infrastructure on multiple server, I think that nise bosh could became the standard for installing CF.

It will be nice to have some recipes that allows, for example, to install 20 deas with a single command in an existing chef infrastructure.

Iwasaki Yudai

unread,
May 28, 2013, 9:45:19 PM5/28/13
to vcap...@cloudfoundry.org
I'm sorry but I myself have no plan to create chef specs.
I currently do not have enough resource to create and, especially, test them.

Gandalf Corvotempesta

unread,
May 29, 2013, 5:14:03 AM5/29/13
to vcap...@cloudfoundry.org
2013/5/29 Iwasaki Yudai <iwasak...@gmail.com>

I'm sorry but I myself have no plan to create chef specs.
I currently do not have enough resource to create and, especially, test them.

Ok, i'll try to create some automation tasks on my own.
Just some clarification bacause i'm not a bosh user:

These two lines do the magic, installing the whole system.
The first line will install a standard "micro" template and the second one it will also install a "micro_ng" template:

sudo env PATH=$PATH bundle exec ./bin/nise-bosh -y ../cf-release ../micro.yml micro
sudo env PATH=$PATH bundle exec ./bin/nise-bosh --keep-monit-files -y ../cf-release ../micro.yml micro_ng

In manifest we have:

jobs:
- name: micro
template:
- postgres
- nats
- dea_next
- health_manager_next
- serialization_data_server
- uaa
- vcap_redis
- mysql_node_ng
- mysql_gateway
- postgresql_node_ng
- postgresql_gateway
- name: micro_ng
template:
- cloud_controller_ng
- gorouter


this will define both jobs with all templates needed by each one, right?
So, calling "micro" will install:
postgres, nats, dea_next and so on.

But where these are defined ?
In manifest I can see:

properties:  
micro: true


What's this?

I can also see:
 
dea_next:
memory_mb: 2048
disk_mb: 8192
num_instances: 16

is this the only thing needed to install a dea_next?

What If I would like to create a job for installing a standalone MySQL Node?
Adding something like this to the manifest (inside 'jobs') should be enough?

- name: mysql_node
template:
- nats
- mysql_node_ng
- mysql_gateway

and then call

sudo env PATH=$PATH bundle exec ./bin/nise-bosh -y ../cf-release ../full_manifest.yml mysql_node

But I don't see any references to "mysql_node_ng" but only to "mysql_node".








Iwasaki Yudai

unread,
May 29, 2013, 9:35:26 AM5/29/13
to vcap...@cloudfoundry.org
Your understanding is correct. You can add a mysql job using the definition you wrote.

Each item in the list of the jobs entry is called "Job template" and it simply corresponds to a directory in the "jobs" directory of your cf-release repository. You can find the directories in the jobs directory which have the same names in the list.

The definition of the word "job" is little confusing now.  Before the job collocation was introduced, 1VM could have had only 1 "job" that defined in the "jobs" directory.
However, the current meaning of the "job" is a set of "job templates". You can now deploy multiple "job templates" (former "jobs") to a single VM. However the directory name is still "jobs" and this makes confusion. Job templates are sometimes called "jobs" and sometimes called "(job) templates". Additionally, job templates have template files in their directory, so you also need to be careful when you see the word "templates".

The values in the "properties" entry are used to fill the variables in template files. You can find many variables in template files of job templates.

Gandalf Corvotempesta

unread,
May 29, 2013, 10:29:32 AM5/29/13
to vcap...@cloudfoundry.org
2013/5/29 Iwasaki Yudai <iwasak...@gmail.com>
Your understanding is correct. You can add a mysql job using the definition you wrote.

Each item in the list of the jobs entry is called "Job template" and it simply corresponds to a directory in the "jobs" directory of your cf-release repository. You can find the directories in the jobs directory which have the same names in the list.

<cut> 

The values in the "properties" entry are used to fill the variables in template files. You can find many variables in template files of job templates.

Ok, now it's clear.

Iwasaki Yudai

unread,
May 29, 2013, 12:56:40 PM5/29/13
to vcap...@cloudfoundry.org
I've created a new repository with simpler installer scripts.

* https://github.com/yudai/cf_nise_installer

Now you can install an CF instance to both your local machine and a vagrant VM.

mgar...@gmail.com

unread,
May 29, 2013, 11:45:12 PM5/29/13
to vcap...@cloudfoundry.org
Hi Iwasaki,

I tried it out on a ubuntu 12.04.4 server and got this while running the packaging script for ruby:
#[1794] INFO: Running the packaging script for ruby

#[1794] INFO: An error occurred while compiling ruby
#[1794] INFO: + set -e
+ tar xzf ruby/ruby-1.9.2-p180.tar.gz
+ cd ruby-1.9.2-p180
...
...
compiling openssl
make[1]: Entering directory `/var/vcap/data/compile/ruby/ruby-1.9.2-p180/ext/openssl'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -I/var/vcap/packages/libyaml/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -o ossl_asn1.o -c ossl_asn1.c
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -I/var/vcap/packages/libyaml/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -o ossl_ssl.o -c ossl_ssl.c
ossl_ssl.c:110:1: error: ‘SSLv2_method’ undeclared here (not in a function)
ossl_ssl.c:111:1: error: ‘SSLv2_server_method’ undeclared here (not in a function)
ossl_ssl.c:112:1: error: ‘SSLv2_client_method’ undeclared here (not in a function)
make[1]: *** [ossl_ssl.o] Error 1
make[1]: Leaving directory `/var/vcap/data/compile/ruby/ruby-1.9.2-p180/ext/openssl'
make: *** [mkmain.sh] Error 1


As far as I read, openssl does not longer support ssl V2 by default. If if rebuild and reinstall the openssl package removing the 'no-ssl2...' args and settings it should work.

Is there any other solution?
thanks

Iwasaki Yudai

unread,
May 29, 2013, 11:58:13 PM5/29/13
to vcap...@cloudfoundry.org, mgar...@gmail.com
cf-release is runnable only on Lucid64.
This is not the limitation of the installer script, so I can do nothing. Please use 10.04 instead of 12.04.

If you want to use 12.04 for some reason, you need to fork cf-release and add some tricks to your packaging file of the ruby package.
Add smething like this before the ./configure command in packages/ruby/packaging:
sed -i 's/\(OSSL_SSL_METHOD_ENTRY(SSLv2[^3]\)/\/\/\1/g' ./ext/openssl/ossl_ssl.c

And then, modify scripts/clone_cf_release.sh of cf_nise_installer to point your own cf-release repository. 

Manuel Garcia

unread,
May 30, 2013, 8:39:08 AM5/30/13
to vcap...@cloudfoundry.org, mgar...@gmail.com
I just used a standard AWS AMI. I'll try to downgrade Ubuntu first. 

Thanks!

Gandalf Corvotempesta

unread,
May 31, 2013, 4:25:55 PM5/31/13
to vcap...@cloudfoundry.org
2013/5/29 Iwasaki Yudai <iwasak...@gmail.com>
I've created a new repository with simpler installer scripts.

* https://github.com/yudai/cf_nise_installer

I've seen this:

what it does? How can I create a snapshot?

Iwasaki Yudai

unread,
May 31, 2013, 9:34:26 PM5/31/13
to vcap...@cloudfoundry.org
As far as I know, this NFS export is required by Serialization Data Server.
I assume NG services write out snapshots into the directory.
I have not tested lifecycle functions of NG services yet, so I want to know how to play with them too.

Btw, I found debian_nfs_server job template can replace these lines and that seems a better way.
I'll try replacing when I have time.
Reply all
Reply to author
Forward
0 new messages