Skip to content

Instantly share code, notes, and snippets.

@aristotelesneto
Created September 2, 2014 22:39
Show Gist options
  • Save aristotelesneto/90a749ea37153da7de1e to your computer and use it in GitHub Desktop.
Save aristotelesneto/90a749ea37153da7de1e to your computer and use it in GitHub Desktop.
mariadb-test.yml
<%
deployment_name = "mariadb-test"
deployment_type = "paas-test"
deployment_domain = "10.0.0.1.xip.io"
uuid = "9cd61abd-a8e3-4fff-84b6-cc8ec506ae3f"
num_broker = 1
num_proxy = 2
num_service = 3
%>
---
name: <%= deployment_name %>
director_uuid: <%= uuid %>
releases:
- name: cf-mysql
version: latest
- name: mariadb
version: latest
compilation:
workers: 3
network: sys
reuse_compilation_vms: true
cloud_properties:
ram: 4096
disk: 8192
cpu: 4
update:
serial: false
canaries: 1
max_in_flight: 2
canary_watch_time: 60000-90000
update_watch_time: 60000-90000
networks:
- name: svc
subnets:
- range: 172.31.202.0/24
reserved:
- 172.31.202.201 - 172.31.202.202
- 172.31.202.252 - 172.31.202.253
static:
- 172.31.202.1 - 172.31.202.20
gateway: 172.31.202.254
dns:
- 172.31.202.254
cloud_properties:
name: lab-vl4002
resource_pools:
- name: infrastructure
network: sys
size: <%= num_broker+num_proxy %>
stemcell:
name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
version: latest
cloud_properties:
ram: 1024
disk: 10240
cpu: 1
- name: service
network: svc
size: <%= num_service %>
stemcell:
name: bosh-vsphere-esxi-ubuntu-trusty-go_agent
version: latest
cloud_properties:
ram: 2048
disk: 20480
cpu: 2
jobs:
- name: lb-proxy
templates:
- name: mysql-proxy
release: mariadb
instances: <%= num_proxy %>
resource_pool: infrastructure
networks:
- name: svc
default: [dns, gateway]
static_ips:
<% num_proxy.times do |i| %>
<%= "- 172.31.202.#{i+5}\n" %>
<% end %>
- name: mariadb
templates:
- name: mariadb-galera
release: mariadb
instances: <%= num_service %>
resource_pool: service
persistent_disk: 10240
update:
max_in_flight: 1
networks:
- name: svc
default: [dns, gateway]
static_ips:
<% num_service.times do |i| %>
<%= "- 172.31.202.#{i+11}\n" %>
<% end %>
- name: mariadb-broker
templates:
- name: cf-mysql-broker
release: cf-mysql
instances: <%= num_broker %>
resource_pool: infrastructure
networks:
- name: svc
default: [dns, gateway]
static_ips:
- 172.31.202.1
properties:
auth_username: mariadb-usr
auth_password: mariadb-pwd
cookie_secret: 4b80a323-eee1-42ee-b9e0-2e6556a66013
external_host: mariadb.paas.10.0.0.1.xip.io
cc_api_uri: https://api.paas.10.0.0.1.xip.io
ssl_enabled: true
skip_ssl_validation: true
services:
- name: mariadb
id: 47e6ded8-9580-4024-bc70-2edb38cc3f10
description: "Highly Available MariaDB 5.5 Service that is synchronously replicated and distributed."
tags:
- mysql
- relational
metadata:
displayName: "MariaDB 5.5 Cluster Service"
longDescription: "A MariaDB relational database service cluster. The MySQL server is synchronously replicated, distributed and multi-tenant."
documentationUrl: "http://www.mariadb.org/"
dashboard_client:
id: dashboard-sso-mariadb
secret: R2WNTy3oBVjJhz0qLCUI
plans:
- name: 500mb
id: f80685a0-0c58-4640-9c2f-39b7f7759552
description: 500MB persistent disk, 40 concurrent connections
max_storage_mb: 500
metadata:
displayName: "500 MB"
costs:
- amount:
usd: 0.0
unit: MONTH
bullets:
- Highly Available
- Synchronous Replication
- 500 MB storage
- 40 concurrent connections
mysql_node:
host: mariadb.paas-test.10.0.0.1.xip.io
admin_username: admin
admin_password: abc123
persistent_disk: 10240
properties:
networks:
apps: svc
management: svc
broker_network: svc
nats: &nats
address: 172.31.201.30
machines:
- 172.31.201.30
port: 4222
user: nats
username: nats
password: abc123
use_gnatsd: true
authorization_timeout: 5
mysqlproxy:
port: 3306
service_ro: 172.31.202.201
service_rw: 172.31.202.202
servers:
<% num_proxy.times do |i| %>
<%= "- 172.31.202.#{i+5}\n" %>
<% end %>
mariadb:
port: 3307
username: admin
password: abc123
max_user_connections: 10
version: 5.5
servers:
<% num_service.times do |i| %>
<%= "- 172.31.202.#{i+11}\n" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment