Skip to content

Commit 2ef1a69

Browse files
authored
updating offline registry installation (#92)
Signed-off-by: Michael Hoang <[email protected]>
1 parent 2199abc commit 2ef1a69

File tree

1 file changed

+2
-78
lines changed

1 file changed

+2
-78
lines changed

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

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ The main goal of this stage is:
3535

3636
- Git
3737

38-
- Curl
39-
40-
- Archive Tools (such as `unzip`)
41-
4238
### Create Offline Registry
4339

4440
Download / clone the
@@ -90,37 +86,6 @@ devfile**.
9086
$ podman push <registry_host>:<port>/<project>/nodejs-16:latest
9187
```
9288
93-
### Packaging Starter Projects
94-
95-
To package starter projects you will need to download them manually then
96-
place them under `/stacks/<stack>/<zip>-offline.zip`. Procedure here
97-
will require you to **change the devfile**.
98-
99-
{% callout title="Note!" %}
100-
Starter projects must be packaged under an archive with the
101-
suffix `-offline` to be pulled into the registry.
102-
{% /callout %}
103-
104-
#### Procedure
105-
106-
1. `zip` - Download archive
107-
108-
```shell-session {% title="Example" %}
109-
$ cd /path/to/registry
110-
$ curl -L https://code.quarkus.io/d?e=io.quarkus%3Aquarkus-resteasy&e=io.quarkus%3Aquarkus-micrometer&e=io.quarkus%3Aquarkus-smallrye-health&e=io.quarkus%3Aquarkus-openshift&cn=devfile \
111-
-o stacks/java-quarkus/community-offline.zip
112-
```
113-
114-
2. `git` - Package cloned contents into a directory then archive
115-
116-
```shell-session {% title="Example" %}
117-
$ cd /path/to/registry
118-
$ git clone https://github.com/odo-devfiles/nodejs-ex.git \
119-
stacks/nodejs/nodejs-starter-offline
120-
$ cd stacks/nodejs
121-
$ zip -r nodejs-starter-offline.zip nodejs-starter-offline
122-
```
123-
12489
### Modify Devfile
12590
12691
Change the devfile so you can update references to those offline
@@ -129,51 +94,10 @@ the registry, update the corresponding devfile entries to reference the
12994
resources within the offline version in the registry.
13095
13196
{% callout title="Note!" %}
132-
- All location references to `starterProjects` will change to local
133-
paths relative to the stacks directory.
134-
13597
- Stack component image references will change to use the offline
13698
accessible image repository.
13799
{% /callout %}
138100
139-
#### Procedure
140-
141-
1. Under `starterProjects`, find the starter project definition you
142-
want to make offline.
143-
144-
2. Under the definition for the starter project find either `git` or
145-
`zip`:
146-
147-
```yaml {% title="Before: Starter Project" filename="devfile.yaml" %}
148-
starterProjects:
149-
- name: nodejs-starter
150-
git:
151-
remotes:
152-
origin: https://github.com/odo-devfiles/nodejs-ex.git
153-
```
154-
155-
3. Do one of the following depending on the block type:
156-
157-
- If `git`, replace all of the `git` block with a `zip` block and
158-
add the `location` to be the path to the local file under the
159-
stack root directory (`<registry_root>/stacks/<stack>/`).
160-
161-
- If `zip`, replace the value of `location` to the local file
162-
under the stack root directory
163-
(`<registry_root>/stacks/<stack>/`).
164-
165-
#### Verification step
166-
167-
To confirm you modified your devfile, verify your altered starter
168-
project definition is similar to the following example:
169-
170-
```yaml {% title="After: Starter Project" filename="devfile.yaml" %}
171-
starterProjects:
172-
- name: nodejs-starter
173-
zip:
174-
location: nodejs-starter-offline.zip
175-
```
176-
177101
### Build Registry
178102
179103
#### Procedure
@@ -185,10 +109,10 @@ starterProjects:
185109
$ cd /path/to/registry
186110
```
187111
188-
2. Build the registry image.
112+
2. Build the offline registry image.
189113
190114
```shell-session
191-
$ bash .ci/build.sh
115+
$ bash .ci/build.sh offline
192116
```
193117
194118
### Additional resources

0 commit comments

Comments
 (0)