Skip to content

Commit caac377

Browse files
DevTools Week 09/22: Docs Update - Devfile Registry (#36)
* building-a-custom-devfile-registry.md doc revisions: - golang version updated - air gap environment manual added as additional resource Signed-off-by: Michael Valdron <mvaldron@redhat.com> * creating-a-devfile-stack.md doc revision: Step 2 expanded. Signed-off-by: Michael Valdron <mvaldron@redhat.com> * deploying-a-devfile-registry.md doc revision: Deploying the devfile registry on Kubernetes cluster formatting fixed. Signed-off-by: Michael Valdron <mvaldron@redhat.com> * installation-of-in-cluster-offline-devfile-registry.md doc revisions: - Modify devfile verification step heading fixed - Colon at the end of modify devfile overview paragraph replace with period Signed-off-by: Michael Valdron <mvaldron@redhat.com> * adding-a-registry-schema.md revisions: example headers fixed. Signed-off-by: Michael Valdron <mvaldron@redhat.com> * golang versions revised. Signed-off-by: Michael Valdron <mvaldron@redhat.com> * revised Dockerfile under building custom registry guide. Signed-off-by: Michael Valdron <mvaldron@redhat.com> * replace outdated doc link tags with standard markdown links. Signed-off-by: Michael Valdron <mvaldron@redhat.com> --------- Signed-off-by: Michael Valdron <mvaldron@redhat.com>
1 parent 9cf1cd6 commit caac377

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

libs/docs/src/docs/no-version/adding-a-registry-schema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ To add samples and stacks from other repositories, place the
9494
- The architectures associated to the stack version.
9595
{% /table %}
9696

97-
```yaml {% title="extraDevfileEntries.yaml sample" filename="devfile.yaml" %}
97+
```yaml {% title="extraDevfileEntries.yaml sample" filename="extraDevfileEntries.yaml" %}
9898
schemaVersion: <version>
9999
samples:
100100
- name: nodejs-basic
@@ -261,7 +261,7 @@ information such as name, language, and resources.
261261
- The project templates that can be used in a devfile.
262262
{% /table %}
263263

264-
```json {% title="Index.json sample" %}
264+
```json {% title="Index.json sample" filename="index.json" %}
265265
[
266266
{
267267
"name": "go",

libs/docs/src/docs/no-version/building-a-custom-devfile-registry.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ your cloud or cluster to form the devfile registry.
6161

6262
### Prerequisites
6363

64-
- Golang 1.13.x or higher
64+
- Golang 1.18.x or higher
6565

6666
- Docker 17.05 or higher
6767

@@ -77,14 +77,19 @@ your cloud or cluster to form the devfile registry.
7777
following:
7878

7979
```docker {% filename="Dockerfile" %}
80-
FROM quay.io/openshift-pipeline/golang:1.15-alpine AS builder
81-
# Install dependencies
82-
RUN apk add --no-cache git bash
80+
FROM registry.access.redhat.com/ubi8/go-toolset:1.18 AS builder
81+
# Run tasks as root
82+
USER root
83+
# Install yq
84+
RUN curl -sL -O https://github.com/mikefarah/yq/releases/download/v4.9.5/yq_linux_amd64 -o /usr/local/bin/yq && mv ./yq_linux_amd64 /usr/local/bin/yq && chmod +x /usr/local/bin/yq
85+
# Copy registry contents
8386
COPY . /registry
8487
# Download the registry build tools
8588
RUN git clone https://github.com/devfile/registry-support.git /registry-support
8689
# Run the registry build tools
8790
RUN /registry-support/build-tools/build.sh /registry /build
91+
# Reset user as non-root
92+
USER 1001
8893
FROM quay.io/devfile/devfile-index-base:next
8994
COPY --from=builder /build/index.json /index.json
9095
COPY --from=builder /build/stacks /stacks
@@ -147,3 +152,4 @@ build, run, and deploy your application.
147152
### Additional resources
148153
149154
- For information on deploying the devfile index container image, see [deploying a devfile registry](./deploying-a-devfile-registry).
155+
- For information on deploying to air-gapped environment, see [installation of in-cluster offline devfile registry](./installation-of-in-cluster-offline-devfile-registry).

libs/docs/src/docs/no-version/creating-a-devfile-stack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ various projects.
1212
1. Create a fork of the [devfile-registry repo](https://github.com/devfile/registry), clone
1313
your fork locally and go to its directory.
1414

15-
2. Create a stack folder with a name that matches the stack name. For
15+
2. Within the stacks directory `registry/stacks/`, create a stack folder with a name that matches the stack name. For
1616
example, `tutorial-stack/`.
1717

1818
3. Create version directories for storing different stack versions.

libs/docs/src/docs/no-version/deploying-a-devfile-registry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ devfile registry.
6969
name: devfile-registry
7070
spec:
7171
devfileIndexImage: quay.io/devfile/devfile-index:next
72-
tls:
73-
enabled: false
72+
tls:
73+
enabled: false
7474
k8s:
75-
ingressDomain: $INGRESS_DOMAIN
75+
ingressDomain: $INGRESS_DOMAIN
7676
EOF
7777
```
7878

libs/docs/src/docs/no-version/installation-of-in-cluster-offline-devfile-registry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The main goal of this stage is:
2929

3030
### Prerequisites
3131

32-
- Golang 1.17.x or higher
32+
- Golang 1.18.x or higher
3333

3434
- Docker 17.05 or higher or Podman 4.0.x or higher
3535

@@ -126,7 +126,7 @@ suffix `-offline` to be pulled into the registry.
126126
Change the devfile so you can update references to those offline
127127
resources as part of the registry build. For all the items pulled into
128128
the registry, update the corresponding devfile entries to reference the
129-
resources within the offline version in the registry:
129+
resources within the offline version in the registry.
130130
131131
{% callout title="Note!" %}
132132
- All location references to `starterProjects` will change to local
@@ -162,7 +162,7 @@ resources within the offline version in the registry:
162162
under the stack root directory
163163
(`<registry_root>/stacks/<stack>/`).
164164
165-
### Verification step
165+
#### Verification step
166166
167167
To confirm you modified your devfile, verify your altered starter
168168
project definition is similar to the following example:

0 commit comments

Comments
 (0)