nomagic

nomagic.net

Once in a while everybody hopes for a little miracle in their projects. But there is no magic.

Using Bosh with PCFDev

How to use the bosh cli together with PCFDev

Peter Kern

2 minute read

What?

The installation of PCFDev on my local notebook was initiated by a single command. After the command completed I had a minimal footprint Cloud Foundry deployment on my local machine. But how did this happen?

Why?

BOSH is the software which is used for deployment and lifecycle management of Cloud Foundry. So it does not hurt to learn a little bit about it. And because we have PCFDev installed we also have the opportunity to experiment with bosh in a local environment.

How?

Before we start we need to install the bosh command line interface. On my manjaro linux box I use yaourt for installations from the AUR. Currently there is only a package in arch user repository (AUR). So let’s take that one.

$ yaourt --sync bosh-cli

$ which bosh
/usr/bin/bosh

Next we need to setup the environment for bosh.

$ eval $(cf dev bosh env)

This will set the relevant env variables for bosh.

$ env | grep BOSH

BOSH_CLIENT_SECRET=4242_0WK5cEZsC
BOSH_GW_HOST=10.144.0.2
BOSH_CLIENT=ops_manager
BOSH_GW_PRIVATE_KEY=/home/peter/.cfdev/state/bosh/jumpbox.key
BOSH_CA_CERT=/home/peter/.cfdev/state/bosh/ca.crt
BOSH_ENVIRONMENT=10.144.0.2
BOSH_GW_USER=jumpbox

Now we can try to list the bosh deployments on our PCFDev vm.

$ bosh deployments

Using environment '10.144.0.2' as client 'ops_manager'

Name                     Release(s)                         Stemcell(s)                                         Team(s)  
cf-66ade9481d314315358c  binary-buildpack/1.0.30            bosh-warden-boshlite-ubuntu-xenial-go_agent/170.30  -  
                         bosh-dns/1.10.0                                                                          
                         bosh-dns-aliases/0.0.3                                                                   
                         bpm/1.0.3                                                                                
                         capi/1.71.4                                                                              
                         cf-cli/1.9.0                                                                             
                         cf-networking/2.18.2                                                                     
                         cf-syslog-drain/8.1                                                                      
                         cflinuxfs2/1.267.0                                                                       
                         cflinuxfs3/0.62.0                                                                        
                         consul/198                                                                               
                         consul-drain/0.0.3                                                                       
                         credhub/2.1.2                                                                            
                         diego/2.22.1                                                                             
                         dotnet-core-buildpack/2.2.5                                                              
                         garden-runc/1.18.0                                                                       
                         go-buildpack/1.8.33                                                                      
                         java-offline-buildpack/4.16.1                                                            
                         log-cache/2.0.1                                                                          
                         loggregator/103.4                                                                        
                         loggregator-agent/2.3                                                                    
                         nats/26                                                                                  
                         nodejs-buildpack/1.6.43                                                                  
                         php-buildpack/4.3.70                                                                     
                         push-apps-manager-release/667.0.6                                                        
                         pxc/0.14.2                                                                               
                         python-buildpack/1.6.28                                                                  
                         routing/0.184.0                                                                          
                         ruby-buildpack/1.7.31                                                                    
                         silk/2.18.1                                                                              
                         staticfile-buildpack/1.4.39                                                              
                         statsd-injector/1.5.0                                                                    
                         uaa/66.0                                                                                 

1 deployments

Succeeded

What next?

Find out how I can redeploy the uaa because I want to change the smtp server settings for sending the registration emails.

comments powered by Disqus

Recent posts

See more

Categories

About

Unicorns ... invite them to your release party but do not expect them to do your work.

Datenschutz

Weiterlesen