Code Monkey home page Code Monkey logo

cf-mysql-deployment's Introduction

Cloud Foundry MySQL Bosh Deployment

This repo contains a BOSH 2 manifest that defines tested topologies of cf-mysql-release.

It serves as the reference for the compatible release and stemcell versions.

This repo takes advantange of new features such as:

Please refer to BOSH documentation for more details. If you're having troubles with the pre-requisites, please contact the BOSH team for help (perhaps on slack).

Usage

New deployments

New deployments will work "out of the box" with little additional configuration. There are two mechanisms for providing credentials to the deployment:

  • Credentials can be provided with -l <path-to-vars-file> (see below for more information on variable files).
  • variables store file should be provided with --vars-store <path-to-vars-store-file> to let the CLI generate secure passwords and write them to the provided vars store file.

By default the deployment manifest will not deploy brokers, nor try to register routes for the proxies with a Cloud Foundry router. To enable integration with Cloud Foundry, operations files are provided to add brokers and register proxy routes.

If you require static IPs for the proxy instance groups, these IPs should be added to the networks section of the cloud-config as well as to an operations file which will use these IPs for the proxy instance groups. See below for more information on operations files.

bosh \
  -e my-director \
  -d cf-mysql \
  deploy \
  ~/workspace/cf-msyql-deployment/cf-mysql-deployment.yml \
  -o <path-to-operations

Upgrading from previous deployment topologies

If you are upgrading an existing deployment of cf-mysql-release with a manifest that does not take advantage of these new features, for example if the manifest was generated via the spiff templates and stubs provided in the cf-mysql-release repository, then be aware:

  1. The base manifest refers to AZs called z1, z2, and z3. If your cloud-config doesn't have those AZs, it will result in an error.
  2. The base manifest will not deploy brokers, nor try to register routes for the proxies with a Cloud Foundry router. If you wish to preserve this behavior you will need to include the add brokers and register proxy routes operations files.
  3. Create custom operations files to map any non-default configuration (e.g. the number of maximum connections).
  4. Create a variables file to contain the credentials of the existing deployment.
  • Using --vars-store is not recommended as it will result in credentials being rotated which can cause issues.
  1. Run the following command:
bosh \
  -e my-director \
  -d my-deployment \
  deploy \
  ~/workspace/cf-msyql-deployment/cf-mysql-deployment.yml \
  -o <path-to-deployment-name-operations> \
  [-o <path-to-additional-operations>] \
  -l <path-to-vars-file> \
  [-l <path-to-additional-vars-files>]

Operations files

The manifest template is not intended to be modified; any changes you need to make should be added to environment-specific operations files, e.g. cf-mysql-operations.yml

Operations files are optional files for modifying the deployment manifest. They are intended for structural and non-secret changes, e.g. modifying the cf_mysql.mysql.max_connections property. Secret values should be placed in variables files (see below for more information on variables files).

A set of operations files for common functionality (e.g. adding a broker for Cloud Foundry integration) is provided here.

The syntax for operations files is detailed here, and example operations files can be found here.

Operations files can be provided at deploy-time as follows:

bosh \
  deploy \
  -o <path-to-operations-file>

For instance, our template assumes your cloud-config has a persistent-disk type named "large". If your cloud-config specifies a type "small", you would add the following to cf-mysql-operations.yml:

---
- type: replace
  path: /instance_groups/name=mysql/persistent_disk_type
  value: small

Variables files

Variables files are a flat-format key-value yaml file which contains sensitive information such as password, ssl keys/certs etc.

They can be provided at deploy-time as follows:

bosh \
  deploy \
  -l <path-to-vars-file>

We provide a default set of variables intended for a local bosh-lite environment here.

Use this as an example for your environment-specific var-file, e.g. cf-mysql-vars.yml

cf-mysql-deployment's People

Contributors

robdimsdale avatar fushewokunze-pivotal avatar johannasmith avatar

Watchers

James Cloos avatar

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.