About Me

My photo
Rohit is an investor, startup advisor and an Application Modernization Scale Specialist working at Google.

Friday, January 26, 2018

Generating Load and chaos on Pivotal Cloud Foundry


If you wanted to generate load on the apps running on PCF and wanted some load scripts here are some repos that stress test Spring Music and other apps

https://github.com/pivotal-cf-experimental/spring-music-on-cf-benchmarking

https://github.com/xchapter7x/cf-app-attack

https://github.com/cloudfoundry/cf-acceptance-tests/tree/master/assets/dora

https://github.com/bijukunjummen/boot2-load-demo

https://github.com/cloudfoundry-incubator/pat

https://content.pivotal.io/blog/250k-containers-in-production-a-real-test-for-the-real-world

https://github.com/dsyer/spring-boot-startup-bench

https://github.com/jamlo/jmeter-bosh-release

https://github.com/chaostoolkit and https://github.com/chaostoolkit/chaostoolkit-cloud-foundry

https://github.com/ragstorooks/testrr

Chaos Loris which is chaos monkey for application instances which will exercise your applications resiliency.

Chaos Lemur which is chaos monkey for BOSH releases and jobs, so it exercises the resiliency of the platform

Generic Script to create chaos ...

apt-get install apache2-utils

# ab -n <num_requests> -c <concurrency> <addr>:<port><path>po

ab -n 1000 -c 100 http://localhost:4567/



Tuesday, January 23, 2018

Connecting to Oracle Databases from apps in Cloud Foundry

A common use case when replatforming apps is connecting to oracle databases via a user provided service instance. There are three ways these CUPs can defined as specified in the spring cloud connectors #oracle doc. There are some gotchas when defining oracle CUPs. This post provides examples of when and which form of Oracle CUPs to define ...

The connector will check for:
  1. uri using the scheme oracle
  2. jdbcUrl using the subprotocol oracle in the JDBC URL
  3. oracleUri, oracleuri, oracleUrl, or oracleurl fields in credentials
Any of the three approaches will work ...  however;


- If you are using oracle subprotocol , then the CUPs has to be a uri. 

- If your DB url contains the ldap:// prefix before the host name in the URL then use the jdbcUrl credentials property instead of url. 


cf create-user-provided-service catalog-db -p '{"jdbcUrl":"jdbc:oracle:thin:TOMHANKS/<pwd>$2011@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555))(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555))(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555)))(CONNECT_DATA=(SERVICE_NAME=cd_app)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=5))))"}'


cf cups ulrDataSource -p “dbURL” oracle://ulr_wsph:facebook123#@rwev10exp.abc.facebook.com:1576/e_facebooklog_rgwd.nbc.us


The Spring cloud connectors library provides ORACLE connectors that automatically wire up your ORCL cups to your Spring datasource bean
http://cloud.spring.io/spring-cloud-connectors/spring-cloud-connectors.html#_extending_spring_cloud_connectors


Significant contributions to this post by Anwar Chirakkattil , Oleg Iavorskyi and Brad Starkenberg