cloudfoundry-attic / bosh-softlayer-cpi-release-DEPRECATED-TO_BE_DELETED

A BOSH release for the bosh-softlayer-cpi written in Golang and using the new BOSH external CPI release fashion.
Apache License 2.0
3 stars 8 forks source link

Where do we find appropriate stem cells for dal09? #25

Closed sykesm closed 8 years ago

sykesm commented 8 years ago

Trying to bring up a director in dal09 with the documentation and templates from this repository. After a few problems that I can work around, I hit the following:

Command 'deploy' failed:
  creating stemcell (light-bosh-stemcell-3232.4-softlayer-esxi-ubuntu-trusty-go_agent 3232.4):
    CPI 'create_stemcell' method responded with error: CmdError{"type":"Bosh::Clouds::CloudError","message":"Did not find stemcell with ID '1129495'","ok_to_retry":false}

The image ID matches the information in stemcell.MF.

I'm unable to bring up a director in softlayer with the information currently available in the repository. Where does one find the list of available stemcells for softlayer that are publicly available?

jianqiu commented 8 years ago

@sykesm Could you please post me the yaml file used to bring up director? Thanks!

jianqiu commented 8 years ago

@sykesm Here is a log for your reference:

Deployment manifest: '/root/workspaces/deployer/bosh-init-6/sl-bosh-v3.yml' Deployment state: '/root/workspaces/deployer/bosh-init-6/sl-bosh-v3-state.json'

Started validating Downloading release 'bosh'... Skipped Found in local cache Validating release 'bosh'... Finished (00:00:02) Downloading release 'bosh-softlayer-cpi'... Finished (00:00:08) Validating release 'bosh-softlayer-cpi'... Finished (00:00:03) Validating cpi release... Finished (00:00:00) Validating deployment manifest... Finished (00:00:00) Validating stemcell... Finished (00:00:00) Finished validating (00:00:14)

Started installing CPI Compiling package 'golang_1.5.3/7d56aca2e7cc0f1e28c0852a9f8c91f0170eed5b'... Finished (00:00:21) Compiling package 'bosh_softlayer_cpi/dc9ac158cdd14dd7921a307e038b007c2078aa48'... Finished (00:00:10) Installing packages... Finished (00:00:03) Rendering job templates... Finished (00:00:00) Installing job 'softlayer_cpi'... Finished (00:00:00) Finished installing CPI (00:00:36)

Starting registry... Finished (00:00:00) Uploading stemcell 'light-bosh-stemcell-3232.4-softlayer-esxi-ubuntu-trusty-go_agent/3232.4'... Finished (00:00:01)

Started deploying Creating VM for instance 'bosh/0' from stemcell '1129495'... Finished (00:08:39) Waiting for the agent on VM '20351023' to be ready... Finished (00:00:45) Creating disk... Finished (00:04:10) Attaching disk '11591141' to VM '20351023'... Finished (00:01:17) Rendering job templates... Finished (00:00:03) Compiling package 'libpq/09c8f60b87c9bd41b37b0f62159c9d77163f52b8'... Finished (00:00:35) Compiling package 'postgres/55dbf1828bbb8e5fcd7dc7550cfb73de89312458'... Finished (00:04:03) Compiling package 'genisoimage/008d332ba1471bccf9d9aeb64c258fdd4bf76201'... Finished (00:00:31) Compiling package 's3cli/46a8902dea5b853b9cc2a8ff570503d0201c4f4f'... Finished (00:00:01) Compiling package 'powerdns/256336d00b1689138490c385c03ad3a8f54b4a9e'... Finished (00:00:02) Compiling package 'mysql/b7e73acc0bfe05f1c6cbfd97bf92d39b0d3155d5'... Finished (00:00:42) Compiling package 'nginx/1d356bbd17ed8c349fd1053093222d78559687ec'... Finished (00:01:02) Compiling package 'ruby/030e3d4eafd00b10bbfa879bcf44fba62139205e'... Finished (00:02:52) Compiling package 'golang_1.5.3/7d56aca2e7cc0f1e28c0852a9f8c91f0170eed5b'... Finished (00:00:25) Compiling package 'director/099c19f03d39e0aca6a28b336f50da4952b70cdc'... Finished (00:02:25) Compiling package 'nats/6a31c7bb0d5ffa2a9f43c7fd7193193438e20e92'... Finished (00:00:13) Compiling package 'health_monitor/4c4f257a58778faf38d38d71516f95a002846e34'... Finished (00:01:52) Compiling package 'bosh_softlayer_cpi/dc9ac158cdd14dd7921a307e038b007c2078aa48'... Finished (00:00:15) Updating instance 'bosh/0'... Finished (00:00:20) Waiting for instance 'bosh/0' to be running... Finished (00:00:11) Running the post-start scripts 'bosh/0'... Finished (00:00:00) Finished deploying (00:30:32)

Stopping registry... Finished (00:00:00) Cleaning up rendered CPI jobs... Finished (00:00:00)

mattcui commented 8 years ago

It's most likely that your account has no permission to access that "public" image template. So seems "public" images are still not visible to everyone, I opened a SL ticket to confirm if other accounts can or can't access the public images created by my account.

sykesm commented 8 years ago

The light-bosh-stemcell-3215-softlayer-esxi-ubuntu-trusty-go_agent.tgz stem cell works but light-bosh-stemcell-3232.4-softlayer-esxi-ubuntu-trusty-go_agent.tgz does not. I don't believe it's something on my end.

Also, I'd like to reiterate my question:

Where does one find the list of available stemcells for softlayer that are publicly available?

Thanks.

sykesm commented 8 years ago

Looking at the stemcell resource on your concourse pipeline, I tried to use these:

    url: https://s3.amazonaws.com/bosh-softlayer-cpi-stemcells/light-bosh-stemcell-3215-softlayer-esxi-ubuntu-trusty-go_agent.tgz
    sha1: b64fe3fb56f1cc0ddb4212c39a94839c9379f82e
    # url: https://s3.amazonaws.com/bosh-softlayer-cpi-stemcells/light-bosh-stemcell-3232-softlayer-esxi-ubuntu-trusty-go_agent.tgz
    # sha1: f669d9f70ad25f89e22742831ae7eab83f890e6e
    # url: https://s3.amazonaws.com/bosh-softlayer-cpi-stemcells/light-bosh-stemcell-3232.2-softlayer-esxi-ubuntu-trusty-go_agent.tgz
    # sha1: 10fce43a2438cb5b8786adc8a24c1b84ec83ac3d
    # url: https://s3.amazonaws.com/bosh-softlayer-cpi-stemcells/light-bosh-stemcell-3232.3-softlayer-esxi-ubuntu-trusty-go_agent.tgz
    # sha1: c5ed6027e6b62dd286af8fdcb79d1ac3e64f0345
    # url: https://s3.amazonaws.com/bosh-softlayer-cpi-stemcells/light-bosh-stemcell-3232.4-softlayer-esxi-ubuntu-trusty-go_agent.tgz
    # sha1: 032fa7fc561b4e0b2ae427bb1219f72d5687fd65

Only the 3215 version (uncommented) works - all others fail to resolve the image ID.

mattcui commented 8 years ago

I think the reason why 3215 can work for you is that we ever shared the account to Michael for 3215 image. But we don't want to do that every time when a user wants to use our images, so we started making "public image" from 3232.4, but seems the public images still can't be accessed by other accounts, I am talking with Softlayer support on this issue. After this issue is solved, we will work with BOSH community to publish our stemcells on bosh.io, then the user can see what images can be used on Softlayer.

mattcui commented 8 years ago

@sykesm Worked with SL support to try to know where is wrong, I think I got the idea, the problem should be in the CPI code, currently, we use getBlockDeviceTemplateGroups to identify an existing image template, but this function should only work for private images. I think a proper way is to change to use getObject instead. @sykesm, Need your help to confirm if getObject can work for your account, could you please try to run the following curl command to see if you can get the correct result? Thanks

curl -v https://<user>:<apikey>@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest_Block_Device_Template_Group/1129495/getObject

Please let us know if the above command works for you. Thanks.

sykesm commented 8 years ago

It appears to work:

{
  "accountId": 278444,
  "createDate": "2016-05-19T07:48:21-05:00",
  "id": 1129495,
  "name": "light-bosh-stemcell-3232.4-softlayer-esxi-ubuntu-trusty-go_agent",
  "note": "Public_light_stemcell_3232.4",
  "parentId": null,
  "publicFlag": 1,
  "statusId": 1,
  "summary": "Public_light_stemcell_3232.4",
  "transactionId": null,
  "userRecordId": 247176,
  "accountReferences": [],
  "globalIdentifier": "2741a10e-dee0-4504-baf0-0f5f1558e16f"
}
mattcui commented 8 years ago

Opened bug 120778955

maximilien commented 8 years ago

@sykesm we are also working on pushing stemcells on bosh.io where all stemcells are published.

/cc @cppforlife since I believe he might need to update bosh.io to show SL stemcells.

mattcui commented 8 years ago

Submitted PR125 to make cpi support to query public images.

maximilien commented 8 years ago

I am closing this. W.r.t. to list of public stem cells. Look for them soon on bosh.io. @cppforlife has to do some work to make them visible and it's on his todo list.