Skip to content

Commit

Permalink
[NMB-28832] Add sample values files for Flow on Kubernetes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pattyhair committed Oct 31, 2019
1 parent 90dc713 commit 48fe7da
Show file tree
Hide file tree
Showing 6 changed files with 1,357 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## Welcome
Welcome to the CloudBees examples repository. This repository was created as a place for storing tutorials, examples, and other learning materials.
Welcome to the CloudBees examples repository. This repository was created as a place for storing tutorials, examples, and other learning materials.

## Examples summary
The following table is a brief summary of each of the example projects.
The following table is a brief summary of each of the example projects.

|Directory|Description |
|:---|:-|
|pipeline-template-examples|This repository includes a sample Pipeline Template Catalog. The demos folder includes examples of how to customize a template.yaml file. |
|helm-custom-value-file-examples|Custom Property Value Files for the CloudBees Core for Modern Platforms Helm installation.|
|flow-on-kubernetes|Sample property value files for CloudBees Flow on Kubernetes Helm installation.|
10 changes: 10 additions & 0 deletions flow-on-kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CloudBees Flow Installation Examples

## Introduction
These YAML files are example values files for the CloudBees Flow Helm Chart.

## Examples
- `cloudbees-flow-demo.yaml`: Example .yaml file for installing CloudBees Flow on standard Kubernetes for a non-production environment.
- `cloudbees-flow-prod.yaml`: Example .yaml file for installing CloudBees Flow on standard Kubernetes for a production environment.
- `values.yaml`: Default parameter values for CloudBees Flow on standard Kubernetes. Springboard from this file to create your own custom values.yaml file.
- `values-filebeat.yaml`: Sample values file to configure Filebeat log shipper to capture logs from CloudBees Flow services and pods.
82 changes: 82 additions & 0 deletions flow-on-kubernetes/cloudbees-flow-demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
demoMode: true

##---------------------------------------------
## Flow storage configuration section
##---------------------------------------------

storage:
volumes:
serverPlugins:
accessMode: ReadWriteOnce
# Storage class for plugins directory. Currently it has to be shared across server and web replicas.
# Server and web are co-located using hard affinity rule for demoMode. StorageClass is null here to ensure the same behavior across all cloud providers
# (it forces storage class to fall back to "default" disk based ReadWriteOnce platform specific storage class)
storageClass: null
storage: 5Gi

repositoryStorage:
storage: 10Gi

##---------------------------------------------
## Flow components/workloads configuration section
##---------------------------------------------
server:
resources:
limits:
cpu: 1.5
requests:
cpu: 0.5

# No zookeeper for demo mode
zookeeper:
enabled: false

# Install mariadb chart for demo mode
# and create a database and user for Flow to use.
# Note that the database user name and password
# specified in the `initdbScripts` section must
# match the values in the `database` section below.

mariadb:
fullnameOverride: mariadb
replication:
enabled: false
securityContext:
enabled: true
volumePermissions:
enabled: true
initdbScripts:
demo-db.sql: |-
CREATE DATABASE IF NOT EXISTS demo CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE DATABASE IF NOT EXISTS demo_upgrade CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'flow'@'%' IDENTIFIED BY 'flow_pass';
GRANT ALL PRIVILEGES ON demo.* TO 'flow'@'%';
GRANT ALL PRIVILEGES ON demo_upgrade.* TO 'flow'@'%';
FLUSH PRIVILEGES;
database:
dbName: "demo"
dbUser: "flow"
dbPassword: "flow_pass"
dbType: "mariadb"
dbPort: 3306
clusterEndpoint: "mariadb"

##---------------------------------------------
## Flow server admin credentials section
##---------------------------------------------

flowCredentials:
## Name of the secret containing the admin user password to use. If set, the admin user password
## will be read from the secret instead of the plain-text `adminPassword` (not recommended for production).
##
## The data field must contain base64 encoded value for key 'CBF_SERVER_ADMIN_PASSWORD'.
## E.g., kubectl create secret generic flow-admin-secret --from-literal=CBF_SERVER_ADMIN_PASSWORD='rrx!*d$z75Dsb'
##
## Uncomment the following line to set the name of the secret to use to read the admin user password.
# existingSecret: flow-admin-secret
##
## IMPORTANT: This is clearly not meant for production use and is only meant for demo environments
## where security may not be a concern. Use of `existingSecret` is preferred.
adminPassword: changeme

65 changes: 65 additions & 0 deletions flow-on-kubernetes/cloudbees-flow-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
##---------------------------------------------
## Database configuration section
##---------------------------------------------
database:
## 1. The database to use for CloudBees Flow installation.
## The following database types are supported with Flow in a production environment:
## mysql, oracle, or sqlserver
##
## The database type must be specified.
dbType:

## 2. The name of the database to use with CloudBees Flow installation.
##
## The database name must be specified.
dbName:

## 3. Name of the secret containing the database user credentials.
## The data field must contain base64 encoded values for keys 'DB_USER' and 'DB_PASSWORD'.
## E.g., kubectl create secret generic flow-db-secret --from-literal=DB_USER=flow_user --from-literal=DB_PASSWORD='S!*d$z5Dsb'
##
## Set the name of the secret that contains the database user credentials.
existingSecret: flow-db-secret

## 4.(a) Database hostname if the database instance is running outside the cluster
##
## Either the database hostname (externalEndpoint) or the database service name (clusterEndpoint) must be specified.
##
## Uncomment the following line to set the database hostname.
# externalEndpoint: flowdb.example.com

## 4.(b) Database service name if the database instance is running within the cluster. Use the service DNS name if
## the database service is running in a different namespace in the cluster, e.g., my-sql-db-mysql.default.svc.cluster.local
##
## Either the database hostname (externalEndpoint) or the database service name (clusterEndpoint) must be specified.
##
## Uncomment the following line to set the database service name.
# clusterEndpoint: flow-db-mysql

## 5. The database port to use.
##
## The database port must be specified.
dbPort:

##---------------------------------------------
## Flow storage configuration section
##---------------------------------------------
storage:
volumes:
serverPlugins:
## A ReadWriteMany storage class used for plugins directory.
## It is shared across all the Flow server and the web server
## replicas.
storageClass: your-readwritemany-storage-class

##---------------------------------------------
## Flow server admin credentials section
##---------------------------------------------

flowCredentials:
## Name of the secret containing the admin user password to use.
## The data field must contain base64 encoded value for key 'CBF_SERVER_ADMIN_PASSWORD'.
## E.g., kubectl create secret generic your-flow-admin-secret --from-literal=CBF_SERVER_ADMIN_PASSWORD='rrx!*d$z75Dsb'
##
## Set the name of the secret that contains the admin user password.
existingSecret: your-flow-admin-secret
Loading

0 comments on commit 48fe7da

Please sign in to comment.