#39 getfedora: render coreos download page using stream.json
Merged by codeblock. Opened by rfairley.
fedora-web/ rfairley/websites rfairley-coreos-release-browser  into  master

Download 39.patch

Still WIP - opening the PR for quick review and guidance on how far to polish this before preview. Going to be tidying it further throughout Friday, including:
- tweak spacing and font sizes
- fill out descriptions
- handle the stream.json parsing better to simplify display logic
- label the metal artifacts in the listing better (right now the displayed provider is always metal - should be ISO, RAW, installer-iso, etc)

Time permitting, we can add UI elements. Elements we might want are the tab menus like shown in the mockups in https://pagure.io/fedora-websites/issue/964. Another one I'm considering to reduce the impact of the list of AMIs is a dropdown which shows say 2 listed AMIs at the top of the list, and a "show all" button to show AMIs from all regions.

Adapted from https://github.com/jlebon/fedora-coreos-browser/blob/master/index.html.

Can be tested locally by following this: https://relrod.github.io/fedora-webdocs/websites/setup/ (I'm running it in a F29 container with port 5000 exposed).

cc @bgilbert @sanja

1 new commit added

  • cleanups, fix indentation

1 new commit added

  • add verify signature & sha256 buttons

1 new commit added

  • check if signature/sha256 keys exist first

1 new commit added

  • start description, cleanups

6 new commits added

  • start description, cleanups
  • check if signature/sha256 keys exist first
  • add verify signature & sha256 buttons
  • cleanups, fix indentation
  • fetch mock stream.json, and render data
  • getfedora: add release browser to coreos download page

6 new commits added

  • start description, cleanups
  • check if signature/sha256 keys exist first
  • add verify signature & sha256 buttons
  • cleanups, fix indentation
  • fetch mock stream.json, and render data
  • getfedora: add release browser to coreos download page

2 new commits added

  • getfedora: render coreos download page using stream.json
  • getfedora: add release browser to coreos download page

So I messed up when I initially wrote these, and it's actually the inverse. The dist/ path is for devel. See https://vuejs.org/v2/guide/#Getting-Started.

@jlebon ahh, thanks! fixing.

I squashed the edit commits I made; will later squash all commits into one.

The rendering of stream.json should now be complete, and hopefully neat enough to show to users. Ready for review now.

This code should be refactored to be more maintainable. Working on this now - will try to have it in this PR, otherwise it can be done in a followup.

2 new commits added

  • getfedora: render coreos download page using stream.json
  • getfedora: add release browser to coreos download page

Current state (using mock stream.json): https://rfairley.fedorapeople.org/getfedora-coreos-download-346fb08-01.png

Hello, can you please prevent the usage of any external content and provide all required file without any potential tracker?

Are we sure the new content preserve a good internationalization support?

2 new commits added

  • move Vue dependency to saved file
  • specify only js variables as raw, add translatable sections

@jibecfed Thanks, added the vue.min.json file to the local static content. I also moved the {% raw %} specifiers to wrap only the parts where the js variables are binded in {{ }}, and added {% trans %} for translatable text. Needs some tidying up of the code, but this way should provide internationalization support at least for the text that is known at the time of creating the translations.

2 new commits added

  • remove developer references
  • add a few more translations, switch base URL to official

rebased onto a2fc652a174a164b7c7edb922695064b5dae7f54

Let's remove armhfp and i386 for now since we don't have any work started for these arches. Don't have strong opinion but since we don't have any official artifacts for ppc64le, aarch64 and s390x arches, maybe we can exclude them for now as well and can be added when we have artifacts getting built for these arch

@bgilbert @jlebon Do we want to show non-production refs (https://pagure.io/fedora-web/websites/pull-request/39#_1__23) on website?

Yes, you're right. We should just have stable, testing, and next on the download page (and since only one of those is currently available... it should just be testing).

Yeah, let's drop both the stream and arch dropdowns and just hardcode testing and x86_64 for now. Seems slightly mischievious to have an "arch" dropdown if there's only one choice. :)

Also, let's drop the Refresh button too? Unlike the build browser, this isn't a webpage displaying rapidly changing data.

rebased onto ff4bcacf53507f46216ef410d476645955df7e12

Thanks @sinnykumari , @jlebon - I made the mentioned fixes, just dropping the select buttons for now.

I do have some WIP work for general refactoring (https://github.com/rfairley/fedora-website/commits/rfairley-coreos-release-browser), which avoids the signatureAndShaDisplay object (which currently breaks the Verify signature & sha256 buttons if an extension in ${stream}.json mismatches what is declared in the signatureAndShaDisplay object . Also gives prettier titles (e.g. not just metal for all the bare metal artifacts). Should be able to rebase the WIP branch onto this soon. Though, as a temporary measure the PR in this state would be functional.

rebased onto 6bc193bfa158243a2d64b003c9fbfd1d55424220

rebased onto 8d93e1abad647c38b53fcc08b64f890c9ed63f81

rebased onto de3ac3d677aa5fee256f2d28d212315b11a8f319

rebased onto 1d3ee274b2ffb8d1d10dfa054de47a943900b2f2

Thanks Robert, nice work! so far looks good. Will do remaining review once WIP is lifted.

rebased onto be065193e29311b5304728b9f93edb12b014b2e3

Clicking the testing.json link toward the top of the download page takes me to this link:
https://builds.coreos.fedoraproject.org/streams/%7B%7B%20streamData.stream%20%7D%7D.json
with the {{ streamData.stream }} as a literal, uninterpolated variable. I'm guessing that's not intended.

Also, since only the CoreOS stuff is using Vue, please only include it on those pages. The way it's included right now bypasses the JS bundler and also gets pulled in on EVERY page load instead of just the pages that need it.

Instead, please include it in {% block js %}...{% endblock %} on the CoreOS pages.

Lastly, you likely want to update the link on the front page to point to this page instead of coreos.fp.o (and perhaps add this as an edition in the navbar, if it is ready to become a first-class edition).

Now lifted WIP!

I added a link to the location where these docs https://github.com/coreos/fedora-coreos-docs/pull/1 will exist on the Overview page. For now, I have just used the text from the tracker README (https://github.com/coreos/fedora-coreos-tracker) to give a description of Fedora CoreOS on the Overview page. We will want to develop this further later.

Tidy-ups will be done in a separate follow-up PR to make signatureAndShaDisplay less fragile (WIP: https://github.com/rfairley/fedora-website/commits/rfairley-coreos-release-browser).

@codeblock thanks, will add these fixes in.

rebased onto 31f42d1225855a2669cea346594936e635f0f381

rebased onto 840f81a700b72f261172244985ec226a6097ca1e

rebased onto 237e37747cd91198ea06d9cfa7ea3f0c80b6f963

rebased onto 5762c1d643b8bf8ae685f232f11ec996148cd784

@codeblock thanks for taking a look! Addressed the comments now.

Clicking the testing.json link toward the top of the download page takes me to this link:
https://builds.coreos.fedoraproject.org/streams/%7B%7B%20streamData.stream%20%7D%7D.json
with the {{ streamData.stream }} as a literal, uninterpolated variable. I'm guessing that's not intended.

Fixed - was indeed passing a literal, I meant to reference the variable.

Also, since only the CoreOS stuff is using Vue, please only include it on those pages. The way it's included right now bypasses the JS bundler and also gets pulled in on EVERY page load instead of just the pages that need it.
Instead, please include it in {% block js %}...{% endblock %} on the CoreOS pages.

Makes sense - I added a {% block js %} for the JS parts, as well as a <script> to include /static/js/vue.min.js. I have only done this for the download page for now, as only that page is using Vue currently.

Lastly, you likely want to update the link on the front page to point to this page instead of coreos.fp.o (and perhaps add this as an edition in the navbar, if it is ready to become a first-class edition).

Updated the link to the coreos Overview page. For now, since it is still in preview, I've left it out of the navbar. Once FCOS is stable though (a few months away), we'll want to list it with the first-class editions.

rebased onto 4cf089ffd5801eca8a805c074acbb7d26bc8f9bb

rebased onto f74d531e52c5cba72d228e30805e90e04b51f758

Proposal: Try running containers in the latest preview release of Fedora CoreOS.

Subscribe to the coreos-status mailing list to receive important operational notices from the Fedora CoreOS team. Give feedback and follow Fedora CoreOS development in the Fedora CoreOS issue tracker.?

Once we have more than one stream, we should explain what each of them are. For now, let's not bother.

Preview releases of Fedora CoreOS should not be used for production workloads. Fedora CoreOS may change in incompatible ways during the preview period. Additional platforms and functionality will be added over the coming months.?

Labeling the link <stream>.json adds stutter. Maybe just make the link text JSON?

Labels like metal and installer.iso are meant to be machine-readable. We should have a mapping table to human-readable names.

Let's not render the actual signature URL, just provide a link to it.

Fedora CoreOS is an automatically-updating, minimal operating system for running containerized workloads securely and at scale. It is currently available for testing on a limited set of platforms, with more coming soon.?

rebased onto dc3afc10d11031f86d62ed06e1f08bbf4b0fa2a0

rebased onto 2cc0e6e75b7c10556281cfa00b1653180456b2d2

@bgilbert the language proposals SGTM, edited to use these. Also addressed the other comments.

Labeling the link .json adds stutter. Maybe just make the link text JSON?

:+1: - fixed.

We should have a mapping table to human-readable names.

Added a displayPrettyProvider function which maps the provider.extension to a human-readable name. Special conditions to conditionally hide an extension beneath the artifact name, e.g. for pxe and installer-pxe, are added in at https://pagure.io/fedora-web/websites/blob/2cc0e6e75b7c10556281cfa00b1653180456b2d2/f/sites/getfedora.org/site/coreos/download/index.html#_79. (Following the mock-up example at https://pagure.io/fedora-websites/issue/964#comment-576026).

Let's not render the actual signature URL, just provide a link to it.

:+1: - changed this to render just Downloads for the link text, linking to the signature.

Uploaded a .zip of the rendered overview and downloads HTML pages at the current state, as well as a screenshot of the downloads page with some of the Verify signature & sha256 sections expanded, to facilitate review: https://github.com/rfairley/fedora-website/blob/rfairley-rendered-html/getfedora-coreos-2cc0e6e.zip?raw=true

It doesn't show in the diff, but the overview page says This is the coreos you've been waiting for.. Can we change that to e.g. Preview an automatically updating Linux OS for containerized workloads.?

Also, on the getfedora front page: can we change the FCOS flavor text to Fedora CoreOS is an automatically updating, minimal, container-focused operating system.? (i.e., add is, and drop monolithic).

LGTM otherwise!

https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/ link doesn't work for me. Is it scheduled to get live soon or we need to fix the URL?

One comment above , otherwise LGTM

rebased onto a21b754e9d7b21397f900ab938787c0c08550996

rebased onto f0ec35796ae3e1b2fa2b84197957ebcb57bed4f8

@bgilbert

It doesn't show in the diff, but the overview page says This is the coreos you've been waiting for.. Can we change that to e.g. Preview an automatically updating Linux OS for containerized workloads.?
Also, on the getfedora front page: can we change the FCOS flavor text to Fedora CoreOS is an automatically updating, minimal, container-focused operating system.? (i.e., add is, and drop monolithic).

SGTM, fixed!

@sinnykumari

https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/ link doesn't work for me. Is it scheduled to get live soon or we need to fix the URL?

I believe this still needs to be published - but will should be visible at that URL once integrated into the main Fedora docs (comparing to Silverblue https://docs.fedoraproject.org/en-US/fedora-silverblue/getting-started/).

Updated: https://github.com/rfairley/fedora-website/blob/rfairley-rendered-html/getfedora-coreos-f0ec357.zip?raw=true

Can we just drop those two div elements entirely? We also already say the stream name lower down.

rebased onto 80b041afc4641c02be86019b98dced15505791e1

Can we just drop those two div elements entirely? We also already say the stream name lower down.

SGTM, fixed. Was initially thinking to keep them so we display the architecture, but that's evident in the URLs that they're x86_64. The page looks neater without the divs.

Only once we start adding other architectures, we should display the architecture somewhere.

BTW, the latest stream metadata in https://github.com/coreos/fedora-coreos-streams/pull/2 should allow you to see what a real AMI and AWS VMDK would look like.

Anyway, LGTM! Really nice work on this, @rfairley! :tada:

BTW, the latest stream metadata in https://github.com/coreos/fedora-coreos-streams/pull/2 should allow you to see what a real AMI and AWS VMDK would look like.

They are updated at https://builds.coreos.fedoraproject.org/streams/testing.json and this PR is using that link. Website looked fine to me locally with AMI details.

I'm going to merge this in, let's make additional changes in new PRs :)

Pull-Request has been merged by codeblock

BTW, the latest stream metadata in https://github.com/coreos/fedora-coreos-streams/pull/2 should allow you to see what a real AMI and AWS VMDK would look like.

They are updated at https://builds.coreos.fedoraproject.org/streams/testing.json and this PR is using that link. Website looked fine to me locally with AMI details.

@jlebon, @sinnykumari, :+1: - noticed the 30.20190715.1 got in at the streams URL. Nice!

I just uploaded a screenshot of the page with the AWS AMIs and VMDK in case anyone wants to see: https://github.com/rfairley/fedora-website/blob/rfairley-rendered-html/Screenshot_2019-07-16%20Get%20Fedora(1).png

@codeblock :+1:, thanks!

@rfairley Merged, but I just realized the signature links don't work. Is that something that will fix itself as part of the release, or do those need to be changed?

Just one more suggestion: can we drop the laptop picture? I'm guessing that was cloned from the workstation download page, but it doesn't really apply for FCOS.

@codeblock those should fix themselves - work is underway to sign the artifacts, then the signatures should be available. @jlebon, would the signatures be uploaded for the 30.20190715.1 release once signed?

Is that something that will fix itself as part of the release, or do those need to be changed?

Yeah, it will be fixed as part of the release.

@jlebon, would the signatures be uploaded for the 30.20190715.1 release once signed?

Correct. (Though it'll be 30.20190716.0).

Just one more suggestion: can we drop the laptop picture? I'm guessing that was cloned from the workstation download page, but it doesn't really apply for FCOS.

Agreed - opened: https://pagure.io/fedora-web/websites/pull-request/40

Metadata