Author Topic: Docker Template XML Schema  (Read 6075 times)

Offline Squid

  • Community Developer
  • Hero Member
  • *****
  • Posts: 7558
  • Don Juan Prawn
Re: Docker Template XML Schema
« Reply #30 on: May 28, 2016, 04:52:57 PM »
Can I use Status:Beta|Stable in "<Category>" tag with CA, or do I need to use the "<Beta>" tag? (any different for 6.1.9 and 6.2?)
After it was determined (not by myself - although admittedly I was neutral on the change) to deprecate the <Beta> tag CA supports both methods.  dockerMan itself makes no use of the Category entry (and also doesn't implement it 100%), so it's irrelevant

Quote
Also, is the <Description> tag removed from 6.2? Is there an new way to have different information on CA (overview), and then you add the docker (where description was before).
This is working fine on 6.1.9, but not on 6.2b21 :(
Othersl decided to deprecate the description tag and instead utilize (and unilaterally change the specification without any consultation and then try to tell me that they know the specifications of CA's tag's better than myself) of the <Overview> tag in 6.2 which was previously a CA specific tag (and designed for its needs)

Net result is that the operation you are seeing is correct:  Only the overview displays under 6.2 (and in CA)

Offline Bjonness406

  • Community Developer
  • Hero Member
  • *****
  • Posts: 596
Re: Docker Template XML Schema
« Reply #31 on: May 28, 2016, 05:01:31 PM »


Quote
Also, is the <Description> tag removed from 6.2? Is there an new way to have different information on CA (overview), and then you add the docker (where description was before).
This is working fine on 6.1.9, but not on 6.2b21 :(
Othersl decided to deprecate the description tag and instead utilize (and unilaterally change the specification without any consultation and then try to tell me that they know the specifications of CA's tag's better than myself) of the <Overview> tag in 6.2 which was previously a CA specific tag (and designed for its needs)

Net result is that the operation you are seeing is correct:  Only the overview displays under 6.2 (and in CA)
Ahh :(
I liked the previous <overview> and <description> a lot more, looks more clean, and I don't see the point of changing it.
Main Server: unRAID 6.2 Plus | Mobo: MSI - B75A-G41 | CPU: Intel i5 3570 | RAM: 16Gig | Parity: WD Red 4TB | Data: WD Red 2TB x 2 | Cache: Samsung 850 Evo 250Gig | Case: Fractal R5

Testing server: unRAID 6.2 | Prebuilt Dell T3600 w/ Xeon E5-1620 with 16Gig ECC reg ram.

Offline Squid

  • Community Developer
  • Hero Member
  • *****
  • Posts: 7558
  • Don Juan Prawn
Re: Docker Template XML Schema
« Reply #32 on: September 05, 2016, 05:49:54 PM »
One of the new features enabled by CA's rewrite of its rendering engine is user-selectable Branches to install.

If the template supports this, when the user installs (or defaults) a supported template, they will be presented with a pop up asking them which branch of the application to install.

Add this in to the template:
Code: [Select]
<Branch>
    <Tag>tag#1</Tag>
    <TagDescription>This is the description of tag #1</TagDescription>
</Branch>
<Branch>
    <Tag>tag #2</Tag>
    <TagDescription>This is the description of tag #2</TagDescription>
</Branch>
and so on...

When the user selects a branch, the tag (if any) that is already included in the <Repository> entry will be overwritten with the selected tag prior to the xml being sent to dockerMan.

The user will also be presented with a Default option which will send to dockerMan the xml with an unaltered <Repository> entry with whatever tag is already present in it (if no tag is present, dockerMan automatically appends :latest as a tag)

I don't really recommend adding more than a few branches to any container, as the user can ultimately still change the branch themselves in dockerMan, limited screen real estate, and who wants to add the 100 or so branches that something like MySQL offers to a template.

Additionally, this feature is not going to be back-ported to legacy mode in CA (ie: if you hit Update Applications, you will not see the popup)


This feature will be available within CA sometime the week of September 5

Advanced

Each branch also has the ability to replace any of the xml tags from the main template.

EG: If the default tag requires an environment variable of LAN=1, but the branch requires VMLAN=1, then you would have the xml set up something like this:

Code: [Select]
.
.
.
<Environment>
  <Variable>
    <Name>LAN</Name>
    <Value>1</Value>
  </Variable>
</Environment>
.
.
<Branch>
  <Tag>SomeTag</Tag>
  <TagDescription>This is the description</TagDescription>
  <Environment>
    <Variable>
      <Name>VMLAN</Name>
      <Value>1</Value>
    </Variable>
  </Environment>
</Branch>
Note that ANY of the template schema can be replaced by the branch this way (including the repository - If replacing the repository, specify the full repo including the tag, as the tag identified by the <Tag> entry will not get appended in this case

Also note that if the template is a v2 template (ie: has the <Config Name..... > entries, you should include both the <Config entries AND the v1 legacy sections to be replaced for compatibility for 6.1.x

For a couple of examples, look here: https://github.com/Squidly271/docker-test-repo
« Last Edit: September 09, 2016, 11:26:26 AM by Squid »

Offline Squid

  • Community Developer
  • Hero Member
  • *****
  • Posts: 7558
  • Don Juan Prawn
Re: Docker Template XML Schema
« Reply #33 on: January 02, 2017, 07:11:48 AM »
Briefly looking at the docker xml template scheme for 6.2 I have issues with the current proposal.

the new scheme as it is at the moment doesn't work in pre 6.2 versions.

if docker authors want to be fully 6.2 compliant, and not leave those wishing to stay on 6.1 behind, we will end up having to write two sets of tags for every path, variable, device or port mapping.

it's my experience that when you increase the complexity, you exponentialy increase the chances of mistakes. miss out one mapping, or make a mistake on either set of tags, you end up with a container that will only work properly on either post or pre 6.2, but not both.
If you use dockerMan to create templates, then there is no problem as its generated files are both v1 and v2 compliant.  Manually creating the xml is a recipe for disaster.  Going forward however this really isn't going to be a big deal as less and less users use 6.1.x / 6.0

Offline Squid

  • Community Developer
  • Hero Member
  • *****
  • Posts: 7558
  • Don Juan Prawn
Re: Docker Template XML Schema
« Reply #34 on: January 02, 2017, 07:27:24 AM »
To clarify further, a number of maintainers and myself were very vocal in questioning the switch to use of attributes vs extending v1 elements as that design choice didn't particularly make a whole lot of sense.  (Along with redefining the specifications on a few existing attributes)  Unfortunately the powers that be decided that attributes were going to be the way forward

Offline jonathanm

  • Hero Member
  • *****
  • Posts: 4283
Re: Docker Template XML Schema
« Reply #35 on: January 02, 2017, 10:52:47 AM »
Briefly looking at the docker xml template scheme for 6.2 I have issues with the current proposal.

the new scheme as it is at the moment doesn't work in pre 6.2 versions.

if docker authors want to be fully 6.2 compliant, and not leave those wishing to stay on 6.1 behind, we will end up having to write two sets of tags for every path, variable, device or port mapping.

it's my experience that when you increase the complexity, you exponentialy increase the chances of mistakes. miss out one mapping, or make a mistake on either set of tags, you end up with a container that will only work properly on either post or pre 6.2, but not both.
If you use dockerMan to create templates, then there is no problem as its generated files are both v1 and v2 compliant.  Manually creating the xml is a recipe for disaster.  Going forward however this really isn't going to be a big deal as less and less users use 6.1.x / 6.0
You were trolled by a bot  ;D https://lime-technology.com/forum/index.php?topic=47482.0

Offline Squid

  • Community Developer
  • Hero Member
  • *****
  • Posts: 7558
  • Don Juan Prawn
Re: Docker Template XML Schema
« Reply #36 on: January 02, 2017, 10:57:35 AM »
Briefly looking at the docker xml template scheme for 6.2 I have issues with the current proposal.

the new scheme as it is at the moment doesn't work in pre 6.2 versions.

if docker authors want to be fully 6.2 compliant, and not leave those wishing to stay on 6.1 behind, we will end up having to write two sets of tags for every path, variable, device or port mapping.

it's my experience that when you increase the complexity, you exponentialy increase the chances of mistakes. miss out one mapping, or make a mistake on either set of tags, you end up with a container that will only work properly on either post or pre 6.2, but not both.
If you use dockerMan to create templates, then there is no problem as its generated files are both v1 and v2 compliant.  Manually creating the xml is a recipe for disaster.  Going forward however this really isn't going to be a big deal as less and less users use 6.1.x / 6.0
You were trolled by a bot  ;D https://lime-technology.com/forum/index.php?topic=47482.0
>:(  >:(  >:(

Although what's funnier is that @Sparklyballs pointed out that post to me and also missed the fact that he wrote it in the first place...  (That and you took the time to actually search out the originating thread   :o )

Offline jonathanm

  • Hero Member
  • *****
  • Posts: 4283
Re: Docker Template XML Schema
« Reply #37 on: January 02, 2017, 11:00:39 AM »
(That and you took the time to actually search out the originating thread   :o )
Select body text of post, right click, search with google, first hit. 5 seconds max. Took longer to copy the thread URL into the reply.  ;D

Offline Squid

  • Community Developer
  • Hero Member
  • *****
  • Posts: 7558
  • Don Juan Prawn
Re: Docker Template XML Schema
« Reply #38 on: January 02, 2017, 11:02:12 AM »
(That and you took the time to actually search out the originating thread   :o )
Select body text of post, right click, search with google, first hit. 5 seconds max. Took longer to copy the thread URL into the reply.  ;D
Well, I guess 5 seconds of your life to make me look like a fool is time well spent   ;D   As I've stated, you are my new nemesis   ;)