Deploying Diego to BOSH-Lite


Nanduni Nimalsiri
 

Hi all,

I want to deploy Docker images to Cloud Foundry. I am still a newbie and I do not know much about it. My intention is to experience this locally in my machine via Bosh-Lite. So I suppose I need to follow the README[1] in BOSH Release for Diego (cloudfoundry-incubator/diego-release).
[1] https://github.com/cloudfoundry-incubator/diego-release#deploying-diego-to-bosh-lite

In brief, I want to deploy Diego to Bosh-Lite, but I am stuck with this for days. The README does not provide more details on this process. I am unable to install spiff which I suppose is a tool for generating the BOSH manifests. I followed spiff README[2]. But I failed to install spiff. Then I tried to install it by executable binaries as well as through its git hub repo by 'go get'. I followed this tutorial[3] too. But I could not succeed in any of the ways.
[2] https://github.com/cloudfoundry-incubator/spiff
[3] http://www.evoila.de/2015/03/13/installing-cloudfoundry-spiff-on-ubuntu/?lang=en

Can any one help me to install spiff or provide me any resource for this. If some one can teach me the process of deploying Diego to Bosh-Lite, it would be a great relief for me. If you find any good blog post on this subject, share it with me. Please help.

Best Regards,
Nanduni.


Tomoe Sugihara
 

Hi Nanduni,

On Wed, Feb 10, 2016 at 1:05 PM, Nanduni Nimalsiri <nandunibw(a)gmail.com>
wrote:

[snip]

Can any one help me to install spiff or provide me any resource for this.
If some one can teach me the process of deploying Diego to Bosh-Lite, it
would be a great relief for me. If you find any good blog post on this
subject, share it with me. Please help.
There are built binaries here:
https://github.com/cloudfoundry-incubator/spiff/releases
I downloaded one and put it in a directory that is in the search path (PATH
env variable), and worked fine.

Ref: https://github.com/cloudfoundry-incubator/spiff#installation

HTH,
Tomoe


Nanduni Nimalsiri
 

Thank you for the reply.

Yes I did as you have told. But it gives me errors. I'll tell what I did so that you might be able to figure out my mistake.

1. I downloaded this binary:
https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_linux_amd64.zip
Now it is in my Downloads folder.
2. I extracted it there.
3. Then I used the command: sudo gedit ~/.profile and set the path as below.
export SPIFF_HOME=/home/nanduni/Downloads/spiff
export PATH=$PATH:$SPIFF_HOME
Then I saved and refreshed that content using : source ~/.profile

Then I ran the following to generate the CF manifest.
$ cd ~/workspace/cf-release
$ ./scripts/generate-bosh-lite-dev-manifest

But it gives me the following error.
nanduni(a)nanduni-TECRA-M11:~/workspace/cf-release$ ./scripts/generate-bosh-lite-dev-manifest
Aborted. Please install spiff by following https://github.com/cloudfoundry-incubator/spiff#installation
Incorrect YAML structure in `/home/nanduni/workspace/cf-release/bosh-lite/deployments/cf.yml': expected Hash at the root

Can you tell me where I have gone wrong?

Best Regards,
Nanduni.


Tomoe Sugihara
 

On Wed, Feb 10, 2016 at 2:55 PM, Nanduni Nimalsiri <nandunibw(a)gmail.com>
wrote:

Thank you for the reply.

Yes I did as you have told. But it gives me errors. I'll tell what I did
so that you might be able to figure out my mistake.

1. I downloaded this binary:

https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_linux_amd64.zip
Now it is in my Downloads folder.
2. I extracted it there.
3. Then I used the command: sudo gedit ~/.profile and set the path as
below.
export SPIFF_HOME=/home/nanduni/Downloads/spiff
export PATH=$PATH:$SPIFF_HOME
Then I saved and refreshed that content using : source ~/.profile
Isn't /home/nanduni/Downloads/spiff a binary file?
If so, you should have /home/nanduni/Downloads/ in your PATH as opposed to
/home/nanduni/Downloads*/spiff*

Best,
Tomoe


Paul Bakare
 

In addition, make sure you have GO installed. Also make sure GOPATH and
GOROOT env are set correctly.

For example:
export GOPATH=$HOME/projects/goprojects
export GOROOT=/usr/local/opt/go/libexec

On Wed, Feb 10, 2016 at 8:06 AM, Tomoe Sugihara <tsugihara(a)pivotal.io>
wrote:

On Wed, Feb 10, 2016 at 2:55 PM, Nanduni Nimalsiri <nandunibw(a)gmail.com>
wrote:

Thank you for the reply.

Yes I did as you have told. But it gives me errors. I'll tell what I did
so that you might be able to figure out my mistake.

1. I downloaded this binary:

https://github.com/cloudfoundry-incubator/spiff/releases/download/v1.0.7/spiff_linux_amd64.zip
Now it is in my Downloads folder.
2. I extracted it there.
3. Then I used the command: sudo gedit ~/.profile and set the path as
below.
export SPIFF_HOME=/home/nanduni/Downloads/spiff
export PATH=$PATH:$SPIFF_HOME
Then I saved and refreshed that content using : source ~/.profile
Isn't /home/nanduni/Downloads/spiff a binary file?
If so, you should have /home/nanduni/Downloads/ in your PATH as opposed
to /home/nanduni/Downloads*/spiff*

Best,
Tomoe


Nanduni Nimalsiri
 

Thank you Tomoe.

You are exactly correct. I almost forgot that I have set path to a binary file. It is now working fine. Thank you very much. Looking forward for more help in upcoming issues.

Best Regards,
Nanduni.


Nanduni Nimalsiri
 

Thank you Kayode.

I followed your instructions. That helped me. Now it is working fine. Thanks again. Looking forward for more help in upcoming issues.

Best Regards,
Nanduni.


Nanduni Nimalsiri
 

Hi all,

Sorry for troubling again. I generated the CF manifests successfully. But I am getting errors while generating the Diego manifests. I gives me the following error.

nanduni(a)nanduni-TECRA-M11:~/workspace/diego-release$ ./scripts/generate-bosh-lite-manifests
~/workspace/diego-release ~/workspace/diego-release
2016/02/10 14:54:28 error generating manifest: unresolved nodes:
(( merge )) in ././scripts/../manifest-generation/config-from-cf-internal.yml properties.metron_agent.tls_client.cert (properties.metron_agent.tls_client.cert)
(( merge )) in ././scripts/../manifest-generation/config-from-cf-internal.yml properties.metron_agent.tls_client.key (properties.metron_agent.tls_client.key)
(( merge )) in ././scripts/../manifest-generation/config-from-cf-internal.yml properties.loggregator.tls.ca (properties.loggregator.tls.ca)
(( properties.metron_agent.tls_client.cert )) in dynaml config_from_cf.metron_agent.tls_client.cert ()
(( properties.metron_agent.tls_client.key )) in dynaml config_from_cf.metron_agent.tls_client.key ()
(( properties.loggregator.tls.ca )) in dynaml config_from_cf.loggregator.tls.ca ()

How can I get over this? Any help is highly appreciated.

Best regards,
Nanduni.


Eric Malm <emalm@...>
 

Hi, Nanduni,

The diego-release README does recommend deploying the runtime-passed branch
of cf-release alongside the master branch of diego-release. Although the
two are typically compatible, development instability can sometimes cause
that not to be the case. That's unfortunately true right now because of
recent changes to certain cf-release property names that need to flow into
the Diego deployment manifest.

If you're only looking for releases of CF and Diego to deploy to BOSH-Lite
in order to try pushing some apps, you may be more interested in deploying
the latest stable CF release and an associated compatible Diego release. At
the moment, that's CF v230, and you can find the Diego release version and
other related releases listed at the end of the CF v230 release notes:
https://github.com/cloudfoundry/cf-release/releases/tag/v230

To use these versions, check out cf-release and diego-release to the
appropriate version tags, and make sure the submodules are up-to-date. This
corresponds to slightly revised instructions for steps 3 and 4 in the
diego-release README:

cd ~/workspace/cf-release
git checkout v230
./scripts/update

cd ~/workspace/diego-release
git checkout v0.1450.0
./scripts/update

With the release repositories at those versions, you should then be able to
proceed with the README instructions to generate the deployment manifests,
create and upload the releases, and deploy CF and Diego.

Hope that helps! If you need further assistance, please let us know here,
or join us on the Cloud Foundry Slack channels at
https://slack.cloudfoundry.org/.

Best,
Eric, CF Runtime Diego PM

On Wed, Feb 10, 2016 at 1:36 AM, Nanduni Nimalsiri <nandunibw(a)gmail.com>
wrote:

Hi all,

Sorry for troubling again. I generated the CF manifests successfully. But
I am getting errors while generating the Diego manifests. I gives me the
following error.

nanduni(a)nanduni-TECRA-M11:~/workspace/diego-release$
./scripts/generate-bosh-lite-manifests
~/workspace/diego-release ~/workspace/diego-release
2016/02/10 14:54:28 error generating manifest: unresolved nodes:
(( merge )) in
././scripts/../manifest-generation/config-from-cf-internal.yml
properties.metron_agent.tls_client.cert
(properties.metron_agent.tls_client.cert)
(( merge )) in
././scripts/../manifest-generation/config-from-cf-internal.yml
properties.metron_agent.tls_client.key
(properties.metron_agent.tls_client.key)
(( merge )) in
././scripts/../manifest-generation/config-from-cf-internal.yml
properties.loggregator.tls.ca (properties.loggregator.tls.ca)
(( properties.metron_agent.tls_client.cert )) in dynaml
config_from_cf.metron_agent.tls_client.cert ()
(( properties.metron_agent.tls_client.key )) in dynaml
config_from_cf.metron_agent.tls_client.key ()
(( properties.loggregator.tls.ca )) in dynaml
config_from_cf.loggregator.tls.ca ()

How can I get over this? Any help is highly appreciated.

Best regards,
Nanduni.


Nanduni Nimalsiri
 

Hi Eric,

Thank you very much. I could deploy Diego in Bosh-Lite with the versions you have mentioned. Thank you again for your very clear instructions.

I came up with another issue. It seems that only cloudfoundry/lattice-app docker image works for me. When I push any other image from Docker Hub, the application fails to start ( 0 of 1 instances running, 1 starting ..... 0 of 1 instances running, 1 crashed).

I tried with several images. eg: busybox, hello-world etc. I can't find any reason. Can you please help me?

Best Regards,
Nanduni


Eric Malm <emalm@...>
 

Hi, Nanduni,

If the other Docker images you are pushing don't declare ports to expose,
or the processes they run don't listen for TCP connections on the ports
they expose, then they will fail the default 'port' health check when
pushed as a CF app. If you turn that port-based health-check off by
changing it to 'none', though, the image may run successfully. For example,
I was able to get the busybox image to start as a CF app by running `cf
push busybox -o busybox -u none`. I did encounter a problem with the
'hello-world' image, as it appeared not to start the '/hello' command
correctly in garden-linux, and I've filed a bug in the Garden team's
tracker about it at https://www.pivotaltracker.com/story/show/113694139.
Someone from that team may be able to provide more insight into why that
image doesn't execute correctly, or whether it's too minimal to be
supported.

Thanks,
Eric

On Sat, Feb 13, 2016 at 4:47 PM, Nanduni Nimalsiri <nandunibw(a)gmail.com>
wrote:

Hi Eric,

Thank you very much. I could deploy Diego in Bosh-Lite with the versions
you have mentioned. Thank you again for your very clear instructions.

I came up with another issue. It seems that only cloudfoundry/lattice-app
docker image works for me. When I push any other image from Docker Hub, the
application fails to start ( 0 of 1 instances running, 1 starting ..... 0
of 1 instances running, 1 crashed).

I tried with several images. eg: busybox, hello-world etc. I can't find
any reason. Can you please help me?

Best Regards,
Nanduni