Skip to content

Commit 7130058

Browse files
committed
cli: document running invenio cmds
closes #85
1 parent f3ca779 commit 7130058

File tree

10 files changed

+75
-28
lines changed

10 files changed

+75
-28
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# docs.reana.io
1+
# inveniordm.docs.cern.ch
22

33
[![Travis Build Status](https://img.shields.io/travis/inveniosoftware/docs-invenio-rdm.svg)](https://travis-ci.org/inveniosoftware/docs-invenio-rdm.svg) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/inveniosoftware/InvenioRDM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![License](https://img.shields.io/github/license/inveniosoftware/InvenioRDM.svg)](https://github.com/inveniosoftware/docs-invenio-rdm/blob/master/LICENSE)
44

@@ -14,4 +14,3 @@ $ pip install -r requirements.txt
1414
$ mkdocs serve
1515
$ firefox http://127.0.0.1:8000
1616
```
17-

docs/deployment/kubernetes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# Kubernetes
1+
# Kubernetes
2+
3+
Coming soon

docs/deployment/openshift.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# OpenShift
2+
3+
Coming soon

docs/develop/customize.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ Building assets...
1919

2020
Passing the `--no-install-js` option, skips re-installation of JS dependencies.
2121

22-
Go to the browser [*https://localhost:5000/*](https://localhost:5000) or refresh the page. And voila! The logo has been changed!
22+
Go to the browser [*https://localhost:5000/*](https://localhost:5000) or refresh the page. And voilà! The logo has been changed!
2323

2424
**WARNING**: If you do not see it changing, check in an incognito window, the browser might have cached the logo.

docs/develop/init.md renamed to docs/develop/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Getting Started
22

33
You are now ready to learn how to create, customize and iterate on your own
4-
InvenioRDM instance. The previous section showed you what is the equivalent of
5-
a deploy compilation when working with a compiled language: it gets you the final
6-
result, but you wouldn't do that when developing.
4+
InvenioRDM instance. In fact, the previous section showed you the last step before
5+
deploying. You wouldn't want to fully containerize your application in the day
6+
to day of developing your instance.
77

88
When working on your InvenioRDM application, you will want to use the commands
99
and the workflow we explain in these pages.

docs/develop/install_locally.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Assigning superuser access to admin role...
7070

7171
**Known issues**:
7272

73-
The Elasticsearch container might crash due to lack of memory. One solution is to increase the maximum allowed allocation per process (See more [here](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/docker.html)). Solving this issue depends on your OS:
73+
The Elasticsearch container might crash due to lack of memory. One solution is to increase the maximum allowed allocation per process (See more [here](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/docker.html)). Solving this issue depends on your OS:
7474

7575
On Linux, add the following to ``/etc/sysctl.conf`` on your local machine (host machine):
7676

docs/develop/run.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ $ curl -k -XGET https://localhost:5000/api/records/?q=doge | python3 -m json.too
153153

154154
Alternatively, you can use the web UI.
155155

156-
Navigate to https://localhost:5000/search . Note that you might need to accept the SSL exception since it's using a test certificate.
156+
Navigate to https://localhost:5000/ . Note that you might need to accept the SSL exception since it's using a test certificate.
157157
And visit the record page for the newly created record. You will see it has no files associated with it. Let's change that!
158158

159159
### Upload a file to a record
@@ -169,9 +169,7 @@ Save it as `snow_doge.jpg` in your current directory. Then upload it to the reco
169169
**WARNING** Change `pv1dx-rwa61` in the URLs below for the recid of your record.
170170

171171
```
172-
$ curl -k -X PUT https://localhost:5000/api/records/pv1dx-rwa61/files/snow_doge.jpg \
173-
-H "Content-Type: application/octet-stream" \
174-
--data-binary @snow_doge.jpg
172+
$ curl -k -X PUT https://localhost:5000/api/records/pv1dx-rwa61/files/snow_doge.jpg -H "Content-Type: application/octet-stream" --data-binary @snow_doge.jpg
175173
```
176174

177175
This file can then be previewed on the record page and even downloaded.

docs/index.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
Welcome to the InvenioRDM project!
44

5-
InvenioRDM is a ready-to-go Research Data Management web application putting
6-
together the Invenio framework so you don't have to.
5+
InvenioRDM is a ready-to-go turn-key Research Data Management repository. It
6+
puts together the Invenio framework so you don't have to.
77

8-
This documentation walks you through installing, developing and deploying
9-
your very own InvenioRDM instance. Follow the below sections in order to get a
10-
full picture of using InvenioRDM or go straight to what you're interested in -
11-
each section is independent.
8+
This documentation walks you through installing, configuring and deploying
9+
your very own InvenioRDM instance. Furthermore, you can customize it for your
10+
need and even add your own extensions! Follow the below sections in order to
11+
get a full picture of using InvenioRDM or go straight to what you're interested
12+
in - each section is independent.
1213

1314

1415
## Install
@@ -19,7 +20,27 @@ allows you to easily install an instance and manage it.
1920

2021
[> Installation Guide](install/index.md)
2122

23+
## Preview
2224

23-
Preview
24-
Develop
25-
Deploy
25+
To quickly get a sense for what InvenioRDM is and can do, you can preview
26+
the default instance after installing `invenio-cli`. Just follow the one page
27+
guide below.
28+
29+
[> Quickly Preview an Instance](preview/index.md)
30+
31+
## Develop
32+
33+
Once you are ready to dive in and work on your own instance - that is,
34+
configure, customize, debug and iterate -, you will want to setup your project
35+
for development. Various commands are at your disposal and we walk you through
36+
the workflow to be effective with them.
37+
38+
[> Getting Started on your Instance](preview/index.md)
39+
40+
## Deploy
41+
42+
Ready to deploy into production? Follow these guides to put a small instance in
43+
production and learn the avenues to take and decisions to make to grow it.
44+
Whether you use Openshift or Kubernetes, we got you covered.
45+
46+
[> Deployment Guides](deployment/openshift.md)

docs/preview/index.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ First, we need to create the project - the necessary files and folders for your
1313
The CLI will require the following data:
1414

1515
- **Project name**: Title of your project with space allowed (project name for humans)
16-
- **Project short name**: Hyphenated and lowercased title or (project name for machines)
16+
- **Project short name**: Hyphenated and lowercased title (project name for machines)
1717
- **Project website**: URL where the project will be deployed
1818
- **Github repository**: Repository in format `<owner>/<code repository>`
1919
- **Description**: Short description of project
@@ -68,17 +68,20 @@ $ ls -la february-release
6868
total 56
6969
drwxr-xr-x 5 youruser youruser 4096 Feb 19 13:45 ./
7070
drwxr-xr-x 5 youruser youruser 4096 Feb 19 13:45 ../
71+
drwxr-xr-x 3 youruser youruser 4096 Feb 19 13:45 assets/
7172
drwxr-xr-x 4 youruser youruser 4096 Feb 19 13:45 docker/
7273
-rw-r--r-- 1 youruser youruser 2932 Feb 19 13:45 docker-compose.full.yml
7374
-rw-r--r-- 1 youruser youruser 943 Feb 19 13:45 docker-compose.yml
7475
-rw-r--r-- 1 youruser youruser 1152 Feb 19 13:45 Dockerfile
76+
-rw-r--r-- 1 youruser youruser 46 Feb 19 13:45 .dockerignore
7577
-rw-r--r-- 1 youruser youruser 2665 Feb 19 13:45 docker-services.yml
7678
-rw-r--r-- 1 youruser youruser 2018 Feb 19 13:45 .invenio
7779
-rw-r--r-- 1 youruser youruser 1504 Feb 19 13:45 invenio.cfg
7880
drwxr-xr-x 2 youruser youruser 4096 Feb 19 13:45 logs/
7981
-rw-r--r-- 1 youruser youruser 431 Feb 19 13:45 Pipfile
8082
-rw-r--r-- 1 youruser youruser 756 Feb 19 13:45 README.rst
8183
drwxr-xr-x 3 youruser youruser 4096 Feb 19 13:45 static/
84+
drwxr-xr-x 2 youruser youruser 4096 Feb 19 13:45 templates/
8285
```
8386

8487
**Notes and Known Issues**
@@ -104,8 +107,30 @@ Visit https://localhost
104107
$ firefox https://localhost
105108
```
106109

107-
That is literally it! You now have a running instance of InvenioRDM at
108-
https://localhost . You can get a sense for what InvenioRDM offers and explore.
110+
You now have a running instance of InvenioRDM at [https://localhost](https://localhost),
111+
but it doesn't have any records in it. For demonstration purposes, we will add
112+
randomly generated records:
113+
114+
``` console
115+
$ invenio-cli demo --containers
116+
```
117+
118+
You can now get a full sense for what InvenioRDM offers and explore.
119+
120+
121+
## Running Invenio commands
122+
123+
If you are already familiar with Invenio and the many commands its CLI (`invenio`)
124+
provides, you might be wondering how to execute those. Because the entire application
125+
is containerized, you need to connect to the web-api or web-ui container in order
126+
to use one of those commands. In fact, this is what `invenio-cli` does behind the scene!
127+
128+
``` console
129+
$ docker exec -it <container name or id> /bin/bash
130+
# invenio <your command>
131+
```
132+
133+
You can use `docker ps` to get the name or id of the web-api or web-ui container.
109134

110135

111136
## Conclusions
@@ -124,5 +149,5 @@ $ firefox https://localhost
124149

125150
These instructions don't provide you with a nice development experience though.
126151
You need to run `invenio-cli containerize` for every change you make in your
127-
project. That's slow and cumbersome. Up next, we show how to develop your
128-
local instance and set yourself up to be productive!
152+
project. That's slow and cumbersome. Up next, we show how to [develop your
153+
local instance](../develop/index.md) and set yourself up to be productive!

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repo_name: 'docs-invenio-rdm'
88
repo_url: 'https://github.com/inveniosoftware/docs-invenio-rdm'
99

1010
# Copyright
11-
copyright: 'Copyright &copy; 2020 CERN and Northwestern University.'
11+
copyright: 'Copyright &copy; 2019-2020 CERN and Northwestern University.'
1212

1313
# Configuration
1414
theme:
@@ -29,7 +29,7 @@ nav:
2929
- Install: 'install/index.md'
3030
- Preview: 'preview/index.md'
3131
- Develop:
32-
- Getting Started: 'develop/init.md'
32+
- Getting Started: 'develop/index.md'
3333
- Install Locally: 'develop/install_locally.md'
3434
- Run: 'develop/run.md'
3535
- Configuration: 'develop/config.md'

0 commit comments

Comments
 (0)