Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mhucka committed Jun 4, 2021
2 parents a4dcf1d + e97fd48 commit 23c1aad
Show file tree
Hide file tree
Showing 7 changed files with 674 additions and 653 deletions.
11 changes: 0 additions & 11 deletions INSTALL-Python3.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,3 @@ brew install python3
```

HomeBrew's Python 3 package installs `pip3` by default. Unless you configured your copy of HomeBrew to install it elsewhere, programs should end up in `/usr/local/bin` on your computer. Look for `pip3` there (e.g., by running the command `ls /usr/local/bin/pip*` to see what gets listed).


## Installing Python modules

Often you'll need some additional modules to be installed in your Python development environment, so that you can refer to them in your Python programs using the `import` statement. To make sure you get the desired Python and `pip`, you can use the `-m` interpreter option to install the desired module using a command with the following form:

```shell
python3 -m pip install MODULENAME
```

where `MODULENAME` is the name of the module you need to install.
77 changes: 33 additions & 44 deletions INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,52 @@ Installing DIBS
The following are instructions for installing DIBS on an Ubuntu
20.04.2 LTS host.


Requirements
------------

+ Python3 and pip
+ NodeJS/npm (for installing the universal viewer)
+ Apache2 + WSGI
+ SQLite3


Preparing your machine
----------------------

We can install the general environment via Debian's package
manager.

```shell
sudo apt install apache2 apache2-dev apache2-ssl-dev \
libapache2-mod-wsgi-py3 python3 python3-pip sqlite3 \
npm
```
sudo apt install apache2 apache2-dev apache2-ssl-dev \
libapache2-mod-wsgi-py3 python3 python3-pip sqlite3

Cloning DIBS
------------

In this example we're assuming the host serving the application
Installing DIBS
---------------

1. Take a look at https://github.com/caltechlibrary/dibs
2. mkdir a directory to host our app (e.g. /Sites)
3. Clone dibs into our host directory
4. Clone submodules
a. Clone the repository into an appropriate directory
b. set the group onwership to www-data (the group Apache runs under)
c. Initialize and pull the submodule for the Universal Viewer
5. Install Python3 modules required
6. Install/update the Universal viewer
7. Load test data
4 Set the group onwership to www-data (the group Apache runs under)
5. Install Python3 modules required by DIBS
6. Load test data
8. Add users
9. Set permissions
10. Configure Apache and the dibs application

```shell
sudo mkdir /Sites && sudo chown www-data.www-data /Sites
cd /Sites || exit 1
git clone https://github.com/caltechlbirary/dibs
cd dibs
sudo chgrp -R www-data .
git submodule update --init
git submodule update --recursive
python3 -m pip install -r requirements.txt
cd viewer
npm install
npm audit fix
cd ..
python3 load-mock-data.py # This will configure your SQLite tables
sudo chown www-data.www-data dibs.db
sudo chmod 664 dibs.db
python3 people-manager add uname=admin role=library secret=
```
All together, in a shell:

sudo mkdir /Sites && sudo chown www-data.www-data /Sites
cd /Sites || exit 1
git clone https://github.com/caltechlbirary/dibs
cd dibs
sudo chgrp -R www-data .
python3 -m pip install -r requirements.txt
python3 load-mock-data.py # This will configure your SQLite tables
sudo chown www-data.www-data dibs.db
sudo chmod 664 dibs.db
# NOTE: change SOMEUSER to something real
python3 people-manager add uname=SOMEUSER role=library secret=


Configuration
-------------
Expand All @@ -70,13 +59,13 @@ Configuration
2. Create settings.ini and edit as needed
3. Restart apache and test3. Restart apache and test3. Restart apache and test

```shell
cp settings.ini-example settings.ini
nano settings.ini
cp dibs.conf-example dibs.conf
nano dibs.conf
# NOTE: replace MYSITE with the name of our conf file
# Add an "include" link to include our dibs.conf to setup the WSGI connection.
sudo nano /etd/apache2/sites-enabled/MYSITE.conf
sudo apache2ctl -t && sudo systemctl restart apache2
```
In a shell:

cp settings.ini-example settings.ini
nano settings.ini
cp dibs.conf-example dibs.conf
nano dibs.conf
# NOTE: replace MYSITE with the name of our conf file
# Add an "include" link to include our dibs.conf to setup the WSGI connection.
sudo nano /etd/apache2/sites-enabled/MYSITE.conf
sudo apache2ctl -t && sudo systemctl restart apache2
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
618 changes: 319 additions & 299 deletions dev/graphics/diagrams/architecture-diagram/dibs-architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
618 changes: 319 additions & 299 deletions docs/_static/media/architecture-diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"**": ["globaltoc.html", "searchbox.html"]
}

# Show the last updated date in the footer using the default format.
html_last_updated_fmt = ""


# -- Options for the Material theme ---------------------------------------------
# C.f. https://github.com/bashtage/sphinx-material/blob/master/docs/conf.py
Expand Down

0 comments on commit 23c1aad

Please sign in to comment.