Tech Debt: Language Packs should reference a glance-id

Bug #1325381 reported by Adrian Otto
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Won't Fix
Medium
yann degat

Bug Description

User-supplied language packs should reference a glance-id of a container (or VM) image to be used by the solum-worker in which to execute the build script. The Solum API service should look for the absence of a valid glance-id when language pack resources are created or updated, and raise an error if the argument is invalid, or inaccessible by the user, or if there is no valid git-url attribute specified.

Alternatively, the lang-pack resource may specify a git-url attribute. If this is provided, Solum's lp-cedarish LP shall be used, and will check for a local copy of the specified repo, and "git pull" if it exits, or, if it does not exist locally, "git clone" the repo and use it.

The glance-id and git-url attributes are mutually exclusive, and can not be used together. If both are specified, Solum shall raise an error. This approach avoids any ambiguity about how the custom image should check for and use the remote Git repo.

Tags: tech-debt
Adrian Otto (aotto)
Changed in solum:
status: New → Triaged
Adrian Otto (aotto)
description: updated
Adrian Otto (aotto)
description: updated
yann degat (yann-degat)
Changed in solum:
assignee: nobody → yann degat (yann-degat)
Revision history for this message
Julien Vey (vey-julien) wrote :

LP are basically images in glance, so the UUID of the language pack IS the glance id.
Our API is just a wrapper around glance images. We get JSON data as input and convert it into glance tags. We do not store anything related to LP in our DB

I don't really get the "git_url" part, which is very specific to cedarish. How does it apply to an arbitrary LP ?

Revision history for this message
Adrian Otto (aotto) wrote :

The git_url idea allows you to change the build behavior of an existing language pack by offering an externally referenced location where the build script(s) will be sourced. This is how CF and Heroku both work.

Where is our documentation about the input to the lang-pack creation API? We might be able to solve the first part of my concern there.

Revision history for this message
Julien Vey (vey-julien) wrote :
Revision history for this message
Julien Vey (vey-julien) wrote :

The documentation is a view for the user. It doesn't explain how we implemeted it in Solum.

If you look at our source code, you will see how everything is delegated to glance. We just take care of the conversion between the JSON object model in Solum and the tags in Glance
https://github.com/stackforge/solum/blob/master/solum/api/handlers/language_pack_handler.py

Revision history for this message
Julien Vey (vey-julien) wrote :

Adrian, this is the blueprint related to the glance part
https://blueprints.launchpad.net/solum/+spec/store-language-packs-in-glance

Can you mark it as done ?

Revision history for this message
yann degat (yann-degat) wrote :

hi,

how do i get a consensus on this task?

Adrian Otto (aotto)
Changed in solum:
milestone: juno-1 → juno-2
Revision history for this message
Adrian Otto (aotto) wrote :

Use Docker for this.

Changed in solum:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.