diff --git a/.gitignore b/.gitignore index f73f777..a0fdb28 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,8 @@ ca.pem *logging.file_IS_UNDEFINED *.springWebflow osb-service/src/main/resources/static -osb-service/src/main/resources/templates \ No newline at end of file +osb-service/src/main/resources/templates +/tiles/*/** +!/tiles/icon/* +/tiles/om +*_object.yml diff --git a/tiles/deploy-tile.sh b/tiles/deploy-tile.sh new file mode 100755 index 0000000..fae3541 --- /dev/null +++ b/tiles/deploy-tile.sh @@ -0,0 +1,64 @@ +#!/bin/bash +main() { + +[ "$(om -v)" != "$(curl -s "https://raw.githubusercontent.com/pivotal-cf/om/master/version")" ] && echo -e "-----------------------\nnew om version https://github.com/pivotal-cf/om/releases/download/$(curl -s "https://raw.githubusercontent.com/pivotal-cf/om/master/version")/om-$(uname | tr '[:upper:]' '[:lower:]')\n-----------------------" 1>&2 + + [ -f "$TILE_NETWORK" ] && cp "$TILE_NETWORK" ./network_object.yml || echo "${TILE_NETWORK:""}" > ./network_object.yml + # convert network YML into JSON + # RESOURCES + [ -f "$TILE_RESOURCES" ] && cp "$TILE_RESOURCES" ./resources_object.yml || echo "${TILE_RESOURCES:""}" > ./resources_object.yml + # PROPERTIES + [ -f "$TILE_PROPERTIES" ] && cp "$TILE_PROPERTIES" ./properties_object.yml || echo "${TILE_PROPERTIES:""}" > ./properties_object.yml + + # upload product + om \ + -k \ + upload-product \ + --product "$(ls $PRODUCT_PATH | head -n1)" + + om \ + -k \ + stage-product \ + -p "$TILE_PRODUCT_NAME" \ + --product-version "$( ls $PRODUCT_PATH | grep -o -e "[0-9]*\.[0-9]*\.[0-9]*")" + cat ./network_object.yml ./resources_object.yml ./properties_object.yml > config.tmp.yml + +sleep 20 + + # updates properties and resources parameters for tile in Ops Mgr + om \ + --skip-ssl-validation \ + configure-product \ + --product-name "$TILE_PRODUCT_NAME" \ + -c config.tmp.yml + + rm ./network_object.yml ./resources_object.yml ./properties_object.yml config.tmp.yml + produkt="$(om \ + -t $OM_TARGET \ + -k \ + curl \ + -p "/api/v0/staged/products" \ + -x GET | \ + jq "[.[].installation_name]" | \ + grep -o -e "$TILE_PRODUCT_NAME-[a-f0-9]*")" + +sleep 20 + +while om \ + -k \ + curl \ + -p "/api/v0/installations" \ + -x POST \ + -d "{\"deploy_products\": [\"$produkt\"]}" 2>&1 | grep -q "progress" 2>/dev/null 1>/dev/null; do + echo "wait running job is finish" + sleep 60 + om -t $OM_TARGET -k curl -p "/api/v0/installations/current_log" 2>/dev/null 1>/dev/null + done + om -t $OM_TARGET -k curl -p "/api/v0/installations/current_log" | tee log.txt && \ + [ "$(tail -n5 log.txt| grep -o -e "[0-9]*")" -eq 0 ] + +} +PRODUCT_PATH=$PWD/product/*.pivotal +TILE_PRODUCT_NAME="$( ls $PRODUCT_PATH | xargs basename | grep -o -e "[a-Z]*\(-\?[a-Z]\+\)\+" | head -n1 )" + +whereis om >/dev/null && [ ! -z "$OM_USERNAME" ] && [ ! -z "$OM_PASSWORD" ] && [ ! -z "$OM_TARGET" ] && main diff --git a/tiles/icon/example.jpg b/tiles/icon/example.jpg new file mode 100644 index 0000000..4c70a32 Binary files /dev/null and b/tiles/icon/example.jpg differ diff --git a/tiles/package-tile.sh b/tiles/package-tile.sh new file mode 100755 index 0000000..1c686ad --- /dev/null +++ b/tiles/package-tile.sh @@ -0,0 +1,22 @@ +#!/bin/bash +#rm -r binaries -f +mkdir -p binaries + + +SB_NAME="example" +SB_VERSION="0.0.5-rc.3" +MON_VERSION="0.0.1" + +SERVICE="ftp://geile.cloud/de/evoila/cf/broker/osb-$SB_NAME/$SB_VERSION/osb-$SB_NAME-$SB_VERSION.jar" + +function get(){ + n=$(basename $1) + if [[ ! -f $n ]]; then + wget $1 -P binaries -nc + fi +} + +wget --user="maven" --password="jOai055?" $SERVICE -O binaries/osb-$SB_NAME.jar +./translate.sh +tile build $@ +./deploy-tile.sh diff --git a/tiles/properties.yml b/tiles/properties.yml new file mode 100644 index 0000000..ec20ed9 --- /dev/null +++ b/tiles/properties.yml @@ -0,0 +1,79 @@ +##vm type and disk type dont work +#product-properties: +# .properties.catalog_services_0_name: +# value: osb-mysql +# .properties.catalog_services_0_description: +# value: MySQL Open Service Broker +# .properties.catalog_services_0_bindable: +# value: true +# .properties.existing_endpoint_port: +# value: 3306 +# .properties.catalog_services_0_plans_0_name: +# value: xs +# .properties.catalog_services_0_plans_0_description: +# value: A small instance for low requirement apps +# .properties.catalog_services_0_plans_0_free: +# value: true +# .properties.catalog_services_0_plans_0_metadata_connections: +# value: 5 +# .properties.catalog_services_0_plans_1_name: +# value: s +# .properties.catalog_services_0_plans_1_description: +# value: The medium version for Mysql and distributed applications +# .properties.catalog_services_0_plans_1_free: +# value: false +# .properties.catalog_services_0_plans_1_metadata_connections: +# value: 1000 +# .properties.catalog_services_0_plans_1_metadata_instancegroupconfig_0_nodes: +# value: 1 +## .properties.catalog_services_0_plans_1_metadata_instancegroupconfig_0_vmtype: +## value: "nano" +## .properties.catalog_services_0_plans_1_metadata_instancegroupconfig_0_persistentdisktype: +## value: "5120" +# .properties.catalog_services_0_plans_1_metadata_instancegroupconfig_1_nodes: +# value: 0 +## .properties.catalog_services_0_plans_1_metadata_instancegroupconfig_1_vmtype: +## value: +## name: nano +# .properties.catalog_services_0_plans_2_name: +# value: m +# .properties.catalog_services_0_plans_2_description: +# value: A good toolbox providing availability and performance over five nodes +# .properties.catalog_services_0_plans_2_free: +# value: false +# .properties.catalog_services_0_plans_2_metadata_connections: +# value: 5000 +# .properties.catalog_services_0_plans_2_metadata_instancegroupconfig_0_nodes: +# value: 1 +## .properties.catalog_services_0_plans_2_metadata_instancegroupconfig_0_vmtype: +## value: +## name: automatic +## .properties.catalog_services_0_plans_2_metadata_instancegroupconfig_0_persistentdisktype: +## value: +## name: "20 GB" +# .properties.catalog_services_0_plans_2_metadata_instancegroupconfig_1_nodes: +# value: 0 +## .properties.catalog_services_0_plans_2_metadata_instancegroupconfig_1_vmtype: +## value: +## name: automatic +# .properties.catalog_services_0_plans_3_name: +# value: l +# .properties.catalog_services_0_plans_3_description: +# value: The big Bazooka to run heavy computation tasks in a redundant cluster. 7 nodes. +# .properties.catalog_services_0_plans_3_free: +# value: false +# .properties.catalog_services_0_plans_3_metadata_connections: +# value: 5000 +# .properties.catalog_services_0_plans_3_metadata_instancegroupconfig_0_nodes: +# value: 3 +## .properties.catalog_services_0_plans_3_metadata_instancegroupconfig_0_vmtype: +## value: +## name: automatic +## .properties.catalog_services_0_plans_3_metadata_instancegroupconfig_0_persistentdisktype: +## value: +## name: "50 GB" +# .properties.catalog_services_0_plans_3_metadata_instancegroupconfig_1_nodes: +# value: 1 +## .properties.catalog_services_0_plans_3_metadata_instancegroupconfig_1_vmtype: +## value: +## name: automatic diff --git a/tiles/resourcen.yml b/tiles/resourcen.yml new file mode 100644 index 0000000..383fb41 --- /dev/null +++ b/tiles/resourcen.yml @@ -0,0 +1,7 @@ +resource-config: + postgres: + instances: 2 + persistent_disk: + size_mb: "10240" + instance_type: + id: "small" diff --git a/tiles/tile.env b/tiles/tile.env new file mode 100644 index 0000000..5d303de --- /dev/null +++ b/tiles/tile.env @@ -0,0 +1,4 @@ +export PRODUCT_PATH=$PWD/product/*.pivotal +export TILE_PROPERTIES=$PWD/properties.yml +export TILE_RESOURCES=$PWD/resourcen.yml +export TILE_PRODUCT_NAME=osb-postgres diff --git a/tiles/tile.template.yml b/tiles/tile.template.yml new file mode 100644 index 0000000..5aeef57 --- /dev/null +++ b/tiles/tile.template.yml @@ -0,0 +1,414 @@ +--- +name: osb-example # By convention lowercase with dashes +icon_file: icon/example.jpg +label: Example Open Service Broker +description: Example Service Broker + +apply_open_security_group: true + +requires_product_versions: +- name: osb-backend + version : '~>0' + +service_broker: true + +properties: +- name: spring_profiles + type: string + label: SPRING_PROFILES + default: pcf +- name: catalog_services_0_id + type: uuid + label: SERVICE_ID +- name: catalog_services_1_id + type: uuid + label: SERVICE_ID +- name: catalog_services_0_plans_0_id + type: uuid + label: PLAN_ID +- name: catalog_services_0_plans_1_id + type: uuid + label: PLAN_ID +- name: catalog_services_0_plans_2_id + type: uuid + label: PLAN_ID +- name: catalog_services_0_plans_3_id + type: uuid + label: PLAN_ID +- name: catalog_services_1_plans_0_id + type: uuid + label: PLAN_ID +- name: catalog_services_1_plans_1_id + type: uuid + label: PLAN_ID +- name: catalog_services_1_plans_2_id + type: uuid + label: PLAN_ID +- name: catalog_services_1_plans_3_id + type: uuid + label: PLAN_ID +- name: catalog_services_0_dashboardclient_id + type: uuid + label: SERVICE_DASHBOARD_CLIENT_ID + default: osb-example +- name: catalog_services_1_dashboardclient_id + type: uuid + label: SERVICE_DASHBOARD_CLIENT_ID + default: osb-example-second +- name: catalog_services_0_dashboardclient_secret + type: secret + label: SERVICE_DASHBOARD_CLIENT_SECRET +- name: catalog_services_1_dashboardclient_secret + type: secret + label: SERVICE_DASHBOARD_CLIENT_SECRET +- name: login_role + type: string + label: LOGIN_ROLE + default: USER +- name: catalog_services_0_plans_0_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_0_plans_1_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_0_plans_2_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_0_plans_3_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_1_plans_0_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_1_plans_1_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_1_plans_2_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE +- name: catalog_services_1_plans_3_platform + type: string + label: PLAN_PLATFORM + default: EXISTING_SERVICE + +property_blueprints: + - name: service_instance_azs + type: service_network_az_multi_select + configurable: true + optional: false + +forms: +- name: osb_example + label: Basic Configuration + description: Configuration of the OSB Example Service Broker + properties: + - name: service_broker_name + type: string + label: Example Open Service Broker + default: osb-example + - name: catalog_bosh_azs + label: Availability Zone + type: service_network_az_multi_select + +- name: osb_service + label: Catalog Name + description: Service Broker + properties: + - name: catalog_services_0_name + type: string + label: SERVICE_NAME + default: osb-example + - name: catalog_services_0_description + type: string + label: SERVICE_DESCRIPTION + default: Example Open Service Broker + - name: catalog_services_0_bindable + type: boolean + label: SERVICE_BINDABLE + default: true + + +- name: osb_plan_1 + label: Catalog Plan 1 + description: Catalog Plan 1 + properties: + - name: catalog_services_0_plans_0_name + type: string + label: PLAN_NAME + default: xs + - name: catalog_services_0_plans_0_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_0_plans_0_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_0_plans_0_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + +- name: osb_plan_2 + label: Catalog Plan 2 + description: Catalog Plan 2 + properties: + - name: catalog_services_0_plans_1_name + type: string + label: PLAN_NAME + default: s + - name: catalog_services_0_plans_1_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_0_plans_1_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_0_plans_1_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + +- name: osb_plan_3 + label: Catalog Plan 3 + description: Catalog Plan 3 + properties: + - name: catalog_services_0_plans_2_name + type: string + label: PLAN_NAME + default: l + - name: catalog_services_0_plans_2_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_0_plans_2_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_0_plans_2_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + +- name: osb_plan_4 + label: Catalog Plan 4 + description: Catalog Plan 4 + properties: + - name: catalog_services_0_plans_3_name + type: string + label: PLAN_NAME + default: xl + - name: catalog_services_0_plans_3_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_0_plans_3_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_0_plans_3_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + + + +- name: osb_second_service + label: Catalog Second Name + description: Service Secound Broker + properties: + - name: catalog_services_1_name + type: string + label: SERVICE_NAME + default: osb-example-second + - name: catalog_services_1_description + type: string + label: SERVICE_DESCRIPTION + default: Example Open Service Broker + - name: catalog_services_1_bindable + type: boolean + label: SERVICE_BINDABLE + default: true + + +- name: osb_second_plan_1 + label: Catalog Second Plan 1 + description: Catalog Second Plan 1 + properties: + - name: catalog_services_1_plans_0_name + type: string + label: PLAN_NAME + default: xs + - name: catalog_services_1_plans_0_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_1_plans_0_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_1_plans_0_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + +- name: osb_second_plan_2 + label: Catalog Second Plan 2 + description: Catalog Second Plan 2 + properties: + - name: catalog_services_1_plans_1_name + type: string + label: PLAN_NAME + default: s + - name: catalog_services_1_plans_1_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_1_plans_1_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_1_plans_1_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + +- name: osb_second_plan_3 + label: Catalog Second Plan 3 + description: Catalog Second Plan 3 + properties: + - name: catalog_services_1_plans_2_name + type: string + label: PLAN_NAME + default: l + - name: catalog_services_1_plans_2_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_1_plans_2_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_1_plans_2_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 + +- name: osb_second_plan_4 + label: Catalog Second Plan 4 + description: Catalog Second Plan 4 + properties: + - name: catalog_services_1_plans_3_name + type: string + label: PLAN_NAME + default: xl + - name: catalog_services_1_plans_3_description + type: string + label: PLAN_DESCRIPTION + default: A small instance for low requirement apps + - name: catalog_services_1_plans_3_free + type: boolean + label: PLAN_FREE + default: true + - name: catalog_services_1_plans_3_metadata_connections + type: string + label: SERVICE_CONNECTIONS + default: 5 +packages: +- name: osb-bosh-monitoring + type: bosh-release + path: binaries/osb-bosh-monitoring-0.0.1.tgz + +- name: osb_example + type: app-broker + needs_cf_credentials: true + enable_global_access_to_plans: true + consumes: + rabbitmq: + from: rabbitmq + deployment: (( ..osb-backend.deployment_name )) + haproxy-agent: + from: haproxy-agent + deployment: (( ..osb-backend.deployment_name )) + mongodb: + from: mongodb + deployment: (( ..osb-backend.deployment_name )) + manifest: + path: binaries/osb-example.jar + buildpack: java_buildpack_offline + env: + SPRING_PROFILES_ACTIVE: (( .properties.spring_profiles.value )) + SPRING_SSL_ACCEPTSELFSIGNED: true + SERVICE_KEY_MANAGER: osb-service-key-manager.(( $runtime.apps_domain )) + SPRING_DATA_MONGODB_PORT: (( ..osb-backend.properties.mongodb_port.value )) + SPRING_DATA_MONGODB_DATABASE: admin # (( .properties.spring_data_mongodb_database.value )) + SPRING_DATA_MONGODB_USERNAME: admin #(( ..osb-backend.properties.mongodb_properties_mongodb_cred.identity )) + SPRING_DATA_MONGODB_PASSWORD: pleasechangeme # (( ..osb-backend.properties.mongodb_properties_mongodb_cred.password )) + SPRING_RABBITMQ_PORT: (( ..osb-backend.properties.rabbitmq_port.value )) + SPRING_RABBITMQ_VHOST: (( ..osb-backend.properties.rabbitmq_administrators_broker_vhost.value )) + SPRING_RABBITMQ_USERNAME: (( ..osb-backend.properties.rabbitmq_administrators_broker_cred.identity )) + SPRING_RABBITMQ_PASSWORD: (( ..osb-backend.properties.rabbitmq_administrators_broker_cred.password )) + HAPROXY_AGENT_ID: (( ..osb-backend.properties.haproxy_agent_id.value )) + HAPROXY_AUTH_TOKEN: (( ..osb-backend.properties.haproxy_agent_token.value )) + HAPROXY_TOKEN: (( ..osb-backend.properties.haproxy_agent_token.value )) + BOSH_HOST: (( $director.hostname )) + BOSH_USERNAME: (( ..osb-backend.properties.service_broker_bosh_username.value )) + BOSH_PASSWORD: (( ..osb-backend.properties.service_broker_bosh_password.value )) + BOSH_STEMCELLVERSION: (( $self.stemcell_version )) + GENERAL_ENDPOINTURL: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain )) + ENDPOINTS_DEFAULT: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain )) + CATALOG_SERVICES_0_DASHBOARD_URL: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain ))/custom/v2/authentication + CATALOG_SERVICES_0_DASHBOARD_AUTHENDPOINT: (( $runtime.uaa_url ))/oauth + CATALOG_SERVICES_0_DASHBOARDCLIENT_REDIRECTURI: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain ))/custom/v2/authentication + CATALOG_SERVICES_1_DASHBOARD_AUTHENDPOINT: (( $runtime.uaa_url ))/oauth + CATALOG_SERVICES_1_DASHBOARDCLIENT_REDIRECTURI: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain ))/custom/v2/authentication + CATALOG_SERVICES_0_PLANS_0_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_0_PLANS_1_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_0_PLANS_2_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_0_PLANS_3_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + + CATALOG_SERVICES_1_PLANS_0_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_1_PLANS_1_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_1_PLANS_2_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_1_PLANS_3_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + + CATALOG_SERVICES_0_PLANS_0_METADATA_BULLETS: 1 GB disk size,super-fast,awesome + CATALOG_SERVICES_0_PLANS_1_METADATA_BULLETS: 10 GB disk size,super-fast,awesome + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_0_UNIT: MONTHLY + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_0_AMOUNT_EUR: 20 + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_1_UNIT: MONTHLY + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_1_AMOUNT_EUR: 60 + + CATALOG_SERVICES_0_PLANS_0_METADATA_AZS_0: az00 + CATALOG_SERVICES_0_PLANS_1_METADATA_AZS_0: az00 + CATALOG_SERVICES_0_PLANS_2_METADATA_AZS_0: az00 + CATALOG_SERVICES_0_PLANS_3_METADATA_AZS_0: az00 + + CATALOG_SERVICES_1_PLANS_0_METADATA_AZS_0: az00 + CATALOG_SERVICES_1_PLANS_1_METADATA_AZS_0: az00 + CATALOG_SERVICES_1_PLANS_2_METADATA_AZS_0: az00 + CATALOG_SERVICES_1_PLANS_3_METADATA_AZS_0: az00 + + CATALOG_SERVICES_0_METADATA_DISPLAYNAME: Example Open Service Broker + CATALOG_SERVICES_0_METADATA_IMAGEURL: http://logo-load.com/uploads/posts/2016-08/example-logo.png + CATALOG_SERVICES_0_METADATA_LONGDESCRIPTION: Managed, highly available, Example clusters in the cloud + CATALOG_SERVICES_0_METADATA_PROVIDERDISPLAYNAME: evoila + CATALOG_SERVICES_0_METADATA_DOCUMENTATIONURL: http://docs.evoila.de + CATALOG_SERVICES_0_METADATA_SUPPORTURL: http://support.evoila.de + CATALOG_SERVICES_0_TAGS: Best Performance Postgresql, High Availability, PgPool included + + CATALOG_SERVICES_1_METADATA_DISPLAYNAME: Example Open Service Broker + CATALOG_SERVICES_1_METADATA_IMAGEURL: http://logo-load.com/uploads/posts/2016-08/example-logo.png + CATALOG_SERVICES_1_METADATA_LONGDESCRIPTION: Managed, highly available, Example clusters in the cloud + CATALOG_SERVICES_1_METADATA_PROVIDERDISPLAYNAME: evoila + CATALOG_SERVICES_1_METADATA_DOCUMENTATIONURL: http://docs.evoila.de + CATALOG_SERVICES_1_METADATA_SUPPORTURL: http://support.evoila.de + CATALOG_SERVICES_1_TAGS: Best Performance Postgresql, High Availability, PgPool included diff --git a/tiles/tile.yml b/tiles/tile.yml new file mode 100644 index 0000000..e735e05 --- /dev/null +++ b/tiles/tile.yml @@ -0,0 +1,414 @@ +--- +name: osb-example # By convention lowercase with dashes +icon_file: icon/example.jpg +label: Example Open Service Broker +description: Example Service Broker + +apply_open_security_group: true + +requires_product_versions: +- name: osb-backend + version : '~>0' + +service_broker: true + +properties: +- name: spring_profiles + type: string + label: Profile + default: pcf +- name: catalog_services_0_id + type: uuid + label: Id (Unique Id) +- name: catalog_services_1_id + type: uuid + label: Id (Unique Id) +- name: catalog_services_0_plans_0_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_0_plans_1_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_0_plans_2_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_0_plans_3_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_1_plans_0_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_1_plans_1_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_1_plans_2_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_1_plans_3_id + type: uuid + label: Id (Unique ID) +- name: catalog_services_0_dashboardclient_id + type: uuid + label: Dashboard Client Id + default: osb-example +- name: catalog_services_1_dashboardclient_id + type: uuid + label: Dashboard Client Id + default: osb-example-second +- name: catalog_services_0_dashboardclient_secret + type: secret + label: Dashboard Client Secret +- name: catalog_services_1_dashboardclient_secret + type: secret + label: Dashboard Client Secret +- name: login_role + type: string + label: Login role + default: USER +- name: catalog_services_0_plans_0_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_0_plans_1_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_0_plans_2_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_0_plans_3_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_1_plans_0_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_1_plans_1_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_1_plans_2_platform + type: string + label: Platform + default: EXISTING_SERVICE +- name: catalog_services_1_plans_3_platform + type: string + label: Platform + default: EXISTING_SERVICE + +property_blueprints: + - name: service_instance_azs + type: service_network_az_multi_select + configurable: true + optional: false + +forms: +- name: osb_example + label: Basic Configuration + description: Configuration of the OSB Example Service Broker + properties: + - name: service_broker_name + type: string + label: Example Open Service Broker + default: osb-example + - name: catalog_bosh_azs + label: Availability Zone + type: service_network_az_multi_select + +- name: osb_service + label: Catalog Name + description: Service Broker + properties: + - name: catalog_services_0_name + type: string + label: Name + default: osb-example + - name: catalog_services_0_description + type: string + label: Description + default: Example Open Service Broker + - name: catalog_services_0_bindable + type: boolean + label: Bindable Service? + default: true + + +- name: osb_plan_1 + label: Catalog Plan 1 + description: Catalog Plan 1 + properties: + - name: catalog_services_0_plans_0_name + type: string + label: Name + default: xs + - name: catalog_services_0_plans_0_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_0_plans_0_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_0_plans_0_metadata_connections + type: string + label: Number of Connections + default: 5 + +- name: osb_plan_2 + label: Catalog Plan 2 + description: Catalog Plan 2 + properties: + - name: catalog_services_0_plans_1_name + type: string + label: Name + default: s + - name: catalog_services_0_plans_1_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_0_plans_1_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_0_plans_1_metadata_connections + type: string + label: Number of Connections + default: 5 + +- name: osb_plan_3 + label: Catalog Plan 3 + description: Catalog Plan 3 + properties: + - name: catalog_services_0_plans_2_name + type: string + label: Name + default: l + - name: catalog_services_0_plans_2_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_0_plans_2_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_0_plans_2_metadata_connections + type: string + label: Number of Connections + default: 5 + +- name: osb_plan_4 + label: Catalog Plan 4 + description: Catalog Plan 4 + properties: + - name: catalog_services_0_plans_3_name + type: string + label: Name + default: xl + - name: catalog_services_0_plans_3_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_0_plans_3_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_0_plans_3_metadata_connections + type: string + label: Number of Connections + default: 5 + + + +- name: osb_second_service + label: Catalog Second Name + description: Service Secound Broker + properties: + - name: catalog_services_1_name + type: string + label: Name + default: osb-example-second + - name: catalog_services_1_description + type: string + label: Description + default: Example Open Service Broker + - name: catalog_services_1_bindable + type: boolean + label: Bindable Service? + default: true + + +- name: osb_second_plan_1 + label: Catalog Second Plan 1 + description: Catalog Second Plan 1 + properties: + - name: catalog_services_1_plans_0_name + type: string + label: Name + default: xs + - name: catalog_services_1_plans_0_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_1_plans_0_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_1_plans_0_metadata_connections + type: string + label: Number of Connections + default: 5 + +- name: osb_second_plan_2 + label: Catalog Second Plan 2 + description: Catalog Second Plan 2 + properties: + - name: catalog_services_1_plans_1_name + type: string + label: Name + default: s + - name: catalog_services_1_plans_1_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_1_plans_1_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_1_plans_1_metadata_connections + type: string + label: Number of Connections + default: 5 + +- name: osb_second_plan_3 + label: Catalog Second Plan 3 + description: Catalog Second Plan 3 + properties: + - name: catalog_services_1_plans_2_name + type: string + label: Name + default: l + - name: catalog_services_1_plans_2_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_1_plans_2_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_1_plans_2_metadata_connections + type: string + label: Number of Connections + default: 5 + +- name: osb_second_plan_4 + label: Catalog Second Plan 4 + description: Catalog Second Plan 4 + properties: + - name: catalog_services_1_plans_3_name + type: string + label: Name + default: xl + - name: catalog_services_1_plans_3_description + type: string + label: Description + default: A small instance for low requirement apps + - name: catalog_services_1_plans_3_free + type: boolean + label: Plan for Free? + default: true + - name: catalog_services_1_plans_3_metadata_connections + type: string + label: Number of Connections + default: 5 +packages: +- name: osb-bosh-monitoring + type: bosh-release + path: binaries/osb-bosh-monitoring-0.0.1.tgz + +- name: osb_example + type: app-broker + needs_cf_credentials: true + enable_global_access_to_plans: true + consumes: + rabbitmq: + from: rabbitmq + deployment: (( ..osb-backend.deployment_name )) + haproxy-agent: + from: haproxy-agent + deployment: (( ..osb-backend.deployment_name )) + mongodb: + from: mongodb + deployment: (( ..osb-backend.deployment_name )) + manifest: + path: binaries/osb-example.jar + buildpack: java_buildpack_offline + env: + SPRING_PROFILES_ACTIVE: (( .properties.spring_profiles.value )) + SPRING_SSL_ACCEPTSELFSIGNED: true + SERVICE_KEY_MANAGER: osb-service-key-manager.(( $runtime.apps_domain )) + SPRING_DATA_MONGODB_PORT: (( ..osb-backend.properties.mongodb_port.value )) + SPRING_DATA_MONGODB_DATABASE: admin # (( .properties.spring_data_mongodb_database.value )) + SPRING_DATA_MONGODB_USERNAME: admin #(( ..osb-backend.properties.mongodb_properties_mongodb_cred.identity )) + SPRING_DATA_MONGODB_PASSWORD: pleasechangeme # (( ..osb-backend.properties.mongodb_properties_mongodb_cred.password )) + SPRING_RABBITMQ_PORT: (( ..osb-backend.properties.rabbitmq_port.value )) + SPRING_RABBITMQ_VHOST: (( ..osb-backend.properties.rabbitmq_administrators_broker_vhost.value )) + SPRING_RABBITMQ_USERNAME: (( ..osb-backend.properties.rabbitmq_administrators_broker_cred.identity )) + SPRING_RABBITMQ_PASSWORD: (( ..osb-backend.properties.rabbitmq_administrators_broker_cred.password )) + HAPROXY_AGENT_ID: (( ..osb-backend.properties.haproxy_agent_id.value )) + HAPROXY_AUTH_TOKEN: (( ..osb-backend.properties.haproxy_agent_token.value )) + HAPROXY_TOKEN: (( ..osb-backend.properties.haproxy_agent_token.value )) + BOSH_HOST: (( $director.hostname )) + BOSH_USERNAME: (( ..osb-backend.properties.service_broker_bosh_username.value )) + BOSH_PASSWORD: (( ..osb-backend.properties.service_broker_bosh_password.value )) + BOSH_STEMCELLVERSION: (( $self.stemcell_version )) + GENERAL_ENDPOINTURL: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain )) + ENDPOINTS_DEFAULT: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain )) + CATALOG_SERVICES_0_DASHBOARD_URL: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain ))/custom/v2/authentication + CATALOG_SERVICES_0_DASHBOARD_AUTHENDPOINT: (( $runtime.uaa_url ))/oauth + CATALOG_SERVICES_0_DASHBOARDCLIENT_REDIRECTURI: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain ))/custom/v2/authentication + CATALOG_SERVICES_1_DASHBOARD_AUTHENDPOINT: (( $runtime.uaa_url ))/oauth + CATALOG_SERVICES_1_DASHBOARDCLIENT_REDIRECTURI: https://(( .properties.service_broker_name.value )).(( $runtime.apps_domain ))/custom/v2/authentication + CATALOG_SERVICES_0_PLANS_0_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_0_PLANS_1_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_0_PLANS_2_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_0_PLANS_3_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + + CATALOG_SERVICES_1_PLANS_0_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_1_PLANS_1_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_1_PLANS_2_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + CATALOG_SERVICES_1_PLANS_3_METADATA_NETWORKS_0_NAME: (( $self.service_network )) + + CATALOG_SERVICES_0_PLANS_0_METADATA_BULLETS: 1 GB disk size,super-fast,awesome + CATALOG_SERVICES_0_PLANS_1_METADATA_BULLETS: 10 GB disk size,super-fast,awesome + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_0_UNIT: MONTHLY + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_0_AMOUNT_EUR: 20 + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_1_UNIT: MONTHLY + CATALOG_SERVICES_0_PLANS_1_METADATA_COSTS_1_AMOUNT_EUR: 60 + + CATALOG_SERVICES_0_PLANS_0_METADATA_AZS_0: az00 + CATALOG_SERVICES_0_PLANS_1_METADATA_AZS_0: az00 + CATALOG_SERVICES_0_PLANS_2_METADATA_AZS_0: az00 + CATALOG_SERVICES_0_PLANS_3_METADATA_AZS_0: az00 + + CATALOG_SERVICES_1_PLANS_0_METADATA_AZS_0: az00 + CATALOG_SERVICES_1_PLANS_1_METADATA_AZS_0: az00 + CATALOG_SERVICES_1_PLANS_2_METADATA_AZS_0: az00 + CATALOG_SERVICES_1_PLANS_3_METADATA_AZS_0: az00 + + CATALOG_SERVICES_0_METADATA_DISPLAYNAME: Example Open Service Broker + CATALOG_SERVICES_0_METADATA_IMAGEURL: http://logo-load.com/uploads/posts/2016-08/example-logo.png + CATALOG_SERVICES_0_METADATA_LONGDESCRIPTION: Managed, highly available, Example clusters in the cloud + CATALOG_SERVICES_0_METADATA_PROVIDERDISPLAYNAME: evoila + CATALOG_SERVICES_0_METADATA_DOCUMENTATIONURL: http://docs.evoila.de + CATALOG_SERVICES_0_METADATA_SUPPORTURL: http://support.evoila.de + CATALOG_SERVICES_0_TAGS: Best Performance Postgresql, High Availability, PgPool included + + CATALOG_SERVICES_1_METADATA_DISPLAYNAME: Example Open Service Broker + CATALOG_SERVICES_1_METADATA_IMAGEURL: http://logo-load.com/uploads/posts/2016-08/example-logo.png + CATALOG_SERVICES_1_METADATA_LONGDESCRIPTION: Managed, highly available, Example clusters in the cloud + CATALOG_SERVICES_1_METADATA_PROVIDERDISPLAYNAME: evoila + CATALOG_SERVICES_1_METADATA_DOCUMENTATIONURL: http://docs.evoila.de + CATALOG_SERVICES_1_METADATA_SUPPORTURL: http://support.evoila.de + CATALOG_SERVICES_1_TAGS: Best Performance Postgresql, High Availability, PgPool included diff --git a/tiles/translate.sh b/tiles/translate.sh new file mode 100755 index 0000000..fdeb188 --- /dev/null +++ b/tiles/translate.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cp tile.template.yml tile.yml +while read -r line; do replace="$(echo "$line" | awk '{print $1;}')"; with="$(echo "$line" | cut -d' ' -f2-)"; sed -i "s|label:[ \t]*$replace|label: $with|g" tile.yml; done < translate.txt diff --git a/tiles/translate.txt b/tiles/translate.txt new file mode 100644 index 0000000..9ef0b4f --- /dev/null +++ b/tiles/translate.txt @@ -0,0 +1,29 @@ + +BOSH_AUTHENTICATION Bosh Authentication Mechanism (OAuth/Basic) +BOSH_STEMCELLOS Stemcell OS +EXISTING_ENDPOINT_DATABASE Database of Existing Endpoint +EXISTING_ENDPOINT_PORT Port of Existing Endpoint +HA_INSTANCEGROUPCONFIG_NAME HaProxy +HA_NODES HaProxy Nodes +HA_VM_TYPE HaProxy VM Type +LOGIN_ROLE Login role +PLAN_CONNECTIONS Connections +PLAN_DESCRIPTION Description +PLAN_FREE Plan for Free? +PLAN_ID Id (Unique ID) +PLAN_NAME Name +PLAN_PLATFORM Platform +SERVICE_BINDABLE Bindable Service? +SERVICE_CONNECTIONS Number of Connections +SERVICE_DASHBOARD_CLIENT_ID Dashboard Client Id +SERVICE_DASHBOARD_CLIENT_SECRET Dashboard Client Secret +SERVICE_DESCRIPTION Description +SERVICE_ID Id (Unique Id) +SERVICE_INGRESSINSTANCEGROUP Instance Group +SERVICE_INSTANCEGROUPCONFIG_NAME Instance Group Name +SERVICE_NAME Name +SERVICE_NODES Nodes +SERVICE_PERSISTENT_DISK_TYPE Disk Type +SERVICE_VM_TYPE VM Type +SEVICE_NODES Nodes +SPRING_PROFILES Profile