cloudfoundry / bosh-alicloud-cpi-release

BOSH Alibaba CPI
Apache License 2.0
32 stars 20 forks source link

support darwin golang; allow any golang version [fixes #80, fixes #36] #81

Closed drnic closed 5 years ago

drnic commented 5 years ago

This PR helpfully adds mac/darwin support to the CPI bosh create-env command. It also makes it very easy to upgrade to new golang versions in future by only replacing the blobs (no changes required to the packages/golang/ files).

To test this PR:

First, add a darwin golang to blobs (and let's upgrade to 1.12.6 whilst we're at it; but please can we move to a public blobstore too? #77)

mkdir -p tmp
curl https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz -o tmp/go1.12.6.linux-amd64.tar.gz
curl https://dl.google.com/go/go1.12.6.darwin-amd64.tar.gz -o tmp/go1.12.6.darwin-amd64.tar.gz
bosh add-blob tmp/go1.12.6.linux-amd64.tar.gz go1.12.6.linux-amd64.tar.gz
bosh add-blob tmp/go1.12.6.darwin-amd64.tar.gz go1.12.6.darwin-amd64.tar.gz

Next, create a dev release:

bosh create-release --version 22.0.$(date -u "+%Y%m%d%H%M%S") --tarball tmp/bosh-alicloud-cpi-release.tgz --force

An example operator file for a bosh create-env command is:

- type: replace
  path: /releases/-
  value:
    name: bosh-alicloud-cpi
    version: latest
    url: file:///path/to/bosh-alicloud-cpi-release/tmp/bosh-alicloud-cpi-release.tgz

Then apply the operator to your bosh create-env command.

cfdreddbot commented 5 years ago

:white_check_mark: Hey drnic! The commit authors and yourself have already signed the CLA.

drnic commented 5 years ago

I've cut a release of this PR at https://github.com/drnic/bosh-alicloud-cpi-release/releases/tag/22.0.1

drnic commented 5 years ago

cc @xiaozhu36 could you please review/merge this PR for next release? thanks!