Call-for-Code / Prometeo-Pyrrha

Former repository for Prometeo, winner of the Call for Code 2019 Global Challenge, open sourced as Pyrrha (see links within this repo). It measures toxin exposure in real time and analyzes trends over time.
http://pyrrha-platform.org
Apache License 2.0
27 stars 18 forks source link

Migrate the IBM Cloud account from the personal account to the new Prometeo one #72

Closed svaleroc closed 4 years ago

svaleroc commented 4 years ago

Migrate the system as is to the new paid account under Prometeo Platform. This account has credits to cover the production IoT Platform and Kubernetes along with Compose databases.

krook commented 4 years ago

Derek to work with Marco on this

krook commented 4 years ago

How is this coming along @derekteay ?

derekteay commented 4 years ago

Just got a note from IBM today, it says:

Hello Josep,

Thank you for contacting us. I reviewed the account account@prometeoplatform.com and found it's still a trial account. We can't move resource from your account to trial account. Please contact IBM sales team to set up an enterprise for account@prometeoplatform.com which will allow you keep your account and also consuming the credits from the enterprise account.

Please see more information about enterprise account from below link.

https://mediacenter.ibm.com/media/t/1_hi08z2zm https://cloud.ibm.com/docs/account?topic=account-enterprise-tutorial

Kind Regards, IBM cloud support

I'm going to reach out to Ryan Johnson about this.

derekteay commented 4 years ago

Ryan Johnson doesn't handle migration and doesn't have a suggested person on who to reach out to.

After review, I believe this is the best course of action - https://cloud.ibm.com/docs/account?topic=account-enterprise-tutorial#create_enterprise_tutorial

I can do this or Marco can do this, since I don't have the credentials to the account at the moment.

@mrodrise - do you want to perform this step? We can then update the case and get this moving, hopefully before the June 1st date.

krook commented 4 years ago

We decided to recreate the resources in a new IBM Cloud account for Prometeo Platform.

The account has been created, and @mrodrise owns adding folks to it to help stand up a new version of the platform on Kubernetes with @lidderupk and @krook.

This is the proposed set of new consolidated services:

- Kubernetes cluster
    - WS Server Dockerfile
    - Find out if Node-RED runs on the cluster
    - Rules engine (if needed, can wrap the machine learning model)
    - Dashboard (Python dashboard)
- IoT Platform
- Watson Studio (and its dependecies)
- MySQL (keep in Compose)
- Cloudant
upkarlidder commented 4 years ago

https://cloud.ibm.com/unifiedsupport/cases?number=CS1843744

Contacted support on 06/16. They asked for the output of IBMCLOUD_TRACE=true ibmcloud target --cf. Sent them the following log for review on 06/16. Will contact for an update at the end of the week.

❯ IBMCLOUD_TRACE=true ibmcloud target --cf
❯ IBMCLOUD_TRACE=true ibmcloud target --cf

REQUEST: [2020-06-16T13:55:34-07:00]
GET /v2/regions HTTP/1.1
Host: mccp.us-south.cf.cloud.ibm.com
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: IBM Cloud CLI 1.0.0 / darwin

RESPONSE: [2020-06-16T13:55:35-07:00] Elapsed: 473ms
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Methods: GET,OPTIONS,POST,DELETE,PUT,PATCH
Access-Control-Allow-Origin: undefined
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
Date: Tue, 16 Jun 2020 20:55:34 GMT
Etag: W/"1087-vIsEK8beghJKFWMkBwvZwt/f6s8"
X-Backside-Transport: OK OK
X-Global-Transaction-Id: 63cd456d5ee931c6d358c183
X-Ratelimit-Limit: 150
X-Ratelimit-Remaining: 147
X-Ratelimit-Reset: 1592340934989

1087
[
  {
    "id": "ibm:yp:us-south",
    "domain": "ng.bluemix.net",
    "name": "us-south",
    "region": "us-south",
    "display_name": "Dallas",
    "customer": {
      "name": "ibm",
      "display_name": "IBM"
    },
    "deployment": {
      "name": "yp",
      "display_name": "Production"
    },
    "geo": {
      "name": "us-south",
      "display_name": "Dallas"
    },
    "public_regions_by_proximity": [
      "ibm:yp:us-south",
      "ibm:yp:us-east",
      "ibm:yp:eu-gb",
      "ibm:yp:eu-de",
      "ibm:yp:au-syd"
    ],
    "console_url": "https://console.bluemix.net",
    "cf_api": "https://api.us-south.cf.cloud.ibm.com",
    "mccp_api": "https://mccp.us-south.cf.cloud.ibm.com",
    "type": "public",
    "home": true,
    "aliases": [],
    "settings": {
      "devops": {
        "enabled": false
      }
    }
  },
  {
    "id": "ibm:yp:eu-de",
    "domain": "eu-de.bluemix.net",
    "name": "eu-de",
    "region": "eu-de",
    "display_name": "Frankfurt",
    "customer": {
      "name": "ibm",
      "display_name": "IBM"
    },
    "deployment": {
      "name": "yp",
      "display_name": "Production"
    },
    "geo": {
      "name": "eu-de",
      "display_name": "Frankfurt"
    },
    "public_regions_by_proximity": [
      "ibm:yp:eu-de",
      "ibm:yp:eu-gb",
      "ibm:yp:us-east",
      "ibm:yp:us-south",
      "ibm:yp:au-syd"
    ],
    "console_url": "https://console.bluemix.net",
    "cf_api": "https://api.eu-de.cf.cloud.ibm.com",
    "mccp_api": "https://mccp.eu-de.cf.cloud.ibm.com",
    "type": "public",
    "home": false,
    "aliases": [],
    "settings": {
      "devops": {
        "enabled": false
      }
    }
  },
  {
    "id": "ibm:yp:eu-gb",
    "domain": "eu-gb.bluemix.net",
    "name": "eu-gb",
    "region": "eu-gb",
    "display_name": "London",
    "customer": {
      "name": "ibm",
      "display_name": "IBM"
    },
    "deployment": {
      "name": "yp",
      "display_name": "Production"
    },
    "geo": {
      "name": "eu-gb",
      "display_name": "London"
    },
    "public_regions_by_proximity": [
      "ibm:yp:eu-gb",
      "ibm:yp:eu-de",
      "ibm:yp:us-east",
      "ibm:yp:us-south",
      "ibm:yp:au-syd"
    ],
    "console_url": "https://console.bluemix.net",
    "cf_api": "https://api.eu-gb.cf.cloud.ibm.com",
    "mccp_api": "https://mccp.eu-gb.cf.cloud.ibm.com",
    "type": "public",
    "home": false,
    "aliases": [],
    "settings": {
      "devops": {
        "enabled": false
      }
    }
  },
  {
    "id": "ibm:yp:au-syd",
    "domain": "au-syd.bluemix.net",
    "name": "au-syd",
    "region": "au-syd",
    "display_name": "Sydney",
    "customer": {
      "name": "ibm",
      "display_name": "IBM"
    },
    "deployment": {
      "name": "yp",
      "display_name": "Production"
    },
    "geo": {
      "name": "au-syd",
      "display_name": "Sydney"
    },
    "public_regions_by_proximity": [
      "ibm:yp:au-syd",
      "ibm:yp:us-south",
      "ibm:yp:us-east",
      "ibm:yp:eu-de",
      "ibm:yp:eu-gb"
    ],
    "console_url": "https://console.bluemix.net",
    "cf_api": "https://api.au-syd.bluemix.net",
    "mccp_api": "https://mccp.au-syd.cf.cloud.ibm.com",
    "type": "public",
    "home": false,
    "aliases": [],
    "settings": {
      "ccUrl": "https://api.au-syd.cf.cloud.ibm.com",
      "devops": {
        "enabled": false
      }
    }
  },
  {
    "id": "ibm:yp:us-east",
    "domain": "us-east.bluemix.net",
    "name": "us-east",
    "region": "us-east",
    "display_name": "Washington DC",
    "customer": {
      "name": "ibm",
      "display_name": "IBM"
    },
    "deployment": {
      "name": "yp",
      "display_name": "Production"
    },
    "geo": {
      "name": "us-east",
      "display_name": "Washington DC"
    },
    "public_regions_by_proximity": [
      "ibm:yp:us-east",
      "ibm:yp:us-south",
      "ibm:yp:eu-gb",
      "ibm:yp:eu-de",
      "ibm:yp:au-syd"
    ],
    "console_url": "https://console.bluemix.net",
    "cf_api": "https://api.us-east.cf.cloud.ibm.com",
    "mccp_api": "https://mccp.us-east.cf.cloud.ibm.com",
    "type": "public",
    "home": false,
    "aliases": [],
    "settings": {
      "devops": {
        "enabled": false
      }
    }
  }
]
0

REQUEST: [2020-06-16T13:55:35-07:00]
GET /api/v1-beta/environments HTTP/1.1
Host: admin.cfaas.cloud.ibm.com
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: IBM Cloud CLI 1.0.0 / darwin

RESPONSE: [2020-06-16T13:55:35-07:00] Elapsed: 442ms
HTTP/1.1 200 OK
Content-Length: 75
Connection: keep-alive
Content-Type: application/json
Date: Tue, 16 Jun 2020 20:55:35 GMT
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Gc-Instance-Id: kub--cfaas-us-south-prod--cf-admin-6fcd47b479-v8q6z
X-Global-Transaction-Id: a46d97398381096f105f175f7da74b17

{"offset":0,"limit":0,"total_count":0,"first":"","next":"","resources":[]}

REQUEST: [2020-06-16T13:55:35-07:00]
GET /v2/info HTTP/1.1
Host: api.us-south.cf.cloud.ibm.com
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: IBM Cloud CLI 1.0.0 / darwin

RESPONSE: [2020-06-16T13:55:35-07:00] Elapsed: 265ms
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Connection: Keep-Alive
Content-Type: application/json;charset=utf-8
Date: Tue, 16 Jun 2020 20:55:35 GMT
Server: nginx
X-Backside-Transport: OK OK
X-Content-Type-Options: nosniff
X-Global-Transaction-Id: 291d64505ee931c7710237fd

267
{"name":"IBM Cloud","build":"v12.44.0","support":"http://ibm.biz/bluemix-supportinfo","version":0,"description":"IBM Bluemix","authorization_endpoint":"https://iam.cloud.ibm.com/cloudfoundry/login/us-south","token_endpoint":"https://uaa.us-south.cf.cloud.ibm.com","min_cli_version":null,"min_recommended_cli_version":null,"app_ssh_endpoint":"ssh.us-south.cf.cloud.ibm.com:2222","app_ssh_host_key_fingerprint":"c7:1f:89:2a:62:3b:78:a9:08:c9:33:81:fb:39:26:da","app_ssh_oauth_client":"ssh-proxy","doppler_logging_endpoint":"wss://doppler.us-south.cf.cloud.ibm.com:443","api_version":"2.147.0","osbapi_version":"2.15"}
0

REQUEST: [2020-06-16T13:55:35-07:00]
POST /cloudfoundry/login/us-south/oauth/token HTTP/1.1
Host: iam.cloud.ibm.com
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/x-www-form-urlencoded
User-Agent: IBM Cloud CLI 1.0.0 / darwin

grant_type=iam_token&iam_token=[PRIVATE DATA HIDDEN]&response_type=uaa&scope=

RESPONSE: [2020-06-16T13:55:36-07:00] Elapsed: 531ms
HTTP/1.1 403 Forbidden
Connection: close
Content-Length: 734
Content-Language: en-US
Content-Type: application/json
Date: Tue, 16 Jun 2020 20:55:36 GMT
Set-Cookie: sessioncookie=83eb7a8c0e7a0fa2c58ef7ab1f67f3e1; Path=/; Secure; HttpOnly
Transaction-Id: b8a45be280814e8f81825d0f5fc8f7dd

{"context":{"requestId":"b8a45be280814e8f81825d0f5fc8f7dd","requestType":"incoming.Cf_OAuth_Token","userAgent":"IBM Cloud CLI 1.0.0 / darwin","url":"https://iam.cloud.ibm.com","instanceId":"iamid-5.6-8068-cbef4dc-76cb8f5f79-sn49h","threadId":"20b5d8","host":"iamid-5.6-8068-cbef4dc-76cb8f5f79-sn49h","startTime":"16.06.2020 20:55:36:127 GMT","endTime":"01.01.1970 00:00:00:000 GMT","elapsedTime":"0","locale":"en_US","clusterName":"iam-id-prdal10-ljdb"},"errorCode":"BXNIM0204E","errorMessage":"No UAA user exists with the provided user name / IAM ID","errorDetails":"User name / IAM ID 'marco.rodriguez@prometeoplatform.com', environment info: region 'us-south'","error":"forbidden","error_description":"BMXLS0201E: No such account"}

REQUEST: [2020-06-16T13:55:36-07:00]
POST /identity/token HTTP/1.1
Host: iam.cloud.ibm.com
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/x-www-form-urlencoded
User-Agent: IBM Cloud CLI 1.0.0 / darwin

grant_type=refresh_token&refresh_token=[PRIVATE DATA HIDDEN]&response_type=cloud_iam

RESPONSE: [2020-06-16T13:55:36-07:00] Elapsed: 410ms
HTTP/1.1 200 OK
Content-Length: 2332
Connection: keep-alive
Content-Language: en-US
Content-Type: application/json
Date: Tue, 16 Jun 2020 20:55:36 GMT
Set-Cookie: sessioncookie=67d486dd5681fa8962d6943d819689de; Path=/; Secure; HttpOnly
Transaction-Id: 1d2b5d64b15143cebeaeea7732cbcdae

{"access_token":"[PRIVATE DATA HIDDEN]","refresh_token":"[PRIVATE DATA HIDDEN]","ims_user_id":8312846,"token_type":"Bearer","expires_in":3600,"expiration":1592344533,"scope":"ibm openid"}

REQUEST: [2020-06-16T13:55:36-07:00]
POST /cloudfoundry/login/us-south/oauth/token HTTP/1.1
Host: iam.cloud.ibm.com
Accept: application/json
Accept-Language: en-US
Accept-Language: en
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/x-www-form-urlencoded
User-Agent: IBM Cloud CLI 1.0.0 / darwin

grant_type=iam_token&iam_token=[PRIVATE DATA HIDDEN]&response_type=uaa&scope=

RESPONSE: [2020-06-16T13:55:36-07:00] Elapsed: 231ms
HTTP/1.1 403 Forbidden
Connection: close
Content-Length: 734
Content-Language: en-US
Content-Type: application/json
Date: Tue, 16 Jun 2020 20:55:36 GMT
Set-Cookie: sessioncookie=a0e599d6f2c730f2f552a41c97434510; Path=/; Secure; HttpOnly
Transaction-Id: 90a99bb1e2b745afaf637d3221fee187

{"context":{"requestId":"90a99bb1e2b745afaf637d3221fee187","requestType":"incoming.Cf_OAuth_Token","userAgent":"IBM Cloud CLI 1.0.0 / darwin","url":"https://iam.cloud.ibm.com","instanceId":"iamid-5.6-8068-cbef4dc-76cb8f5f79-g5hww","threadId":"20f1df","host":"iamid-5.6-8068-cbef4dc-76cb8f5f79-g5hww","startTime":"16.06.2020 20:55:36:801 GMT","endTime":"01.01.1970 00:00:00:000 GMT","elapsedTime":"0","locale":"en_US","clusterName":"iam-id-prdal10-ljdb"},"errorCode":"BXNIM0204E","errorMessage":"No UAA user exists with the provided user name / IAM ID","errorDetails":"User name / IAM ID 'marco.rodriguez@prometeoplatform.com', environment info: region 'us-south'","error":"forbidden","error_description":"BMXLS0201E: No such account"}
FAILED
Could not login to Cloud Foundry: Remote server error. Status code: 403, error code: forbidden, message: BMXLS0201E: No such account
upkarlidder commented 4 years ago

Update from the support team on 06/22/2020

Hello,

My name is Anthony and I will be assisting you with this issue.

I have escalated this issue to our dev team, and am now standing by for a response from them. I attempted to push a fix for the issue, but the system hung up while trying to perform the fix, so we'll have to wait on dev for this one. Apologies.

Kind Regards,
Anthony S.
Revenue Support Enablement Team (RSET_
upkarlidder commented 4 years ago

The problem has been fixed by IBM support on 06/25/20. I am able to target cf using the command line and @mrodrise is now able to create compose database.

krook commented 4 years ago

This is underway. Cloud credits increased.

krook commented 4 years ago

Done!