Git Product home page Git Product logo

upgrade-tiles-proof-of-concept's People

Contributors

aegershman avatar

Watchers

 avatar  avatar  avatar

upgrade-tiles-proof-of-concept's Issues

General: more informative output on tasks

In order to keep operators clued into the inner-workings of the upgrade-tile tasks, we should include more echo/output statements to display what's happening

Making the output helpful and informative will prevent the need for 'debug' mode (set -x), which will display everything-- including credentials-- in the output window

Alternative to stage-tile task

The logic in stage-tile is weirdly complicated. It's especially frustrating because you cannot have multiple versions of a tile uploaded; you must delete unused products to allow stage-tile to work properly. Perhaps there's a better way to update a tile.

Perhaps #7 could be applied in this case?

How do I know which major stemcell versions to be fetching on?

How can the pipeline know which major stemcell version to go retrieve? Should each individual tile pipeline be in charge of downloading/uploading the latest stemcell? Should some other pipeline automatically listen for available stemcells & upload them automatically, then the tile-pipelines be responsible for applying them? Should I just load the opsman with a pivnet API token & poll the "check for available stemcells" API endpoint?

Inspiration: https://github.com/pivotal-cf/pcf-pipelines/blob/master/tasks/upload-product-and-stemcell/task.sh

Document other "styles" of tile-upgrades

In order to demonstrate the other techniques of upgrading tiles (single-tile single-pipeline; multi-tile single-pipeline, etc.), we should include a little documentation on other ways we've done tile upgrades.

Is 'associate-stemcell' an idempotent operation?

If I try to associate a stemcell to a product, but that stemcell version is already applied to the product, will this still register as a "staged change"? If I'm going to be making API calls to associate a stemcell to a product every time I call "apply-selective-deploy", I need to make sure this doesn't cause unnecessary problems.

I'm hoping for the Opsman response to be something like "stemcell version already applied".

Account for multiple foundations

Unfortunately this current model only upgrades the tiles in one foundation. But I would like to have a tile version "flow" through to other foundations; e.g., tile_a-0.2 must successfully pass through 'sandbox' before it can be applied to 'dev'.

Remove "-and-stemcell" from "upload-product-and-stemcell" task

The pcf-pipelines task upload-product-and-stemcell will upload the stemcell for a product... but I don't need the stemcell to be uploaded in this task anymore. I only want the product. Therefore, we should remove the "-and-stemcell" part from the "upload-product-and-stemcell" task

Make `stage-product` a task in `apply-changes` job

We should separate 'upload-product' and 'stage-product' in order to prevent unnecessary double-uploading. If I want to re-stage a product, why should I have to re-upload it? And if I want to upload a product, why should I have to stage it? Consider separating these.

Investigate "install product" but pass in "deployed_products" param for selective deploys

https://opsman-dev-api-docs.cfapps.io/#triggering-an-install-process

What happens if I call the POST /api/v0/installations endpoint like this?

	./om-darwin \
		--target $TARGET \
		--client-id $USERNAME \
		--client-secret $SECRET \
		--skip-ssl-validation \
		curl \
		--request POST \
		--path /api/v0/installations \
		--data '
			{
				"deploy_products": "all"
			}
		'

Here's the deal:

  • In the UI, if you hit "apply changes", it will run smoke tests / errands / etc. for all tiles. We don't want this. We want selective deploys.

  • When using the API endpoint, presumably, if you don't pass in any --data '...', it is the equivalent of hitting "apply changes" in the UI.

  • When using the API endpoint, you can pass in a list of product GUIDs to trigger selective deploys only on those products. That works just fine.

  • But what if we use this API endpoint and explicitly pass in --data '{deploy_products: all}'? I know 'all' is the default value, but is the behavior different? Can we get it to perform selective deploys only on the staged changes? The benefit here is that then we don't have to explicitly pass in an array of product GUIDS

Stage-deploy does not account for -build.x products

Maybe my stage-deploy task simplification was naive, because now on products that have a *-build.11 semver system, it falls apart.

Healthwatch 1.1.7:

Archive:  ./pivnet-product/p-healthwatch-1.1.7-build.11.pivotal
   creating: metadata/
 extracting: metadata/p_healthwatch.yml  
could not execute "stage-product": failed to stage product: cannot find product p-healthwatch 1.1.7

It wants to be configured with the "full" version, e.g., 1.1.7-build.11

Investigate viability of using built-in functions of Opsman to coordinate changes

For example, instead of downloading a tile and re-uploading it, would it just be easier to issue API calls to opsman & tell it to go download a product? Would it be easier to just outfit the opsman with a pivnet API token && coordinate all changes as "commands" to the opsman?

Is there a way to add a pivnet token to opsman via API call? Flow: get a pivnet token, put it in credhub, then have Concourse upload pivnet token to opsman. Then Concourse handles upgrading opsman by issuing commands via API, rather than having to supply the actual pivnet product/stemcell/etc.

Inefficient use of downloading entire pivnet product

In order to extract the product name (and get the corresponding product GUID from the opsman), we're downloading the entire product from pivnet & looking at the metadata. Do we have to do this? Considering all we need is the product name?

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.