Skip to content

reorganizing docs navigation for 2.2.0 and 2.2.1 #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/registry-viewer/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const footerNavigation: FooterNavigation = {
{ name: 'Cloud Native Computing Foundation', href: 'https://www.cncf.io' },
{ name: 'Registry', href: '/' },
{ name: 'Documentation', href: `https://devfile.io/docs/${defaultVersion}/what-is-a-devfile` },
{ name: 'Community', href: `https://devfile.io/docs/${defaultVersion}/community` },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

],
social: [
{
Expand Down
12 changes: 6 additions & 6 deletions libs/docs/src/docs/2.2.0/adding-a-container-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ configuration of a container in a workspace using the `container` component type
`infinity` argument depend on the base image used in the particular
images.

All tools will respect the specified `command`. When `command`
is not defined, the container will use the default from the
image specified. When `command` is defined, it will override
the one present in the image as intended. Either the
`command` defined by the image or by the container component
within the devfile must be non-terminating, such as the case
All tools will respect the specified `command`. When `command`
is not defined, the container will use the default from the
image specified. When `command` is defined, it will override
the one present in the image as intended. Either the
`command` defined by the image or by the container component
within the devfile must be non-terminating, such as the case
of setting `command` to `sleep` with the `infinity` argument.

```yaml {% filename="devfile.yaml" %}
Expand Down
35 changes: 35 additions & 0 deletions libs/docs/src/docs/2.2.0/authoring-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Overview
description: Authoring devfile - Overview
---

## Creating a minimal devfile

The `schemaVersion` attribute is mandatory in a devfile.

### Procedure

- Define the `schemaVersion` attribute in the devfile and specify a static name for the workspace with the `name` attribute.

```yaml {% title="Minimal devfile with schema version and name" filename="devfile.yaml" %}
schemaVersion: <version>
metadata:
name: devfile-sample
version: 0.0.1
```

## Adding to a minimal devfile

See the following documents to help you add to the minimal devfile to suit your development needs:

- [Adding projects](./adding-projects)

- [Adding components](./adding-components)

- [Adding commands](./adding-commands)

- [Defining variables](./defining-variables)

- [Defining attributes](./defining-attributes)

- [Referring to a parent devfile in a devfile](./referring-to-a-parent-devfile)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Creating devfiles with templates
description: Creating devfiles with templates
title: Creating devfiles
description: Creating devfiles
---

Most dev tools can utilize the devfile registry to
Expand All @@ -25,10 +25,10 @@ building sample templates for common use cases.
- `metadata` is optional but it is recommended to have in your
templates
```yaml {% title="Minimal Devfile" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
```
```yaml {% title="Minimal Devfile with Metadata" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
metadata:
name: devfile-sample
version: 2.0.0
Expand All @@ -46,7 +46,7 @@ building sample templates for common use cases.
the template
- For improved readability on devfile registries, set `displayName` to the title that will be the display text for this template and `icon` to tie a stack icon to the template:
```yaml
schemaVersion: 2.2.0
schemaVersion: <version>
metadata:
name: web-service
version: 1.0.0
Expand Down Expand Up @@ -131,7 +131,7 @@ building sample templates for common use cases.
```
5. Completing the content, the complete devfile should look like the following:
```yaml {% title="Complete Web Service Template" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
metadata:
name: web-service
version: 1.0.0
Expand Down
6 changes: 3 additions & 3 deletions libs/docs/src/docs/2.2.0/defining-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ Attributes can be defined at the top level of the devfile, or in the following o
----
```

2. Define a custom attribute in the `metadata` object.
2. Define a custom attribute at the devfile level.

When no editor is specified, a default editor is provided. To represent this user-defined example, use the `editorFree` attribute as shown in the following example:

```yaml {% title="A devfile without an editor" %}
----
schemaVersion: 2.2.0
attributes:
editorFree: true
metadata:
name: petclinic-dev-environment
attributes:
editorFree: true
components:
- name: myapp
kubernetes:
Expand Down
6 changes: 3 additions & 3 deletions libs/docs/src/docs/2.2.0/innerloop-vs-outerloop.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In a devfile spec, there are two scopes of deployment: innerloop and outerloop.
- This example will use `nodejs-18` UBI image

```yaml
schemaVersion: 2.2.0
schemaVersion: <version>
metadata:
name: nodejs
components:
Expand Down Expand Up @@ -119,7 +119,7 @@ In a devfile spec, there are two scopes of deployment: innerloop and outerloop.
```

```yaml {% title="Final innerloop devfile" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
metadata:
name: nodejs
components:
Expand Down Expand Up @@ -255,7 +255,7 @@ The component and commands here allow the developer to build, run, debug, and te
```

```yaml {% title="Final outerloop devfile" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
metadata:
name: nodejs
components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This attribute can be defined at the component level.
### Procedure
1. Specify "container-overrides" at the component level.
```yaml {% title="Specify container-overrides to override security context for container at component level" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
components:
- name: maven
attributes:
Expand Down Expand Up @@ -43,7 +43,7 @@ This attribute can be defined at the component and devfile attributes levels. If
### Procedure
1. Specify "pod-overrides" at the component level.
```yaml {% title="Specify pod-overrides to override security context for container at component level" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
components:
- name: maven
attributes:
Expand All @@ -56,7 +56,7 @@ This attribute can be defined at the component and devfile attributes levels. If

2. Specify "pod-overrides" at the devfile attributes level. It will be defined as a top-level attribute.
```yaml {% title="Specify pod-overrides to override resources for container at the devfile level" filename="devfile.yaml" %}
schemaVersion: 2.2.0
schemaVersion: <version>
attributes:
pod-overrides:
spec:
Expand Down
2 changes: 1 addition & 1 deletion libs/docs/src/docs/2.2.0/packaging-devfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Packaging devfile

## Creating a devfile

To create a devfile, you can [start from scratch](./create-devfiles-with-templates) or use the [public community devfile registry](https://registry.devfile.io/viewer) to find predefined stacks for popular languages and frameworks. Once you have a devfile, save it as `.devfile.yaml` to your application’s root directory.
To create a devfile, you can [start from scratch](./create-devfiles) or use the [public community devfile registry](https://registry.devfile.io/viewer) to find predefined stacks for popular languages and frameworks. Once you have a devfile, save it as `.devfile.yaml` to your application’s root directory.

## Resources to include with your devfile

Expand Down
35 changes: 35 additions & 0 deletions libs/docs/src/docs/2.2.1-alpha/authoring-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Overview
description: Authoring devfile - Overview
---

## Creating a minimal devfile

The `schemaVersion` attribute is mandatory in a devfile.

### Procedure

- Define the `schemaVersion` attribute in the devfile and specify a static name for the workspace with the `name` attribute.

```yaml {% title="Minimal devfile with schema version and name" filename="devfile.yaml" %}
schemaVersion: <version>
metadata:
name: devfile-sample
version: 0.0.1
```

## Adding to a minimal devfile

See the following documents to help you add to the minimal devfile to suit your development needs:

- [Adding projects](./adding-projects)

- [Adding components](./adding-components)

- [Adding commands](./adding-commands)

- [Defining variables](./defining-variables)

- [Defining attributes](./defining-attributes)

- [Referring to a parent devfile in a devfile](./referring-to-a-parent-devfile)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Creating devfiles with templates
description: Creating devfiles with templates
title: Creating devfiles
description: Creating devfiles
---

Most dev tools can utilize the devfile registry to
Expand All @@ -25,10 +25,10 @@ building sample templates for common use cases.
- `metadata` is optional but it is recommended to have in your
templates
```yaml {% title="Minimal Devfile" filename="devfile.yaml" %}
schemaVersion: 2.2.1
schemaVersion: <version>
```
```yaml {% title="Minimal Devfile with Metadata" filename="devfile.yaml" %}
schemaVersion: 2.2.1
schemaVersion: <version>
metadata:
name: devfile-sample
version: 2.0.0
Expand All @@ -46,7 +46,7 @@ building sample templates for common use cases.
the template
- For improved readability on devfile registries, set `displayName` to the title that will be the display text for this template and `icon` to tie a stack icon to the template:
```yaml
schemaVersion: 2.2.1
schemaVersion: <version>
metadata:
name: web-service
version: 1.0.0
Expand Down Expand Up @@ -131,7 +131,7 @@ building sample templates for common use cases.
```
5. Completing the content, the complete devfile should look like the following:
```yaml {% title="Complete Web Service Template" filename="devfile.yaml" %}
schemaVersion: 2.2.1
schemaVersion: <version>
metadata:
name: web-service
version: 1.0.0
Expand Down
6 changes: 3 additions & 3 deletions libs/docs/src/docs/2.2.1-alpha/innerloop-vs-outerloop.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In a devfile spec, there are two scopes of deployment: innerloop and outerloop.
- This example will use `nodejs-18` UBI image

```yaml
schemaVersion: 2.2.1-alpha
schemaVersion: <version>
metadata:
name: nodejs
components:
Expand Down Expand Up @@ -119,7 +119,7 @@ In a devfile spec, there are two scopes of deployment: innerloop and outerloop.
```

```yaml {% title="Final innerloop devfile" filename="devfile.yaml" %}
schemaVersion: 2.2.1-alpha
schemaVersion: <version>
metadata:
name: nodejs
components:
Expand Down Expand Up @@ -255,7 +255,7 @@ The component and commands here allow the developer to build, run, debug, and te
```

```yaml {% title="Final outerloop devfile" filename="devfile.yaml" %}
schemaVersion: 2.2.1-alpha
schemaVersion: <version>
metadata:
name: nodejs
components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This attribute can be defined at the component level.
### Procedure
1. Specify "container-overrides" at the component level.
```yaml {% title="Specify container-overrides to override security context for container at component level" filename="devfile.yaml" %}
schemaVersion: 2.2.1
schemaVersion: <version>
components:
- name: maven
attributes:
Expand Down Expand Up @@ -43,7 +43,7 @@ This attribute can be defined at the component and devfile attributes levels. If
### Procedure
1. Specify "pod-overrides" at the component level.
```yaml {% title="Specify pod-overrides to override security context for container at component level" filename="devfile.yaml" %}
schemaVersion: 2.2.1
schemaVersion: <version>
components:
- name: maven
attributes:
Expand All @@ -56,7 +56,7 @@ This attribute can be defined at the component and devfile attributes levels. If

2. Specify "pod-overrides" at the devfile attributes level. It will be defined as a top-level attribute.
```yaml {% title="Specify pod-overrides to override resources for container at the devfile level" filename="devfile.yaml" %}
schemaVersion: 2.2.1
schemaVersion: <version>
attributes:
pod-overrides:
spec:
Expand Down
2 changes: 1 addition & 1 deletion libs/docs/src/docs/2.2.1-alpha/packaging-devfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Packaging devfile

## Creating a devfile

To create a devfile, you can [start from scratch](./create-devfiles-with-templates) or use the [public community devfile registry](https://registry.devfile.io/viewer) to find predefined stacks for popular languages and frameworks. Once you have a devfile, save it as `.devfile.yaml` to your application’s root directory.
To create a devfile, you can [start from scratch](./create-devfiles) or use the [public community devfile registry](https://registry.devfile.io/viewer) to find predefined stacks for popular languages and frameworks. Once you have a devfile, save it as `.devfile.yaml` to your application’s root directory.

## Resources to include with your devfile

Expand Down
9 changes: 9 additions & 0 deletions libs/docs/src/docs/no-version/benefits-of-devfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Benefits of devfile
description: Benefits of devfile
---

## Why devfiles?

With devfiles, you can make workspaces composed of multiple containers.
In these containers, you can create any number of identical workspaces
from the same devfile. If you create multiple workspaces, you can share
Expand All @@ -28,6 +30,13 @@ Devfiles have the following benefits:

- Produce consistent build and run behaviors

## Who is devfile for?

- [Application developers](./application-developer)
- [Enterprise architects and runtime providers](./enterprise-architect-and-runtime-provider)
- [Registry administrators](./registry-administrator)
- [Technology and tool builders](./technology-and-tool-builders)

## Additional resources

To ask questions, view open issues, raise concerns, or communicate
Expand Down
5 changes: 5 additions & 0 deletions libs/docs/src/docs/no-version/developing-with-devfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ title: Developing with devfiles
description: Developing with devfiles
---

A devfile is a `yaml` file. After you include it in your local
environment, the devfile provides ways to automate your processes. Tools
like `odo` run the devfile and apply its guidelines to your environment.
You can configure the devfile based on your unique development needs.

To get a better understanding of what devfiles can help build, take a look at a few tools that currently support devfile.

## Quick start guides
Expand Down
Loading