Code Monkey home page Code Monkey logo

cf-mysql-release's Introduction

This release has been deprecated in favor of https://github.com/cloudfoundry-incubator/pxc-release, which is the new default backing database for Cloud Foundry

Cloud Foundry MySQL Service

Table of contents

Components

Downloading a Stable Release

Development

Release notes & known issues

Deploying

Registering the Service Broker

Security Groups

Smoke Tests

Deregistering the Service Broker

CI

Components

A BOSH release of a MySQL database-as-a-service for Cloud Foundry using MariaDB Galera Cluster and a v2 Service Broker.

ComponentDescription
CF MySQL Broker Advertises the MySQL service and plans. Creates and deletes MySQL databases and credentials (bindings) at the request of Cloud Foundry's Cloud Controller.
MySQL Server The MySQL instances, either single or 3-node cluster. Currently using MariaDB 10 (versions vary by release).
Proxy Switchboard; proxies to MySQL, severing connections on MySQL node failure.

Proxy

Traffic to the MySQL cluster is routed through one or more proxy nodes. The current proxy implementation is Switchboard. This proxy acts as an intermediary between the client and the MySQL server, providing failover between MySQL nodes. The number of nodes is configured by the proxy job instance count in the deployment manifest.

NOTE: If the number of proxy nodes is set to zero, apps will be bound to the IP address of the first MySQL node in the cluster. If that IP address should change for any reason (e.g. loss of a VM) or a proxy was subsequently added, one would need to re-bind all apps to the IP address of the new node.

For more details see the proxy documentation.

Dashboard

A user-facing service dashboard is provided by the service broker that displays storage utilization information for each service instance. The dashboard is accessible by users via Single Sign-On (SSO) once authenticated with Cloud Foundry. The dashboard URL can be found by running cf service MY_SERVICE_INSTANCE.

Service authors interested in implementing a service dashboard accessible via SSO can follow documentation for Dashboard SSO.

Prerequisites

  1. SSO is initiated when a user navigates to the URL found in the dashboard_url field. This value is returned to cloud controller by the broker in response to a provision request, and is exposed in the cloud controller API for the service instance. A users client must expose this field as a link, or it can be obtained via curl (cf curl /v2/service_instances/:guid) and copied into a browser.

  2. SSO requires the following OAuth client to be configured in cf-release. This client is responsible for creating the OAuth client for the MySQL dashboard. Without this client configured in cf-release, the MySQL dashboard will not be accessible but the service will be otherwise functional. Registering the broker will display a warning to this effect.

    properties:
      uaa:
        clients:
          cc-service-dashboards:
            secret: cc-broker-secret
            scope: cloud_controller.write,openid,cloud_controller.read,cloud_controller_service_permissions.read
            authorities: clients.read,clients.write,clients.admin
            authorized-grant-types: client_credentials
  3. SSO was implemented in v169 of cf-release; if you are on an older version of cf-release you'll encounter an error when you register the service broker. If upgrading cf-release is not an option, try removing the following lines from the cf-mysql-release manifest and redeploy.

    dashboard_client:
      id: p-mysql
      secret: yoursecret

Implementation Notes

The following links show how this release implements Dashboard SSO integration.

  1. Update the broker catalog with the dashboard client properties
  2. Implement oauth workflow with the omniauth-uaa-oauth2 gem
  3. Use the cf-uaa-lib gem to get a valid access token and request permissions on the instance
  4. Before showing the user the dashboard, the broker checks to see if the user is logged-in and has permissions to view the usage details of the instance.

Broker Configuration

Require HTTPS when visiting Dashboard

The dashboard URL defaults to using the https scheme. This means any requests using http will automatically be redirected to https instead. To override this, you can change jobs.cf-mysql-broker.ssl_enabled to false.

Keep in mind that changing the ssl_enabled setting for an existing broker will not update previously advertised dashboard URLs. Visiting the old URL may fail if you are using the SSO integration, because the OAuth2 client registered with UAA will expect users to both come from and return to a URI using the scheme implied by the ssl_enabled setting.

Note: If using https, the broker must be reached through an SSL termination proxy. Connecting to the broker directly on https will result in a port 443: Connection refused error.

Trust Self-Signed SSL Certificates

By default, the broker will not trust a self-signed SSL certificate when communicating with cf-release. To trust self-signed SSL certificates, you can change jobs.cf-mysql-broker.skip_ssl_validation to true.

Downloading a Stable Release

Stable releases, also known as final releases, are available for general use. Release notes and source code are available on github. Instructions for uploading a final release to your BOSH director can be found on bosh.io.

Note: If your BOSH director's able to access the Internet, you don't need to download and upload a release to your BOSH director. When using cf-mysql-deployment, the correct release is referenced in the manifest, and will be automatically retrieved by the BOSH director.

Development

See our contributing docs for instructions on how to make a pull request.

This BOSH release doubles as a $GOPATH. It will automatically be set up for you if you have direnv installed.

# fetch release repo
mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/cloudfoundry/cf-mysql-release.git
cd cf-mysql-release/

# switch to develop branch (not master!)
git checkout develop

# automate $GOPATH and $PATH setup
direnv allow

# initialize and sync submodules
./scripts/update

If you do not wish to use direnv, you can simply source the .envrc file in the root of the release repo. You may manually need to update your $GOPATH and $PATH variables as you switch in and out of the directory.

Release Notes, Known Issues, and Documentation

Release Notes

Known Issues

For more information, check out the documentation.

Deploying

See https://github.com/cloudfoundry/cf-mysql-deployment to deploy cf-mysql release.

cf-mysql-release's People

Contributors

aaronshurley avatar abg avatar acrmp avatar andrewgilbert12 avatar apshirley avatar bencalegari avatar cf-services avatar drich10 avatar dsabeti avatar evashort avatar fkotsian avatar jberkhahn avatar jpalermo avatar karlkfi avatar lafunamor avatar ljfranklin avatar menicosia avatar mfine30 avatar ndhanushkodi avatar njbennett avatar pcf-core-services-writer avatar rainmaker avatar robdimsdale avatar shalako avatar socalnick avatar staylor14 avatar trayo avatar utricularian avatar zankich avatar zrob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cf-mysql-release's Issues

bosh upload release cf-mysql-9.yml is broken

Downloading from blobstore (id=b6e3b84c-1831-4d64-86af-cc3c8b0d978d)...
Downloading from blobstore (id=eb74e5b1-9fe4-4729-bb65-c4996e0390dd)...
Downloading from blobstore (id=37982f4c-f404-4f67-81b8-29eb1414db47)...
Downloading from blobstore (id=58dfda7c-bfb7-42c5-9940-015618c70f82)...
Downloading from blobstore (id=7159317d-06ac-495c-a857-5fd0c14e7cd2)...
Downloading from blobstore (id=ba98d5bf-5f22-4156-bdac-5aa7b5ddc812)...
Downloading from blobstore (id=5ea65cb3-3b90-462d-b641-e9559afd7318)...
Downloading from blobstore (id=abf094f6-e1a6-4e6f-a732-b336dc2c75e7)...
Downloading from blobstore (id=b080e0ae-65b5-439e-ad92-2b5db9ce01cf)...
MISSING
Cannot find job with checksum `b98fe1b361036408a889ac0a630e5622992f35d4'

some question about shut down all nodes๏ผ

hello, i am using mariadb as a database cluster, but i have some question.

  1. i read the code of mariadb_ctrl, finding that it does not deal with the situation when all nodes shut down, and restart together. maybe we need to bootstrap one node when all node is unreachable. but it still join?? i deploy it in openstack, and it real does not work, when all nodes shut down.
  2. i deploy 3 node mysql/0, mysql/1, mysql/2. first i stop mysql/0, and insert some data to mysql/1 and mysql/2. then stop all node. after i restart all nodes(bootstrap in mysql/0). mysql/1 and mysql/2 can not to join the cluster, because of the /var/vcap/store/mysql/grastate.dat seqno is greater than mysql/0. if i delete the grastate.dat it can join the cluster, but i lose some data. so i want to know how you deal with this question?

thank you for your answer.

Bosh compilation fails on MariaDB, stemcell 2922

Hello,
i m getting mariadb compilation issues while trying to bosh deploy p-mysql v19 on stemcell 2922 (bosh-vcloud-esxi-ubuntu-trusty-go_agent), see trace below.

Would appreciate having the expected stemcell level for the p-mysql releases
best regards
Pierre

/var/vcap/data/compile/mariadb/mariadb-10.0.16/storage/xtradb/btr/btr0cur.cc:1749:36: warning: null argument where non-null required (argument 1) [-Wnonnull]
btr_cur_get_block(cursor)), mtr)
^
/usr/bin/ar: creating /var/vcap/data/compile/mariadb/mariadb-10.0.16/bld/libmysql/libmysqlclient.a
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions.
make[2]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o] Error 4
make[1]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
, Stderr: + MARIADB_VERSION=10.0.16

  • tar xzf mariadb/mariadb-galera-10.0.16.tar.gz
  • set -e
  • cd mariadb-10.0.16
  • mkdir bld
  • cd bld
  • cmake .. -DCMAKE_INSTALL_PREFIX=/var/vcap/packages/mariadb -DWITH_WSREP=ON -DWITH_INNODB_DISALLOW_WRITES=1 -DWITH_PCRE=bundled
    CMake Warning at storage/tokudb/CMakeLists.txt:17 (MESSAGE):
    TokuDB is enabled, but jemalloc is not. This configuration is not
    supported
  • set +e
  • make -j 3
  • BUILD_EXIT_CODE=2

Python not found when compiling scons

error 450001: Action Failed get_task: Compiling package scons: Running packaging script: Running command: 'bash -x packaging', stdout: '', stderr: '+ set -e

  • cd scons
  • tar xfz scons-2.3.1.tar.gz
  • cd scons-2.3.1
  • python setup.py install --prefix=/var/vcap/packages/scons
    packaging: line 7: python: command not found
    ': exit status 127

I don't see any package for python in the packages folder. what am I doing wrong?

Dashboard - 401 Unauthorized

Hi Guys,

After upgrading to v10, cf-release v178 and trusty stemcells, I seemed to have started receiving "401 Unauthorized" along with an Invalid Auth Token error messages when trying to use the 'Manage' functionality of the dashboard.

Error returned by broker:

172.31.128.6, 10.0.0.101 - - [18/Aug/2014 22:22:38] "GET /manage/instances/846f86aa-7dbd-44f8-b466-423ce85a5b6a HTTP/1.1" 302 - 0.0212
I, [2014-08-18T22:22:38.144305 #2385]  INFO -- : Started GET "/manage/auth/cloudfoundry" for 10.0.0.11 at 2014-08-18 22:22:38 +0000
I, [2014-08-18T22:22:38.146806 #2385]  INFO -- omniauth: (cloudfoundry) Request phase initiated.
I, [2014-08-18T22:22:38.148473 #2385]  INFO -- omniauth: (cloudfoundry) Client: dashboard-sso-wd-mariadb auth_server: https://login.10.0.0.1.xip.io token_server: https://uaa.10.0.0.1.xip.io
I, [2014-08-18T22:22:38.155316 #2385]  INFO -- omniauth: (cloudfoundry) Redirect URI https://login.10.0.0.1.xip.io/oauth/authorize?client_id=dashboard-sso-wd-mariadb&response_type=code+id_token&redirect_uri=https%3A%2F%2Fmariadb.10.0.0.1.xip.io%2Fmanage%2Fauth%2Fcloudfoundry%2Fcallback&state=441bace77b9580e673682db06b460a13&scope=cloud_controller_service_permissions.read+openid&nonce=441bace77b9580e673682db06b460a13
172.31.128.6, 10.0.0.101 - - [18/Aug/2014 22:22:38] "GET /manage/auth/cloudfoundry HTTP/1.1" 302 366 0.0166
I, [2014-08-18T22:22:38.427568 #2382]  INFO -- : Started GET "/manage/auth/cloudfoundry/callback?code=sd8T5I&state=441bace77b9580e673682db06b460a13" for 10.0.0.11 at 2014-08-18 22:22:38 +0000
I, [2014-08-18T22:22:38.430221 #2382]  INFO -- omniauth: (cloudfoundry) Callback phase initiated.
I, [2014-08-18T22:22:38.432098 #2382]  INFO -- omniauth: (cloudfoundry) In callback phase code=sd8T5I&state=441bace77b9580e673682db06b460a13
I, [2014-08-18T22:22:38.432571 #2382]  INFO -- omniauth: (cloudfoundry) Fetching access token
I, [2014-08-18T22:22:38.433211 #2382]  INFO -- omniauth: (cloudfoundry) Client: dashboard-sso-wd-mariadb auth_server: https://login.10.0.0.1.xip.io token_server: https://uaa.10.0.0.1.xip.io
D, [2014-08-18T22:22:38.434927 #2382] DEBUG -- omniauth: --->
request: post https://uaa.10.0.0.1.xip.io/oauth/token
headers: {"content-type"=>"application/x-www-form-urlencoded;charset=utf-8", "accept"=>"application/json;charset=utf-8", "authorization"=>"Basic ZGFzaGJvYXJkLXNzby13ZC1tYXJpYWRiOlIyV05UeTNvQlZqSmh6MHFMQ1VJ"}
body: grant_type=authorization_code&code=sd8T5I&redir...
D, [2014-08-18T22:22:38.639265 #2382] DEBUG -- omniauth: <---
response: 200
headers: {"cache-control"=>"no-store", "content-type"=>"application/json;charset=utf-8", "pragma"=>"no-cache", "x-cf-requestid"=>"eb3daa20-db79-40c0-42d4-1dc6160d57c4", "x-proxy-router"=>"router0", "content-length"=>"2152", "accept-ranges"=>"bytes", "date"=>"Mon, 18 Aug 2014 22:22:38 GMT", "x-varnish"=>"1430778949", "age"=>"0", "via"=>"1.1 varnish", "connection"=>"close", "x-cache"=>"MISS", "x-proxy-cache"=>"lb-cache0", "x-proxy-lb-ssl"=>"lb-cache0"}
body: {"access_token":"eyJhbGciOiJSUzI1NiJ9.eyJqdGkiO...
Class#decode is deprecated with these parameters. Please use options hash.
I, [2014-08-18T22:22:38.641928 #2382]  INFO -- omniauth: (cloudfoundry) Got access token #<OmniAuth::Strategies::CFAccessToken:0x007f6036f09d88 @info={"access_token"=>"eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIzNjA3ZjE2YS00M2ZjLTQ0YTMtOGMzOS02NzNmYjExYzIwNGYiLCJzdWIiOiIwMzBhNmVjYS1jNWJiLTRmZTktYjVmNS1hMWM1OGE2ZGI5NTAiLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyX3NlcnZpY2VfcGVybWlzc2lvbnMucmVhZCIsIm9wZW5pZCJdLCJjbGllbnRfaWQiOiJkYXNoYm9hcmQtc3NvLXdkLW1hcmlhZGIiLCJjaWQiOiJkYXNoYm9hcmQtc3NvLXdkLW1hcmlhZGIiLCJncmFudF90eXBlIjoiYXV0aG9yaXphdGlvbl9jb2RlIiwidXNlcl9pZCI6IjAzMGE2ZWNhLWM1YmItNGZlOS1iNWY1LWExYzU4YTZkYjk1MCIsInVzZXJfbmFtZSI6ImFkbWluIiwiZW1haWwiOiJhZG1pbiIsImlhdCI6MTQwODQwMDU1OCwiZXhwIjoxNDA4NDQzNzU4LCJpc3MiOiJodHRwczovL3VhYS5wYWFzLmxhYi53ZWJob3N0LmNvLm56L29hdXRoL3Rva2VuIiwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXJfc2VydmljZV9wZXJtaXNzaW9ucyIsIm9wZW5pZCJdfQ.JVwO4eRnmVajyZu26l08KC0M-jQSlYQsz_xZ1QHHXR5uXZzXuk5ezmd--znN5SyBzZ7lxbvZSAyditOseV3pm0OlhZk2iM9WJX5qQaemQIpKoFEyMsUaAJqQ0h_2xRSJSUzCNl2xy1nsZEAa8lMkeRG5Jn6zmszgdgWTqLaUkf7kdQGqSMywWxD_5xZlusbQojLA-2Ftb132Fv_3zmTweVNXOLpcqtRwGe-V85Jm3e35Df-4zkbaej_9pMO3Yuoz6ZuATHM-o1uZzKOPA-VLojGmIdPFfFXdF9oRhuOZCnR211r9pTPCUogsLiODlhd5snP2EsJlG9kIwOQO3KvP8Q", "token_type"=>"bearer", "refresh_token"=>"eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJmNzFlOTBmZi0zMjFkLTRiNzItYjBiZC0zMzU2YjMxMzdiNWEiLCJzdWIiOiIwMzBhNmVjYS1jNWJiLTRmZTktYjVmNS1hMWM1OGE2ZGI5NTAiLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyX3NlcnZpY2VfcGVybWlzc2lvbnMucmVhZCIsIm9wZW5pZCJdLCJpYXQiOjE0MDg0MDA1NTgsImV4cCI6MTQxMDk5MjU1OCwiY2lkIjoiZGFzaGJvYXJkLXNzby13ZC1tYXJpYWRiIiwiaXNzIjoiaHR0cHM6Ly91YWEucGFhcy5sYWIud2ViaG9zdC5jby5uei9vYXV0aC90b2tlbiIsImdyYW50X3R5cGUiOiJhdXRob3JpemF0aW9uX2NvZGUiLCJ1c2VyX25hbWUiOiJhZG1pbiIsInVzZXJfaWQiOiIwMzBhNmVjYS1jNWJiLTRmZTktYjVmNS1hMWM1OGE2ZGI5NTAiLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlcl9zZXJ2aWNlX3Blcm1pc3Npb25zLnJlYWQiLCJvcGVuaWQiXX0.mb2CZwCoPoZ7CU3OkECDzfqXoywdo_-tPy6uDqBvrBhjLFK9Zfx8Z3foAXW1S2o_kHWhLjUaD1XomSqMYFP_UPfjwtdbTlRDYXvsMm6M1nFXlan0KjDjSJGE69bmfOUuMhE4Xgid7YW3UyYKqyPqSeGdS139AQuopsyTiqEyFH1G_hDgMptagVheWQYjBSk9c3wt0b1jTpB4Hati-xo_wRx265VH_Z8-YiwMegXak8RFbaFs-Lxc0zDl63LKmQJFYIFOypToeb3AOF2hH2h6AFzv7AcmnkmmmRr7N2SRb1hByuQliqsUQVFrXxhb3hJz4s-0onViyC_t6w23pKTWog", "expires_in"=>43199, "scope"=>"cloud_controller_service_permissions.read openid", "jti"=>"3607f16a-43fc-44a3-8c39-673fb11c204f"}, @auth_header="bearer eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIzNjA3ZjE2YS00M2ZjLTQ0YTMtOGMzOS02NzNmYjExYzIwNGYiLCJzdWIiOiIwMzBhNmVjYS1jNWJiLTRmZTktYjVmNS1hMWM1OGE2ZGI5NTAiLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyX3NlcnZpY2VfcGVybWlzc2lvbnMucmVhZCIsIm9wZW5pZCJdLCJjbGllbnRfaWQiOiJkYXNoYm9hcmQtc3NvLXdkLW1hcmlhZGIiLCJjaWQiOiJkYXNoYm9hcmQtc3NvLXdkLW1hcmlhZGIiLCJncmFudF90eXBlIjoiYXV0aG9yaXphdGlvbl9jb2RlIiwidXNlcl9pZCI6IjAzMGE2ZWNhLWM1YmItNGZlOS1iNWY1LWExYzU4YTZkYjk1MCIsInVzZXJfbmFtZSI6ImFkbWluIiwiZW1haWwiOiJhZG1pbiIsImlhdCI6MTQwODQwMDU1OCwiZXhwIjoxNDA4NDQzNzU4LCJpc3MiOiJodHRwczovL3VhYS5wYWFzLmxhYi53ZWJob3N0LmNvLm56L29hdXRoL3Rva2VuIiwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXJfc2VydmljZV9wZXJtaXNzaW9ucyIsIm9wZW5pZCJdfQ.JVwO4eRnmVajyZu26l08KC0M-jQSlYQsz_xZ1QHHXR5uXZzXuk5ezmd--znN5SyBzZ7lxbvZSAyditOseV3pm0OlhZk2iM9WJX5qQaemQIpKoFEyMsUaAJqQ0h_2xRSJSUzCNl2xy1nsZEAa8lMkeRG5Jn6zmszgdgWTqLaUkf7kdQGqSMywWxD_5xZlusbQojLA-2Ftb132Fv_3zmTweVNXOLpcqtRwGe-V85Jm3e35Df-4zkbaej_9pMO3Yuoz6ZuATHM-o1uZzKOPA-VLojGmIdPFfFXdF9oRhuOZCnR211r9pTPCUogsLiODlhd5snP2EsJlG9kIwOQO3KvP8Q">
I, [2014-08-18T22:22:38.683677 #2382]  INFO -- : Processing by Manage::AuthController#create as HTML
I, [2014-08-18T22:22:38.684358 #2382]  INFO -- :   Parameters: {"code"=>"sd8T5I", "state"=>"441bace77b9580e673682db06b460a13"}
I, [2014-08-18T22:22:38.688987 #2382]  INFO -- : Redirected to https://mariadb.10.0.0.1.xip.io/manage/instances/846f86aa-7dbd-44f8-b466-423ce85a5b6a
I, [2014-08-18T22:22:38.689901 #2382]  INFO -- : Completed 302 Found in 5ms (ActiveRecord: 0.0ms)
172.31.128.6, 10.0.0.101 - - [18/Aug/2014 22:22:38] "GET /manage/auth/cloudfoundry/callback?code=sd8T5I&state=441bace77b9580e673682db06b460a13 HTTP/1.1" 302 - 0.2700
I, [2014-08-18T22:22:38.714709 #2385]  INFO -- : Started GET "/manage/instances/846f86aa-7dbd-44f8-b466-423ce85a5b6a" for 10.0.0.11 at 2014-08-18 22:22:38 +0000
I, [2014-08-18T22:22:38.718135 #2385]  INFO -- : Processing by Manage::InstancesController#show as HTML
I, [2014-08-18T22:22:38.718613 #2385]  INFO -- :   Parameters: {"id"=>"846f86aa-7dbd-44f8-b466-423ce85a5b6a"}
I, [2014-08-18T22:22:38.750897 #2385]  INFO -- :   Rendered errors/not_authorized.html.erb within layouts/application (0.3ms)
I, [2014-08-18T22:22:38.753681 #2385]  INFO -- : Filter chain halted as :ensure_can_manage_instance rendered or redirected
I, [2014-08-18T22:22:38.754219 #2385]  INFO -- : Completed 200 OK in 35ms (Views: 5.1ms | ActiveRecord: 0.0ms)

Access has been given via the login server to the dashboard-sso client.

Running a manual API query to determine permissions seem to return successfully:

gcf curl /v2/service_instances/846f86aa-7dbd-44f8-b466-423ce85a5b6a/permissions
{
   "manage": true
}

I understand I've made quite a few changes, but would certainly appreciate some help debugging the issue.

Enable audit_plugin

I have a requirement to run audit logs to syslog. I can enable the audit_plugin by adding these lines to /etc/mysql/my.cnf and restarting the mysql monit jobs:

Audit Plugin options

plugin-load = server_audit=server_audit.so
server_audit_events = connect,query
server_audit_output_type = syslog
server_audit_logging = ON

I don't see a way to add these values into the deployment manifest. Can a trigger be set (if server_audit) to enable the plugin and look for the remaining values in the manifest?

cf_mysql.mysql.server_audit_events
cf_mysql.mysql.server_audit_output_type
cf_mysql.mysql.server_audit_logging

errand "broker-registrar" fails

Trying to run broker-registrar errand... it fails with error

Task 257 done

Started         2014-07-21 15:36:09 UTC
Finished        2014-07-21 15:39:16 UTC
Duration        00:03:07

[stdout]

bundle exec ./bin/broker-registrar register
    --cf-address https://api.cf.abc.def
    --cf-username admin
    --cf-password ********
    --broker-name p-mysql
    --broker-url http://p-mysql.pcf.cf.abc.def:80
    --broker-username admin
    --broker-password ********


[stderr]
E, [2014-07-21T15:36:48.444016 #3290] ERROR -- : 10001: The service broker API returned an error from http://p-mysql.pcf.cf.abc.def/v2/catalog: 404 Not Found (CFoundry::ServerError)

cookie_secret property should be a valid BOSH job property

cf-mysql-broker currently contains an invalid job property definition on
https://github.com/cloudfoundry/cf-mysql-release/blob/master/jobs/cf-mysql-broker/spec#L27

properties:
  auth_username:
    description: "Broker's basic auth username"
  auth_password:
    description: "Broker's basic auth password"
  cookie_secret: 'A unique secret key, used to sign sessions'
  ...

It should be

properties:
  auth_username:
    description: "Broker's basic auth username"
  auth_password:
    description: "Broker's basic auth password"
  cookie_secret: 
    description: 'A unique secret key, used to sign sessions'
  ...

Errand `broker-deregistrar' completed with error (exit code 1)

Stemcell 2611, bosh gems 2624. Trying to deregister broker using example from readmy:

$ bosh run errand broker-deregistrar


Director task 80
  Started preparing deployment
  Started preparing deployment > Binding deployment. Done (00:00:00)
  Started preparing deployment > Binding releases. Done (00:00:00)
  Started preparing deployment > Binding existing deployment. Done (00:00:01)
  Started preparing deployment > Binding resource pools. Done (00:00:00)
  Started preparing deployment > Binding stemcells. Done (00:00:00)
  Started preparing deployment > Binding templates. Done (00:00:00)
  Started preparing deployment > Binding properties. Done (00:00:00)
  Started preparing deployment > Binding unallocated VMs. Done (00:00:00)
  Started preparing deployment > Binding instance networks. Done (00:00:00)
     Done preparing deployment (00:00:01)

  Started preparing package compilation > Finding packages to compile. Done (00:00:00)

  Started binding instance vms > broker-deregistrar/0. Done (00:00:01)

  Started updating job broker-deregistrar > broker-deregistrar/0 (canary). Done (00:00:47)

  Started running errand > broker-deregistrar/0. Done (00:00:02)

  Started fetching logs for broker-deregistrar/0 > Finding and packing log files. Done (00:00:01)

  Started deleting errand instances broker-deregistrar > i-a18607e2. Done (00:01:05)

  Started refilling resource pools > services-small/0. Done (00:00:59)

Task 80 done

Started     2014-07-21 11:32:06 UTC
Finished    2014-07-21 11:35:02 UTC
Duration    00:02:56

[stdout]

bundle exec ./bin/broker-registrar delete
    --cf-address https://54.77.58.71:25555
    --cf-username admin
    --cf-password ********
    --broker-name p-mysql
    --broker-url http://p-mysql.cf.innomdc.com:80
    --broker-username admin
    --broker-password ********


[stderr]
E, [2014-07-21T11:32:56.834016 #5703] ERROR -- : undefined method `authorize' for nil:NilClass (NoMethodError)
/var/vcap/data/packages/broker-registrar/548c89eaccbc77db0d88dbef5b417b625fa3f7f4.1-5e5ebdbab1b3148c7e817090000e49a5becfe0f5/vendor/bundle/ruby/2.0.0/gems/cfoundry-4.7.1/lib/cfoundry/concerns/login_helpers.rb:10:in `login'
/var/vcap/data/packages/broker-registrar/548c89eaccbc77db0d88dbef5b417b625fa3f7f4.1-5e5ebdbab1b3148c7e817090000e49a5becfe0f5/vendor/bundle/ruby/2.0.0/gems/cfoundry-4.7.1/lib/cfoundry/v2/client.rb:50:in `login'
/var/vcap/data/packages/broker-registrar/548c89eaccbc77db0d88dbef5b417b625fa3f7f4.1-5e5ebdbab1b3148c7e817090000e49a5becfe0f5/lib/broker_registrar.rb:25:in `delete'
./bin/broker-registrar:70:in `<main>'

Errand `broker-deregistrar' completed with error (exit code 1)

[make_manifest_spiff_mysql] deploy filed - Error filling in template `00-validation.erb' for `cf-mysql-broker/0'

$ ./bosh-lite/make_manifest_spiff_mysql
$ bosh deploy
...
  Started preparing configuration > Binding configuration. Failed: Error filling in template `00-validation.erb' for `cf-mysql-broker/0' (line 87: Service property 'plans' must be empty or an array of one plan

Example of complete broker properties:

auth_username: admin
auth_password: password
cc_api_url: http://api.cloudfoundry.com
services:
- id: cf-mysql-1
  name: cf-mysql
  description: Cloud Foundry MySQL
  max_db_per_node: 50
  tags:
  - mysql
  - relational
  metadata:
    displayName: "Pivotal MySQL Dev"
    imageUrl: "data:image/png;base64,encodedBase64binary"
    longDescription: "Long Description"
    providerDisplayName: "Pivotal Software"
    documentationUrl:
    supportUrl: "http://support.cloudfoundry.com/"
  dashboard_client:
    id: p-mysql-client
    secret: p-mysql-secret
  plans:
  - name: 100mb
    id: cf-mysql-plan-1
    description: Free Trial
    max_storage_mb: 100
    metadata:
      costs:
      - amount:
          usd: 0.0
        unit: MONTHLY

      bullets:
        - Shared MySQL server
        - 100 MB storage
        - 40 concurrent connections
) (00:00:00)

Create release fails, repository not found

Hi,
i'm trying to create dev releases from develop branch, i faced next issue when i run ./update:

Cloning into 'src/github.com/fraenkel/candiedyaml'...
Username for 'https://github.com': infra-red
Password for 'https://[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/fraenkel/candiedyaml/' not found
Clone of 'https://github.com/fraenkel/candiedyaml' into submodule path 'src/github.com/fraenkel/candiedyaml' failed

Looks like this repository doesnt exist anymore or maybe owner set this repo as private.

Anyone have any ideas about this?

p-mysql broker should expose both proxies for HA

The cf-mysql release deploys multiple proxy servers, for HA purpose.
But the cloudfoundry broker exposes only one, exposing the cf app to db access failure during bosh deployment (see below)

Broker should expose the multiple proxy ips, so that application / buildpacks can leverage the proxy HA

+----------------------+---------+--------------------+-----------------+
| Job/index            | State   | Resource Pool      | IPs             |
+----------------------+---------+--------------------+-----------------+
| cf-mysql-broker_z1/0 | running | cf-mysql-broker_z1 | 192.168.100.150 |
| cf-mysql-broker_z2/0 | running | cf-mysql-broker_z2 | 192.168.100.160 |
| mysql_z1/0           | running | mysql_z1           | 192.168.100.155 |
| mysql_z2/0           | running | mysql_z2           | 192.168.100.165 |
| mysql_z3/0           | running | mysql_z3           | 192.168.100.175 |
| proxy_z1/0           | running | proxy_z1           | 192.168.100.156 |
| proxy_z2/0           | running | proxy_z2           | 192.168.100.166 |
+----------------------+---------+--------------------+-----------------+
  "p-mysql": [                                                                                     
   {                                                                                               
    "credentials": {                                                                               
     "hostname": "192.168.100.156",                                                                
     "jdbcUrl": "jdbc:mysql://192.168.100.156:3306/cf_c49f7310_121a_44a2_a0e6_315ea501b504?user=k6eGjTLmhoL7kx07\u0026password=zrlNwH2IiMuGwc4v",                                                                                   
     "name": "cf_c49f7310_121a_44a2_a0e6_315ea501b504",                                                           
     "password": "zrlNwH2IiMuGwc4v",                                                                              
     "port": 3306,                                                                                                
     "uri": "mysql://k6eGjTLmhoL7kx07:[email protected]:3306/cf_c49f7310_121a_44a2_a0e6_315ea501b504?reconnect=true",                                                                                                
     "username": "k6eGjTLmhoL7kx07"                                                                               
    },                                                                                                            
    "label": "p-mysql",                                                                                           
    "name": "testmysql",                                                                                          
    "plan": "100mb",                                                                                              
    "tags": [                                                                                                     
     "mysql"                                                                                                      
    ]                                                                                                             
   }                                                                                                              

Test issue

Making sure gitbot now tracks issues on this repo. We'll close this as soon as it shows up in tracker.

NOTHING ACTIONABLE PLEASE IGNORE

Acceptance Tests Failure

Hi Guys,

I have been attempting to apply this mysql service to my cloud foundry deployment but I cannot seem to pass the acceptance tests despite the setup seeming to go well. I have also tried pushing, binding and running my own spring application using this service and despite the app binding properly, I am unable reach it's url.

Running 'cf logs --recent' showed the following output regarding my own spring app:

2014-09-18T16:23:16.41+0100 [RTR] OUT mysqlapp.10.244.0.34.xip.io - [18/09/2014:15:23:16 +0000] "GET / HTTP/1.1" 500 3283 "-" "Wget/1.15 (darwin11.4.2)" 10.0.2.15:37832 x_forwarded_for:"192.168.50.1" vcap_request_id:7fd36db8-e317-4b73-6864-d5b4d7c92808 response_time:0.102914806 app_id:5fd67d28-6423-4cff-b1bd-513ef9929661
2014-09-18T16:23:23.37+0100 [App/0] OUT [INFO ] Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@d59cc346: startup date [Thu Sep 18 15:23:23 UTC 2014]; root of context hierarchy
2014-09-18T16:23:23.37+0100 [App/0] OUT [INFO ] Loading XML bean definitions from class path resource [Beans.xml]
2014-09-18T16:23:23.43+0100 [App/0] OUT [INFO ] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5f2cba1b: defining beans [cloudProperties,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,params]; root of factory hierarchy
2014-09-18T16:23:23.44+0100 [App/0] ERR [ERROR ] SRVE0777E: Exception thrown by application class 'org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties:209'
2014-09-18T16:23:23.44+0100 [App/0] ERR org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [Beans.xml]: Could not resolve placeholder 'cloud.services.mysql.connection.host' in string value [jdbc:mysql://${cloud.services.mysql.connection.host}:${cloud.services.mysql.connection.port}/${cloud.services.mysql.connection.name}]
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:174)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:151)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:661)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
2014-09-18T16:23:23.44+0100 [App/0] ERR at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
2014-09-18T16:23:23.44+0100 [App/0] ERR at com.ibm.cf.bindings.placeholder.Main.doGet(Main.java:35)
2014-09-18T16:23:23.44+0100 [App/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
2014-09-18T16:23:23.44+0100 [App/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
2014-09-18T16:23:23.44+0100 [App/0] ERR at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1274)
2014-09-18T16:23:23.44+0100 [App/0] ERR at [internal classes]
2014-09-18T16:23:23.47+0100 [App/0] ERR [ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [Beans.xml]: Could not resolve placeholder 'cloud.services.mysql.connection.host' in string value [jdbc:mysql://${cloud.services.mysql.connection.host}:${cloud.services.mysql.connection.port}/${cloud.services.mysql.connection.name}]
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:174)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:151)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:661)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
2014-09-18T16:23:23.47+0100 [App/0] ERR at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
2014-09-18T16:23:23.47+0100 [App/0] ERR at com.ibm.cf.bindings.placeholder.Main.doGet(Main.java:35)
2014-09-18T16:23:23.47+0100 [App/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
2014-09-18T16:23:23.47+0100 [App/0] ERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
2014-09-18T16:23:23.47+0100 [App/0] ERR at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1274)
2014-09-18T16:23:23.47+0100 [App/0] ERR at [internal classes]
2014-09-18T16:23:23.47+0100 [App/0] ERR Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [Beans.xml]: Could not resolve placeholder 'cloud.services.mysql.connection.host' in string value [jdbc:mysql://${cloud.services.mysql.connection.host}:${cloud.services.mysql.connection.port}/${cloud.services.mysql.connection.name}]
2014-09-18T16:23:23.47+0100 [App/0] ERR ... 14 more
2014-09-18T16:23:23.52+0100 [RTR] OUT mysqlapp.10.244.0.34.xip.io - [18/09/2014:15:23:23 +0000] "GET /basic-application HTTP/1.1" 500 3283 "-" "Wget/1.15 (darwin11.4.2)" 10.0.2.15:37873 x_forwarded_for:"192.168.50.1" vcap_request_id:3fc252d7-44a8-4491-549b-c046386a1d75 response_time:0.162456767 app_id:5fd67d28-6423-4cff-b1bd-513ef9929661

The output from each of the failures in the acceptance tests looked like this:

cf auth admin admin
API endpoint: https://api.10.244.0.34.xip.io
Authenticating...
OK
Use 'cf target' to view or set your target org and space

cf delete-user -f MySqlATS-USER-1-2014_09_18-14h27m32.057s
Deleting user MySqlATS-USER-1-2014_09_18-14h27m32.057s as admin...
OK

cf delete-org -f MySqlATS-ORG-1-2014_09_18-14h27m32.057s
Deleting org MySqlATS-ORG-1-2014_09_18-14h27m32.057s as admin...
OK

cf curl /v2/quota_definitions/7d40f9fc-f9f8-4790-be28-4af5ffcd06f7?recursive=true -X DELETE -d

cf logout
Logging out...
OK

โ€ข Failure [71.196 seconds]
P-MySQL Service
/var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/p_mysql_test.go:180
Enforcing MySQL storage and connection quota
/var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/p_mysql_test.go:179
for each plan
/var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/p_mysql_test.go:178
enforces the connection quota for the plan [It]
/var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/p_mysql_test.go:170

  No future change is possible.  Bailing out early after 2.003s.
  Got stuck at:
      Error: Can't connect to MySQL server on '10.244.1.18' (111)

      Backtrace: /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize'
      /home/vcap/app/main.rb:160:in `new'
      /home/vcap/app/main.rb:160:in `load_mysql'
      /home/vcap/app/main.rb:136:in `block (2 levels) in <top (required)>'
      /home/vcap/app/main.rb:135:in `times'
      /home/vcap/app/main.rb:135:in `block in <top (required)>'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1541:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1541:in `block in compile!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1726:in `synchronize'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'
      /home/vcap/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
      /home/vcap/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
      /home/vcap/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
      /home/vcap/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

  Waiting for:
      success

  /var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/p_mysql_test.go:166

  Full Stack Trace
  /var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/p_mysql_test.go:166 (0x43f1c0)
    1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service.func.016: Eventually(Curl(uri+strconv.Itoa(MaxUserConnections)), helpers.ScaledTimeout(timeout), retryInterval).Should(Say("success"))
  /var/vcap/data/packages/acceptance-tests/9c1674d48cc3a3f0c2ee4f35176fe76bd46e7745.1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service/init_test.go:26 (0x43921d)
    1-7c92da93ee92c9474ec810ed9793eb25c1cf0c35/cf-mysql-service.TestServices: RunSpecsWithDefaultAndCustomReporters(t, "P-MySQL Acceptance Tests", []Reporter{reporters.NewJUnitReporter(fmt.Sprintf("junit_%d.xml", ginkgoconfig.GinkgoConfig.ParallelNode))})

Ran 7 of 7 Specs in 417.180 seconds
FAIL! -- 0 Passed | 7 Failed | 0 Pending | 0 Skipped --- FAIL: TestServices (417.18 seconds)
FAIL

Ginkgo ran 1 suite in 7m7.843416839s
Test Suite Failed

[stderr]

  • cd /var/vcap/packages/acceptance-tests
  • export GOROOT=/var/vcap/packages/golang
  • GOROOT=/var/vcap/packages/golang
  • export PATH=/var/vcap/packages/cli/bin:/var/vcap/packages/golang/bin:/var/vcap/packages/acceptance-tests/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • PATH=/var/vcap/packages/cli/bin:/var/vcap/packages/golang/bin:/var/vcap/packages/acceptance-tests/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • export CONFIG=/var/vcap/packages/acceptance-tests/integration_config.json
  • CONFIG=/var/vcap/packages/acceptance-tests/integration_config.json
  • cat
  • set +x
  • bin/test
  • set -u
  • which go
  • GOPATH=/var/vcap/packages/acceptance-tests/vendor
  • go install github.com/onsi/ginkgo/ginkgo
  • go fmt ./cf-mysql-service/...
  • GOPATH=/var/vcap/packages/acceptance-tests/vendor
  • CF_COLOR=false
  • CF_VERBOSE_OUTPUT=true
  • vendor/bin/ginkgo -v -trace=true -slowSpecThreshold=300 ./cf-mysql-service

Errand `acceptance-tests' completed with error (exit code 1)

Any help in this matter would be greatly appreciated,

Kind Regards,

Max Rycroft

Unresolved deps of mysqld from MariaDB

BOSH and stemcells (AWS Xen Ubuntu 10.04/Lucid) are 2624, deploy of cf-mysql-release failed with "timeout" after:

Started updating job mysql > mysql/0 (canary)

This is caused by:

/var/vcap/packages/mariadb/bin/mysqld --help
/var/vcap/packages/mariadb/bin/mysqld: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

Tried to upload cf-mysql-release after ./update or even bosh create release - same results.

Encrypted connection support for MySQL (MariaDB) in Cloud Foundry

Do you have examples of enabling SSL for MariaDB and then a process for application clients to connect via SSL with a certificate? I don't see any documentation on setting up connection encryption support so please send me there if I just missed it. Thanks.

Failed to execute database script

I've installed, and create a service instance, and then deploy a simple app. Then I bind
the app with the instance. The application needs to use the instance to create
database schema (a simple table), and insert one row into this table.
My app is a spring app, and it has this context





<property name="validationQuery"value="${jdbc.validationQuery}">

How do I actually use the service instance in my spring app?

Thanks,

ERROR- Failed to execute database script;

bosh deploy error : no implicit conversion of Fixnum into String

Hi Expert,
When run bosh deploy, I got below issue:
bosh 1.3016.0
ruby 2.1.6
mysql release 22


Deploying

Are you sure you want to deploy? (type 'yes' to continue): yes

Director task 63
Started unknown
Started unknown > Binding deployment. Done (00:00:00)

Started preparing deployment
Started preparing deployment > Binding releases. Done (00:00:00)
Started preparing deployment > Binding existing deployment. Done (00:00:00)
Started preparing deployment > Binding resource pools. Done (00:00:00)
Started preparing deployment > Binding stemcells. Done (00:00:01)
Started preparing deployment > Binding templates. Done (00:00:00)
Started preparing deployment > Binding properties. Done (00:00:00)
Started preparing deployment > Binding unallocated VMs. Done (00:00:00)
Started preparing deployment > Binding instance networks. Done (00:00:00)

Started preparing package compilation > Finding packages to compile. Done (00:00:00)

Started compiling packages
Started compiling packages > cli/24305e50a638ece2cace4ef4803746c0c9fe4bb0
Started compiling packages > mysqlclient/ce95f8ac566f76b650992987d5282ee473356e43
Started compiling packages > ruby/ff79c965224b4160c1526bd704b3b21e4ad7c362
Started compiling packages > syslog_aggregator/078da6dcb999c1e6f5398a6eb739182ccb4aba25
Failed compiling packages > cli/24305e50a638ece2cace4ef4803746c0c9fe4bb0: no implicit conversion of Fixnum into String (00:00:00)
Failed compiling packages > syslog_aggregator/078da6dcb999c1e6f5398a6eb739182ccb4aba25: no implicit conversion of Fixnum into String (00:00:00)
Failed compiling packages > mysqlclient/ce95f8ac566f76b650992987d5282ee473356e43: no implicit conversion of Fixnum into String (00:00:00)

Failed compiling packages > ruby/ff79c965224b4160c1526bd704b3b21e4ad7c362: no implicit conversion of Fixnum into String (00:00:00)

Thanks,
David

deploy/compilation failed on master

I uploaded 96aadfd and when deploying it I get these compilation errors:

Error 450001: Action Failed get_task: Task 25666cfe-6e7d-409b-70e4-dd83b20c235c result: Compiling package cf-mysql-broker: Running packaging script: Running command: 'bash -x packaging', stdout: 'There was a Errno::ENOENT while loading cf-registrar.gemspec: 
No such file or directory - git from
/var/vcap/data/packages/cf-mysql-broker/a8f9d5b451d7cc2e1439acbbc8d5c739e2a0cb3f.1-/vendor/cache/cf-registrar-fb7d89608eb7/cf-registrar.gemspec:13:in
``'
', stderr: '+ set -e
+ rsync -a cf-mysql-broker/ /var/vcap/packages/cf-mysql-broker
+ cd /var/vcap/packages/cf-mysql-broker
+ export PATH=/var/vcap/packages/ruby/bin:/var/vcap/bosh/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+ PATH=/var/vcap/packages/ruby/bin:/var/vcap/bosh/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+ mysqlclient_dir=/var/vcap/packages/mysqlclient
+ /var/vcap/packages/ruby/bin/bundle config build.mysql2 --with-mysql-config=/var/vcap/packages/mysqlclient/bin/mysql_config
+ /var/vcap/packages/ruby/bin/bundle install --local --deployment --without development test
': exit status 1

haproxy fails to compile on new stemcells

Hi,

I was trying to use cf-mysql-release, and noticed that on the openstack stemcell version 2707 it fails with:

  • tar xzf haproxy/haproxy-1.5.0.tar.gz
  • cd haproxy-1.5.0
  • make TARGET=linux2628 CPU=native USE_OPENSSL=1 USE_STATIC_PCRE=1 USE_ZLIB=1
    src/haproxy.c:1:0: error: CPU you selected does not support x86-64 instruction set

Full log here

Changing this file, taking CPU=native out, fixes the error

Bye!

when i buile release ,there is an error

Unknown command: create releae --force
root@cf001:/service-workspace/release# bosh create release --force
Sorry, your current directory doesn't look like release directory
root@cf001:
/service-workspace/release# cd cf-mysql-release/
root@cf001:~/service-workspace/release/cf-mysql-release# bosh create release --force
Syncing blobs...

Building DEV release

Building packages

Building common...
Final version: FOUND LOCAL

Building mysqlclient...
Final version: FOUND LOCAL

Building cf-mysql-broker...
Final version: NOT FOUND
Dev version: NOT FOUND
Generating...
Pre-packaging...

  • set -e

  • cd /tmp/d20131220-59528-1mgh1ui/d20131220-59528-77lw7q/cf-mysql-broker

  • bundle package
    Fetching gem metadata from https://rubygems.org/..........
    Fetching gem metadata from https://rubygems.org/..
    Using rake (10.1.0)
    Using i18n (0.6.5)
    Using minitest (4.7.5)
    Using multi_json (1.8.0)
    Using atomic (1.1.14)
    Using thread_safe (0.1.3)
    Using tzinfo (0.3.37)
    Using activesupport (4.0.0)
    Using builder (3.1.4)
    Using erubis (2.7.0)
    Using rack (1.5.2)
    Using rack-test (0.6.2)
    Using actionpack (4.0.0)
    Using mime-types (1.25)
    Using polyglot (0.3.3)
    Using treetop (1.4.15)
    Using mail (2.5.4)
    Using actionmailer (4.0.0)
    Using activemodel (4.0.0)
    Using activerecord-deprecated_finders (1.0.3)
    Using arel (4.0.0)
    Using activerecord (4.0.0)
    Using diff-lcs (1.2.4)
    Using hike (1.2.3)
    Using kgio (2.8.1)
    Installing mysql2 (0.3.14)
    Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /root/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb --with-mysql-dir=/var/vcap/packages/mysqlclient --with-mysql-include=/var/vcap/packages/mysqlclient/include/mysql
    

    checking for ruby/thread.h... no
    checking for rb_thread_blocking_region()... yes
    checking for rb_wait_for_single_fd()... yes
    checking for rb_hash_dup()... yes

    checking for rb_intern3()... yes

    Cannot find include dir at /var/vcap/packages/mysqlclient/include/mysql:/var/vcap/packages/mysqlclient/include/mysql:/var/vcap/packages/mysqlclient/include

    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers. Check the mkmf.log file for more
    details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/root/.rbenv/versions/1.9.3-p448/bin/ruby
--with-mysql-dir
--with-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib

Gem files will remain installed in /root/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/mysql2-0.3.14 for inspection.
Results logged to /root/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/mysql2-0.3.14/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.14), and Bundler cannot continue.
Make sure that gem install mysql2 -v '0.3.14' succeeds before bundling.
`cf-mysql-broker' pre-packaging failed

mysql cluster won't get up on first time deploy

i tried to deploy the mysql cluster and it fails.
when i check the mysql.err.log

i see the error

141106  9:53:33 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
         at gcomm/src/pc.cpp:connect():141
141106  9:53:33 [ERROR] WSREP: gcs/src/gcs_core.c:gcs_core_open():202: Failed to open backend connection: -110 (Connection timed out)
141106  9:53:33 [ERROR] WSREP: gcs/src/gcs.c:gcs_open():1291: Failed to open channel 'cf-mariadb-galera-cluster' at 'gcomm://172.21.42.163,172.21.42.167,172.21.42.170': -110 (Connection timed out)
141106  9:53:33 [ERROR] WSREP: gcs connect failed: Connection timed out
141106  9:53:33 [ERROR] WSREP: wsrep::connect() failed: 7
141106  9:53:33 [ERROR] Aborting

it seems that the first node is not bootstrapped with "service mysql start --wsrep-new-cluster"

i tried release 13 & 14

Extracting route registration logic

TL;DR: we want to change something you use, shouldn't affect you in the short run, but want to get your thoughts on the medium-term/long-term, since it will have some impact on this project. We have a story in progress, blocked on this discussion.

We have built a general-purpose route registration job with a couple goals in mind:

  • services that aren't primarily concerned with route registration logic shouldn't have to worry about that, and can simply colocate an "agent" if it's being deployed in a context where it wants to register a route, and the agent handles the logic for them.
  • we have a common, reusable implementation so that there aren't 100 different ways to register routes, and 100 different things that need to be updated when route registration APIs change.

Currently it lives in cf-release, but the goal would be to move it into a routing-release. Right now it's a simple Ruby process that talks to NATS, but we are switching it to use this Golang library that your project also uses: https://github.com/cloudfoundry-incubator/route-registrar.

We are working on that code to make it more general, and add some features to it (e.g. health checking, support for multiple routes to a single IP). In the short run, this won't affect this project as long as you don't try to update your dependency to point to our new changes to that Golang library. In the longer run, this will entail:

  • cf-mysql-release deployments that live in the context of a gorouter, registering routes (presumably for the broker) will want to colocate this route_registrar job
  • manifests will need to configure the route_registrar differently, for example this, this, and this would go away, and the resulting configuration would look something more like this and this

Any thoughts or concerns? We have a story in progress blocked on this discussion.

/cc @ljfranklin @menicosia @robdimsdale @zaksoup

cf-mysql-v25 dashboard cannot login success

I deploy the cf-mysql-v25 release,my cf is 222.when I create the service-broker,it return:

   Warning: This broker includes configuration for a dashboard client. Auto-creation of OAuth2 clients has been disabled in this Cloud Foundry instance. The broker catalog has been updated but its dashboard client configuration will be ignored.
Enabling access of plan 100mb-dev for service p-mysql as admin...
OK

[stderr]
None
I add the client data to the  uaa's yml,but also can't login the dashboard.
should I Manually add the client use the cf-uaac?  

Error filling in template `settings.yml.erb''

We got the error message below when deploying cf-mysql-release on bosh-lite.
The manifest was made using make_manifest_spiff_mysql. No changes.

Versions:
cf-mysql ver 5
cf ver 154
bosh-lite
bosh 1761, stemcell bosh-warden-boshlite-ubuntu ver 24

Error message:
Preparing configuration
binding configuration: Error filling in template settings.yml.erb' forcf-mysql-broker/0' (line 18: undefined method `name' for nil:NilClass) (00:00:01)
Error 1/1 00:00:01

Error 80006: Error filling in template settings.yml.erb' forcf-mysql-broker/0' (line 18: undefined method `name' for nil:NilClass)

haproxy template not found

Trying to deploy cf-mysql getting problem "haproxy not found"

$ git clone --recursive https://github.com/cloudfoundry/cf-mysql-release.git
$ cd cf-mysql-release
$ ./update
$ git checkout v8
$  bosh validate jobs
Getting deployment properties from director...
Compiling deployment manifest...

Analyzing release directory...
 - discovering packages
 - discovering jobs
 - validating properties
Job `haproxy' has not been built

If I try to deploy same release I am getting the same

$ bosh -n deploy
  Started preparing deployment
  Started preparing deployment > Binding deployment. Done (00:00:00)
  Started preparing deployment > Binding releases. Done (00:00:00)
  Started preparing deployment > Binding existing deployment. Done (00:00:00)
  Started preparing deployment > Binding resource pools. Done (00:00:00)
  Started preparing deployment > Binding stemcells. Done (00:00:00)
  Started preparing deployment > Binding templates. Failed: Can't find template `haproxy' (00:00:00)

Error 190012: Can't find template `haproxy'

acceptance-tests failed, cf start , Unauthorized error

Hi Expert,
My environment:
mysql v22
vsphere 5.5
ruby 2.1.6
bosh 1.3016

The deployment finished in acceptance-tests.

Error as below, could you help to check?

[2015-09-09 04:03:55.72 (UTC)]> cf api https://api.192.168.2.33.xip.io --skip-ssl-validation
Setting api endpoint to https://api.192.168.2.33.xip.io...
OK

API endpoint: https://api.192.168.2.33.xip.io (API version: 2.33.0)
Not logged in. Use 'cf login' to log in.

[2015-09-09 04:03:55.82 (UTC)]> cf auth MySQLATS-USER-1-2015_09_09-04h03m53.035s meow
API endpoint: https://api.192.168.2.33.xip.io
Authenticating...
OK
Use 'cf target' to view or set your target org and space

[2015-09-09 04:03:56.11 (UTC)]> cf target -o MySQLATS-ORG-1-2015_09_09-04h03m53.035s -s MySQLATS-SPACE-1-2015_09_09-04h03m53.035s

API endpoint: https://api.192.168.2.33.xip.io (API version: 2.33.0)
User: MySQLATS-USER-1-2015_09_09-04h03m53.035s
Org: MySQLATS-ORG-1-2015_09_09-04h03m53.035s
Space: MySQLATS-SPACE-1-2015_09_09-04h03m53.035s

[2015-09-09 04:03:56.31 (UTC)]> cf push a06314e1-c17a-4ee6-644c-dd104cd3a358 -m 256M -p ../../assets/sinatra_app -no-start
Creating app a06314e1-c17a-4ee6-644c-dd104cd3a358 in org MySQLATS-ORG-1-2015_09_09-04h03m53.035s / space MySQLATS-SPACE-1-2015_09_09-04h03m53.035s as MySQLATS-USER-1-2015_09_09-04h03m53.035s...
OK

Creating route a06314e1-c17a-4ee6-644c-dd104cd3a358.192.168.2.33.xip.io...
OK

Binding a06314e1-c17a-4ee6-644c-dd104cd3a358.192.168.2.33.xip.io to a06314e1-c17a-4ee6-644c-dd104cd3a358...
OK

Uploading a06314e1-c17a-4ee6-644c-dd104cd3a358...
Uploading app files from: ../../assets/sinatra_app
Uploading 105.8K, 12 files
Done uploading
OK

[2015-09-09 04:04:01.96 (UTC)]> cf create-service p-mysql 100mb cadc7408-e3c9-4853-7bef-e950d23c924f
Creating service cadc7408-e3c9-4853-7bef-e950d23c924f in org MySQLATS-ORG-1-2015_09_09-04h03m53.035s / space MySQLATS-SPACE-1-2015_09_09-04h03m53.035s as MySQLATS-USER-1-2015_09_09-04h03m53.035s...
OK

[2015-09-09 04:04:02.40 (UTC)]> cf bind-service a06314e1-c17a-4ee6-644c-dd104cd3a358 cadc7408-e3c9-4853-7bef-e950d23c924f
Binding service cadc7408-e3c9-4853-7bef-e950d23c924f to app a06314e1-c17a-4ee6-644c-dd104cd3a358 in org MySQLATS-ORG-1-2015_09_09-04h03m53.035s / space MySQLATS-SPACE-1-2015_09_09-04h03m53.035s as MySQLATS-USER-1-2015_09_09-04h03m53.035s...
OK
TIP: Use 'cf restage' to ensure your env variable changes take effect

[2015-09-09 04:04:02.81 (UTC)]> cf start a06314e1-c17a-4ee6-644c-dd104cd3a358
Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app a06314e1-c17a-4ee6-644c-dd104cd3a358 in org MySQLATS-ORG-1-2015_09_09-04h03m53.035s / space MySQLATS-SPACE-1-2015_09_09-04h03m53.035s as MySQLATS-USER-1-2015_09_09-04h03m53.035s...
FAILED
Server error, status code: 400, error code: 170001, message: Staging error: no available stagers

[2015-09-09 04:04:03.16 (UTC)]> cf logout
Logging out...
OK

create release failed: omniauth-uaa-oauth2 at .../omniauth-uaa-oauth2-9034154c929a did not have a valid gemspec

./update
+ %* %F{red}%x:%I %F{green}%N:%i%F{white} %_git pull
Already up-to-date.
+ %* %F{red}%x:%I %F{green}%N:%i%F{white} %_git submodule foreach --recursive git submodule sync
Entering 'packages/ruby'
Entering 'shared'
Entering 'src/cf-mysql-broker'
+ %* %F{red}%x:%I %F{green}%N:%i%F{white} %_git submodule update --init --recursive

$ bosh create release --with-tarball
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
Syncing blobs...
mysql/mysql-5.6.13.tar.gz downloaded                                            
ruby/bundler-1.3.5.gem downloaded                                               
ruby/ruby-2.0.0-p353.tar.gz downloaded                                          
ruby/rubygems-2.1.11.tgz downloaded                                             
mysqlclient/mysql-connector-c-6.1.2-src.t... downloaded                         
ruby/yaml-0.1.5.tar.gz downloaded                                               
Please enter development release name: cf-mysql

Building DEV release
---------------------------------

Building packages
-----------------
Building cf-mysql-broker...
  Final version:   NOT FOUND
  Dev version:     NOT FOUND
  Generating...
  Pre-packaging...
  > + %* %F{red}%x:%I %F{green}%N:%i%F{white} %_set -e
  > + %* %F{red}%x:%I %F{green}%N:%i%F{white} %_cd /var/folders/pf/c8pdkkyj75nb3hclrsr6hkdh0000gn/T/d20140319-91073-nugoxr/d20140319-91073-snjx37/cf-mysql-broker
  > + %* %F{red}%x:%I %F{green}%N:%i%F{white} %_bundle package --all
  > Fetching gem metadata from https://rubygems.org/.......
  > Fetching additional metadata from https://rubygems.org/..
  > Fetching https://github.com/cloudfoundry/cf-registrar
  > Cloning into bare repository '/Users/drnic/.rvm/gems/ruby-2.1.0/cache/bundler/git/cf-registrar-9d7df3522da755bae12a440ffb1fad3a6e9c6bd2'...
  > Cloning into '/Users/drnic/.rvm/gems/ruby-2.1.0/bundler/gems/cf-registrar-fb7d89608eb7'...
  > done.
  > Fetching git://github.com/cloudfoundry/omniauth-uaa-oauth2.git
  > Cloning into bare repository '/Users/drnic/.rvm/gems/ruby-2.1.0/cache/bundler/git/omniauth-uaa-oauth2-69ecf61d24d374114e03b6e3905bebeaf7cbad96'...
  > Cloning into '/Users/drnic/.rvm/gems/ruby-2.1.0/bundler/gems/omniauth-uaa-oauth2-9034154c929a'...
  > done.
  > Using rake (10.1.0)
  > Installing i18n (0.6.5)
  > Using minitest (4.7.5)
  > Using multi_json (1.8.4)
  > Using atomic (1.1.14)
  > Using thread_safe (0.1.3)
  > Installing tzinfo (0.3.37)
  > Installing activesupport (4.0.0)
  > Using builder (3.1.4)
  > Using erubis (2.7.0)
  > Using rack (1.5.2)
  > Using rack-test (0.6.2)
  > Installing actionpack (4.0.0)
  > Installing mime-types (1.25)
  > Using polyglot (0.3.3)
  > Using treetop (1.4.15)
  > Using mail (2.5.4)
  > Installing actionmailer (4.0.0)
  > Installing activemodel (4.0.0)
  > Using activerecord-deprecated_finders (1.0.3)
  > Installing arel (4.0.0)
  > Installing activerecord (4.0.0)
  > Using addressable (2.3.5)
  > Using eventmachine (1.0.3)
  > Using daemons (1.1.9)
  > Using json_pure (1.8.1)
  > Installing thin (1.6.1)
  > Installing nats (0.5.0.beta.12)
  > Installing vcap-concurrency (0.1.0)
  > Using yajl-ruby (1.2.0)
  > Installing cf-message-bus (0.2.0)
  > Installing msgpack (0.5.8)
  > Installing fluent-logger (0.4.7)
  > Installing steno (1.2.4)
  > Using cf-registrar (1.0.0) from https://github.com/cloudfoundry/cf-registrar (at master)
  > Installing cf-uaa-lib (1.3.10)
  > Using safe_yaml (1.0.1)
  > Installing crack (0.4.2)
  > Using diff-lcs (1.2.4)
  > Using hashie (2.0.5)
  > Using hike (1.2.3)
  > Installing kgio (2.8.1)
  > Installing mysql2 (0.3.14)
  > Installing omniauth (1.2.1)
  > 
  > omniauth-uaa-oauth2 at /Users/drnic/.rvm/gems/ruby-2.1.0/bundler/gems/omniauth-uaa-oauth2-9034154c929a did not have a valid gemspec.
  > This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
  > The validation message from Rubygems was:
  >   duplicate dependency on cf-uaa-lib (>= 0), (>= 0) use:
  >     add_runtime_dependency 'cf-uaa-lib', '>= 0', '>= 0'
  > Using omniauth-uaa-oauth2 (0.0.3) from git://github.com/cloudfoundry/omniauth-uaa-oauth2.git (at error_handling)
  > Using bundler (1.5.2)
  > Using thor (0.18.1)
  > Installing railties (4.0.0)
  > Using tilt (1.4.1)
  > Installing sprockets (2.10.0)
  > Installing sprockets-rails (2.0.0)
  > Installing rails (4.0.0)
  > Installing rails-api (0.1.0)
  > Installing raindrops (0.12.0)
  > Installing rspec-core (2.14.5)
  > Installing rspec-expectations (2.14.3)
  > Installing rspec-mocks (2.14.3)
  > Installing rspec-rails (2.14.0)
  > Using settingslogic (2.0.9)
  > Installing unicorn (4.6.3)
  > Installing webmock (1.17.2)
  > Your bundle is complete!
  > Use `bundle show [gemname]` to see where a bundled gem is installed.
  > Updating files in vendor/cache
  > Could not find rake-10.1.0.gem for installation
`cf-mysql-broker' pre-packaging failed

No Bundle or .ruby-version

Hi,

Unlike cf-release which has a .ruby-version and bundle file there is none for this repo. Not really a big issue but nice to know exactly which Ruby and Bosh version we should be using.

Thanks,

@tlabeeuw @weymanf

No release notes for v20

Release notes seem to still be missing for v20 over 2 weeks after release. Not sure if this is an omission?

public release tgz available

If you'd like to include a reference to it in the readme, there is a publicly available tgz of v9 release:

bosh upload release https://community-shared-boshreleases.s3.amazonaws.com/boshrelease-cf-mysql-9.tgz

update script should fail fast if permissions denied

Script should exit immediately after permission error; otw this can be missed as it scrolls by quickly and later you're left wondering why the release you deployed doesn't have the latest code.

$ ./update
++ dirname ./update
+ ./scripts/install-git-hooks
+ has_remote_branch
+ git rev-parse '@{u}'
+ git pull
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
+ git submodule foreach --recursive git submodule sync
Entering 'packages/ruby'
Entering 'shared'
Entering 'src/broker-registrar'
Entering 'src/cf-mysql-broker'
Entering 'src/github.com/cloudfoundry-incubator/cf-lager'
Entering 'src/github.com/cloudfoundry-incubator/cf-mysql-acceptance-tests'
Entering 'src/github.com/cloudfoundry-incubator/cf-test-helpers'
Entering 'src/github.com/cloudfoundry-incubator/galera-healthcheck'
Entering 'src/github.com/cloudfoundry-incubator/route-registrar'
Entering 'src/github.com/cloudfoundry-incubator/switchboard'
Entering 'src/github.com/cloudfoundry/mariadb_ctrl'
Entering 'src/github.com/erikstmartin/go-testdb'
Entering 'src/github.com/fraenkel/candiedyaml'
Entering 'src/github.com/go-sql-driver/mysql'
Entering 'src/github.com/nu7hatch/gouuid'
Entering 'src/github.com/onsi/ginkgo'
Entering 'src/github.com/onsi/gomega'
Entering 'src/github.com/pivotal-golang/lager'
Entering 'src/github.com/sclevine/agouti'
Entering 'src/github.com/tedsuo/ifrit'
Entering 'src/golang.org/x/crypto'
Entering 'src/gopkg.in/validator.v2'
+ git submodule update --init --recursive

when i deploy the mysql release, it spent a long time . and if it error ,never to recover!

i use the micro bosh to deploy the mysql cluster in the openstack. and i get some trouble.
when i deploy the first node it look like easy to deploy,but when run "141125 2:39:26 [Note] InnoDB: Setting log file ./ib_logfile101 size to 1000 MB
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000
141125 2:39:42 [Note] InnoDB: Setting log file ./ib_logfile1 size to 1000 MB
InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000"
it spent a long time . and also in "file does not exist, creating with contents: BOOTSTRAP
starting in bootstrap".

when i deploy the second node. it spent more time than the first one. and if it run error(in fact in the node i found it was error "panic:command time out" for galera-healthcheck ) . when i try to restart it ,but nerver work. only i deploy once agian.

create release fails on No artifact found for cf-mysql-broker

Hi
Getting following error while creating release. Looking forward for any pointers to move forward.

Thanks
Naheed

Building xtrabackup...
Using final version '2e701e7a9e4241b28052d984733de36aae152275'

Building cf-mysql-broker...
No artifact found for cf-mysql-broker
Generating...
Pre-packaging...

  • set -e
  • cd /home/vagrant/tmp/d20150731-31754-12hnjwm/d20150731-31754-1vp8gbx/cf-my
    sql-broker
  • bundle package --all --no-install
    Unknown switches '--no-install'
    'cf-mysql-broker' pre-packaging failed

like bosh-lite/cf, the warden templates could prepopulate all answers and "just work"

The make_manifest in bosh-lite does not require any extra templates. Sadly, for cf-mysql-release, a lot of fields are required to be provided even though the answers are well-known for bosh-lite:

./generate_deployment_manifest warden                               
2014/06/18 16:44:05 error generating manifest: unresolved nodes:
    (( merge )) in ./templates/cf-mysql-template.yml    director_uuid
    (( merge )) in ./templates/cf-mysql-template.yml    meta.external_domain
    (( merge )) in ./templates/cf-mysql-template.yml    meta.apps_domain
    (( merge )) in ./templates/cf-mysql-template.yml    meta.nats
    (( meta.environment "-mysql" )) in ./templates/cf-mysql-template.yml    name
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[0].properties.admin_password
    (( "p-mysql." meta.external_domain ))   in ./templates/cf-mysql-template.yml    jobs.[1].properties.external_host
    (( meta.nats )) in dynaml   jobs.[1].properties.nats
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[1].properties.auth_username
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[1].properties.cookie_secret
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[1].properties.auth_password
    (( jobs.mysql.properties.admin_password ))  in dynaml   jobs.[1].properties.mysql_node.admin_password
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[1].properties.cc_api_uri
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[1].properties.services.[0].dashboard_client.secret
    (( jobs.cf-mysql-broker.properties.cc_api_uri ))    in dynaml   jobs.[2].properties.cf.api_url
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[2].properties.cf.admin_username
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[2].properties.cf.admin_password
    (( jobs.cf-mysql-broker.properties.external_host )) in dynaml   jobs.[2].properties.broker.host
    (( jobs.cf-mysql-broker.properties.auth_username )) in dynaml   jobs.[2].properties.broker.username
    (( jobs.cf-mysql-broker.properties.auth_password )) in dynaml   jobs.[2].properties.broker.password
    (( jobs.cf-mysql-broker.properties.cc_api_uri ))    in dynaml   jobs.[3].properties.cf.api_url
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[3].properties.cf.admin_username
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[3].properties.cf.admin_password
    (( jobs.cf-mysql-broker.properties.external_host )) in dynaml   jobs.[3].properties.broker.host
    (( jobs.cf-mysql-broker.properties.auth_username )) in dynaml   jobs.[3].properties.broker.username
    (( jobs.cf-mysql-broker.properties.auth_password )) in dynaml   jobs.[3].properties.broker.password
    (( jobs.cf-mysql-broker.properties.cc_api_uri ))    in dynaml   jobs.[4].properties.cf.api_url
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[4].properties.cf.admin_username
    (( merge )) in ./templates/cf-mysql-template.yml    jobs.[4].properties.cf.admin_password
    (( meta.apps_domain ))  in dynaml   jobs.[4].properties.cf.apps_domain
    (( jobs.cf-mysql-broker.properties.external_host )) in dynaml   jobs.[4].properties.broker.host

Could we upgrade the warden template to include all the data; rather than require each user to create a custom yml file with the values?

cf-warden and cf-mysql-manifest ipaddress clash

Hi

I have tried deploying the MYSQL Bosh release to a bosh-lite that already has a running deployment of cloudfoundry (cf-warden). There appears to be an ipaddress clash.

Steps:

  1. Create, Upload and deploy a cf-warden release into bosh-lite
  2. Generate manifest with ./bosh-lite/make_manifest_spiff_mysql
  3. Create, Upload and deploy a cf-warden-mysql release into bosh-lite

I get the error:

Creating bound missing VMs
  services-small/0: Could not acquire network: 10.244.1.0 (00:00:00)                                
  services-small/1 (00:00:03)                                                                       
Error                   2/2 00:00:03                                                                

Error 100: Could not acquire network: 10.244.1.0

The bosh --debug log is

E, [2014-01-10T04:19:21.102065 #4876] [task:19] ERROR -- : Could not acquire network: 10.244.1.0
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/warden-client-0.1.0/lib/warden/client.rb:60:in `read'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/warden-client-0.1.0/lib/warden/client.rb:104:in `call'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_warden_cpi-1.5.0.pre.66/lib/cloud/warden/cloud.rb:90:in `block (2 levels) in create_vm'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_warden_cpi-1.5.0.pre.66/lib/cloud/warden/helpers.rb:35:in `with_warden'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_warden_cpi-1.5.0.pre.66/lib/cloud/warden/cloud.rb:82:in `block in create_vm'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.1657/lib/common/thread_formatter.rb:46:in `with_thread_name'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_warden_cpi-1.5.0.pre.66/lib/cloud/warden/cloud.rb:74:in `create_vm'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/vm_creator.rb:44:in `create'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/resource_pool_updater.rb:51:in `create_missing_vm'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/resource_pool_updater.rb:34:in `block (4 levels) in create_missing_vms'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.1657/lib/common/thread_formatter.rb:46:in `with_thread_name'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/resource_pool_updater.rb:32:in `block (3 levels) in create_missing_vms'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/event_log.rb:78:in `call'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/event_log.rb:78:in `advance_and_track'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/event_log.rb:39:in `track'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh-director-1.5.0.pre.1657/lib/bosh/director/resource_pool_updater.rb:31:in `block (2 levels) in create_missing_vms'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.1657/lib/common/thread_pool.rb:79:in `call'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.1657/lib/common/thread_pool.rb:79:in `block (2 levels) in create_thread'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.1657/lib/common/thread_pool.rb:63:in `loop'
/opt/rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.1657/lib/common/thread_pool.rb:63:in `block in create_thread

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.