Giter VIP home page Giter VIP logo

Comments (24)

tintoverano avatar tintoverano commented on July 18, 2024

update

I generated a manifest file, but it doesn't seem good

trying to edit the sample file https://github.com/cloudfoundry/cf-services-contrib-release/blob/master/examples/dns-all.yml

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

You can update the manifest for cf-services-contrib-release referring to the manifest of Cloud Foundry.
For example, the network part, the properties for azure should be updated.

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

thanks, this is what I'm doing right now...

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer

could you please take a look at the yml file I created below?

cf-services-contrib.yml.txt

I only kept the parts from the original yml file (see above), which I thought was needed for mongodb besides the standard things and marked lines with:

# CHANGE ?

where I was not sure either what to put or what I put was OK

what should I enter here?

  mongodb_gateway:
    token: MONGODB_SERVICE_TOKEN # CHANGE ? - the token you use later with `cf create-service-auth-token`

thank you again for the support!!

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano
This is a sample manifest which you can refer to.
cf-services-contrib-azure.yml.txt
NOTE:

  1. Run bosh releases to verify the release cf-services-contrib and the version.

    releases:
      - name: cf-services-contrib
        version: 6
    
  2. Create a new subnet. For e.g. ServicesContrib.

  3. Change the DNS.

    dns: [10.0.0.100]
    

    In your case, you need to update the dns which can resolve your system domain properly. For e.g. 8.8.8.8

  4. Update the address of nats. For e.g. 10.0.16.13

For the token, it is defined by yourself.
In the above example, I just left the default value.

Please verify the mongodb service works fine with your APP.
If yes, please close this issue. If no, please feel free to let us know.
Thanks.

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer

thanks for the template

I'm trying to figure out step 3: changing DNS
could you please point me to some doc on how setting 8.8.8.8 will help resolving my system domain?

update: OK, I got it now

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano
8.8.8.8 is just an example. You can change it to the DNS which can resolve your system domain.

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

great
just found out about google public dns

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer

I got the follwing error message during deployment

Error 40000: Object ("mongodb_gateway") did not match the required type `Hash'

please find the error report attached: debug.txt

thanks

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano
I did not hit a similar error.
Please check your manifest to make sure the format is correct.

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer
this one solves it: https://groups.google.com/a/cloudfoundry.org/forum/#!topic/bosh-users/MSowjyao2VY

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer

  Started refilling resource pools
  Started refilling resource pools > common/0
  Started refilling resource pools > common/1
  Started refilling resource pools > common/2
  Started refilling resource pools > common/3
  Started refilling resource pools > common/4
  Started refilling resource pools > common/5. Failed: http_put - error: 409 message: {
  "error": {
    "code": "OperationNotAllowed",
    "message": "Operation results in exceeding quota limits of Core. Maximum allowed: 5, Current in use: 5, Additional requested: 1."
  }
}

I got around this by reducing the size, since I'm only deploying mongodb:

resource_pools:
  - name: common
    network: default
    size: 2 #CHANGE to number of services + 1
    stemcell:
      name: bosh-azure-hyperv-ubuntu-trusty-go_agent
      version: '0000'
    cloud_properties:
      instance_type: Standard_D1

was it OK to do that?

deploy went down fine, so I'm ready to check the mongodb service ...

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

hello @bingosummer

creating service auth token was fine

$ cf create-service-auth-token mongodb core MONGODB_SERVICE_TOKEN
Creating service auth token as admin...
OK

but then I ran into a problem when trying to create a mongodb service

$ CF_TRACE=true cf create-service mongodb default meteor-mongodb
Creating service instance meteor-mongodb in org default_organization / space meteor as admin...

REQUEST: [2015-12-19T19:54:25Z]
GET /v2/spaces/92854a4c-82b7-406a-8f40-b1f9c1004e06/services?q=label%3Amongodb HTTP/1.1
Host: api.cf.protact.me
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.14.0+2654a47 / linux



RESPONSE: [2015-12-19T19:54:26Z]
HTTP/1.1 401 Unauthorized
Content-Length: 97
Content-Type: application/json;charset=utf-8
Date: Sat, 19 Dec 2015 19:54:42 GMT
Server: nginx
X-Cf-Requestid: 4bd725de-e14d-41d2-4872-1ac5278d4f57
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 725da939-eec6-4ed5-4dcb-668026f7aa7e::e43db33d-c09b-4202-a305-d7624f65b2c3

{
  "code": 1000,
  "description": "Invalid Auth Token",
  "error_code": "CF-InvalidAuthToken"
}


REQUEST: [2015-12-19T19:54:26Z]
POST /oauth/token HTTP/1.1
Host: login.cf.protact.me
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/x-www-form-urlencoded
User-Agent: go-cli 6.14.0+2654a47 / linux

grant_type=refresh_token&refresh_token=eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI5MTc1YTlhYy1iZTJmLTQwMjMtOTI3NS03MTRkMGRhYTY2ZWEtciIsInN1YiI6ImJkNWMwMzMyLTM3YjItNGExNC1iYzVmLWZlOTQzZTYyZmY0NiIsInNjb3BlIjpbIm9wZW5pZCIsInNjaW0ucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iLCJ1YWEudXNlciIsInJvdXRpbmcucm91dGVyX2dyb3Vwcy5yZWFkIiwiY2xvdWRfY29udHJvbGxlci5yZWFkIiwicGFzc3dvcmQud3JpdGUiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIiwiZG9wcGxlci5maXJlaG9zZSIsInNjaW0ud3JpdGUiXSwiaWF0IjoxNDUwMjU1Njk4LCJleHAiOjE0NTI4NDc2OTgsImNpZCI6ImNmIiwiY2xpZW50X2lkIjoiY2YiLCJpc3MiOiJodHRwOi8vdWFhLmNmLnByb3RhY3QubWUvb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiJhZG1pbiIsIm9yaWdpbiI6InVhYSIsInVzZXJfaWQiOiJiZDVjMDMzMi0zN2IyLTRhMTQtYmM1Zi1mZTk0M2U2MmZmNDYiLCJyZXZfc2lnIjoiNDY0ZjNjOTYiLCJhdWQiOlsiY2YiLCJvcGVuaWQiLCJzY2ltIiwiY2xvdWRfY29udHJvbGxlciIsInVhYSIsInJvdXRpbmcucm91dGVyX2dyb3VwcyIsInBhc3N3b3JkIiwiZG9wcGxlciJdfQ.XCKFvfRwH0gQFAzJnNDeltkIiyNVDMm1xeAsV4iWA6e2z4UIafCllCJ4-H2x5cckh-Os81ghqtGpzdgjBQyQ14ClbGZt7JDrLsMjRXgHay0zCh-3gUo46B1RMCHC2q0m3TUA1lsDiiTmSMSvhytPF4rqFzuj7qe34W9UFXGbhOs&scope=

RESPONSE: [2015-12-19T19:54:26Z]
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Date: Sat, 19 Dec 2015 19:54:41 GMT
Expires: 0
Pragma: no-cache
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Cf-Requestid: 1a2790ca-363b-47a6-5dbc-cea49160859b
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block

967
{"access_token":"[PRIVATE DATA HIDDEN]","token_type":"bearer","refresh_token":"[PRIVATE DATA HIDDEN]","expires_in":599,"scope":"routing.router_groups.read cloud_controller.read password.write cloud_controller.write openid doppler.firehose scim.write scim.read cloud_controller.admin uaa.user","jti":"0cf25e8b-ad64-4a89-bb37-82a8b6ac8a0b"}
0



REQUEST: [2015-12-19T19:54:26Z]
GET /v2/spaces/92854a4c-82b7-406a-8f40-b1f9c1004e06/services?q=label%3Amongodb HTTP/1.1
Host: api.cf.protact.me
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.14.0+2654a47 / linux



RESPONSE: [2015-12-19T19:54:26Z]
HTTP/1.1 200 OK
Content-Length: 107
Content-Type: application/json;charset=utf-8
Date: Sat, 19 Dec 2015 19:54:42 GMT
Server: nginx
X-Cf-Requestid: 6e5dca27-1dac-462d-61a4-18efd33b8631
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 2ef84a97-b00c-414b-5ac3-4a3a1230abea::024528cd-6c59-46cd-930a-189a9d18dd34

{
  "total_results": 0,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [

  ]
}
FAILED
Service offering mongodb not found
FAILED
Service offering mongodb not found

running the same command the 2nd time a different result is shown

$ CF_TRACE=true cf create-service mongodb default meteor-mongodb
Creating service instance meteor-mongodb in org default_organization / space meteor as admin...

REQUEST: [2015-12-19T19:59:07Z]
GET /v2/spaces/92854a4c-82b7-406a-8f40-b1f9c1004e06/services?q=label%3Amongodb HTTP/1.1
Host: api.cf.protact.me
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.14.0+2654a47 / linux



RESPONSE: [2015-12-19T19:59:07Z]
HTTP/1.1 200 OK
Content-Length: 107
Content-Type: application/json;charset=utf-8
Date: Sat, 19 Dec 2015 19:59:23 GMT
Server: nginx
X-Cf-Requestid: 85421e9e-51d1-4e3c-4158-f96d5adfaca4
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 41404b68-bbc3-42b4-7729-531e6a35c365::f688f4aa-ee2e-4075-ab26-f9059d9f58b8

{
  "total_results": 0,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [

  ]
}
FAILED
Service offering mongodb not found
FAILED
Service offering mongodb not found

what could be the problem?

thanks for the help

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano

Here are some steps to debug. Hope it helps.

  1. Run bosh vms to verify gateways/0 and mongodb_service_node/0 are running.

  2. Check the token for mongodb_gateway in your manifest.

  3. Run cf marketplace to verify the following output.

    Getting services from marketplace in org default_organization / space azure as admin...
    OK
    
    service         plans     description
    mongodb         default   MongoDB NoSQL database
    
  4. Run cf service-auth-tokens to verify the following output.

    Getting service auth tokens as admin...
    OK
    
    label     provider
    mongodb   core
    
  5. Run cf services to verify the following output.

    Getting services in org default_organization / space azure as admin...
    OK
    
    name             service   plan      bound apps   last operation
    meteor-mongodb   mongodb   default                create succeeded
    

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

hello and thanks @bingosummer

step 1 is not OK

+-----------------------------------+-----------+--------------------+---------------+
| Job/index                           | State     | Resource Pool | IPs             |
+-----------------------------------+-----------+--------------------+---------------+
| gateways/0                        | failing    | common           | 10.0.64.12 |
| mongodb_service_node/0 | running | common           | 10.0.64.13 |
+-----------------------------------+---------- +--------------------+---------------+

how can I fix this?

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano
That means bosh deploy failed.
You need to make sure the manifest is correct.
How to debug:

ssh [email protected] -i bosh
sudo su
cd /var/vcap/sys/log

According to the logs, you can get more informations and change your manifest to make it work.

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer
I'll check
no error was produced by bosh deploy just success

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer

  • step 1 is OK now, I had to fix the nats part of the services-contrib manifest
+------------------------+---------+---------------+------------+
| Job/index              | State   | Resource Pool | IPs        |
+------------------------+---------+---------------+------------+
| gateways/0             | running | common        | 10.0.64.12 |
| mongodb_service_node/0 | running | common        | 10.0.64.13 |
+------------------------+---------+---------------+------------+

VMs total: 2

I re-run

$ cf create-service mongodb default meteor-mongodb
Creating service instance meteor-mongodb in org default_organization / space meteor as admin...
FAILED
Service offering mongodb not found

update: with trace on

$ CF_TRACE=true cf create-service mongodb default meteor-mongodb
Creating service instance meteor-mongodb in org default_organization / space meteor as admin...

REQUEST: [2015-12-20T10:36:28Z]
GET /v2/spaces/92854a4c-82b7-406a-8f40-b1f9c1004e06/services?q=label%3Amongodb HTTP/1.1
Host: api.cf.protact.me
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.14.0+2654a47 / linux



RESPONSE: [2015-12-20T10:36:28Z]
HTTP/1.1 200 OK
Content-Length: 107
Content-Type: application/json;charset=utf-8
Date: Sun, 20 Dec 2015 10:36:45 GMT
Server: nginx
X-Cf-Requestid: fff29aac-ff99-480f-700d-0a96d6b0f38c
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 9c11a6a7-320d-489d-6225-b3d718a9374e::ee68ccb8-d825-465f-bf86-0dd4592f3485

{
  "total_results": 0,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [

  ]
}
FAILED
Service offering mongodb not found
FAILED
Service offering mongodb not found
  • step 2: what do you mean by checking it?
  • step 3 is NOT OK
$ cf marketplace
Getting services from marketplace in org default_organization / space meteor as admin...
OK

No service offerings found
  • step 4 is OK
$ cf service-auth-tokens
Getting service auth tokens as admin...
OK

label     provider   
mongodb   core   
  • step 5 is NOT OK
$ cf services
Getting services in org default_organization / space meteor as admin...
OK

No services found

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano
If you can't list the mongodb service offerings using cf marketplace, then cf create-service will fail. (http://docs.cloudfoundry.org/devguide/services/managing-services.html)
I think, your problem should still be in the manifest. Could you attach your manifest?

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer please find it attached cf-services-contrib-azure-mongo.yml.txt

from bosh-azure-cpi-release.

bingosummer avatar bingosummer commented on July 18, 2024

@tintoverano
In your manifest:

srv_api_uri: http://api.cf.protact.com

The uri should be http://api.cf.protact.me.
:)

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

ah, sorry about that @bingosummer

$ cf marketplace
Getting services from marketplace in org default_organization / space meteor as admin...
OK

service   plans     description   
mongodb   default   MongoDB NoSQL database   

moving forward to see the db now

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

success, demo app is running

thanks for your precious support @bingosummer

from bosh-azure-cpi-release.

tintoverano avatar tintoverano commented on July 18, 2024

@bingosummer
https://medium.com/@veranotinto/meteor-demo-app-on-cf-azure-de918366608a#.vrjy3i6x3 :)

from bosh-azure-cpi-release.

Related Issues (20)

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.