Merge ~toabctl/cloud-images/+git/aws-eks-website:separate-ui-and-data into ~cloud-images-release-managers/cloud-images/+git/aws-eks-website:master

Proposed by Thomas Bechtold
Status: Merged
Merged at revision: e36118250dd90596f7891d7dfd05f268b3141b15
Proposed branch: ~toabctl/cloud-images/+git/aws-eks-website:separate-ui-and-data
Merge into: ~cloud-images-release-managers/cloud-images/+git/aws-eks-website:master
Diff against target: 3574 lines (+1981/-325)
15 files modified
changelog.yaml (+66/-0)
dev/null (+0/-2)
index.html (+1172/-280)
index.html.j2 (+436/-0)
k8s_versions.yaml (+30/-0)
querydata-amd64-1.16.txt (+21/-0)
querydata-amd64-1.17.txt (+21/-0)
querydata-amd64-1.18.txt (+21/-0)
querydata-amd64-1.19.txt (+21/-0)
querydata-amd64-1.20.txt (+21/-0)
querydata-amd64-1.21.txt (+21/-0)
querydata-arm64-1.20.txt (+21/-0)
querydata-arm64-1.21.txt (+21/-0)
regionnames.yaml (+22/-0)
update.py (+87/-43)
Reviewer Review Type Date Requested Status
John Chittum Approve
Gauthier Jolly Approve
Review via email: mp+407727@code.staging.launchpad.net

Commit message

Make everything templated when generating index.html and add arm64
Commit 25f2738a3bed6f0219ee98dd858efab33f9b5b37 moved already the
changelog entries into its own changelog.yaml file.
This commit now moves everything else to its own files:
- k8s_versions.yaml: this files contains the available k8s versions,
  the architectures that the specific version supports and a reference
  to the querydata file (those querydata files are generated by the
  Jenkins pipelines)
- regionnames.yaml: a mapping between a region
identifier (eg. 'af-south-1') and it's name ('Africa (Capetown)')
With that, it's now pretty easy to add new k8s versions or new
architectures. There is no need to copy & paste big chunks of html in
the index.html file.
Updating index.html is now done with:
./update.py
Note that the querydata-$arch-$k8sversion.txt are now in git. The
reasion is, that all data to generate index.html is now in git. So if
the website layout changes, it's easy to regenerate the index.html
because the data is available.

Separate changelog entries from index.html
Currently it's a pain to update the changelog entries in the
index.html file. The latest entry must be copied to the list of old
entries and then the latest entry can be modified to refect the latest
change.
This now changes. The changes entries in index.html are now
autogenerated based on:
1) the changelog.yaml file which contains all the change entries
2) the index.html.j2 file which is (based on index.html) a jinja2
   template that gets rendered by update.py into index.html
The generation of the index.html file can be triggered eg with:
./update.py amd64.released-1.21.txt 1.21
The update.py script does first override the index.html file based on
the index.html.j2 template and then continues to search & replace the
AMIs (based on the query-data).
Note: The part about changing the AMIs will be also templated out so
no more search & replace is needed
Note: index.html is still checked into git because that's the file
that is visible to endusers. So having that in git is valuable.

Description of the change

This can easily be tested by checking out this branch and then calling ./update.py

That will generate the index.html (same as the one that is already checked in with this commit)

To post a comment you must log in.
Revision history for this message
Gauthier Jolly (gjolly) wrote :

tested and LGTM

review: Approve
Revision history for this message
John Chittum (jchittum) wrote :

general +1, but some basic feedback (to decide if you want to do now or on a next pass, to me it's not blocking)

1. instead of checking in the querydata, have directions for retrieving it. since it'll change for each release, you'll either need to check it in each time, or (my preference) add to the .gitignore, and just download
2. expand on that -- automatically download querydata
3. querydata is being discontinued in the 22.04 release. Probably worth thinking about using streams or directly querying the cloud for version information.

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches