FAQ
Hello,

I've installed CF on a VM and I want to customize it by adding a new
system service (custom dbaas).
I found a tuto on the KB (http://support.cloudfoundry.com/entries/
20485171-how-to-add-a-system-service-to-oss-cloud-foundry-step-by-step-
guide) to create new services.
But my new service needs some parameters (size, type, etc...)
Is there a way to create provisioned services with parameters ?
Example with CLI:
vmc create-service dbaas test -p size=1 type=Oracle

Thanks in advance
Alex

Search Discussions

  • Nicholas Kushmerick at Jun 18, 2012 at 8:40 pm
    The standard way to do this in Cloud Foundry is to define several service
    plans, one for each combination of parameters. Grep our services code for
    'plan' and you'll see what I am referring to. Here is an example of how
    you would set up some plans ("plana" and "planb") in your BOSH deploymen
    manifest:

    jobs:
    - name: postgresql_node_plana
    template: postgresql_node
    instances: 10
    resource_pool: infrastructure
    persistent_disk: 11000 # 20 x 512MB + some spare
    properties:
    plan: plana
    networks:
    - name: default
    static_ips:
    - XX.XX.XX.XX - XX.XX.XX.XX
    - name: postgresql_node_planb
    template: postgresql_node
    instances: 10
    resource_pool: infrastructure
    persistent_disk: 5000 # 1 x 4GB + some spare
    properties:
    plan: planb
    networks:
    - name: default
    static_ips:
    - XX.XX.XX.XX - XX.XX.XX.XX

    properties:
    service_plans:
    postgresql:
    plana:
    job_management:
    high_water: 8
    low_water: 2
    configuration:
    capacity: 20
    max_db_size: 512 # 1/2 GB
    max_long_query: 1
    max_long_tx: 2
    max_clients: 5
    planb:
    job_management:
    high_water: 8
    low_water: 2
    configuration:
    capacity: 1 # single-tenant plan
    max_db_size: 4096 # 4 GB
    max_long_query: 10
    max_long_tx: 20
    max_clients: 50

    UNFORTUNATELY, the standard Cloud Foundry clients (VMC, STS) do not yet
    support a "--plan" option. That is coming, but in the meantime try
    something like this:

    curl -H 'AUTHORIZATION:
    04085b084922186e69636b7465737440766d776172652e636f6d063a065546c2b07c0f0844f221912f5a1eb73fed9f499380ea28cb1bd6a9cf197a9'
    -H 'Content-Type: application/json' -d
    '{"type":"database","tier":"plana","vendor":"postgresql","version":"9.0","name":"mydb"}'
    http://api.example.com
    where the token comes from ~/.vmc_token.

    -- Nick

    On Mon, Jun 18, 2012 at 7:25 AM, Alex wrote:

    Hello,

    I've installed CF on a VM and I want to customize it by adding a new
    system service (custom dbaas).
    I found a tuto on the KB (http://support.cloudfoundry.com/entries/
    20485171-how-to-add-a-system-service-to-oss-cloud-foundry-step-by-step-
    guide) to create new services.
    But my new service needs some parameters (size, type, etc...)
    Is there a way to create provisioned services with parameters ?
    Example with CLI:
    vmc create-service dbaas test -p size=1 type=Oracle

    Thanks in advance
    Alex


    --
    Nick
    phone +1.206.293.5186 *·* skype nicholaskushmerick
  • Jeremy Voorhis at Jun 18, 2012 at 10:04 pm
    Are there any plans for adding parameters or configuration support for services? There are lots of potential services that require config files on disk specific to an end user's application to get anything done.

    Jeremy VoorhisSr Engineer, appfog.com
    503.319.0075


    On Monday, June 18, 2012 at 1:39 PM, Nicholas Kushmerick wrote:

    The standard way to do this in Cloud Foundry is to define several service plans, one for each combination of parameters. Grep our services code for 'plan' and you'll see what I am referring to. Here is an example of how you would set up some plans ("plana" and "planb") in your BOSH deploymen manifest:
    jobs:
    - name: postgresql_node_plana
    template: postgresql_node
    instances: 10
    resource_pool: infrastructure
    persistent_disk: 11000 # 20 x 512MB + some spare
    properties:
    plan: plana
    networks:
    - name: default
    static_ips:
    - XX.XX.XX.XX - XX.XX.XX.XX
    - name: postgresql_node_planb
    template: postgresql_node
    instances: 10
    resource_pool: infrastructure
    persistent_disk: 5000 # 1 x 4GB + some spare
    properties:
    plan: planb
    networks:
    - name: default
    static_ips:
    - XX.XX.XX.XX - XX.XX.XX.XX

    properties:
    service_plans:
    postgresql:
    plana:
    job_management:
    high_water: 8
    low_water: 2
    configuration:
    capacity: 20
    max_db_size: 512 # 1/2 GB
    max_long_query: 1
    max_long_tx: 2
    max_clients: 5
    planb:
    job_management:
    high_water: 8
    low_water: 2
    configuration:
    capacity: 1 # single-tenant plan
    max_db_size: 4096 # 4 GB
    max_long_query: 10
    max_long_tx: 20
    max_clients: 50

    UNFORTUNATELY, the standard Cloud Foundry clients (VMC, STS) do not yet support a "--plan" option. That is coming, but in the meantime try something like this:
    curl -H 'AUTHORIZATION: 04085b084922186e69636b7465737440766d776172652e636f6d063a065546c2b07c0f0844f221912f5a1eb73fed9f499380ea28cb1bd6a9cf197a9' -H 'Content-Type: application/json' -d '{"type":"database","tier":"plana","vendor":"postgresql","version":"9.0","name":"mydb"}' http://api.example.com
    where the token comes from ~/.vmc_token.

    -- Nick

    On Mon, Jun 18, 2012 at 7:25 AM, Alex (mailto:alexmuzet@gmail.com)> wrote:
    Hello,

    I've installed CF on a VM and I want to customize it by adding a new
    system service (custom dbaas).
    I found a tuto on the KB (http://support.cloudfoundry.com/entries/
    20485171-how-to-add-a-system-service-to-oss-cloud-foundry-step-by-step- (http://support.cloudfoundry.com/entries/%0A20485171-how-to-add-a-system-service-to-oss-cloud-foundry-step-by-step-)
    guide) to create new services.
    But my new service needs some parameters (size, type, etc...)
    Is there a way to create provisioned services with parameters ?
    Example with CLI:
    vmc create-service dbaas test -p size=1 type=Oracle

    Thanks in advance
    Alex


    --
    Nick
    phone +1.206.293.5186 (tel:%2B1.206.293.5186) · skype nicholaskushmerick
  • Aliaksei Kliuchnikau at Jun 19, 2012 at 3:11 pm
    Hi Jeremy,

    My team is planning to introduce such feature. We are at the design stage -
    investigating where and how to do it. But currently we don't have details
    to share. When we will advance in our vision of the services configuration
    feature I will let you know about the details.

    Thanks,
    Alex Kliuchnikau
    Active Technologies, Minsk, Belarus
    On Tue, Jun 19, 2012 at 1:04 AM, Jeremy Voorhis wrote:

    Are there any plans for adding parameters or configuration support for
    services? There are lots of potential services that require config files on
    disk specific to an end user's application to get anything done.

    Jeremy Voorhis
    Sr Engineer, appfog.com
    503.319.0075

    On Monday, June 18, 2012 at 1:39 PM, Nicholas Kushmerick wrote:

    The standard way to do this in Cloud Foundry is to define several service
    plans, one for each combination of parameters. Grep our services code for
    'plan' and you'll see what I am referring to. Here is an example of how
    you would set up some plans ("plana" and "planb") in your BOSH deploymen
    manifest:

    jobs:
    - name: postgresql_node_plana
    template: postgresql_node
    instances: 10
    resource_pool: infrastructure
    persistent_disk: 11000 # 20 x 512MB + some spare
    properties:
    plan: plana
    networks:
    - name: default
    static_ips:
    - XX.XX.XX.XX - XX.XX.XX.XX
    - name: postgresql_node_planb
    template: postgresql_node
    instances: 10
    resource_pool: infrastructure
    persistent_disk: 5000 # 1 x 4GB + some spare
    properties:
    plan: planb
    networks:
    - name: default
    static_ips:
    - XX.XX.XX.XX - XX.XX.XX.XX

    properties:
    service_plans:
    postgresql:
    plana:
    job_management:
    high_water: 8
    low_water: 2
    configuration:
    capacity: 20
    max_db_size: 512 # 1/2 GB
    max_long_query: 1
    max_long_tx: 2
    max_clients: 5
    planb:
    job_management:
    high_water: 8
    low_water: 2
    configuration:
    capacity: 1 # single-tenant plan
    max_db_size: 4096 # 4 GB
    max_long_query: 10
    max_long_tx: 20
    max_clients: 50



    UNFORTUNATELY, the standard Cloud Foundry clients (VMC, STS) do not yet
    support a "--plan" option. That is coming, but in the meantime try
    something like this:

    curl -H 'AUTHORIZATION:
    04085b084922186e69636b7465737440766d776172652e636f6d063a065546c2b07c0f0844f221912f5a1eb73fed9f499380ea28cb1bd6a9cf197a9'
    -H 'Content-Type: application/json' -d
    '{"type":"database","tier":"plana","vendor":"postgresql","version":"9.0","name":"mydb"}'
    http://api.example.com


    where the token comes from ~/.vmc_token.

    -- Nick


    On Mon, Jun 18, 2012 at 7:25 AM, Alex wrote:

    Hello,

    I've installed CF on a VM and I want to customize it by adding a new
    system service (custom dbaas).
    I found a tuto on the KB (http://support.cloudfoundry.com/entries/
    20485171-how-to-add-a-system-service-to-oss-cloud-foundry-step-by-step-
    guide) to create new services.
    But my new service needs some parameters (size, type, etc...)
    Is there a way to create provisioned services with parameters ?
    Example with CLI:
    vmc create-service dbaas test -p size=1 type=Oracle

    Thanks in advance
    Alex




    --
    Nick
    phone +1.206.293.5186 *·* skype nicholaskushmerick

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupvcap-dev @
postedJun 18, '12 at 2:25p
activeJun 19, '12 at 3:11p
posts4
users4

People

Translate

site design / logo © 2022 Grokbase