Giter Club home page Giter Club logo

website's Introduction

fluxcd.io

Netlify Status

This repo houses the assets used to build the Flux project's landing page at https://fluxcd.io.

Note: The sources for some of Flux's documentation are housed in other repositories within https://github.com/fluxcd. Documentation issues and pull requests should be made against those repos.

Project Docs Site GitHub Source
Flux https://fluxcd.io/flux https://github.com/fluxcd/website
Flagger https://fluxcd.io/flagger https://github.com/fluxcd/website

How to modify this website

The main landing page of this website can be modified in hugo.yaml.

Almost all of the content lives in the content/en/<project> directories. Here are some special cases.

  • ./content/en/blog contains all blog posts - make sure you update the front-matter for posts to show up correctly.
  • ./external-sources/ defines how files from other repositories are pulled in. We currently do this for Markdown files from the /fluxcd/community and /fluxcd/.github repositories. (make gen-content pulls these in.)
  • Flux CLI docs (cmd) and components docs: under ./content/en/flux but pulled in through in make gen-content as well.
  • /static/_redirects defines redirects on https://fluxcd.io. Check out https://docs.netlify.com/routing/redirects/ for the syntax definition and how to test if things work.

Running the site locally

In order to run the Flux site locally, you need to install:

  • Node.js
  • The Hugo static site generator. Make sure to install the "extended" variant of Hugo with support for the Hugo Pipes feature and to check the netlify.toml configuration file for which version of Hugo you should install.
  • jq

Once those tools are installed, fetch the assets necessary to run the site:

Then run the site in "server" mode:

make serve

Navigate to http://localhost:1313 to see the site running in your browser. As you make updates to the site, the browser will immediately update to reflect those changes.

Note: Sometimes you need to clear the output of previous builds, e.g. when the structure of imported documentation has changed. If you see duplicate pages being served, run

git clean -fx -- content/

and then run make serve again. The duplicates will then be gone.

Publishing the site

The Flux website is published automatically by Netlify when changes are pushed to the main branch. The site does not need to be published manually.

Preview builds

When you submit a pull request to this repository, Netlify builds a "deploy preview" of your changes. You can see that preview by clicking on the Details link of the netlify/fluxcd/deploy-preview check at the bottom of the pull request page.

Local Development (docker)

Run make docker-preview and wait until the following output appears:

Environment: "development"
Serving pages from memory
Web Server is available at //localhost:1313/ (bind address 0.0.0.0)
Press Ctrl+C to stop

Visit http://localhost:1313, where any changes will be visible from inside of the running container. Markdown files updated in content/ should trigger a browser refresh as they are saved.

The docker-preview target builds the theme, which takes a while and doesn't need to be repeated unless you are making changes to the theme. On subsequent runs, running make docker-serve instead will skip building the theme.

This depends on the Docker image fluxcd/website:hugo-support which should be kept updated when the website's build-time dependencies have changed; this image contains everything needed to run the docs locally.

If this doesn't work, the image may be stale. The instructions to update it are below.

Remote Development (kubernetes / okteto CLI)

This works the same as local development above, but with the Okteto CLI you do not need to run a Linux machine or virtual machine on your local development environment.

First, make sure you are permitted to deploy pods on any local or remote Kubernetes cluster. Download the Okteto CLI for Windows, Mac, or Linux.

Okteto CLI is a light-weight client-side tool that replaces Docker with a remote cluster. You can run hugo server remotely in this way; any changes to the local clone are synchronized to the cluster. The experience is basically the same as local development, (except that you won't need to install Docker.)

Instead of make docker-serve, type okteto up.

You can change the behavior in okteto.yml according to the Okteto Manifest Reference, for example adding a persistent volume can speed up the synchronization of the working directory files to the remote pod on repeated runs.

Updating the Development/preview container image

(For maintainers) Using a machine with docker and logged in with an account that has permission to push to docker.io/fluxcd/website repo, run make docker-push.

The dependencies of docker-push are explained below. If the above worked then you are done, and should not need to read any further. Rebuilding hugo takes a long time and should be avoided when the version hasn't changed or it isn't needed; run make docker-push-support instead to skip building hugo.

Update the docker-support image tag whenever build-time (or "serve"-time) dependencies have changed.

How is the Development container made?

These targets as explained below are run in the appropriate order as dependencies of make docker-push.

  • TODO: add a system/integration test for website that verifies any changes have not broken make docker-serve, for example by adding new dependencies without mentioning them in the ./Dockerfile.
Flux-specific Dependencies

The Flux website has some build-time dependencies including Python3, PyYAML, rsync, grep, nodejs, npm, curl, jq, (and potentially others that may be added in the future.) Flux-specific dependencies are prepared in an image that gets tagged as docker.io/fluxcd/website:hugo-support.

This image is built from the Dockerfile in ./; run make docker-build-support to rebuild it locally, (or run as make docker-push-support to build and also push.)

gohugoio/hugo

The Flux website also depends on a specific version of Hugo, which unfortunately does not provide docker images for each version. So we build it from source, with the HUGO_BUILD_TAGS=extended build arg enabled.

Run make docker-push-hugo to build and also push this image target.

This will run make hugo to get a shallow clone of the gohugoio/hugo repository at the right HUGO_VERSION and make docker-build-hugo to build a hugo container base image. (This target compiles golibsass which is very large, and may take a while.)

These are all the dependencies of make docker-push.

website's People

Contributors

alisondy avatar arhell avatar aryan9600 avatar bbodenmiller avatar chanwit avatar darkowlzz avatar dependabot[bot] avatar developer-guy avatar dholbach avatar favourdaniel avatar frederik-baetens avatar h20220025 avatar hiddeco avatar juozasg avatar kingdonb avatar lloydchang avatar lucperkins avatar makkes avatar mewzherder avatar relu avatar santosh1176 avatar scottrigby avatar somtochiama avatar souleb avatar squaremo avatar staceypotter avatar stefanprodan avatar thisisobate avatar timonbimon avatar vanessaabankwah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Mention GitOps Toolkit

It'd be good to point out that we are working on the GitOps Toolkit, a broader and more modular approach to GitOps and "flux v2" which will be composed from the GOTK. We might want to link to an announcement, a presentation, to toolkit.fluxcd.io and a get started doc.

Maybe also mention that "flux v1" is in maintenance mode now.

QA new site

Before we merge #110 we should at the very least

  • check all pages from toolkit.fluxcd.io are successfully moved over
  • run a link checker over the entire site

Interviews with Flux 2 production users

Invite Flux 2 end users to an interview style discussion about their GitOps journey, which could then be edited and made available publicly.

Selected interviews could be made available on the Flux blog, or linked somewhere on the website.

Remove duplicate titles for imported docs

hack/import-flux2-docs.sh adds frontmatter for both imported markdown and html docs.

Now it should remove the title after having added frontmatter title entry. A good example for this now is /docs/components/source/gitrepositories/.

Unclutter notifications area

From #81:

The "notification area" is getting very crowded now. Let's figure out a way to have a news section that sources bits from somewhere else and takes up more clearly defined space, e.g. 3 stickied bits of info (like flagger-move, maintenance mode) plus the last 3 blogs posts...?

[docs] Figure out "edit this page" logic

E.g. click on it and it takes you straight to GitHub.

Theoretically this is easy to do, but some docs come from f/flux2, so this will be a little more complicated to do.

Requires old hugo version

[daniel@reef fluxcd.io ]$ git grep -i hugo netlify.toml
netlify.toml:HUGO_VERSION = "0.55.6"
[daniel@reef fluxcd.io ]$ 

Using recent hugo

[daniel@reef fluxcd.io ]$ hugo version
Hugo Static Site Generator v0.75.1/extended linux/amd64 BuildDate: 2020-09-15T14:28:18Z
[daniel@reef fluxcd.io ]$ hugo server 
port 1313 already in use, attempting to use an available port
Start building sites … 
Built in 13 ms
Error: Error building site: TOCSS: failed to transform "sass/style.sass" (text/x-sass): SCSS processing failed: file "stdin", line 10, col 9: malformed URL 
[daniel@reef fluxcd.io ]$ 

Using an older version of hugo

[daniel@reef fluxcd.io ]$ ./hugo version
Hugo Static Site Generator v0.57.0-9B00E647/extended linux/amd64 BuildDate: 2019-08-14T08:12:12Z
[daniel@reef fluxcd.io ]$ ./hugo server 
port 1313 already in use, attempting to use an available port

                   | EN  
+------------------+----+
  Pages            |  3  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  8  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 169 ms
Watching for changes in /home/daniel/dev/fluxcd.io/{assets,content,layouts,static}
Watching for config changes in /home/daniel/dev/fluxcd.io/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:38783/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Organize docs according to use cases (persona?)

Update for current needs. See earlier work Scott & Leigh did on high-level personas.

Separate issues/PRs should link to this umbrella issue. Examples:

  • Helm users @scottrigby
    • intro page fluxcd/flux2#1255
    • how to get started
    • Helm migration intro page (this is linked from use case intro page)
    • 1 or 2 repos (could maybe add use cases from Kingdon and Scott's kubecon talk)
    • how to contribute to helm controller
  • Kustomize users
  • Azure users @stealthybox fluxcd/flux2#1064
    • Ask AKS/MS Arc folks at microsoft to look at this?
  • Open Shift users @chanwit
    • Flux Operator for Open Shift as well
  • Jenkins users @kingdonb
  • Terraform users @stealthybox
    • Flux installation method (there is a google cloud example added to terraform provider repo) @scottrigby
    • A Terraform reconciler controller idea
  • Vault users @scottrigby & @kingdonb
  • Jsonnet users
  • Windows users

Fix timetable doc on new site

@scottrigby says

  1. The ^^ were there really just to underline the short headers, as an easy way to reference the status of each (Flux 1, Flux 2 CLI, GOTK) at each milestone. Is it possible to underline those, or in some other way make them stand out from any bullets below?
  2. Can the table content be top-justified for readability?
  3. In mkdocs I was able to style these table columns to explicit percent widths: 4%, 32, 32, 32. Is that possible here too? See https://github.com/fluxcd/flux2/blob/main/docs/_static/custom.css#L119-L122

This is re: #110

Restructure docs around how-to, reference, tutorials, and explanation

Aside from the command-line reference, most of the documentation is under "Guides", and this is in danger of becoming a miscellaneous (and therefore not very helpful) classification. To give visitors a better chance of finding what they need, I suggest following the scheme now described at https://documentation.divio.com/introduction/; that is, to structure documentation around the four categories:

  • how to guides show people how to accomplish a specific, practical task; e.g., how to migrate to the Helm controller
  • reference materials let people look up the details of a command or API, e.g., what the flags are for flux create image
  • tutorials aim to teach an aspect of the system, by giving people a step by step guide; e.g., the source-watcher dev guide
  • explanations discuss a topic related to the system, so people can get a better understanding of it; e.g., "Core Concepts"

This gives a meaningful first dispatch point for docs visitors -- if they have a specific problem to solve, they can look under "how to", if they want to learn more by doing, they can follow a tutorial, and so on.

Automate import of docs

Now that #74 is sorted, we might want to look into automating this. Would it be e.g. possible to have a cron job which runs the hack/gen-content.sh script and create a PR if there's a diff?

Complete landing page on new site

Re: #110

We still have a couple of blocks we want to add to the main page from fluxcd.io - let's see how we can add them to the site using docsy most easily.

Spacing between elements require a slight change

While I was mocking the structure of the homepage, I did not spend much time on padding and/or margin between elements. This is most obvious in the "features" section, where the spacing between icons and/or text is not optimal.

Disable documentation section

Disable docs for now, so we can prep a drop-in replacement for current fluxcd.io.

Maybe also point to

  • toolkit.fluxcd.io
  • docs.fluxcd.io
  • docs.fluxcd.io/projects/helm-operator

so people still find their docs

Support page

Explain what user options are if you need help with Flux projects.

We should point out

  • FAQ/Troubleshooting Docs for individual projects
  • clearly what the limits of community support are
  • how to submit clear information if you really found an issue
  • how to buy enterprise support (this would be open to companies who offer support around Flux and its technologies)

Ensure users know how to contribute edits to each page

Since we draw from different sources, "edit this page" should link to the correct file in the correct repo. Example component CRDs are from the go code in each separate controller, which would be very difficult for new users to find.

Subsume flux2 docs under fluxcd.io/docs

As discussed in fluxcd/flux2#367 we want to move the docs like so:

. Now Future
Docs Website toolkit.fluxcd.io fluxcd.io/docs
User Guides toolkit.fluxcd.io/guides fluxcd.io/docs/flux
Dev Guides toolkit.fluxcd.io/dev-guides fluxcd.io/docs/gitops-toolkit

The proposal did not quite discuss what would happen with

Once we have a URL structure figured out for everything we can start implementing. Maybe we do this in 3 stages - first as discussed in the discussion linked above Flux v2 docs only.

Beautify blog section

https://fluxcd.io/blog/ currently looks a bit bleak.

I think it could either

  • show the full last 10 articles or
  • show the 10 last articles and their featured image ... if that can be accomplished easily(?)

Create privacy page

At present we do not have any analytics enabled that require us to comply with GDPR and/or point people towards a privacy statement. It would however still be nice of us to tell people in the interest of transparency.

For this, a privacy page must be created and linked to in the footer. The contents of it could be as short as:

Note that we track visits to this website using Netlify server-side analytics. Because site activity is tracked anonymously without cookies or personally identifying information, Netlify Analytics is fully GDPR compliant.

Change gradient

Gradient of the hero elements should be changed to the one that is currently in use for the menu on https://docs.fluxcd.io, as it is a brighter / more vivid color combination.

background-image: linear-gradient(45deg, rgb(0, 150, 225) 0%, rgb(27, 141, 226) 24%, rgb(42, 125, 227) 53%, rgb(53, 112, 227) 78%, rgb(53, 112, 227) 100%);

We may want to incorporate this color change in the color palette defined in https://github.com/fluxcd/fluxcd.io/blob/next-gen/assets/sass/style.sass#L12-L15

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.