Skip to content

Commit a3f60fc

Browse files
Pablo Panerozzacharo
andcommitted
deployment: fixes on images and registry from review
Co-authored-by: Zacharias Zacharodimos <[email protected]>
1 parent a09c81a commit a3f60fc

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

docs/deployment/image.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ docker build -t demo-inveniordm /path/to/your/instance --build-arg include_asset
1111

1212
**Why is the `include_assets` flag needed**
1313

14-
When running InvenioRDM in local (`invenio-cli run`) you are running the uWSGI server in your own machine. On the other hand, when running `invenio-cli containerize` you are building the docker image. Then you are runing it in your machine along the other containers. Nonetheless, the statics are built in a different fashion. However, when deploying somewhere else they are needed.
14+
When running InvenioRDM in local (`invenio-cli run`), you are running the uWSGI server on your own machine where you have built the statics. On the other hand, when running `invenio-cli containerize` you are building the docker image and then running it along the other containers. There, `invenio-cli` takes care of building the statics in the mounted volume for you. However, when building the image on your own (e.g. deploying somewhere else), you need to take care of the statics yourself.
1515

16-
This is the case when deploying in OpenShift. To solve this problem the charts define a share volume mounted on the Nginx and the Web containers.
16+
This is the case when deploying in OpenShift. To solve this problem the chart defines a shared volume mounted on the Nginx and the Web containers.
1717

1818
When a volume is mounted it overwrites the contents of the folder (i.e. it will delete the assets). Therefore, we make use of an `initContainer` to mount the volume in a temporary location and copy to the volume the assets. This way when the volume is mounted into Nginx and Web containers it already has the assets. Being the end result that `/static` files can be served directly by Nginx.

docs/deployment/registries.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ To store your image in GitHub you will need a repository. You can use your insta
1717
*https://github/yourusername/rdmrepo*. In addition, you will need to [create an access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). This access token must have
1818
`read:packages` and `write:packages` scopes.
1919

20-
The first step is to login in GitHub's docker registry:
20+
The first step is to log in to GitHub's docker registry:
2121

2222
``` console
2323
$ docker login docker.pkg.github.com -u <YOU_GITHUB_USERNAME> -p <YOUR_GITHUB_TOKEN>
2424
```
2525

26-
Then find your docker image and tag it you the url of your GitHub registry:
26+
Then, find your docker image and tag it with the url of your GitHub registry:
2727

2828
```
2929
$ docker images
@@ -45,7 +45,7 @@ demo-inveniordm latest
4545
docker.pkg.github.com/yourusername/rdmrepo/rdmimage:latest latest 9b6dd5ae6b48 17 hours ago 2.33GB
4646
```
4747

48-
The last step is to push your package to the github registry:
48+
The last step is to push your package to the GitHub registry:
4949

5050
``` console
5151
docker push docker.pkg.github.com/yourusername/rdmrepo/rdmimage:latest
@@ -54,7 +54,11 @@ docker push docker.pkg.github.com/yourusername/rdmrepo/rdmimage:latest
5454
In order to use this image, you must set the following value in your `values.yaml` file (for both `web` and `worker`):
5555

5656
```
57-
image: docker.pkg.github.com/yourusername/rdmrepo/rdmimage:latest
57+
web:
58+
image: docker.pkg.github.com/yourusername/rdmrepo/rdmimage:latest
59+
60+
worker:
61+
image: docker.pkg.github.com/yourusername/rdmrepo/rdmimage:latest
5862
```
5963

6064
Even if your project and/or image is public, GitHub requires you to be authenticated in order to pull your image.
@@ -71,7 +75,7 @@ $ oc secrets link default <SECRET_NAME> --for=pull \
7175

7276
## OpenShift
7377

74-
First you need to login in your OpenShift cluster and its image registry:
78+
First you need to log in to your OpenShift cluster and its image registry:
7579

7680
``` console
7781
$ docker login -u openshift -p $(oc whoami -t) <registry_ip>:<port>
@@ -80,7 +84,7 @@ $ oc project
8084
Using project "inveniordm" on server "<registry_ip>:<port>".
8185
```
8286

83-
Then find your docker image and tag it you the url of your OpenShift registry:
87+
Then, find your docker image and tag it with the url of your OpenShift registry:
8488

8589
``` console
8690
$ docker images
@@ -91,7 +95,7 @@ $ docker tag demo-inveniordm <registry_ip>:<port>/inveniordm/demo-inveniordm:lat
9195
```
9296

9397
!!! info "Project name"
94-
Note that `inveniordm` is the name of the OpenShift project we are using. It's value should be the one returned
98+
Note that `inveniordm` is the name of the OpenShift project we are using. Its value should be the one returned
9599
by the `oc project` command. Therefore the tag is: ``<registry_ip>:<port>/<project_name>/<name_of_your_image>:<version>``
96100

97101
Check that it was tagged correctly:
@@ -112,5 +116,9 @@ $ docker push <registry_ip>:<port>/inveniordm/demo-inveniordm:latest
112116
In order to use this image, you must set the following value in your `values.yaml` file (for both `web` and `worker`):
113117

114118
``` console
115-
image: <registry_ip>:<port>/inveniordm/demo-inveniordm:rdm
119+
web:
120+
image: <registry_ip>:<port>/inveniordm/demo-inveniordm:rdm
121+
122+
worker:
123+
image: <registry_ip>:<port>/inveniordm/demo-inveniordm:rdm
116124
```

0 commit comments

Comments
 (0)